diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index da0edbce57..f6cbfd6a47 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -48,72 +48,72 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr); + const wxString& name = wxWebViewNameStr) wxOVERRIDE; - virtual void LoadURL(const wxString& url); - virtual void LoadHistoryItem(wxSharedPtr item); - virtual wxVector > GetBackwardHistory(); - virtual wxVector > GetForwardHistory(); + virtual void LoadURL(const wxString& url) wxOVERRIDE; + virtual void LoadHistoryItem(wxSharedPtr item) wxOVERRIDE; + virtual wxVector > GetBackwardHistory() wxOVERRIDE; + virtual wxVector > GetForwardHistory() wxOVERRIDE; - virtual bool CanGoForward() const; - virtual bool CanGoBack() const; - virtual void GoBack(); - virtual void GoForward(); - virtual void ClearHistory(); - virtual void EnableHistory(bool enable = true); - virtual void Stop(); - virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); + virtual bool CanGoForward() const wxOVERRIDE; + virtual bool CanGoBack() const wxOVERRIDE; + virtual void GoBack() wxOVERRIDE; + virtual void GoForward() wxOVERRIDE; + virtual void ClearHistory() wxOVERRIDE; + virtual void EnableHistory(bool enable = true) wxOVERRIDE; + virtual void Stop() wxOVERRIDE; + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT) wxOVERRIDE; - virtual wxString GetPageSource() const; - virtual wxString GetPageText() const; + virtual wxString GetPageSource() const wxOVERRIDE; + virtual wxString GetPageText() const wxOVERRIDE; - virtual bool IsBusy() const; - virtual wxString GetCurrentURL() const; - virtual wxString GetCurrentTitle() const; + virtual bool IsBusy() const wxOVERRIDE; + virtual wxString GetCurrentURL() const wxOVERRIDE; + virtual wxString GetCurrentTitle() const wxOVERRIDE; - virtual void SetZoomType(wxWebViewZoomType type); - virtual wxWebViewZoomType GetZoomType() const; - virtual bool CanSetZoomType(wxWebViewZoomType type) const; + virtual void SetZoomType(wxWebViewZoomType type) wxOVERRIDE; + virtual wxWebViewZoomType GetZoomType() const wxOVERRIDE; + virtual bool CanSetZoomType(wxWebViewZoomType type) const wxOVERRIDE; - virtual void Print(); + virtual void Print() wxOVERRIDE; - virtual wxWebViewZoom GetZoom() const; - virtual void SetZoom(wxWebViewZoom zoom); + virtual wxWebViewZoom GetZoom() const wxOVERRIDE; + virtual void SetZoom(wxWebViewZoom zoom) wxOVERRIDE; - virtual void* GetNativeBackend() const; + virtual void* GetNativeBackend() const wxOVERRIDE; - virtual long Find(const wxString& WXUNUSED(text), int WXUNUSED(flags) = wxWEBVIEW_FIND_DEFAULT) { return wxNOT_FOUND; } + virtual long Find(const wxString& WXUNUSED(text), int WXUNUSED(flags) = wxWEBVIEW_FIND_DEFAULT) wxOVERRIDE { return wxNOT_FOUND; } //Clipboard functions - virtual bool CanCut() const { return true; } - virtual bool CanCopy() const { return true; } - virtual bool CanPaste() const { return true; } - virtual void Cut(); - virtual void Copy(); - virtual void Paste(); + virtual bool CanCut() const wxOVERRIDE { return true; } + virtual bool CanCopy() const wxOVERRIDE { return true; } + virtual bool CanPaste() const wxOVERRIDE { return true; } + virtual void Cut() wxOVERRIDE; + virtual void Copy() wxOVERRIDE; + virtual void Paste() wxOVERRIDE; //Undo / redo functionality - virtual bool CanUndo() const { return true; } - virtual bool CanRedo() const { return true; } - virtual void Undo(); - virtual void Redo(); + virtual bool CanUndo() const wxOVERRIDE { return true; } + virtual bool CanRedo() const wxOVERRIDE { return true; } + virtual void Undo() wxOVERRIDE; + virtual void Redo() wxOVERRIDE; //Editing functions - virtual void SetEditable(bool enable = true); - virtual bool IsEditable() const { return false; } + virtual void SetEditable(bool enable = true) wxOVERRIDE; + virtual bool IsEditable() const wxOVERRIDE { return false; } //Selection - virtual void SelectAll(); - virtual bool HasSelection() const { return false; } - virtual void DeleteSelection(); - virtual wxString GetSelectedText() const { return ""; } - virtual wxString GetSelectedSource() const { return ""; } - virtual void ClearSelection(); + virtual void SelectAll() wxOVERRIDE; + virtual bool HasSelection() const wxOVERRIDE { return false; } + virtual void DeleteSelection() wxOVERRIDE; + virtual wxString GetSelectedText() const wxOVERRIDE { return ""; } + virtual wxString GetSelectedSource() const wxOVERRIDE { return ""; } + virtual void ClearSelection() wxOVERRIDE; virtual bool RunScript(const wxString& javascript, wxString* output = NULL) wxOVERRIDE; //Virtual Filesystem Support - virtual void RegisterHandler(wxSharedPtr handler); + virtual void RegisterHandler(wxSharedPtr handler) wxOVERRIDE; #ifdef __WXMSW__ static bool StartUp(int &code, const wxString &path = ""); @@ -126,7 +126,7 @@ public: static void DoCEFWork(); protected: - virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + virtual void DoSetPage(const wxString& html, const wxString& baseUrl) wxOVERRIDE; private: //History related variables, we currently use our own implementation diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index b67da71bab..caf92f1cb3 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -53,63 +53,66 @@ public: ClientHandler() : m_loadErrorCode(-1) {} virtual ~ClientHandler() {} - virtual CefRefPtr GetContextMenuHandler() { return this; } - virtual CefRefPtr GetLifeSpanHandler() { return this; } - virtual CefRefPtr GetLoadHandler() { return this; } - virtual CefRefPtr GetDisplayHandler() { return this; } + virtual CefRefPtr GetContextMenuHandler() wxOVERRIDE { return this; } + virtual CefRefPtr GetLifeSpanHandler() wxOVERRIDE { return this; } + virtual CefRefPtr GetLoadHandler() wxOVERRIDE { return this; } + virtual CefRefPtr GetDisplayHandler() wxOVERRIDE { return this; } // CefDisplayHandler methods virtual void OnLoadingStateChange(CefRefPtr browser, bool isLoading, bool canGoBack, - bool canGoForward); + bool canGoForward) wxOVERRIDE; virtual void OnAddressChange(CefRefPtr browser, CefRefPtr frame, - const CefString& url); + const CefString& url) wxOVERRIDE; virtual void OnTitleChange(CefRefPtr browser, - const CefString& title); + const CefString& title) wxOVERRIDE; virtual bool OnConsoleMessage(CefRefPtr browser, const CefString& message, const CefString& source, - int line); + int line) wxOVERRIDE; // CefContextMenuHandler methods virtual void OnBeforeContextMenu(CefRefPtr browser, CefRefPtr frame, CefRefPtr params, - CefRefPtr model); + CefRefPtr model) wxOVERRIDE; virtual bool OnContextMenuCommand(CefRefPtr browser, CefRefPtr frame, CefRefPtr params, int command_id, - CefContextMenuHandler::EventFlags event_flags); + CefContextMenuHandler::EventFlags event_flags) wxOVERRIDE; virtual void OnContextMenuDismissed(CefRefPtr browser, - CefRefPtr frame); + CefRefPtr frame) wxOVERRIDE; // CefLifeSpanHandler methods virtual bool OnBeforePopup(CefRefPtr browser, CefRefPtr frame, const CefString& target_url, const CefString& target_frame_name, + WindowOpenDisposition target_disposition, + bool user_gesture, const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo, CefRefPtr& client, CefBrowserSettings& settings, - bool* no_javascript_access); - virtual void OnAfterCreated(CefRefPtr browser); - virtual bool DoClose(CefRefPtr browser); - virtual void OnBeforeClose(CefRefPtr browser); + bool* no_javascript_access) wxOVERRIDE; + virtual void OnAfterCreated(CefRefPtr browser) wxOVERRIDE; + virtual bool DoClose(CefRefPtr browser) wxOVERRIDE; + virtual void OnBeforeClose(CefRefPtr browser) wxOVERRIDE; // CefLoadHandler methods virtual void OnLoadStart(CefRefPtr browser, - CefRefPtr frame); + CefRefPtr frame, + TransitionType transition_type) wxOVERRIDE; virtual void OnLoadEnd(CefRefPtr browser, CefRefPtr frame, - int httpStatusCode); + int httpStatusCode) wxOVERRIDE; virtual void OnLoadError(CefRefPtr browser, CefRefPtr frame, ErrorCode errorCode, const CefString& errorText, - const CefString& failedUrl); + const CefString& failedUrl) wxOVERRIDE; CefRefPtr GetBrowser() { return m_browser; } @@ -132,15 +135,15 @@ public: // CefResourceHandler methods virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback); + CefRefPtr callback) wxOVERRIDE; virtual void GetResponseHeaders(CefRefPtr response, int64& response_length, - CefString& redirectUrl); + CefString& redirectUrl) wxOVERRIDE; virtual bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, - CefRefPtr callback); - virtual void Cancel() {} + CefRefPtr callback) wxOVERRIDE; + virtual void Cancel() wxOVERRIDE {} private: wxSharedPtr m_handler; @@ -161,7 +164,7 @@ public: virtual CefRefPtr Create(CefRefPtr WXUNUSED(browser), CefRefPtr WXUNUSED(frame), const CefString& WXUNUSED(scheme_name), - CefRefPtr WXUNUSED(request)) + CefRefPtr WXUNUSED(request)) wxOVERRIDE { return new SchemeHandler(m_handler); } @@ -181,7 +184,7 @@ public: }; wxStringVisitor(wxWebViewChromium* webview, StringType type) : m_type(type), m_webview(webview) {} - void Visit(const CefString& string) + void Visit(const CefString& string) wxOVERRIDE { switch(m_type) { @@ -673,6 +676,8 @@ bool ClientHandler::OnBeforePopup(CefRefPtr WXUNUSED(browser), CefRefPtr WXUNUSED(frame), const CefString& target_url, const CefString& target_frame_name, + WindowOpenDisposition WXUNUSED(target_disposition), + bool WXUNUSED(user_gesture), const CefPopupFeatures& WXUNUSED(popupFeatures), CefWindowInfo& WXUNUSED(windowInfo), CefRefPtr& WXUNUSED(client), @@ -713,7 +718,8 @@ void ClientHandler::OnBeforeClose(CefRefPtr browser) // CefLoadHandler methods void ClientHandler::OnLoadStart(CefRefPtr WXUNUSED(browser), - CefRefPtr frame) + CefRefPtr frame, + TransitionType WXUNUSED(transition_type)) { wxString url = frame->GetURL().ToString(); wxString target = frame->GetName().ToString();