diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 4f1c251aae..47fd857c2c 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -149,10 +149,10 @@ public: SchemeHandlerFactory(wxSharedPtr handler): m_handler(handler) {} // Return a new scheme handler instance to handle the request. - virtual CefRefPtr Create(CefRefPtr browser, - CefRefPtr frame, - const CefString& scheme_name, - CefRefPtr request) + virtual CefRefPtr Create(CefRefPtr WXUNUSED(browser), + CefRefPtr WXUNUSED(frame), + const CefString& WXUNUSED(scheme_name), + CefRefPtr WXUNUSED(request)) { return new SchemeHandler( m_handler ); } @@ -226,7 +226,7 @@ public: virtual void* GetNativeBackend() const; - virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) { return wxNOT_FOUND; } + virtual long Find(const wxString& WXUNUSED(text), int WXUNUSED(flags) = wxWEBVIEW_FIND_DEFAULT) { return wxNOT_FOUND; } //Clipboard functions virtual bool CanCut() const { return true; } diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index cc20dd29e0..d69a129996 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -1088,7 +1088,7 @@ SourceViewDialog::SourceViewDialog(wxWindow* parent, wxString source) : SetSizer(sizer); } -void WebFrame::OnClose(wxCloseEvent &evt) +void WebFrame::OnClose(wxCloseEvent & WXUNUSED(evt)) { delete m_timer; // On Windows/Linux, calling `Shutdown` here will cause a crash when closing WebFrame. diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index e5c7973c9d..059f4bb695 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -498,12 +498,15 @@ void wxWebViewChromium::Shutdown() } // CefDisplayHandler methods -void ClientHandler::OnLoadingStateChange(CefRefPtr browser, bool isLoading, - bool canGoBack, bool canGoForward) +void ClientHandler::OnLoadingStateChange(CefRefPtr WXUNUSED(browser), + bool WXUNUSED(isLoading), + bool WXUNUSED(canGoBack), + bool WXUNUSED(canGoForward)) {} -void ClientHandler::OnAddressChange(CefRefPtr browser, CefRefPtr frame, - const CefString& url) +void ClientHandler::OnAddressChange(CefRefPtr WXUNUSED(browser), + CefRefPtr WXUNUSED(frame), + const CefString& WXUNUSED(url)) {} void ClientHandler::OnTitleChange(CefRefPtr browser, const CefString& title) @@ -518,45 +521,46 @@ void ClientHandler::OnTitleChange(CefRefPtr browser, const CefString m_webview->HandleWindowEvent(event); } -bool ClientHandler::OnConsoleMessage(CefRefPtr browser, const CefString& message, - const CefString& source, int line) +bool ClientHandler::OnConsoleMessage(CefRefPtr WXUNUSED(browser), + const CefString& WXUNUSED(message), + const CefString& WXUNUSED(source), int WXUNUSED(line)) { return false; } // CefContextMenuHandler methods -void ClientHandler::OnBeforeContextMenu(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, +void ClientHandler::OnBeforeContextMenu(CefRefPtr WXUNUSED(browser), + CefRefPtr WXUNUSED(frame), + CefRefPtr WXUNUSED(params), CefRefPtr model) { if(!m_webview->IsContextMenuEnabled()) model->Clear(); } -bool ClientHandler::OnContextMenuCommand(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, - int command_id, - CefContextMenuHandler::EventFlags event_flags) +bool ClientHandler::OnContextMenuCommand(CefRefPtr WXUNUSED(browser), + CefRefPtr WXUNUSED(frame), + CefRefPtr WXUNUSED(params), + int WXUNUSED(command_id), + CefContextMenuHandler::EventFlags WXUNUSED(event_flags)) { return false; } -void ClientHandler::OnContextMenuDismissed(CefRefPtr browser, - CefRefPtr frame) +void ClientHandler::OnContextMenuDismissed(CefRefPtr WXUNUSED(browser), + CefRefPtr WXUNUSED(frame)) {} // CefLifeSpanHandler methods -bool ClientHandler::OnBeforePopup(CefRefPtr browser, - CefRefPtr frame, +bool ClientHandler::OnBeforePopup(CefRefPtr WXUNUSED(browser), + CefRefPtr WXUNUSED(frame), const CefString& target_url, const CefString& target_frame_name, - const CefPopupFeatures& popupFeatures, - CefWindowInfo& windowInfo, - CefRefPtr& client, - CefBrowserSettings& settings, - bool* no_javascript_access) + const CefPopupFeatures& WXUNUSED(popupFeatures), + CefWindowInfo& WXUNUSED(windowInfo), + CefRefPtr& WXUNUSED(client), + CefBrowserSettings& WXUNUSED(settings), + bool* WXUNUSED(no_javascript_access)) { wxWebViewEvent *event = new wxWebViewEvent(wxEVT_WEBVIEW_NEWWINDOW, m_webview->GetId(), @@ -577,7 +581,7 @@ void ClientHandler::OnAfterCreated(CefRefPtr browser) m_browserId = browser->GetIdentifier(); } } -bool ClientHandler::DoClose(CefRefPtr browser) +bool ClientHandler::DoClose(CefRefPtr WXUNUSED(browser)) { return false; } @@ -591,7 +595,7 @@ void ClientHandler::OnBeforeClose(CefRefPtr browser) } // CefLoadHandler methods -void ClientHandler::OnLoadStart(CefRefPtr browser, +void ClientHandler::OnLoadStart(CefRefPtr WXUNUSED(browser), CefRefPtr frame) { wxString url = frame->GetURL().ToString(); @@ -608,9 +612,9 @@ void ClientHandler::OnLoadStart(CefRefPtr browser, } } -void ClientHandler::OnLoadEnd(CefRefPtr browser, +void ClientHandler::OnLoadEnd(CefRefPtr WXUNUSED(browser), CefRefPtr frame, - int httpStatusCode) + int WXUNUSED(httpStatusCode)) { wxString url = frame->GetURL().ToString(); wxString target = frame->GetName().ToString(); @@ -665,11 +669,11 @@ void ClientHandler::OnLoadEnd(CefRefPtr browser, } } -void ClientHandler::OnLoadError(CefRefPtr browser, - CefRefPtr frame, +void ClientHandler::OnLoadError(CefRefPtr WXUNUSED(browser), + CefRefPtr WXUNUSED(frame), ErrorCode errorCode, - const CefString& errorText, - const CefString& failedUrl) + const CefString& WXUNUSED(errorText), + const CefString& WXUNUSED(failedUrl)) { //We define a macro for convenience #define ERROR_TYPE_CASE(error, wxtype) case(error): \ @@ -765,7 +769,7 @@ bool SchemeHandler::ProcessRequest(CefRefPtr request, void SchemeHandler::GetResponseHeaders(CefRefPtr response, int64& response_length, - CefString& redirectUrl) + CefString& WXUNUSED(redirectUrl)) { if ( !m_mime_type.empty() ) response->SetMimeType( m_mime_type ); @@ -778,7 +782,7 @@ void SchemeHandler::GetResponseHeaders(CefRefPtr response, bool SchemeHandler::ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, - CefRefPtr callback) + CefRefPtr WXUNUSED(callback)) { bool has_data = false; bytes_read = 0;