diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 8520e2b81..61e7bb6df 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://code.google.com/p/chromiumembedded/wiki/BranchesAndBuilding { - 'chromium_checkout': '267aeeb8d85c8503a7fd12bd14654b8ea78d3974', + 'chromium_checkout': '40af916dfb14ca12890e3a7cf8b50d8e62c69695', } diff --git a/cef.gyp b/cef.gyp index 7b141ea0b..5c60e0694 100644 --- a/cef.gyp +++ b/cef.gyp @@ -1101,10 +1101,10 @@ '<(DEPTH)/chrome/browser/prefs/proxy_prefs.h', '<(DEPTH)/chrome/common/pref_names.cc', '<(DEPTH)/chrome/common/pref_names.h', - '<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_switches.cc', - '<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_switches.h', - '<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_pref_names.cc', - '<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_pref_names.h', + '<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc', + '<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h', + '<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.cc', + '<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h', # Include sources for the loadtimes V8 extension. '<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.h', '<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.cc', diff --git a/cef.gypi b/cef.gypi index 20bce8d8c..1b83a010b 100644 --- a/cef.gypi +++ b/cef.gypi @@ -6,8 +6,9 @@ 'variables': { # Don't use the chrome style plugin with CEF. 'clang_use_chrome_plugins': 0, - # Set ENABLE_PRINTING=1. - 'enable_printing': 2, + # Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1. + 'enable_basic_printing': 1, + 'enable_print_preview': 0, 'conditions': [ # Directory for CEF source files. [ 'OS=="win"', { diff --git a/libcef/browser/browser_context_impl.cc b/libcef/browser/browser_context_impl.cc index e65f51460..62df34c82 100644 --- a/libcef/browser/browser_context_impl.cc +++ b/libcef/browser/browser_context_impl.cc @@ -26,14 +26,13 @@ using content::BrowserThread; class CefBrowserContextImpl::CefResourceContext : public content::ResourceContext { public: CefResourceContext() : getter_(NULL) {} - virtual ~CefResourceContext() {} // ResourceContext implementation: - virtual net::HostResolver* GetHostResolver() OVERRIDE { + net::HostResolver* GetHostResolver() override { CHECK(getter_); return getter_->host_resolver(); } - virtual net::URLRequestContext* GetRequestContext() OVERRIDE { + net::URLRequestContext* GetRequestContext() override { CHECK(getter_); return getter_->GetURLRequestContext(); } diff --git a/libcef/browser/browser_context_impl.h b/libcef/browser/browser_context_impl.h index 81cfe1ea1..8a992aaa7 100644 --- a/libcef/browser/browser_context_impl.h +++ b/libcef/browser/browser_context_impl.h @@ -23,39 +23,39 @@ class CefURLRequestContextGetter; class CefBrowserContextImpl : public CefBrowserContext { public: CefBrowserContextImpl(); - virtual ~CefBrowserContextImpl(); + ~CefBrowserContextImpl() override; // BrowserContext methods. - virtual base::FilePath GetPath() const OVERRIDE; - virtual bool IsOffTheRecord() const OVERRIDE; - virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE; - virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; - virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( - int renderer_child_id) OVERRIDE; - virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; - virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( - int renderer_child_id) OVERRIDE; - virtual net::URLRequestContextGetter* + base::FilePath GetPath() const override; + bool IsOffTheRecord() const override; + content::DownloadManagerDelegate* GetDownloadManagerDelegate() override; + net::URLRequestContextGetter* GetRequestContext() override; + net::URLRequestContextGetter* GetRequestContextForRenderProcess( + int renderer_child_id) override; + net::URLRequestContextGetter* GetMediaRequestContext() override; + net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( + int renderer_child_id) override; + net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( const base::FilePath& partition_path, - bool in_memory) OVERRIDE; - virtual content::ResourceContext* GetResourceContext() OVERRIDE; - virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE; - virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; - virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE; - virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE; + bool in_memory) override; + content::ResourceContext* GetResourceContext() override; + content::BrowserPluginGuestManager* GetGuestManager() override; + storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; + content::PushMessagingService* GetPushMessagingService() override; + content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; // CefBrowserContext methods. - virtual net::URLRequestContextGetter* CreateRequestContext( + net::URLRequestContextGetter* CreateRequestContext( content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) - OVERRIDE; - virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( + override; + net::URLRequestContextGetter* CreateRequestContextForStoragePartition( const base::FilePath& partition_path, bool in_memory, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) - OVERRIDE; + override; private: class CefResourceContext; diff --git a/libcef/browser/browser_context_proxy.cc b/libcef/browser/browser_context_proxy.cc index aa4a837e3..77b1528c4 100644 --- a/libcef/browser/browser_context_proxy.cc +++ b/libcef/browser/browser_context_proxy.cc @@ -24,14 +24,13 @@ class CefBrowserContextProxy::CefResourceContext : public content::ResourceContext { public: CefResourceContext() : getter_(NULL) {} - virtual ~CefResourceContext() {} // ResourceContext implementation: - virtual net::HostResolver* GetHostResolver() OVERRIDE { + net::HostResolver* GetHostResolver() override { CHECK(getter_); return getter_->GetHostResolver(); } - virtual net::URLRequestContext* GetRequestContext() OVERRIDE { + net::URLRequestContext* GetRequestContext() override { CHECK(getter_); return getter_->GetURLRequestContext(); } diff --git a/libcef/browser/browser_context_proxy.h b/libcef/browser/browser_context_proxy.h index 0cff8a78a..c62abc2c9 100644 --- a/libcef/browser/browser_context_proxy.h +++ b/libcef/browser/browser_context_proxy.h @@ -26,7 +26,7 @@ class CefBrowserContextProxy : public CefBrowserContext { public: CefBrowserContextProxy(CefRefPtr handler, CefBrowserContext* parent); - virtual ~CefBrowserContextProxy(); + ~CefBrowserContextProxy() override; // Reference counting and object life span is managed by // CefContentBrowserClient. @@ -34,36 +34,36 @@ class CefBrowserContextProxy : public CefBrowserContext { bool Release() { return (--refct_ == 0); } // BrowserContext methods. - virtual base::FilePath GetPath() const OVERRIDE; - virtual bool IsOffTheRecord() const OVERRIDE; - virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE; - virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; - virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( - int renderer_child_id) OVERRIDE; - virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; - virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( - int renderer_child_id) OVERRIDE; - virtual net::URLRequestContextGetter* + base::FilePath GetPath() const override; + bool IsOffTheRecord() const override; + content::DownloadManagerDelegate* GetDownloadManagerDelegate() override; + net::URLRequestContextGetter* GetRequestContext() override; + net::URLRequestContextGetter* GetRequestContextForRenderProcess( + int renderer_child_id) override; + net::URLRequestContextGetter* GetMediaRequestContext() override; + net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( + int renderer_child_id) override; + net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( const base::FilePath& partition_path, - bool in_memory) OVERRIDE; - virtual content::ResourceContext* GetResourceContext() OVERRIDE; - virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE; - virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; - virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE; - virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE; + bool in_memory) override; + content::ResourceContext* GetResourceContext() override; + content::BrowserPluginGuestManager* GetGuestManager() override; + storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; + content::PushMessagingService* GetPushMessagingService() override; + content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; // CefBrowserContext methods. - virtual net::URLRequestContextGetter* CreateRequestContext( + net::URLRequestContextGetter* CreateRequestContext( content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) - OVERRIDE; - virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( + override; + net::URLRequestContextGetter* CreateRequestContextForStoragePartition( const base::FilePath& partition_path, bool in_memory, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) - OVERRIDE; + override; CefRefPtr handler() const { return handler_; } diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 34a6fca1d..eca55e5a0 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -187,7 +187,7 @@ class CefFileDialogCallbackImpl : public CefFileDialogCallback { const CefBrowserHostImpl::RunFileChooserCallback& callback) : callback_(callback) { } - ~CefFileDialogCallbackImpl() { + ~CefFileDialogCallbackImpl() override { if (!callback_.is_null()) { // The callback is still pending. Cancel it now. if (CEF_CURRENTLY_ON_UIT()) { @@ -199,7 +199,7 @@ class CefFileDialogCallbackImpl : public CefFileDialogCallback { } } - virtual void Continue(const std::vector& file_paths) OVERRIDE { + void Continue(const std::vector& file_paths) override { if (CEF_CURRENTLY_ON_UIT()) { if (!callback_.is_null()) { std::vector vec; @@ -217,7 +217,7 @@ class CefFileDialogCallbackImpl : public CefFileDialogCallback { } } - virtual void Cancel() OVERRIDE { + void Cancel() override { if (CEF_CURRENTLY_ON_UIT()) { if (!callback_.is_null()) { CancelNow(callback_); @@ -269,6 +269,10 @@ class CefRunFileDialogCallbackWrapper } private: + friend class base::RefCountedThreadSafe; + + ~CefRunFileDialogCallbackWrapper() {} + CefRefPtr host_; CefRefPtr callback_; }; @@ -591,7 +595,7 @@ class CefBrowserHostImpl::DevToolsWebContentsObserver : } // WebContentsObserver methods: - virtual void WebContentsDestroyed() OVERRIDE { + void WebContentsDestroyed() override { browser_->OnDevToolsWebContentsDestroyed(); } @@ -602,8 +606,6 @@ class CefBrowserHostImpl::DevToolsWebContentsObserver : }; CefBrowserHostImpl::~CefBrowserHostImpl() { - // All weak pointer references should be removed in DestroyBrowser(). - DCHECK(!weak_ptr_factory_.HasWeakPtrs()); } CefRefPtr CefBrowserHostImpl::GetBrowser() { @@ -1415,8 +1417,6 @@ void CefBrowserHostImpl::DestroyBrowser() { CefContentBrowserClient::Get()->RemoveBrowserInfo(browser_info_); browser_info_->set_browser(NULL); - - weak_ptr_factory_.InvalidateWeakPtrs(); } gfx::NativeView CefBrowserHostImpl::GetContentView() const { @@ -2244,11 +2244,6 @@ bool CefBrowserHostImpl::SetPendingPopupInfo( return true; } -base::WeakPtr CefBrowserHostImpl::GetWeakPtr() { - CEF_REQUIRE_UIT(); - return weak_ptr_factory_.GetWeakPtr(); -} - void CefBrowserHostImpl::UpdatePreferredSize(content::WebContents* source, const gfx::Size& pref_size) { PlatformSizeTo(pref_size.width(), pref_size.height()); @@ -2671,8 +2666,7 @@ CefBrowserHostImpl::CefBrowserHostImpl( focus_on_editable_field_(false), mouse_cursor_change_disabled_(false), devtools_frontend_(NULL), - file_chooser_pending_(false), - weak_ptr_factory_(this) { + file_chooser_pending_(false) { #if defined(USE_AURA) window_widget_ = NULL; #endif @@ -2960,10 +2954,11 @@ void CefBrowserHostImpl::OnRunFileChooserDelegateCallback( return; // Convert FilePath list to SelectedFileInfo list. - std::vector selected_files; + std::vector selected_files; for (size_t i = 0; i < file_paths.size(); ++i) { - selected_files.push_back( - ui::SelectedFileInfo(file_paths[i], base::FilePath())); + content::FileChooserFileInfo info; + info.file_path = file_paths[i]; + selected_files.push_back(info); } // Notify our RenderViewHost in all cases. diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index 7ec5a96ee..a077b8c0d 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -21,7 +21,6 @@ #include "libcef/common/response_manager.h" #include "base/memory/scoped_ptr.h" -#include "base/memory/weak_ptr.h" #include "base/strings/string16.h" #include "base/synchronization/lock.h" #include "content/public/browser/notification_observer.h" @@ -98,7 +97,7 @@ class CefBrowserHostImpl : public CefBrowserHost, virtual void OnResponse(const std::string& response) =0; }; - virtual ~CefBrowserHostImpl(); + ~CefBrowserHostImpl() override; // Create a new CefBrowserHostImpl instance. static CefRefPtr Create( @@ -130,91 +129,89 @@ class CefBrowserHostImpl : public CefBrowserHost, int render_process_id, int render_routing_id); // CefBrowserHost methods. - virtual CefRefPtr GetBrowser() OVERRIDE; - virtual void CloseBrowser(bool force_close) OVERRIDE; - virtual void SetFocus(bool focus) OVERRIDE; - virtual void SetWindowVisibility(bool visible) OVERRIDE; - virtual CefWindowHandle GetWindowHandle() OVERRIDE; - virtual CefWindowHandle GetOpenerWindowHandle() OVERRIDE; - virtual CefRefPtr GetClient() OVERRIDE; - virtual CefRefPtr GetRequestContext() OVERRIDE; - virtual double GetZoomLevel() OVERRIDE; - virtual void SetZoomLevel(double zoomLevel) OVERRIDE; - virtual void RunFileDialog( + CefRefPtr GetBrowser() override; + void CloseBrowser(bool force_close) override; + void SetFocus(bool focus) override; + void SetWindowVisibility(bool visible) override; + CefWindowHandle GetWindowHandle() override; + CefWindowHandle GetOpenerWindowHandle() override; + CefRefPtr GetClient() override; + CefRefPtr GetRequestContext() override; + double GetZoomLevel() override; + void SetZoomLevel(double zoomLevel) override; + void RunFileDialog( FileDialogMode mode, const CefString& title, const CefString& default_file_name, const std::vector& accept_types, - CefRefPtr callback) OVERRIDE; - virtual void StartDownload(const CefString& url) OVERRIDE; - virtual void Print() OVERRIDE; - virtual void Find(int identifier, const CefString& searchText, - bool forward, bool matchCase, bool findNext) OVERRIDE; - virtual void StopFinding(bool clearSelection) OVERRIDE; - virtual void ShowDevTools(const CefWindowInfo& windowInfo, - CefRefPtr client, - const CefBrowserSettings& settings, - const CefPoint& inspect_element_at) OVERRIDE; - virtual void CloseDevTools() OVERRIDE; - virtual void SetMouseCursorChangeDisabled(bool disabled) OVERRIDE; - virtual bool IsMouseCursorChangeDisabled() OVERRIDE; - virtual bool IsWindowRenderingDisabled() OVERRIDE; - virtual void ReplaceMisspelling(const CefString& word) OVERRIDE; - virtual void AddWordToDictionary(const CefString& word) OVERRIDE; - virtual void WasResized() OVERRIDE; - virtual void WasHidden(bool hidden) OVERRIDE; - virtual void NotifyScreenInfoChanged() OVERRIDE; - virtual void Invalidate(PaintElementType type) OVERRIDE; - virtual void SendKeyEvent(const CefKeyEvent& event) OVERRIDE; - virtual void SendMouseClickEvent(const CefMouseEvent& event, - MouseButtonType type, - bool mouseUp, int clickCount) OVERRIDE; - virtual void SendMouseMoveEvent(const CefMouseEvent& event, - bool mouseLeave) OVERRIDE; - virtual void SendMouseWheelEvent(const CefMouseEvent& event, - int deltaX, int deltaY) OVERRIDE; - virtual void SendFocusEvent(bool setFocus) OVERRIDE; - virtual void SendCaptureLostEvent() OVERRIDE; - virtual void NotifyMoveOrResizeStarted() OVERRIDE; - virtual CefTextInputContext GetNSTextInputContext() OVERRIDE; - virtual void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent) - OVERRIDE; - virtual void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent) - OVERRIDE; - virtual void DragTargetDragEnter(CefRefPtr drag_data, - const CefMouseEvent& event, - DragOperationsMask allowed_ops); - virtual void DragTargetDragOver(const CefMouseEvent& event, - DragOperationsMask allowed_ops); - virtual void DragTargetDragLeave(); - virtual void DragTargetDrop(const CefMouseEvent& event); - virtual void DragSourceSystemDragEnded(); - virtual void DragSourceEndedAt(int x, int y, DragOperationsMask op); + CefRefPtr callback) override; + void StartDownload(const CefString& url) override; + void Print() override; + void Find(int identifier, const CefString& searchText, + bool forward, bool matchCase, bool findNext) override; + void StopFinding(bool clearSelection) override; + void ShowDevTools(const CefWindowInfo& windowInfo, + CefRefPtr client, + const CefBrowserSettings& settings, + const CefPoint& inspect_element_at) override; + void CloseDevTools() override; + void SetMouseCursorChangeDisabled(bool disabled) override; + bool IsMouseCursorChangeDisabled() override; + bool IsWindowRenderingDisabled() override; + void ReplaceMisspelling(const CefString& word) override; + void AddWordToDictionary(const CefString& word) override; + void WasResized() override; + void WasHidden(bool hidden) override; + void NotifyScreenInfoChanged() override; + void Invalidate(PaintElementType type) override; + void SendKeyEvent(const CefKeyEvent& event) override; + void SendMouseClickEvent(const CefMouseEvent& event, + MouseButtonType type, + bool mouseUp, int clickCount) override; + void SendMouseMoveEvent(const CefMouseEvent& event, + bool mouseLeave) override; + void SendMouseWheelEvent(const CefMouseEvent& event, + int deltaX, int deltaY) override; + void SendFocusEvent(bool setFocus) override; + void SendCaptureLostEvent() override; + void NotifyMoveOrResizeStarted() override; + CefTextInputContext GetNSTextInputContext() override; + void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent) override; + void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent) override; + void DragTargetDragEnter(CefRefPtr drag_data, + const CefMouseEvent& event, + DragOperationsMask allowed_ops) override; + void DragTargetDragOver(const CefMouseEvent& event, + DragOperationsMask allowed_ops) override; + void DragTargetDragLeave() override; + void DragTargetDrop(const CefMouseEvent& event) override; + void DragSourceSystemDragEnded() override; + void DragSourceEndedAt(int x, int y, DragOperationsMask op) override; // CefBrowser methods. - virtual CefRefPtr GetHost() OVERRIDE; - virtual bool CanGoBack() OVERRIDE; - virtual void GoBack() OVERRIDE; - virtual bool CanGoForward() OVERRIDE; - virtual void GoForward() OVERRIDE; - virtual bool IsLoading() OVERRIDE; - virtual void Reload() OVERRIDE; - virtual void ReloadIgnoreCache() OVERRIDE; - virtual void StopLoad() OVERRIDE; - virtual int GetIdentifier() OVERRIDE; - virtual bool IsSame(CefRefPtr that) OVERRIDE; - virtual bool IsPopup() OVERRIDE; - virtual bool HasDocument() OVERRIDE; - virtual CefRefPtr GetMainFrame() OVERRIDE; - virtual CefRefPtr GetFocusedFrame() OVERRIDE; - virtual CefRefPtr GetFrame(int64 identifier) OVERRIDE; - virtual CefRefPtr GetFrame(const CefString& name) OVERRIDE; - virtual size_t GetFrameCount() OVERRIDE; - virtual void GetFrameIdentifiers(std::vector& identifiers) OVERRIDE; - virtual void GetFrameNames(std::vector& names) OVERRIDE; - virtual bool SendProcessMessage( + CefRefPtr GetHost() override; + bool CanGoBack() override; + void GoBack() override; + bool CanGoForward() override; + void GoForward() override; + bool IsLoading() override; + void Reload() override; + void ReloadIgnoreCache() override; + void StopLoad() override; + int GetIdentifier() override; + bool IsSame(CefRefPtr that) override; + bool IsPopup() override; + bool HasDocument() override; + CefRefPtr GetMainFrame() override; + CefRefPtr GetFocusedFrame() override; + CefRefPtr GetFrame(int64 identifier) override; + CefRefPtr GetFrame(const CefString& name) override; + size_t GetFrameCount() override; + void GetFrameIdentifiers(std::vector& identifiers) override; + void GetFrameNames(std::vector& names) override; + bool SendProcessMessage( CefProcessId target_process, - CefRefPtr message) OVERRIDE; + CefRefPtr message) override; // Returns true if windowless rendering is enabled. bool IsWindowless() const; @@ -333,45 +330,40 @@ class CefBrowserHostImpl : public CefBrowserHost, }; DestructionState destruction_state() const { return destruction_state_; } - // Used to retrieve a WeakPtr that will be invalidated when the browser is - // destroyed. This method can only be called on, and the resulting WeakPtr - // can only be dereferenced on, the UI thread. - base::WeakPtr GetWeakPtr(); - // content::WebContentsDelegate methods. - virtual content::WebContents* OpenURLFromTab( + content::WebContents* OpenURLFromTab( content::WebContents* source, - const content::OpenURLParams& params) OVERRIDE; - virtual void LoadingStateChanged(content::WebContents* source, - bool to_different_document) OVERRIDE; - virtual void CloseContents(content::WebContents* source) OVERRIDE; - virtual void UpdateTargetURL(content::WebContents* source, - const GURL& url) OVERRIDE; - virtual bool AddMessageToConsole(content::WebContents* source, - int32 level, - const base::string16& message, - int32 line_no, - const base::string16& source_id) OVERRIDE; - virtual void BeforeUnloadFired(content::WebContents* source, - bool proceed, - bool* proceed_to_fire_unload) OVERRIDE; - virtual bool TakeFocus(content::WebContents* source, - bool reverse) OVERRIDE; - virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; - virtual bool HandleContextMenu( - const content::ContextMenuParams& params) OVERRIDE; - virtual bool PreHandleKeyboardEvent( + const content::OpenURLParams& params) override; + void LoadingStateChanged(content::WebContents* source, + bool to_different_document) override; + void CloseContents(content::WebContents* source) override; + void UpdateTargetURL(content::WebContents* source, + const GURL& url) override; + bool AddMessageToConsole(content::WebContents* source, + int32 level, + const base::string16& message, + int32 line_no, + const base::string16& source_id) override; + void BeforeUnloadFired(content::WebContents* source, + bool proceed, + bool* proceed_to_fire_unload) override; + bool TakeFocus(content::WebContents* source, + bool reverse) override; + void WebContentsFocused(content::WebContents* contents) override; + bool HandleContextMenu( + const content::ContextMenuParams& params) override; + bool PreHandleKeyboardEvent( content::WebContents* source, const content::NativeWebKeyboardEvent& event, - bool* is_keyboard_shortcut) OVERRIDE; - virtual void HandleKeyboardEvent( + bool* is_keyboard_shortcut) override; + void HandleKeyboardEvent( content::WebContents* source, - const content::NativeWebKeyboardEvent& event) OVERRIDE; - virtual bool CanDragEnter( + const content::NativeWebKeyboardEvent& event) override; + bool CanDragEnter( content::WebContents* source, const content::DropData& data, - blink::WebDragOperationsMask operations_allowed) OVERRIDE; - virtual bool ShouldCreateWebContents( + blink::WebDragOperationsMask operations_allowed) override; + bool ShouldCreateWebContents( content::WebContents* web_contents, int route_id, WindowContainerType window_container_type, @@ -380,60 +372,59 @@ class CefBrowserHostImpl : public CefBrowserHost, const std::string& partition_id, content::SessionStorageNamespace* session_storage_namespace, content::WebContentsView** view, - content::RenderViewHostDelegateView** delegate_view) OVERRIDE; - virtual void WebContentsCreated(content::WebContents* source_contents, - int opener_render_frame_id, - const base::string16& frame_name, - const GURL& target_url, - content::WebContents* new_contents) OVERRIDE; - virtual void DidNavigateMainFramePostCommit( - content::WebContents* tab) OVERRIDE; - virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() - OVERRIDE; - virtual void RunFileChooser( + content::RenderViewHostDelegateView** delegate_view) override; + void WebContentsCreated(content::WebContents* source_contents, + int opener_render_frame_id, + const base::string16& frame_name, + const GURL& target_url, + content::WebContents* new_contents) override; + void DidNavigateMainFramePostCommit( + content::WebContents* tab) override; + content::JavaScriptDialogManager* GetJavaScriptDialogManager() override; + void RunFileChooser( content::WebContents* tab, - const content::FileChooserParams& params) OVERRIDE; - virtual void UpdatePreferredSize(content::WebContents* source, - const gfx::Size& pref_size) OVERRIDE; - virtual void RequestMediaAccessPermission( + const content::FileChooserParams& params) override; + void UpdatePreferredSize(content::WebContents* source, + const gfx::Size& pref_size) override; + void RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, - const content::MediaResponseCallback& callback) OVERRIDE; + const content::MediaResponseCallback& callback) override; // content::WebContentsObserver methods. using content::WebContentsObserver::BeforeUnloadFired; using content::WebContentsObserver::WasHidden; - virtual void RenderFrameCreated( - content::RenderFrameHost* render_frame_host) OVERRIDE; - virtual void RenderFrameDeleted( - content::RenderFrameHost* render_frame_host) OVERRIDE; - virtual void RenderViewCreated( - content::RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewDeleted( - content::RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewReady() OVERRIDE; - virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; - virtual void DidCommitProvisionalLoadForFrame( + void RenderFrameCreated( + content::RenderFrameHost* render_frame_host) override; + void RenderFrameDeleted( + content::RenderFrameHost* render_frame_host) override; + void RenderViewCreated( + content::RenderViewHost* render_view_host) override; + void RenderViewDeleted( + content::RenderViewHost* render_view_host) override; + void RenderViewReady() override; + void RenderProcessGone(base::TerminationStatus status) override; + void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - ui::PageTransition transition_type) OVERRIDE; - virtual void DidFailProvisionalLoad( + ui::PageTransition transition_type) override; + void DidFailProvisionalLoad( content::RenderFrameHost* render_frame_host, const GURL& validated_url, int error_code, - const base::string16& error_description) OVERRIDE; - virtual void DocumentAvailableInMainFrame() OVERRIDE; - virtual void DidFailLoad(content::RenderFrameHost* render_frame_host, - const GURL& validated_url, - int error_code, - const base::string16& error_description) OVERRIDE; - virtual void FrameDetached( - content::RenderFrameHost* render_frame_host) OVERRIDE; - virtual void PluginCrashed(const base::FilePath& plugin_path, - base::ProcessId plugin_pid) OVERRIDE; - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + const base::string16& error_description) override; + void DocumentAvailableInMainFrame() override; + void DidFailLoad(content::RenderFrameHost* render_frame_host, + const GURL& validated_url, + int error_code, + const base::string16& error_description) override; + void FrameDetached( + content::RenderFrameHost* render_frame_host) override; + void PluginCrashed(const base::FilePath& plugin_path, + base::ProcessId plugin_pid) override; + bool OnMessageReceived(const IPC::Message& message) override; // Override to provide a thread safe implementation. - virtual bool Send(IPC::Message* message) OVERRIDE; + bool Send(IPC::Message* message) override; private: class DevToolsWebContentsObserver; @@ -472,9 +463,9 @@ class CefBrowserHostImpl : public CefBrowserHost, const base::string16& actual_value); // content::NotificationObserver methods. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; CefBrowserHostImpl(const CefWindowInfo& window_info, const CefBrowserSettings& settings, @@ -666,10 +657,6 @@ class CefBrowserHostImpl : public CefBrowserHost, scoped_ptr invisible_cursor_; #endif // defined(USE_X11) - // Only used on the UI thread. All references will be invalidated when - // DestroyBrowser() is called. Must be the last member. - base::WeakPtrFactory weak_ptr_factory_; - IMPLEMENT_REFCOUNTING(CefBrowserHostImpl); DISALLOW_EVIL_CONSTRUCTORS(CefBrowserHostImpl); }; diff --git a/libcef/browser/browser_host_impl_mac.mm b/libcef/browser/browser_host_impl_mac.mm index 3f8d59b90..3125253dc 100644 --- a/libcef/browser/browser_host_impl_mac.mm +++ b/libcef/browser/browser_host_impl_mac.mm @@ -12,7 +12,7 @@ #include "libcef/browser/text_input_client_osr_mac.h" #include "libcef/browser/thread_util.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/mac/mac_util.h" #include "base/mac/scoped_nsautorelease_pool.h" #include "base/strings/string_util.h" diff --git a/libcef/browser/browser_host_impl_win.cc b/libcef/browser/browser_host_impl_win.cc index a9d6ab085..08515f434 100644 --- a/libcef/browser/browser_host_impl_win.cc +++ b/libcef/browser/browser_host_impl_win.cc @@ -16,7 +16,7 @@ #include "libcef/browser/thread_util.h" #include "libcef/browser/window_delegate_view.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/i18n/case_conversion.h" #include "base/memory/ref_counted_memory.h" #include "base/strings/string_util.h" diff --git a/libcef/browser/browser_info.h b/libcef/browser/browser_info.h index b84cbbc25..5593ccf06 100644 --- a/libcef/browser/browser_info.h +++ b/libcef/browser/browser_info.h @@ -20,7 +20,6 @@ class CefBrowserInfo : public base::RefCountedThreadSafe { public: CefBrowserInfo(int browser_id, bool is_popup); - virtual ~CefBrowserInfo(); int browser_id() const { return browser_id_; }; bool is_popup() const { return is_popup_; } @@ -44,6 +43,10 @@ class CefBrowserInfo : public base::RefCountedThreadSafe { void set_browser(CefRefPtr browser); private: + friend class base::RefCountedThreadSafe; + + ~CefBrowserInfo(); + typedef std::set > RenderIdSet; void add_render_id(RenderIdSet* id_set, diff --git a/libcef/browser/browser_main.h b/libcef/browser/browser_main.h index 4134cc9e2..686cce040 100644 --- a/libcef/browser/browser_main.h +++ b/libcef/browser/browser_main.h @@ -33,16 +33,16 @@ class CefDevToolsDelegate; class CefBrowserMainParts : public content::BrowserMainParts { public: explicit CefBrowserMainParts(const content::MainFunctionParams& parameters); - virtual ~CefBrowserMainParts(); + ~CefBrowserMainParts() override; - virtual void PreMainMessageLoopStart() OVERRIDE; - virtual void PostMainMessageLoopStart() OVERRIDE; - virtual void PreEarlyInitialization() OVERRIDE; - virtual void ToolkitInitialized() OVERRIDE; - virtual int PreCreateThreads() OVERRIDE; - virtual void PreMainMessageLoopRun() OVERRIDE; - virtual void PostMainMessageLoopRun() OVERRIDE; - virtual void PostDestroyThreads() OVERRIDE; + void PreMainMessageLoopStart() override; + void PostMainMessageLoopStart() override; + void PreEarlyInitialization() override; + void ToolkitInitialized() override; + int PreCreateThreads() override; + void PreMainMessageLoopRun() override; + void PostMainMessageLoopRun() override; + void PostDestroyThreads() override; CefBrowserContext* browser_context() const { return global_browser_context_.get(); diff --git a/libcef/browser/browser_message_filter.h b/libcef/browser/browser_message_filter.h index 6e77441d7..be0e64e74 100644 --- a/libcef/browser/browser_message_filter.h +++ b/libcef/browser/browser_message_filter.h @@ -22,12 +22,12 @@ struct ViewHostMsg_CreateWindow_Params; class CefBrowserMessageFilter : public IPC::MessageFilter { public: explicit CefBrowserMessageFilter(content::RenderProcessHost* host); - virtual ~CefBrowserMessageFilter(); + ~CefBrowserMessageFilter() override; // IPC::ChannelProxy::MessageFilter implementation. - virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE; - virtual void OnFilterRemoved() OVERRIDE; - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + void OnFilterAdded(IPC::Sender* sender) override; + void OnFilterRemoved() override; + bool OnMessageReceived(const IPC::Message& message) override; bool Send(IPC::Message* message); diff --git a/libcef/browser/browser_message_loop.h b/libcef/browser/browser_message_loop.h index 990b1aa9a..23cfcc429 100644 --- a/libcef/browser/browser_message_loop.h +++ b/libcef/browser/browser_message_loop.h @@ -15,7 +15,7 @@ class CefBrowserMessageLoop : public base::MessageLoopForUI { public: CefBrowserMessageLoop(); - virtual ~CefBrowserMessageLoop(); + ~CefBrowserMessageLoop() override; // Returns the MessageLoopForUI of the current thread. static CefBrowserMessageLoop* current(); diff --git a/libcef/browser/browser_pref_store.h b/libcef/browser/browser_pref_store.h index 191567826..70c6c02dc 100644 --- a/libcef/browser/browser_pref_store.h +++ b/libcef/browser/browser_pref_store.h @@ -17,7 +17,7 @@ class CefBrowserPrefStore : public TestingPrefStore { scoped_ptr CreateService(); protected: - virtual ~CefBrowserPrefStore(); + ~CefBrowserPrefStore() override; DISALLOW_COPY_AND_ASSIGN(CefBrowserPrefStore); }; diff --git a/libcef/browser/browser_urlrequest_impl.cc b/libcef/browser/browser_urlrequest_impl.cc index 91f7c42fc..100564674 100644 --- a/libcef/browser/browser_urlrequest_impl.cc +++ b/libcef/browser/browser_urlrequest_impl.cc @@ -35,14 +35,14 @@ class CefURLFetcherDelegate : public net::URLFetcherDelegate { public: CefURLFetcherDelegate(CefBrowserURLRequest::Context* context, int request_flags); - virtual ~CefURLFetcherDelegate(); + ~CefURLFetcherDelegate() override; // net::URLFetcherDelegate methods. - virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; - virtual void OnURLFetchDownloadProgress(const net::URLFetcher* source, - int64 current, int64 total) OVERRIDE; - virtual void OnURLFetchUploadProgress(const net::URLFetcher* source, - int64 current, int64 total) OVERRIDE; + void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchDownloadProgress(const net::URLFetcher* source, + int64 current, int64 total) override; + void OnURLFetchUploadProgress(const net::URLFetcher* source, + int64 current, int64 total) override; private: // The context_ pointer will outlive this object. @@ -59,17 +59,15 @@ class NET_EXPORT CefURLFetcherResponseWriter : : url_request_(url_request), message_loop_proxy_(message_loop_proxy) { } - virtual ~CefURLFetcherResponseWriter() { - } // net::URLFetcherResponseWriter methods. - virtual int Initialize(const net::CompletionCallback& callback) OVERRIDE { + int Initialize(const net::CompletionCallback& callback) override { return net::OK; } - virtual int Write(net::IOBuffer* buffer, - int num_bytes, - const net::CompletionCallback& callback) OVERRIDE { + int Write(net::IOBuffer* buffer, + int num_bytes, + const net::CompletionCallback& callback) override { if (url_request_.get()) { message_loop_proxy_->PostTask(FROM_HERE, base::Bind(&CefURLFetcherResponseWriter::WriteOnClientThread, @@ -81,7 +79,7 @@ class NET_EXPORT CefURLFetcherResponseWriter : return num_bytes; } - virtual int Finish(const net::CompletionCallback& callback) OVERRIDE { + int Finish(const net::CompletionCallback& callback) override { if (url_request_.get()) url_request_ = NULL; return net::OK; @@ -143,13 +141,6 @@ class CefBrowserURLRequest::Context static_cast(request_.get())->SetReadOnly(true); } - virtual ~Context() { - if (fetcher_.get()) { - // Delete the fetcher object on the thread that created it. - message_loop_proxy_->DeleteSoon(FROM_HERE, fetcher_.release()); - } - } - inline bool CalledOnValidThread() { return message_loop_proxy_->BelongsToCurrentThread(); } @@ -273,7 +264,6 @@ class CefBrowserURLRequest::Context } if (cef_flags & UR_FLAG_REPORT_UPLOAD_PROGRESS) { - load_flags |= net::LOAD_ENABLE_UPLOAD_PROGRESS; upload_data_size_ = upload_data_size; } @@ -396,6 +386,15 @@ class CefBrowserURLRequest::Context CefRefPtr response() { return response_; } private: + friend class base::RefCountedThreadSafe; + + ~Context() { + if (fetcher_.get()) { + // Delete the fetcher object on the thread that created it. + message_loop_proxy_->DeleteSoon(FROM_HERE, fetcher_.release()); + } + } + void NotifyUploadProgressIfNecessary() { if (!got_upload_progress_complete_ && upload_data_size_ > 0) { // URLFetcher sends upload notifications using a timer and will not send diff --git a/libcef/browser/browser_urlrequest_impl.h b/libcef/browser/browser_urlrequest_impl.h index e1e186940..b0055726e 100644 --- a/libcef/browser/browser_urlrequest_impl.h +++ b/libcef/browser/browser_urlrequest_impl.h @@ -14,17 +14,17 @@ class CefBrowserURLRequest : public CefURLRequest { CefBrowserURLRequest(CefRefPtr request, CefRefPtr client); - virtual ~CefBrowserURLRequest(); + ~CefBrowserURLRequest() override; bool Start(); // CefURLRequest methods. - virtual CefRefPtr GetRequest() OVERRIDE; - virtual CefRefPtr GetClient() OVERRIDE; - virtual Status GetRequestStatus() OVERRIDE; - virtual ErrorCode GetRequestError() OVERRIDE; - virtual CefRefPtr GetResponse() OVERRIDE; - virtual void Cancel() OVERRIDE; + CefRefPtr GetRequest() override; + CefRefPtr GetClient() override; + Status GetRequestStatus() override; + ErrorCode GetRequestError() override; + CefRefPtr GetResponse() override; + void Cancel() override; private: bool VerifyContext(); diff --git a/libcef/browser/chrome_browser_process_stub.h b/libcef/browser/chrome_browser_process_stub.h index e5c3703bc..6238d8685 100644 --- a/libcef/browser/chrome_browser_process_stub.h +++ b/libcef/browser/chrome_browser_process_stub.h @@ -26,74 +26,74 @@ class BackgroundModeManager { class ChromeBrowserProcessStub : public BrowserProcess { public: ChromeBrowserProcessStub(); - virtual ~ChromeBrowserProcessStub(); + ~ChromeBrowserProcessStub() override; // BrowserProcess implementation. - virtual void ResourceDispatcherHostCreated() OVERRIDE; - virtual void EndSession() OVERRIDE; - virtual MetricsServicesManager* GetMetricsServicesManager() OVERRIDE; - virtual metrics::MetricsService* metrics_service() OVERRIDE; - virtual rappor::RapporService* rappor_service() OVERRIDE; - virtual IOThread* io_thread() OVERRIDE; - virtual WatchDogThread* watchdog_thread() OVERRIDE; - virtual ProfileManager* profile_manager() OVERRIDE; - virtual PrefService* local_state() OVERRIDE; - virtual net::URLRequestContextGetter* system_request_context() OVERRIDE; - virtual chrome_variations::VariationsService* variations_service() OVERRIDE; - virtual BrowserProcessPlatformPart* platform_part() OVERRIDE; - virtual extensions::EventRouterForwarder* - extension_event_router_forwarder() OVERRIDE; - virtual NotificationUIManager* notification_ui_manager() OVERRIDE; - virtual message_center::MessageCenter* message_center() OVERRIDE; - virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE; - virtual policy::PolicyService* policy_service() OVERRIDE; - virtual IconManager* icon_manager() OVERRIDE; - virtual GLStringManager* gl_string_manager() OVERRIDE; - virtual GpuModeManager* gpu_mode_manager() OVERRIDE; - virtual void CreateDevToolsHttpProtocolHandler( + void ResourceDispatcherHostCreated() override; + void EndSession() override; + MetricsServicesManager* GetMetricsServicesManager() override; + metrics::MetricsService* metrics_service() override; + rappor::RapporService* rappor_service() override; + IOThread* io_thread() override; + WatchDogThread* watchdog_thread() override; + ProfileManager* profile_manager() override; + PrefService* local_state() override; + net::URLRequestContextGetter* system_request_context() override; + chrome_variations::VariationsService* variations_service() override; + BrowserProcessPlatformPart* platform_part() override; + extensions::EventRouterForwarder* + extension_event_router_forwarder() override; + NotificationUIManager* notification_ui_manager() override; + message_center::MessageCenter* message_center() override; + policy::BrowserPolicyConnector* browser_policy_connector() override; + policy::PolicyService* policy_service() override; + IconManager* icon_manager() override; + GLStringManager* gl_string_manager() override; + GpuModeManager* gpu_mode_manager() override; + void CreateDevToolsHttpProtocolHandler( chrome::HostDesktopType host_desktop_type, const std::string& ip, - int port) OVERRIDE; - virtual unsigned int AddRefModule() OVERRIDE; - virtual unsigned int ReleaseModule() OVERRIDE; - virtual bool IsShuttingDown() OVERRIDE; - virtual printing::PrintJobManager* print_job_manager() OVERRIDE; - virtual printing::PrintPreviewDialogController* - print_preview_dialog_controller() OVERRIDE; - virtual printing::BackgroundPrintingManager* - background_printing_manager() OVERRIDE; - virtual IntranetRedirectDetector* intranet_redirect_detector() OVERRIDE; - virtual const std::string& GetApplicationLocale() OVERRIDE; - virtual void SetApplicationLocale(const std::string& locale) OVERRIDE; - virtual DownloadStatusUpdater* download_status_updater() OVERRIDE; - virtual DownloadRequestLimiter* download_request_limiter() OVERRIDE; - virtual BackgroundModeManager* background_mode_manager() OVERRIDE; - virtual void set_background_mode_manager_for_test( - scoped_ptr manager) OVERRIDE; - virtual StatusTray* status_tray() OVERRIDE; - virtual SafeBrowsingService* safe_browsing_service() OVERRIDE; - virtual safe_browsing::ClientSideDetectionService* - safe_browsing_detection_service() OVERRIDE; + int port) override; + unsigned int AddRefModule() override; + unsigned int ReleaseModule() override; + bool IsShuttingDown() override; + printing::PrintJobManager* print_job_manager() override; + printing::PrintPreviewDialogController* + print_preview_dialog_controller() override; + printing::BackgroundPrintingManager* + background_printing_manager() override; + IntranetRedirectDetector* intranet_redirect_detector() override; + const std::string& GetApplicationLocale() override; + void SetApplicationLocale(const std::string& locale) override; + DownloadStatusUpdater* download_status_updater() override; + DownloadRequestLimiter* download_request_limiter() override; + BackgroundModeManager* background_mode_manager() override; + void set_background_mode_manager_for_test( + scoped_ptr manager) override; + StatusTray* status_tray() override; + SafeBrowsingService* safe_browsing_service() override; + safe_browsing::ClientSideDetectionService* + safe_browsing_detection_service() override; #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) - virtual void StartAutoupdateTimer() OVERRIDE; + void StartAutoupdateTimer() override; #endif - virtual ChromeNetLog* net_log() OVERRIDE; - virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; - virtual component_updater::ComponentUpdateService* - component_updater() OVERRIDE; - virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; - virtual component_updater::PnaclComponentInstaller* - pnacl_component_installer() OVERRIDE; - virtual MediaFileSystemRegistry* - media_file_system_registry() OVERRIDE; - virtual bool created_local_state() const OVERRIDE; + ChromeNetLog* net_log() override; + prerender::PrerenderTracker* prerender_tracker() override; + component_updater::ComponentUpdateService* + component_updater() override; + CRLSetFetcher* crl_set_fetcher() override; + component_updater::PnaclComponentInstaller* + pnacl_component_installer() override; + MediaFileSystemRegistry* + media_file_system_registry() override; + bool created_local_state() const override; #if defined(ENABLE_WEBRTC) - virtual WebRtcLogUploader* webrtc_log_uploader() OVERRIDE; + WebRtcLogUploader* webrtc_log_uploader() override; #endif - virtual network_time::NetworkTimeTracker* network_time_tracker() OVERRIDE; - virtual gcm::GCMDriver* gcm_driver() OVERRIDE; + network_time::NetworkTimeTracker* network_time_tracker() override; + gcm::GCMDriver* gcm_driver() override; private: std::string locale_; diff --git a/libcef/browser/chrome_scheme_handler.cc b/libcef/browser/chrome_scheme_handler.cc index 5057131eb..e0c9ffaea 100644 --- a/libcef/browser/chrome_scheme_handler.cc +++ b/libcef/browser/chrome_scheme_handler.cc @@ -18,7 +18,7 @@ #include "libcef/common/content_client.h" #include "base/command_line.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/logging.h" #include "base/path_service.h" #include "base/strings/string_util.h" @@ -182,8 +182,8 @@ class Delegate : public InternalHandlerDelegate { public: Delegate() {} - virtual bool OnRequest(CefRefPtr request, - Action* action) OVERRIDE { + bool OnRequest(CefRefPtr request, + Action* action) override { GURL url = GURL(request->GetURL().ToString()); std::string path = url.path(); if (path.length() > 0) @@ -298,8 +298,8 @@ void DidFinishChromeVersionLoad(CefRefPtr frame) { : frame_(frame) { } - virtual bool Visit(CefRefPtr info, - int count, int total) OVERRIDE { + bool Visit(CefRefPtr info, + int count, int total) override { std::string name = info->GetName(); if (name == "Shockwave Flash") { if (frame_->IsValid()) { @@ -333,9 +333,9 @@ class ChromeProtocolHandlerWrapper : : chrome_protocol_handler_(chrome_protocol_handler.Pass()) { } - virtual net::URLRequestJob* MaybeCreateJob( + net::URLRequestJob* MaybeCreateJob( net::URLRequest* request, - net::NetworkDelegate* network_delegate) const OVERRIDE { + net::NetworkDelegate* network_delegate) const override { // Keep synchronized with the checks in ChromeProtocolHandler::MaybeCreateJob. if (content::ViewHttpCacheJobFactory::IsSupportedURL(request->url()) || (request->url().SchemeIs(content::kChromeUIScheme) && diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index 8b4c19f44..a572c2363 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -66,14 +66,14 @@ class CefAccessTokenStore : public content::AccessTokenStore { public: CefAccessTokenStore() {} - virtual void LoadAccessTokens( - const LoadAccessTokensCallbackType& callback) OVERRIDE { + void LoadAccessTokens( + const LoadAccessTokensCallbackType& callback) override { callback.Run(access_token_set_, CefContentBrowserClient::Get()->request_context().get()); } - virtual void SaveAccessToken( - const GURL& server_url, const base::string16& access_token) OVERRIDE { + void SaveAccessToken( + const GURL& server_url, const base::string16& access_token) override { access_token_set_[server_url] = access_token; } @@ -102,7 +102,7 @@ class CefQuotaCallbackImpl : public CefQuotaCallback { } } - virtual void Continue(bool allow) OVERRIDE { + void Continue(bool allow) override { if (CEF_CURRENTLY_ON_IOT()) { if (!callback_.is_null()) { callback_.Run(allow ? @@ -116,7 +116,7 @@ class CefQuotaCallbackImpl : public CefQuotaCallback { } } - virtual void Cancel() OVERRIDE { + void Cancel() override { if (CEF_CURRENTLY_ON_IOT()) { if (!callback_.is_null()) { CancelNow(callback_); @@ -155,7 +155,7 @@ class CefAllowCertificateErrorCallbackImpl : callback_(callback) { } - virtual void Continue(bool allow) OVERRIDE { + void Continue(bool allow) override { if (CEF_CURRENTLY_ON_UIT()) { if (!callback_.is_null()) { callback_.Run(allow); @@ -187,7 +187,7 @@ class CefGeolocationCallbackImpl : public CefGeolocationCallback { explicit CefGeolocationCallbackImpl(const CallbackType& callback) : callback_(callback) {} - virtual void Continue(bool allow) OVERRIDE { + void Continue(bool allow) override { if (CEF_CURRENTLY_ON_UIT()) { if (!callback_.is_null()) { callback_.Run(allow); @@ -215,33 +215,16 @@ class CefGeolocationCallbackImpl : public CefGeolocationCallback { DISALLOW_COPY_AND_ASSIGN(CefGeolocationCallbackImpl); }; -void CancelGeolocationPermission(base::WeakPtr browser, - const GURL& requesting_frame, - int bridge_id) { - if (browser.get()) { - CefRefPtr client = browser->GetClient(); - if (client.get()) { - CefRefPtr handler = - client->GetGeolocationHandler(); - if (handler.get()) { - handler->OnCancelGeolocationPermission(browser.get(), - requesting_frame.spec(), - bridge_id); - } - } - } -} - class CefQuotaPermissionContext : public content::QuotaPermissionContext { public: CefQuotaPermissionContext() { } // The callback will be dispatched on the IO thread. - virtual void RequestQuotaPermission( + void RequestQuotaPermission( const content::StorageQuotaParams& params, int render_process_id, - const PermissionCallback& callback) OVERRIDE { + const PermissionCallback& callback) override { if (params.storage_type != storage::kStorageTypePersistent) { // To match Chrome behavior we only support requesting quota with this // interface for Persistent storage type. @@ -278,8 +261,7 @@ class CefQuotaPermissionContext : public content::QuotaPermissionContext { } private: - virtual ~CefQuotaPermissionContext() { - } + ~CefQuotaPermissionContext() override {} DISALLOW_COPY_AND_ASSIGN(CefQuotaPermissionContext); }; @@ -287,14 +269,13 @@ class CefQuotaPermissionContext : public content::QuotaPermissionContext { class CefPluginServiceFilter : public content::PluginServiceFilter { public: CefPluginServiceFilter() {} - virtual ~CefPluginServiceFilter() {} - virtual bool IsPluginAvailable(int render_process_id, - int render_frame_id, - const void* context, - const GURL& url, - const GURL& policy_url, - content::WebPluginInfo* plugin) OVERRIDE { + bool IsPluginAvailable(int render_process_id, + int render_frame_id, + const void* context, + const GURL& url, + const GURL& policy_url, + content::WebPluginInfo* plugin) override { bool allowed = true; CefRefPtr browser = @@ -319,8 +300,8 @@ class CefPluginServiceFilter : public content::PluginServiceFilter { return allowed; } - virtual bool CanLoadPlugin(int render_process_id, - const base::FilePath& path) OVERRIDE { + bool CanLoadPlugin(int render_process_id, + const base::FilePath& path) override { return true; } @@ -702,7 +683,6 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches( static const char* const kSwitchNames[] = { switches::kContextSafetyImplementation, switches::kDisableSpellChecking, - switches::kEnableMediaStream, switches::kEnableSpeechInput, switches::kEnableSpellingAutoCorrect, switches::kUncaughtExceptionStackSize, @@ -806,14 +786,20 @@ content::AccessTokenStore* CefContentBrowserClient::CreateAccessTokenStore() { return new CefAccessTokenStore; } -void CefContentBrowserClient::RequestGeolocationPermission( +void CefContentBrowserClient::RequestPermission( + content::PermissionType permission, content::WebContents* web_contents, int bridge_id, const GURL& requesting_frame, bool user_gesture, - base::Callback result_callback, - base::Closure* cancel_callback) { + const base::Callback& result_callback) { CEF_REQUIRE_UIT(); + + if (permission != content::PermissionType::PERMISSION_GEOLOCATION) { + result_callback.Run(false); + return; + } + bool proceed = false; CefRefPtr browser = @@ -831,15 +817,8 @@ void CefContentBrowserClient::RequestGeolocationPermission( proceed = handler->OnRequestGeolocationPermission( browser.get(), requesting_frame.spec(), bridge_id, callbackImpl.get()); - if (proceed) { - // The callback reference may outlive the browser so use a WeakPtr. - *cancel_callback = - base::Bind(CancelGeolocationPermission, - browser->GetWeakPtr(), requesting_frame, - bridge_id); - } else { + if (!proceed) callbackImpl->Disconnect(); - } } } } @@ -850,6 +829,32 @@ void CefContentBrowserClient::RequestGeolocationPermission( } } +void CefContentBrowserClient::CancelPermissionRequest( + content::PermissionType permission, + content::WebContents* web_contents, + int bridge_id, + const GURL& requesting_frame) { + CEF_REQUIRE_UIT(); + + if (permission != content::PermissionType::PERMISSION_GEOLOCATION) + return; + + CefRefPtr browser = + CefBrowserHostImpl::GetBrowserForContents(web_contents); + if (browser.get()) { + CefRefPtr client = browser->GetClient(); + if (client.get()) { + CefRefPtr handler = + client->GetGeolocationHandler(); + if (handler.get()) { + handler->OnCancelGeolocationPermission(browser.get(), + requesting_frame.spec(), + bridge_id); + } + } + } +} + bool CefContentBrowserClient::CanCreateWindow( const GURL& opener_url, const GURL& opener_top_level_frame_url, @@ -1017,11 +1022,10 @@ content::DevToolsManagerDelegate* void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, - std::vector* mappings) { + content::FileDescriptorInfo* mappings) { int crash_signal_fd = GetCrashSignalFD(command_line); if (crash_signal_fd >= 0) { - mappings->push_back(content::FileDescriptorInfo( - kCrashDumpSignal, base::FileDescriptor(crash_signal_fd, false))); + mappings->Share(kCrashDumpSignal, crash_signal_fd); } } #endif // defined(OS_POSIX) && !defined(OS_MACOSX) diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index f033a764e..4ea861209 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -38,7 +38,7 @@ class SiteInstance; class CefContentBrowserClient : public content::ContentBrowserClient { public: CefContentBrowserClient(); - virtual ~CefContentBrowserClient(); + ~CefContentBrowserClient() override; // Returns the singleton CefContentBrowserClient instance. static CefContentBrowserClient* Get(); @@ -79,31 +79,31 @@ class CefContentBrowserClient : public content::ContentBrowserClient { void RemoveBrowserContextReference(CefBrowserContext* context); // ContentBrowserClient implementation. - virtual content::BrowserMainParts* CreateBrowserMainParts( - const content::MainFunctionParams& parameters) OVERRIDE; - virtual void RenderProcessWillLaunch( - content::RenderProcessHost* host) OVERRIDE; - virtual net::URLRequestContextGetter* CreateRequestContext( + content::BrowserMainParts* CreateBrowserMainParts( + const content::MainFunctionParams& parameters) override; + void RenderProcessWillLaunch( + content::RenderProcessHost* host) override; + net::URLRequestContextGetter* CreateRequestContext( content::BrowserContext* browser_context, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) - OVERRIDE; - virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( + override; + net::URLRequestContextGetter* CreateRequestContextForStoragePartition( content::BrowserContext* browser_context, const base::FilePath& partition_path, bool in_memory, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) - OVERRIDE; - virtual bool IsHandledURL(const GURL& url) OVERRIDE; - virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, - int child_process_id) OVERRIDE; - virtual content::QuotaPermissionContext* - CreateQuotaPermissionContext() OVERRIDE; - virtual content::MediaObserver* GetMediaObserver() OVERRIDE; - virtual content::SpeechRecognitionManagerDelegate* - GetSpeechRecognitionManagerDelegate() OVERRIDE; - virtual void AllowCertificateError( + override; + bool IsHandledURL(const GURL& url) override; + void AppendExtraCommandLineSwitches(base::CommandLine* command_line, + int child_process_id) override; + content::QuotaPermissionContext* + CreateQuotaPermissionContext() override; + content::MediaObserver* GetMediaObserver() override; + content::SpeechRecognitionManagerDelegate* + GetSpeechRecognitionManagerDelegate() override; + void AllowCertificateError( int render_process_id, int render_frame_id, int cert_error, @@ -114,49 +114,53 @@ class CefContentBrowserClient : public content::ContentBrowserClient { bool strict_enforcement, bool expired_previous_decision, const base::Callback& callback, - content::CertificateRequestResultType* result) OVERRIDE; - virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; - virtual void RequestGeolocationPermission( + content::CertificateRequestResultType* result) override; + content::AccessTokenStore* CreateAccessTokenStore() override; + void RequestPermission( + content::PermissionType permission, content::WebContents* web_contents, int bridge_id, const GURL& requesting_frame, bool user_gesture, - base::Callback result_callback, - base::Closure* cancel_callback) OVERRIDE; - virtual bool CanCreateWindow(const GURL& opener_url, - const GURL& opener_top_level_frame_url, - const GURL& source_origin, - WindowContainerType container_type, - const GURL& target_url, - const content::Referrer& referrer, - WindowOpenDisposition disposition, - const blink::WebWindowFeatures& features, - bool user_gesture, - bool opener_suppressed, - content::ResourceContext* context, - int render_process_id, - int opener_id, - bool* no_javascript_access) OVERRIDE; - virtual void ResourceDispatcherHostCreated() OVERRIDE; - virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, - const GURL& url, - content::WebPreferences* prefs) OVERRIDE; - virtual SkColor GetBaseBackgroundColor(content::RenderViewHost* rvh) OVERRIDE; - virtual void BrowserURLHandlerCreated( - content::BrowserURLHandler* handler) OVERRIDE; - virtual std::string GetDefaultDownloadName() OVERRIDE; - virtual content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() - OVERRIDE; + const base::Callback& result_callback) override; + void CancelPermissionRequest(content::PermissionType permission, + content::WebContents* web_contents, + int bridge_id, + const GURL& requesting_frame) override; + bool CanCreateWindow(const GURL& opener_url, + const GURL& opener_top_level_frame_url, + const GURL& source_origin, + WindowContainerType container_type, + const GURL& target_url, + const content::Referrer& referrer, + WindowOpenDisposition disposition, + const blink::WebWindowFeatures& features, + bool user_gesture, + bool opener_suppressed, + content::ResourceContext* context, + int render_process_id, + int opener_id, + bool* no_javascript_access) override; + void ResourceDispatcherHostCreated() override; + void OverrideWebkitPrefs(content::RenderViewHost* rvh, + const GURL& url, + content::WebPreferences* prefs) override; + SkColor GetBaseBackgroundColor(content::RenderViewHost* rvh) override; + void BrowserURLHandlerCreated( + content::BrowserURLHandler* handler) override; + std::string GetDefaultDownloadName() override; + content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() + override; #if defined(OS_POSIX) && !defined(OS_MACOSX) - virtual void GetAdditionalMappedFilesForChildProcess( + void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, - std::vector* mappings) OVERRIDE; + content::FileDescriptorInfo* mappings) override; #endif #if defined(OS_WIN) - const wchar_t* GetResourceDllName() OVERRIDE; + const wchar_t* GetResourceDllName() override; #endif // Perform browser process registration for the custom scheme. diff --git a/libcef/browser/context.cc b/libcef/browser/context.cc index 3754971ba..6eb17e67e 100644 --- a/libcef/browser/context.cc +++ b/libcef/browser/context.cc @@ -20,7 +20,7 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/debug/debugger.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/synchronization/waitable_event.h" #include "chrome/browser/printing/print_job_manager.h" #include "content/public/app/content_main.h" diff --git a/libcef/browser/context.h b/libcef/browser/context.h index cf57d977e..e47dd6169 100644 --- a/libcef/browser/context.h +++ b/libcef/browser/context.h @@ -40,7 +40,7 @@ class CefContext : public content::NotificationObserver { typedef std::list > BrowserList; CefContext(); - ~CefContext(); + ~CefContext() override; // Returns the singleton CefContext instance. static CefContext* Get(); @@ -83,9 +83,9 @@ class CefContext : public content::NotificationObserver { void FinalizeShutdown(); // NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Track context state. bool initialized_; diff --git a/libcef/browser/context_menu_params_impl.h b/libcef/browser/context_menu_params_impl.h index d53dbfa6d..c4da125ca 100644 --- a/libcef/browser/context_menu_params_impl.h +++ b/libcef/browser/context_menu_params_impl.h @@ -18,26 +18,26 @@ class CefContextMenuParamsImpl explicit CefContextMenuParamsImpl(content::ContextMenuParams* value); // CefContextMenuParams methods. - virtual int GetXCoord() OVERRIDE; - virtual int GetYCoord() OVERRIDE; - virtual TypeFlags GetTypeFlags() OVERRIDE; - virtual CefString GetLinkUrl() OVERRIDE; - virtual CefString GetUnfilteredLinkUrl() OVERRIDE; - virtual CefString GetSourceUrl() OVERRIDE; - virtual bool HasImageContents() OVERRIDE; - virtual CefString GetPageUrl() OVERRIDE; - virtual CefString GetFrameUrl() OVERRIDE; - virtual CefString GetFrameCharset() OVERRIDE; - virtual MediaType GetMediaType() OVERRIDE; - virtual MediaStateFlags GetMediaStateFlags() OVERRIDE; - virtual CefString GetSelectionText() OVERRIDE; - virtual CefString GetMisspelledWord() OVERRIDE; - virtual int GetMisspellingHash() OVERRIDE; - virtual bool GetDictionarySuggestions( - std::vector& suggestions) OVERRIDE; - virtual bool IsEditable() OVERRIDE; - virtual bool IsSpellCheckEnabled() OVERRIDE; - virtual EditStateFlags GetEditStateFlags() OVERRIDE; + int GetXCoord() override; + int GetYCoord() override; + TypeFlags GetTypeFlags() override; + CefString GetLinkUrl() override; + CefString GetUnfilteredLinkUrl() override; + CefString GetSourceUrl() override; + bool HasImageContents() override; + CefString GetPageUrl() override; + CefString GetFrameUrl() override; + CefString GetFrameCharset() override; + MediaType GetMediaType() override; + MediaStateFlags GetMediaStateFlags() override; + CefString GetSelectionText() override; + CefString GetMisspelledWord() override; + int GetMisspellingHash() override; + bool GetDictionarySuggestions( + std::vector& suggestions) override; + bool IsEditable() override; + bool IsSpellCheckEnabled() override; + EditStateFlags GetEditStateFlags() override; DISALLOW_COPY_AND_ASSIGN(CefContextMenuParamsImpl); }; diff --git a/libcef/browser/cookie_manager_impl.cc b/libcef/browser/cookie_manager_impl.cc index 3c44760d4..d580a0272 100644 --- a/libcef/browser/cookie_manager_impl.cc +++ b/libcef/browser/cookie_manager_impl.cc @@ -16,7 +16,7 @@ #include "libcef/common/time_util.h" #include "base/bind.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/format_macros.h" #include "base/logging.h" #include "base/threading/thread_restrictions.h" @@ -63,6 +63,10 @@ class VisitCookiesCallback : public base::RefCounted { } private: + friend class base::RefCounted; + + ~VisitCookiesCallback() {} + scoped_refptr cookie_monster_; CefRefPtr visitor_; }; diff --git a/libcef/browser/cookie_manager_impl.h b/libcef/browser/cookie_manager_impl.h index c2201a73a..4c9a3d118 100644 --- a/libcef/browser/cookie_manager_impl.h +++ b/libcef/browser/cookie_manager_impl.h @@ -13,25 +13,24 @@ class CefCookieManagerImpl : public CefCookieManager { public: CefCookieManagerImpl(bool is_global); - ~CefCookieManagerImpl(); + ~CefCookieManagerImpl() override; // Initialize the cookie manager. void Initialize(const CefString& path, bool persist_session_cookies); // CefCookieManager methods. - virtual void SetSupportedSchemes(const std::vector& schemes) - OVERRIDE; - virtual bool VisitAllCookies(CefRefPtr visitor) OVERRIDE; - virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly, - CefRefPtr visitor) OVERRIDE; - virtual bool SetCookie(const CefString& url, - const CefCookie& cookie) OVERRIDE; - virtual bool DeleteCookies(const CefString& url, - const CefString& cookie_name) OVERRIDE; - virtual bool SetStoragePath(const CefString& path, - bool persist_session_cookies) OVERRIDE; - virtual bool FlushStore(CefRefPtr callback) OVERRIDE; + void SetSupportedSchemes(const std::vector& schemes) override; + bool VisitAllCookies(CefRefPtr visitor) override; + bool VisitUrlCookies(const CefString& url, bool includeHttpOnly, + CefRefPtr visitor) override; + bool SetCookie(const CefString& url, + const CefCookie& cookie) override; + bool DeleteCookies(const CefString& url, + const CefString& cookie_name) override; + bool SetStoragePath(const CefString& path, + bool persist_session_cookies) override; + bool FlushStore(CefRefPtr callback) override; net::CookieMonster* cookie_monster() { return cookie_monster_.get(); } diff --git a/libcef/browser/devtools_delegate.cc b/libcef/browser/devtools_delegate.cc index 81b264590..3bae4f1e9 100644 --- a/libcef/browser/devtools_delegate.cc +++ b/libcef/browser/devtools_delegate.cc @@ -47,7 +47,7 @@ class TCPServerSocketFactory private: // content::DevToolsHttpHandler::ServerSocketFactory. - virtual scoped_ptr Create() const OVERRIDE { + scoped_ptr Create() const override { return scoped_ptr( new net::TCPServerSocket(NULL, net::NetLog::Source())); } @@ -65,9 +65,9 @@ class Target : public content::DevToolsTarget { public: explicit Target(scoped_refptr agent_host); - virtual std::string GetId() const OVERRIDE { return agent_host_->GetId(); } - virtual std::string GetParentId() const OVERRIDE { return std::string(); } - virtual std::string GetType() const OVERRIDE { + std::string GetId() const override { return agent_host_->GetId(); } + std::string GetParentId() const override { return std::string(); } + std::string GetType() const override { switch (agent_host_->GetType()) { case content::DevToolsAgentHost::TYPE_WEB_CONTENTS: return kTargetTypePage; @@ -78,24 +78,24 @@ class Target : public content::DevToolsTarget { } return kTargetTypeOther; } - virtual std::string GetTitle() const OVERRIDE { + std::string GetTitle() const override { return agent_host_->GetTitle(); } - virtual std::string GetDescription() const OVERRIDE { return std::string(); } - virtual GURL GetURL() const OVERRIDE { return agent_host_->GetURL(); } - virtual GURL GetFaviconURL() const OVERRIDE { return favicon_url_; } - virtual base::TimeTicks GetLastActivityTime() const OVERRIDE { + std::string GetDescription() const override { return std::string(); } + GURL GetURL() const override { return agent_host_->GetURL(); } + GURL GetFaviconURL() const override { return favicon_url_; } + base::TimeTicks GetLastActivityTime() const override { return last_activity_time_; } - virtual bool IsAttached() const OVERRIDE { + bool IsAttached() const override { return agent_host_->IsAttached(); } - virtual scoped_refptr GetAgentHost() const - OVERRIDE { + scoped_refptr GetAgentHost() const + override { return agent_host_; } - virtual bool Activate() const OVERRIDE; - virtual bool Close() const OVERRIDE; + bool Activate() const override; + bool Close() const override; private: scoped_refptr agent_host_; diff --git a/libcef/browser/devtools_delegate.h b/libcef/browser/devtools_delegate.h index e56ceb50a..a27fc9e68 100644 --- a/libcef/browser/devtools_delegate.h +++ b/libcef/browser/devtools_delegate.h @@ -24,18 +24,18 @@ class RenderViewHost; class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate { public: explicit CefDevToolsDelegate(int port); - virtual ~CefDevToolsDelegate(); + ~CefDevToolsDelegate() override; // Stops http server. void Stop(); // DevToolsHttpHandlerDelegate overrides. - virtual std::string GetDiscoveryPageHTML() OVERRIDE; - virtual bool BundlesFrontendResources() OVERRIDE; - virtual base::FilePath GetDebugFrontendDir() OVERRIDE; - virtual scoped_ptr CreateSocketForTethering( + std::string GetDiscoveryPageHTML() override; + bool BundlesFrontendResources() override; + base::FilePath GetDebugFrontendDir() override; + scoped_ptr CreateSocketForTethering( net::StreamListenSocket::Delegate* delegate, - std::string* name) OVERRIDE; + std::string* name) override; // Returns the chrome-devtools URL. std::string GetChromeDevToolsURL(); @@ -50,20 +50,20 @@ class CefDevToolsManagerDelegate : public content::DevToolsManagerDelegate { public: explicit CefDevToolsManagerDelegate( content::BrowserContext* browser_context); - virtual ~CefDevToolsManagerDelegate(); + ~CefDevToolsManagerDelegate() override; // DevToolsManagerDelegate implementation. - virtual void Inspect(content::BrowserContext* browser_context, - content::DevToolsAgentHost* agent_host) OVERRIDE {} - virtual void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host, - bool attached) OVERRIDE {} - virtual base::DictionaryValue* HandleCommand( + void Inspect(content::BrowserContext* browser_context, + content::DevToolsAgentHost* agent_host) override {} + void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host, + bool attached) override {} + base::DictionaryValue* HandleCommand( content::DevToolsAgentHost* agent_host, - base::DictionaryValue* command) OVERRIDE; - virtual scoped_ptr CreateNewTarget( - const GURL& url) OVERRIDE; - virtual void EnumerateTargets(TargetCallback callback) OVERRIDE; - virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE; + base::DictionaryValue* command) override; + scoped_ptr CreateNewTarget( + const GURL& url) override; + void EnumerateTargets(TargetCallback callback) override; + std::string GetPageThumbnailData(const GURL& url) override; private: content::BrowserContext* browser_context_; diff --git a/libcef/browser/devtools_frontend.h b/libcef/browser/devtools_frontend.h index a8451db03..115322b40 100644 --- a/libcef/browser/devtools_frontend.h +++ b/libcef/browser/devtools_frontend.h @@ -42,27 +42,27 @@ class CefDevToolsFrontend : public content::WebContentsObserver, private: CefDevToolsFrontend(CefRefPtr frontend_browser, content::DevToolsAgentHost* agent_host); - virtual ~CefDevToolsFrontend(); + ~CefDevToolsFrontend() override; // WebContentsObserver overrides. - virtual void RenderViewCreated( - content::RenderViewHost* render_view_host) OVERRIDE; - virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE; - virtual void WebContentsDestroyed() OVERRIDE; + void RenderViewCreated( + content::RenderViewHost* render_view_host) override; + void DocumentOnLoadCompletedInMainFrame() override; + void WebContentsDestroyed() override; // content::DevToolsFrontendHost::Delegate implementation. - virtual void HandleMessageFromDevToolsFrontend( - const std::string& message) OVERRIDE; - virtual void HandleMessageFromDevToolsFrontendToBackend( - const std::string& message) OVERRIDE; + void HandleMessageFromDevToolsFrontend( + const std::string& message) override; + void HandleMessageFromDevToolsFrontendToBackend( + const std::string& message) override; // content::DevToolsAgentHostClient implementation. - virtual void DispatchProtocolMessage( + void DispatchProtocolMessage( content::DevToolsAgentHost* agent_host, - const std::string& message) OVERRIDE; - virtual void AgentHostClosed( + const std::string& message) override; + void AgentHostClosed( content::DevToolsAgentHost* agent_host, - bool replaced) OVERRIDE; + bool replaced) override; CefRefPtr frontend_browser_; scoped_refptr agent_host_; diff --git a/libcef/browser/devtools_scheme_handler.cc b/libcef/browser/devtools_scheme_handler.cc index 115596496..1573c8985 100644 --- a/libcef/browser/devtools_scheme_handler.cc +++ b/libcef/browser/devtools_scheme_handler.cc @@ -22,8 +22,8 @@ class Delegate : public InternalHandlerDelegate { public: Delegate() {} - virtual bool OnRequest(CefRefPtr request, - Action* action) OVERRIDE { + bool OnRequest(CefRefPtr request, + Action* action) override { GURL url = GURL(request->GetURL().ToString()); std::string path = url.path(); if (path.length() > 0) diff --git a/libcef/browser/download_item_impl.h b/libcef/browser/download_item_impl.h index 6f3fcc8df..d3a6bb059 100644 --- a/libcef/browser/download_item_impl.h +++ b/libcef/browser/download_item_impl.h @@ -20,22 +20,22 @@ class CefDownloadItemImpl explicit CefDownloadItemImpl(content::DownloadItem* value); // CefDownloadItem methods. - virtual bool IsValid() OVERRIDE; - virtual bool IsInProgress() OVERRIDE; - virtual bool IsComplete() OVERRIDE; - virtual bool IsCanceled() OVERRIDE; - virtual int64 GetCurrentSpeed() OVERRIDE; - virtual int GetPercentComplete() OVERRIDE; - virtual int64 GetTotalBytes() OVERRIDE; - virtual int64 GetReceivedBytes() OVERRIDE; - virtual CefTime GetStartTime() OVERRIDE; - virtual CefTime GetEndTime() OVERRIDE; - virtual CefString GetFullPath() OVERRIDE; - virtual uint32 GetId() OVERRIDE; - virtual CefString GetURL() OVERRIDE; - virtual CefString GetSuggestedFileName() OVERRIDE; - virtual CefString GetContentDisposition() OVERRIDE; - virtual CefString GetMimeType() OVERRIDE; + bool IsValid() override; + bool IsInProgress() override; + bool IsComplete() override; + bool IsCanceled() override; + int64 GetCurrentSpeed() override; + int GetPercentComplete() override; + int64 GetTotalBytes() override; + int64 GetReceivedBytes() override; + CefTime GetStartTime() override; + CefTime GetEndTime() override; + CefString GetFullPath() override; + uint32 GetId() override; + CefString GetURL() override; + CefString GetSuggestedFileName() override; + CefString GetContentDisposition() override; + CefString GetMimeType() override; private: DISALLOW_COPY_AND_ASSIGN(CefDownloadItemImpl); diff --git a/libcef/browser/download_manager_delegate.cc b/libcef/browser/download_manager_delegate.cc index b263c9fe2..7ef38acf8 100644 --- a/libcef/browser/download_manager_delegate.cc +++ b/libcef/browser/download_manager_delegate.cc @@ -12,7 +12,7 @@ #include "libcef/browser/thread_util.h" #include "base/bind.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/logging.h" #include "base/path_service.h" #include "base/strings/string_util.h" @@ -62,8 +62,8 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { callback_(callback) { } - virtual void Continue(const CefString& download_path, - bool show_dialog) OVERRIDE { + void Continue(const CefString& download_path, + bool show_dialog) override { if (CEF_CURRENTLY_ON_UIT()) { if (download_id_ <= 0) return; @@ -203,7 +203,7 @@ class CefDownloadItemCallbackImpl : public CefDownloadItemCallback { download_id_(download_id) { } - virtual void Cancel() OVERRIDE { + void Cancel() override { CEF_POST_TASK(CEF_UIT, base::Bind(&CefDownloadItemCallbackImpl::DoCancel, this)); } diff --git a/libcef/browser/download_manager_delegate.h b/libcef/browser/download_manager_delegate.h index 86f01f78c..f878a8562 100644 --- a/libcef/browser/download_manager_delegate.h +++ b/libcef/browser/download_manager_delegate.h @@ -20,23 +20,23 @@ class CefDownloadManagerDelegate public content::DownloadManagerDelegate { public: explicit CefDownloadManagerDelegate(content::DownloadManager* manager); - ~CefDownloadManagerDelegate(); + ~CefDownloadManagerDelegate() override; private: // DownloadItem::Observer methods. - virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; - virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE; + void OnDownloadUpdated(content::DownloadItem* download) override; + void OnDownloadDestroyed(content::DownloadItem* download) override; // DownloadManager::Observer methods. - virtual void OnDownloadCreated(content::DownloadManager* manager, - content::DownloadItem* item) OVERRIDE; - virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; + void OnDownloadCreated(content::DownloadManager* manager, + content::DownloadItem* item) override; + void ManagerGoingDown(content::DownloadManager* manager) override; // DownloadManagerDelegate methods. - virtual bool DetermineDownloadTarget( + bool DetermineDownloadTarget( content::DownloadItem* item, - const content::DownloadTargetCallback& callback) OVERRIDE; - virtual void GetNextId(const content::DownloadIdCallback& callback) OVERRIDE; + const content::DownloadTargetCallback& callback) override; + void GetNextId(const content::DownloadIdCallback& callback) override; content::DownloadManager* manager_; base::WeakPtrFactory manager_ptr_factory_; diff --git a/libcef/browser/frame_host_impl.cc b/libcef/browser/frame_host_impl.cc index 54f932314..7d9531a40 100644 --- a/libcef/browser/frame_host_impl.cc +++ b/libcef/browser/frame_host_impl.cc @@ -17,7 +17,7 @@ class StringVisitHandler : public CefResponseManager::Handler { explicit StringVisitHandler(CefRefPtr visitor) : visitor_(visitor) { } - virtual void OnResponse(const Cef_Response_Params& params) OVERRIDE { + void OnResponse(const Cef_Response_Params& params) override { visitor_->Visit(params.response); } private: @@ -32,7 +32,7 @@ class ViewTextHandler : public CefResponseManager::Handler { explicit ViewTextHandler(CefRefPtr frame) : frame_(frame) { } - virtual void OnResponse(const Cef_Response_Params& params) OVERRIDE { + void OnResponse(const Cef_Response_Params& params) override { CefRefPtr browser = frame_->GetBrowser(); if (browser.get()) { static_cast(browser.get())->ViewText( diff --git a/libcef/browser/frame_host_impl.h b/libcef/browser/frame_host_impl.h index 0089b8103..ec486a305 100644 --- a/libcef/browser/frame_host_impl.h +++ b/libcef/browser/frame_host_impl.h @@ -24,36 +24,36 @@ class CefFrameHostImpl : public CefFrame { const CefString& url, const CefString& name, int64 parent_frame_id); - virtual ~CefFrameHostImpl(); + ~CefFrameHostImpl() override; // CefFrame methods - virtual bool IsValid() OVERRIDE; - virtual void Undo() OVERRIDE; - virtual void Redo() OVERRIDE; - virtual void Cut() OVERRIDE; - virtual void Copy() OVERRIDE; - virtual void Paste() OVERRIDE; - virtual void Delete() OVERRIDE; - virtual void SelectAll() OVERRIDE; - virtual void ViewSource() OVERRIDE; - virtual void GetSource(CefRefPtr visitor) OVERRIDE; - virtual void GetText(CefRefPtr visitor) OVERRIDE; - virtual void LoadRequest(CefRefPtr request) OVERRIDE; - virtual void LoadURL(const CefString& url) OVERRIDE; - virtual void LoadString(const CefString& string, - const CefString& url) OVERRIDE; - virtual void ExecuteJavaScript(const CefString& jsCode, - const CefString& scriptUrl, - int startLine) OVERRIDE; - virtual bool IsMain() OVERRIDE; - virtual bool IsFocused() OVERRIDE; - virtual CefString GetName() OVERRIDE; - virtual int64 GetIdentifier() OVERRIDE; - virtual CefRefPtr GetParent() OVERRIDE; - virtual CefString GetURL() OVERRIDE; - virtual CefRefPtr GetBrowser() OVERRIDE; - virtual CefRefPtr GetV8Context() OVERRIDE; - virtual void VisitDOM(CefRefPtr visitor) OVERRIDE; + bool IsValid() override; + void Undo() override; + void Redo() override; + void Cut() override; + void Copy() override; + void Paste() override; + void Delete() override; + void SelectAll() override; + void ViewSource() override; + void GetSource(CefRefPtr visitor) override; + void GetText(CefRefPtr visitor) override; + void LoadRequest(CefRefPtr request) override; + void LoadURL(const CefString& url) override; + void LoadString(const CefString& string, + const CefString& url) override; + void ExecuteJavaScript(const CefString& jsCode, + const CefString& scriptUrl, + int startLine) override; + bool IsMain() override; + bool IsFocused() override; + CefString GetName() override; + int64 GetIdentifier() override; + CefRefPtr GetParent() override; + CefString GetURL() override; + CefRefPtr GetBrowser() override; + CefRefPtr GetV8Context() override; + void VisitDOM(CefRefPtr visitor) override; void SetFocused(bool focused); void SetAttributes(const CefString& url, diff --git a/libcef/browser/geolocation_impl.cc b/libcef/browser/geolocation_impl.cc index 2b9a5feda..47c93c34c 100644 --- a/libcef/browser/geolocation_impl.cc +++ b/libcef/browser/geolocation_impl.cc @@ -26,6 +26,10 @@ class CefLocationRequest : } private: + friend class base::RefCountedThreadSafe; + + ~CefLocationRequest() {} + void OnLocationUpdate(const content::Geoposition& position) { CEF_REQUIRE_UIT(); if (callback_.get()) { diff --git a/libcef/browser/internal_scheme_handler.cc b/libcef/browser/internal_scheme_handler.cc index 2bc824cbe..6a955ffb3 100644 --- a/libcef/browser/internal_scheme_handler.cc +++ b/libcef/browser/internal_scheme_handler.cc @@ -37,27 +37,27 @@ class RedirectHandler : public CefResourceHandler { : url_(url) { } - virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback) OVERRIDE { + bool ProcessRequest(CefRefPtr request, + CefRefPtr callback) override { callback->Continue(); return true; } - virtual void GetResponseHeaders(CefRefPtr response, - int64& response_length, - CefString& redirectUrl) OVERRIDE { + void GetResponseHeaders(CefRefPtr response, + int64& response_length, + CefString& redirectUrl) override { response_length = 0; redirectUrl = url_.spec(); } - virtual bool ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr callback) OVERRIDE { + bool ReadResponse(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr callback) override { return false; } - virtual void Cancel() OVERRIDE { + void Cancel() override { } private: @@ -76,30 +76,30 @@ class InternalHandler : public CefResourceHandler { size_(size) { } - virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback) OVERRIDE { + bool ProcessRequest(CefRefPtr request, + CefRefPtr callback) override { callback->Continue(); return true; } - virtual void GetResponseHeaders(CefRefPtr response, - int64& response_length, - CefString& redirectUrl) OVERRIDE { + void GetResponseHeaders(CefRefPtr response, + int64& response_length, + CefString& redirectUrl) override { response_length = size_; response->SetMimeType(mime_type_); response->SetStatus(200); } - virtual bool ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr callback) OVERRIDE { + bool ReadResponse(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr callback) override { bytes_read = reader_->Read(data_out, 1, bytes_to_read); return (bytes_read > 0); } - virtual void Cancel() OVERRIDE { + void Cancel() override { } private: @@ -117,11 +117,11 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory { : delegate_(delegate.Pass()) { } - virtual CefRefPtr Create( + CefRefPtr Create( CefRefPtr browser, CefRefPtr frame, const CefString& scheme_name, - CefRefPtr request) OVERRIDE { + CefRefPtr request) override { GURL url = GURL(request->GetURL().ToString()); InternalHandlerDelegate::Action action; diff --git a/libcef/browser/javascript_dialog_manager.cc b/libcef/browser/javascript_dialog_manager.cc index cae3a2b4e..6e8ce3103 100644 --- a/libcef/browser/javascript_dialog_manager.cc +++ b/libcef/browser/javascript_dialog_manager.cc @@ -21,7 +21,7 @@ class CefJSDialogCallbackImpl : public CefJSDialogCallback { const content::JavaScriptDialogManager::DialogClosedCallback& callback) : callback_(callback) { } - ~CefJSDialogCallbackImpl() { + ~CefJSDialogCallbackImpl() override { if (!callback_.is_null()) { // The callback is still pending. Cancel it now. if (CEF_CURRENTLY_ON_UIT()) { @@ -33,8 +33,8 @@ class CefJSDialogCallbackImpl : public CefJSDialogCallback { } } - virtual void Continue(bool success, - const CefString& user_input) OVERRIDE { + void Continue(bool success, + const CefString& user_input) override { if (CEF_CURRENTLY_ON_UIT()) { if (!callback_.is_null()) { callback_.Run(success, user_input); diff --git a/libcef/browser/javascript_dialog_manager.h b/libcef/browser/javascript_dialog_manager.h index 445499bff..221050743 100644 --- a/libcef/browser/javascript_dialog_manager.h +++ b/libcef/browser/javascript_dialog_manager.h @@ -19,10 +19,10 @@ class CefJavaScriptDialog; class CefJavaScriptDialogManager : public content::JavaScriptDialogManager { public: explicit CefJavaScriptDialogManager(CefBrowserHostImpl* browser); - virtual ~CefJavaScriptDialogManager(); + ~CefJavaScriptDialogManager() override; // JavaScriptDialogManager methods. - virtual void RunJavaScriptDialog( + void RunJavaScriptDialog( content::WebContents* web_contents, const GURL& origin_url, const std::string& accept_lang, @@ -30,19 +30,19 @@ class CefJavaScriptDialogManager : public content::JavaScriptDialogManager { const base::string16& message_text, const base::string16& default_prompt_text, const DialogClosedCallback& callback, - bool* did_suppress_message) OVERRIDE; + bool* did_suppress_message) override; - virtual void RunBeforeUnloadDialog( + void RunBeforeUnloadDialog( content::WebContents* web_contents, const base::string16& message_text, bool is_reload, - const DialogClosedCallback& callback) OVERRIDE; + const DialogClosedCallback& callback) override; - virtual void CancelActiveAndPendingDialogs( - content::WebContents* web_contents) OVERRIDE; + void CancelActiveAndPendingDialogs( + content::WebContents* web_contents) override; - virtual void WebContentsDestroyed( - content::WebContents* web_contents) OVERRIDE; + void WebContentsDestroyed( + content::WebContents* web_contents) override; // Called by the CefJavaScriptDialog when it closes. void DialogClosed(CefJavaScriptDialog* dialog); diff --git a/libcef/browser/media_capture_devices_dispatcher.h b/libcef/browser/media_capture_devices_dispatcher.h index adb4b18af..cae0d3b0e 100644 --- a/libcef/browser/media_capture_devices_dispatcher.h +++ b/libcef/browser/media_capture_devices_dispatcher.h @@ -42,23 +42,23 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver { content::MediaStreamDevices* devices); // Overridden from content::MediaObserver: - virtual void OnAudioCaptureDevicesChanged() OVERRIDE; - virtual void OnVideoCaptureDevicesChanged() OVERRIDE; - virtual void OnMediaRequestStateChanged( + void OnAudioCaptureDevicesChanged() override; + void OnVideoCaptureDevicesChanged() override; + void OnMediaRequestStateChanged( int render_process_id, int render_frame_id, int page_request_id, const GURL& security_origin, content::MediaStreamType stream_type, - content::MediaRequestState state) OVERRIDE; - virtual void OnCreatingAudioStream(int render_process_id, - int render_view_id) OVERRIDE; + content::MediaRequestState state) override; + void OnCreatingAudioStream(int render_process_id, + int render_view_id) override; private: friend struct DefaultSingletonTraits; CefMediaCaptureDevicesDispatcher(); - virtual ~CefMediaCaptureDevicesDispatcher(); + ~CefMediaCaptureDevicesDispatcher() override; const content::MediaStreamDevices& GetAudioCaptureDevices(); const content::MediaStreamDevices& GetVideoCaptureDevices(); diff --git a/libcef/browser/menu_creator.h b/libcef/browser/menu_creator.h index 2955fd439..732415053 100644 --- a/libcef/browser/menu_creator.h +++ b/libcef/browser/menu_creator.h @@ -29,7 +29,7 @@ class CefMenuCreator : public CefMenuModelImpl::Delegate { }; explicit CefMenuCreator(CefBrowserHostImpl* browser); - virtual ~CefMenuCreator(); + ~CefMenuCreator() override; // Returns true if the context menu is currently showing. bool IsShowingContextMenu(); @@ -47,12 +47,12 @@ class CefMenuCreator : public CefMenuModelImpl::Delegate { bool CreateRunner(); // CefMenuModelImpl::Delegate methods. - virtual void ExecuteCommand(CefRefPtr source, - int command_id, - cef_event_flags_t event_flags) OVERRIDE; - virtual void MenuWillShow(CefRefPtr source) OVERRIDE; - virtual void MenuClosed(CefRefPtr source) OVERRIDE; - virtual bool FormatLabel(base::string16& label) OVERRIDE; + void ExecuteCommand(CefRefPtr source, + int command_id, + cef_event_flags_t event_flags) override; + void MenuWillShow(CefRefPtr source) override; + void MenuClosed(CefRefPtr source) override; + bool FormatLabel(base::string16& label) override; // Create the default menu model. void CreateDefaultModel(); diff --git a/libcef/browser/menu_creator_runner_linux.h b/libcef/browser/menu_creator_runner_linux.h index eb28c5707..4d00bc0d0 100644 --- a/libcef/browser/menu_creator_runner_linux.h +++ b/libcef/browser/menu_creator_runner_linux.h @@ -14,12 +14,12 @@ class CefMenuCreatorRunnerLinux: public CefMenuCreator::Runner { public: CefMenuCreatorRunnerLinux(); - virtual ~CefMenuCreatorRunnerLinux(); + ~CefMenuCreatorRunnerLinux() override; // CefMemoryManager::Runner methods. - virtual bool RunContextMenu(CefMenuCreator* manager) OVERRIDE; - virtual void CancelContextMenu() OVERRIDE; - virtual bool FormatLabel(base::string16& label) OVERRIDE; + bool RunContextMenu(CefMenuCreator* manager) override; + void CancelContextMenu() override; + bool FormatLabel(base::string16& label) override; private: scoped_ptr menu_; diff --git a/libcef/browser/menu_creator_runner_mac.h b/libcef/browser/menu_creator_runner_mac.h index d4ccc6d79..dc7f8c50a 100644 --- a/libcef/browser/menu_creator_runner_mac.h +++ b/libcef/browser/menu_creator_runner_mac.h @@ -17,10 +17,10 @@ class MenuController; class CefMenuCreatorRunnerMac : public CefMenuCreator::Runner { public: CefMenuCreatorRunnerMac(); - virtual ~CefMenuCreatorRunnerMac(); + ~CefMenuCreatorRunnerMac() override; // CefMemoryManager::Runner methods. - virtual bool RunContextMenu(CefMenuCreator* manager) OVERRIDE; + bool RunContextMenu(CefMenuCreator* manager) override; private: MenuController* menu_controller_; diff --git a/libcef/browser/menu_creator_runner_win.h b/libcef/browser/menu_creator_runner_win.h index c78e953b6..1e4b4e304 100644 --- a/libcef/browser/menu_creator_runner_win.h +++ b/libcef/browser/menu_creator_runner_win.h @@ -16,7 +16,7 @@ class CefMenuCreatorRunnerWin : public CefMenuCreator::Runner { CefMenuCreatorRunnerWin(); // CefMemoryManager::Runner methods. - virtual bool RunContextMenu(CefMenuCreator* manager) OVERRIDE; + bool RunContextMenu(CefMenuCreator* manager) override; private: scoped_ptr menu_; diff --git a/libcef/browser/menu_model_impl.cc b/libcef/browser/menu_model_impl.cc index babe2509b..a847ffc4c 100644 --- a/libcef/browser/menu_model_impl.cc +++ b/libcef/browser/menu_model_impl.cc @@ -26,19 +26,16 @@ class CefSimpleMenuModel : public ui::MenuModel { menu_model_delegate_(NULL) { } - virtual ~CefSimpleMenuModel() { - } - // MenuModel methods. - virtual bool HasIcons() const OVERRIDE { + bool HasIcons() const override { return false; } - virtual int GetItemCount() const OVERRIDE { + int GetItemCount() const override { return impl_->GetCount(); } - virtual ItemType GetTypeAt(int index) const OVERRIDE { + ItemType GetTypeAt(int index) const override { switch (impl_->GetTypeAt(index)) { case MENUITEMTYPE_COMMAND: return TYPE_COMMAND; @@ -56,24 +53,24 @@ class CefSimpleMenuModel : public ui::MenuModel { } } - virtual ui::MenuSeparatorType GetSeparatorTypeAt(int index) const OVERRIDE { + ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override { return ui::NORMAL_SEPARATOR; } - virtual int GetCommandIdAt(int index) const OVERRIDE { + int GetCommandIdAt(int index) const override { return impl_->GetCommandIdAt(index); } - virtual base::string16 GetLabelAt(int index) const OVERRIDE { + base::string16 GetLabelAt(int index) const override { return impl_->GetFormattedLabelAt(index); } - virtual bool IsItemDynamicAt(int index) const OVERRIDE { + bool IsItemDynamicAt(int index) const override { return false; } - virtual bool GetAcceleratorAt(int index, - ui::Accelerator* accelerator) const OVERRIDE { + bool GetAcceleratorAt(int index, + ui::Accelerator* accelerator) const override { int key_code = 0; bool shift_pressed = false; bool ctrl_pressed = false; @@ -95,63 +92,63 @@ class CefSimpleMenuModel : public ui::MenuModel { return false; } - virtual bool IsItemCheckedAt(int index) const OVERRIDE { + bool IsItemCheckedAt(int index) const override { return impl_->IsCheckedAt(index); } - virtual int GetGroupIdAt(int index) const OVERRIDE { + int GetGroupIdAt(int index) const override { return impl_->GetGroupIdAt(index); } - virtual bool GetIconAt(int index, gfx::Image* icon) OVERRIDE { + bool GetIconAt(int index, gfx::Image* icon) override { return false; } - virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt( - int index) const OVERRIDE { + ui::ButtonMenuItemModel* GetButtonMenuItemAt( + int index) const override { return NULL; } - virtual bool IsEnabledAt(int index) const OVERRIDE { + bool IsEnabledAt(int index) const override { return impl_->IsEnabledAt(index); } - virtual bool IsVisibleAt(int index) const OVERRIDE { + bool IsVisibleAt(int index) const override { return impl_->IsVisibleAt(index); } - virtual void HighlightChangedTo(int index) OVERRIDE { + void HighlightChangedTo(int index) override { } - virtual void ActivatedAt(int index) OVERRIDE { + void ActivatedAt(int index) override { ActivatedAt(index, 0); } - virtual void ActivatedAt(int index, int event_flags) OVERRIDE { + void ActivatedAt(int index, int event_flags) override { impl_->ActivatedAt(index, static_cast(event_flags)); } - virtual MenuModel* GetSubmenuModelAt(int index) const OVERRIDE { + MenuModel* GetSubmenuModelAt(int index) const override { CefRefPtr submenu = impl_->GetSubMenuAt(index); if (submenu.get()) return static_cast(submenu.get())->model(); return NULL; } - virtual void MenuWillShow() OVERRIDE { + void MenuWillShow() override { impl_->MenuWillShow(); } - virtual void MenuClosed() OVERRIDE { + void MenuClosed() override { impl_->MenuClosed(); } - virtual void SetMenuModelDelegate( - ui::MenuModelDelegate* menu_model_delegate) OVERRIDE { + void SetMenuModelDelegate( + ui::MenuModelDelegate* menu_model_delegate) override { menu_model_delegate_ = menu_model_delegate; } - virtual ui::MenuModelDelegate* GetMenuModelDelegate() const OVERRIDE { + ui::MenuModelDelegate* GetMenuModelDelegate() const override { return menu_model_delegate_; } diff --git a/libcef/browser/menu_model_impl.h b/libcef/browser/menu_model_impl.h index 62aa7ebff..6e3996861 100644 --- a/libcef/browser/menu_model_impl.h +++ b/libcef/browser/menu_model_impl.h @@ -40,68 +40,68 @@ class CefMenuModelImpl : public CefMenuModel { // The delegate must outlive this class. explicit CefMenuModelImpl(Delegate* delegate); - virtual ~CefMenuModelImpl(); + ~CefMenuModelImpl() override; // CefMenuModel methods. - virtual bool Clear() OVERRIDE; - virtual int GetCount() OVERRIDE; - virtual bool AddSeparator() OVERRIDE; - virtual bool AddItem(int command_id, const CefString& label) OVERRIDE; - virtual bool AddCheckItem(int command_id, const CefString& label) OVERRIDE; - virtual bool AddRadioItem(int command_id, const CefString& label, - int group_id) OVERRIDE; - virtual CefRefPtr AddSubMenu(int command_id, - const CefString& label) OVERRIDE; - virtual bool InsertSeparatorAt(int index) OVERRIDE; - virtual bool InsertItemAt(int index, int command_id, - const CefString& label) OVERRIDE; - virtual bool InsertCheckItemAt(int index, int command_id, - const CefString& label) OVERRIDE; - virtual bool InsertRadioItemAt(int index, int command_id, - const CefString& label, int group_id) OVERRIDE; - virtual CefRefPtr InsertSubMenuAt(int index, int command_id, - const CefString& label) OVERRIDE; - virtual bool Remove(int command_id) OVERRIDE; - virtual bool RemoveAt(int index) OVERRIDE; - virtual int GetIndexOf(int command_id) OVERRIDE; - virtual int GetCommandIdAt(int index) OVERRIDE; - virtual bool SetCommandIdAt(int index, int command_id) OVERRIDE; - virtual CefString GetLabel(int command_id) OVERRIDE; - virtual CefString GetLabelAt(int index) OVERRIDE; - virtual bool SetLabel(int command_id, const CefString& label) OVERRIDE; - virtual bool SetLabelAt(int index, const CefString& label) OVERRIDE; - virtual MenuItemType GetType(int command_id) OVERRIDE; - virtual MenuItemType GetTypeAt(int index) OVERRIDE; - virtual int GetGroupId(int command_id) OVERRIDE; - virtual int GetGroupIdAt(int index) OVERRIDE; - virtual bool SetGroupId(int command_id, int group_id) OVERRIDE; - virtual bool SetGroupIdAt(int index, int group_id) OVERRIDE; - virtual CefRefPtr GetSubMenu(int command_id) OVERRIDE; - virtual CefRefPtr GetSubMenuAt(int index) OVERRIDE; - virtual bool IsVisible(int command_id) OVERRIDE; - virtual bool IsVisibleAt(int index) OVERRIDE; - virtual bool SetVisible(int command_id, bool visible) OVERRIDE; - virtual bool SetVisibleAt(int index, bool visible) OVERRIDE; - virtual bool IsEnabled(int command_id) OVERRIDE; - virtual bool IsEnabledAt(int index) OVERRIDE; - virtual bool SetEnabled(int command_id, bool enabled) OVERRIDE; - virtual bool SetEnabledAt(int index, bool enabled) OVERRIDE; - virtual bool IsChecked(int command_id) OVERRIDE; - virtual bool IsCheckedAt(int index) OVERRIDE; - virtual bool SetChecked(int command_id, bool checked) OVERRIDE; - virtual bool SetCheckedAt(int index, bool checked) OVERRIDE; - virtual bool HasAccelerator(int command_id) OVERRIDE; - virtual bool HasAcceleratorAt(int index) OVERRIDE; - virtual bool SetAccelerator(int command_id, int key_code, bool shift_pressed, - bool ctrl_pressed, bool alt_pressed) OVERRIDE; - virtual bool SetAcceleratorAt(int index, int key_code, bool shift_pressed, - bool ctrl_pressed, bool alt_pressed) OVERRIDE; - virtual bool RemoveAccelerator(int command_id) OVERRIDE; - virtual bool RemoveAcceleratorAt(int index) OVERRIDE; - virtual bool GetAccelerator(int command_id, int& key_code, - bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) OVERRIDE; - virtual bool GetAcceleratorAt(int index, int& key_code, bool& shift_pressed, - bool& ctrl_pressed, bool& alt_pressed) OVERRIDE; + bool Clear() override; + int GetCount() override; + bool AddSeparator() override; + bool AddItem(int command_id, const CefString& label) override; + bool AddCheckItem(int command_id, const CefString& label) override; + bool AddRadioItem(int command_id, const CefString& label, + int group_id) override; + CefRefPtr AddSubMenu(int command_id, + const CefString& label) override; + bool InsertSeparatorAt(int index) override; + bool InsertItemAt(int index, int command_id, + const CefString& label) override; + bool InsertCheckItemAt(int index, int command_id, + const CefString& label) override; + bool InsertRadioItemAt(int index, int command_id, + const CefString& label, int group_id) override; + CefRefPtr InsertSubMenuAt(int index, int command_id, + const CefString& label) override; + bool Remove(int command_id) override; + bool RemoveAt(int index) override; + int GetIndexOf(int command_id) override; + int GetCommandIdAt(int index) override; + bool SetCommandIdAt(int index, int command_id) override; + CefString GetLabel(int command_id) override; + CefString GetLabelAt(int index) override; + bool SetLabel(int command_id, const CefString& label) override; + bool SetLabelAt(int index, const CefString& label) override; + MenuItemType GetType(int command_id) override; + MenuItemType GetTypeAt(int index) override; + int GetGroupId(int command_id) override; + int GetGroupIdAt(int index) override; + bool SetGroupId(int command_id, int group_id) override; + bool SetGroupIdAt(int index, int group_id) override; + CefRefPtr GetSubMenu(int command_id) override; + CefRefPtr GetSubMenuAt(int index) override; + bool IsVisible(int command_id) override; + bool IsVisibleAt(int index) override; + bool SetVisible(int command_id, bool visible) override; + bool SetVisibleAt(int index, bool visible) override; + bool IsEnabled(int command_id) override; + bool IsEnabledAt(int index) override; + bool SetEnabled(int command_id, bool enabled) override; + bool SetEnabledAt(int index, bool enabled) override; + bool IsChecked(int command_id) override; + bool IsCheckedAt(int index) override; + bool SetChecked(int command_id, bool checked) override; + bool SetCheckedAt(int index, bool checked) override; + bool HasAccelerator(int command_id) override; + bool HasAcceleratorAt(int index) override; + bool SetAccelerator(int command_id, int key_code, bool shift_pressed, + bool ctrl_pressed, bool alt_pressed) override; + bool SetAcceleratorAt(int index, int key_code, bool shift_pressed, + bool ctrl_pressed, bool alt_pressed) override; + bool RemoveAccelerator(int command_id) override; + bool RemoveAcceleratorAt(int index) override; + bool GetAccelerator(int command_id, int& key_code, + bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) override; + bool GetAcceleratorAt(int index, int& key_code, bool& shift_pressed, + bool& ctrl_pressed, bool& alt_pressed) override; // Callbacks from the ui::MenuModel implementation. void ActivatedAt(int index, cef_event_flags_t event_flags); diff --git a/libcef/browser/print_settings_impl.h b/libcef/browser/print_settings_impl.h index e802c56f3..0ae7e10e4 100644 --- a/libcef/browser/print_settings_impl.h +++ b/libcef/browser/print_settings_impl.h @@ -20,32 +20,32 @@ class CefPrintSettingsImpl bool read_only); // CefPrintSettings methods. - virtual bool IsValid() OVERRIDE; - virtual bool IsReadOnly() OVERRIDE; - virtual CefRefPtr Copy() OVERRIDE; - virtual void SetOrientation(bool landscape) OVERRIDE; - virtual bool IsLandscape() OVERRIDE; - virtual void SetPrinterPrintableArea( + bool IsValid() override; + bool IsReadOnly() override; + CefRefPtr Copy() override; + void SetOrientation(bool landscape) override; + bool IsLandscape() override; + void SetPrinterPrintableArea( const CefSize& physical_size_device_units, const CefRect& printable_area_device_units, - bool landscape_needs_flip) OVERRIDE; - virtual void SetDeviceName(const CefString& name) OVERRIDE; - virtual CefString GetDeviceName() OVERRIDE; - virtual void SetDPI(int dpi) OVERRIDE; - virtual int GetDPI() OVERRIDE; - virtual void SetPageRanges(const PageRangeList& ranges) OVERRIDE; - virtual size_t GetPageRangesCount() OVERRIDE; - virtual void GetPageRanges(PageRangeList& ranges) OVERRIDE; - virtual void SetSelectionOnly(bool selection_only) OVERRIDE; - virtual bool IsSelectionOnly() OVERRIDE; - virtual void SetCollate(bool collate) OVERRIDE; - virtual bool WillCollate() OVERRIDE; - virtual void SetColorModel(ColorModel model) OVERRIDE; - virtual ColorModel GetColorModel() OVERRIDE; - virtual void SetCopies(int copies) OVERRIDE; - virtual int GetCopies() OVERRIDE; - virtual void SetDuplexMode(DuplexMode mode) OVERRIDE; - virtual DuplexMode GetDuplexMode() OVERRIDE; + bool landscape_needs_flip) override; + void SetDeviceName(const CefString& name) override; + CefString GetDeviceName() override; + void SetDPI(int dpi) override; + int GetDPI() override; + void SetPageRanges(const PageRangeList& ranges) override; + size_t GetPageRangesCount() override; + void GetPageRanges(PageRangeList& ranges) override; + void SetSelectionOnly(bool selection_only) override; + bool IsSelectionOnly() override; + void SetCollate(bool collate) override; + bool WillCollate() override; + void SetColorModel(ColorModel model) override; + ColorModel GetColorModel() override; + void SetCopies(int copies) override; + int GetCopies() override; + void SetDuplexMode(DuplexMode mode) override; + DuplexMode GetDuplexMode() override; // Must hold the controller lock while using this value. const printing::PrintSettings& print_settings() { return const_value(); } diff --git a/libcef/browser/printing/print_dialog_linux.cc b/libcef/browser/printing/print_dialog_linux.cc index 39bbc9435..53a5c51e4 100644 --- a/libcef/browser/printing/print_dialog_linux.cc +++ b/libcef/browser/printing/print_dialog_linux.cc @@ -13,7 +13,7 @@ #include "libcef/common/content_client.h" #include "base/bind.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/files/file_util_proxy.h" #include "base/lazy_instance.h" #include "base/logging.h" @@ -34,7 +34,7 @@ class CefPrintDialogCallbackImpl : public CefPrintDialogCallback { : dialog_(dialog) { } - virtual void Continue(CefRefPtr settings) OVERRIDE { + void Continue(CefRefPtr settings) override { if (CEF_CURRENTLY_ON_UIT()) { if (dialog_.get()) { dialog_->OnPrintContinue(settings); @@ -46,7 +46,7 @@ class CefPrintDialogCallbackImpl : public CefPrintDialogCallback { } } - virtual void Cancel() OVERRIDE { + void Cancel() override { if (CEF_CURRENTLY_ON_UIT()) { if (dialog_.get()) { dialog_->OnPrintCancel(); @@ -75,7 +75,7 @@ class CefPrintJobCallbackImpl : public CefPrintJobCallback { : dialog_(dialog) { } - virtual void Continue() OVERRIDE { + void Continue() override { if (CEF_CURRENTLY_ON_UIT()) { if (dialog_.get()) { dialog_->OnJobCompleted(); diff --git a/libcef/browser/printing/print_dialog_linux.h b/libcef/browser/printing/print_dialog_linux.h index 69444433b..c7fcea771 100644 --- a/libcef/browser/printing/print_dialog_linux.h +++ b/libcef/browser/printing/print_dialog_linux.h @@ -34,26 +34,28 @@ class CefPrintDialogLinux PrintingContextLinux* context); // printing::CefPrintDialogLinuxInterface implementation. - virtual void UseDefaultSettings() OVERRIDE; - virtual bool UpdateSettings(printing::PrintSettings* settings) OVERRIDE; - virtual void ShowDialog( + void UseDefaultSettings() override; + bool UpdateSettings(printing::PrintSettings* settings) override; + void ShowDialog( gfx::NativeView parent_view, bool has_selection, - const PrintingContextLinux::PrintSettingsCallback& callback) OVERRIDE; - virtual void PrintDocument(const printing::MetafilePlayer& metafile, - const base::string16& document_name) OVERRIDE; - virtual void AddRefToDialog() OVERRIDE; - virtual void ReleaseDialog() OVERRIDE; + const PrintingContextLinux::PrintSettingsCallback& callback) override; + void PrintDocument(const printing::MetafilePlayer& metafile, + const base::string16& document_name) override; + void AddRefToDialog() override; + void ReleaseDialog() override; private: + friend class base::DeleteHelper; + friend class base::RefCountedThreadSafe< + CefPrintDialogLinux, content::BrowserThread::DeleteOnUIThread>; friend struct content::BrowserThread::DeleteOnThread< content::BrowserThread::UI>; - friend class base::DeleteHelper; friend class CefPrintDialogCallbackImpl; friend class CefPrintJobCallbackImpl; explicit CefPrintDialogLinux(PrintingContextLinux* context); - virtual ~CefPrintDialogLinux(); + ~CefPrintDialogLinux() override; void SetHandler(); void ReleaseHandler(); diff --git a/libcef/browser/printing/print_view_manager.cc b/libcef/browser/printing/print_view_manager.cc index 8be8d8a52..028bbfae4 100644 --- a/libcef/browser/printing/print_view_manager.cc +++ b/libcef/browser/printing/print_view_manager.cc @@ -29,11 +29,11 @@ PrintViewManager::PrintViewManager(content::WebContents* web_contents) PrintViewManager::~PrintViewManager() { } -#if !defined(DISABLE_BASIC_PRINTING) +#if defined(ENABLE_BASIC_PRINTING) bool PrintViewManager::PrintForSystemDialogNow() { return PrintNowInternal(new PrintMsg_PrintForSystemDialog(routing_id())); } -#endif // !DISABLE_BASIC_PRINTING +#endif // ENABLE_BASIC_PRINTING void PrintViewManager::RenderProcessGone(base::TerminationStatus status) { PrintViewManagerBase::RenderProcessGone(status); diff --git a/libcef/browser/printing/print_view_manager.h b/libcef/browser/printing/print_view_manager.h index 9d64b027c..d886809e4 100644 --- a/libcef/browser/printing/print_view_manager.h +++ b/libcef/browser/printing/print_view_manager.h @@ -18,20 +18,20 @@ namespace printing { class PrintViewManager : public PrintViewManagerBase, public content::WebContentsUserData { public: - virtual ~PrintViewManager(); + ~PrintViewManager() override; -#if !defined(DISABLE_BASIC_PRINTING) +#if defined(ENABLE_BASIC_PRINTING) // Same as PrintNow(), but for the case where a user prints with the system // dialog from print preview. bool PrintForSystemDialogNow(); -#endif // !DISABLE_BASIC_PRINTING +#endif // ENABLE_BASIC_PRINTING // content::WebContentsObserver implementation. - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + bool OnMessageReceived(const IPC::Message& message) override; // content::WebContentsObserver implementation. // Terminates or cancels the print job if one was pending. - virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; + void RenderProcessGone(base::TerminationStatus status) override; private: explicit PrintViewManager(content::WebContents* web_contents); diff --git a/libcef/browser/printing/print_view_manager_base.cc b/libcef/browser/printing/print_view_manager_base.cc index f08d1f2b4..23c2cd966 100644 --- a/libcef/browser/printing/print_view_manager_base.cc +++ b/libcef/browser/printing/print_view_manager_base.cc @@ -61,11 +61,11 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } -#if !defined(DISABLE_BASIC_PRINTING) +#if defined(ENABLE_BASIC_PRINTING) bool PrintViewManagerBase::PrintNow() { return PrintNowInternal(new PrintMsg_PrintPages(routing_id())); } -#endif // !DISABLE_BASIC_PRINTING +#endif // ENABLE_BASIC_PRINTING void PrintViewManagerBase::UpdateScriptedPrintingBlocked() { Send(new PrintMsg_SetScriptedPrintingBlocked( @@ -152,7 +152,7 @@ void PrintViewManagerBase::OnDidPrintPage( #if !defined(OS_WIN) // Update the rendered document. It will send notifications to the listener. document->SetPage(params.page_number, - metafile.PassAs(), + metafile.Pass(), params.page_size, params.content_area); diff --git a/libcef/browser/printing/print_view_manager_base.h b/libcef/browser/printing/print_view_manager_base.h index 7a6df9502..2af7b3933 100644 --- a/libcef/browser/printing/print_view_manager_base.h +++ b/libcef/browser/printing/print_view_manager_base.h @@ -33,20 +33,20 @@ class PrintViewManagerBase : public content::NotificationObserver, public PrintedPagesSource, public content::WebContentsObserver { public: - virtual ~PrintViewManagerBase(); + ~PrintViewManagerBase() override; -#if !defined(DISABLE_BASIC_PRINTING) +#if defined(ENABLE_BASIC_PRINTING) // Prints the current document immediately. Since the rendering is // asynchronous, the actual printing will not be completed on the return of // this function. Returns false if printing is impossible at the moment. virtual bool PrintNow(); -#endif // !DISABLE_BASIC_PRINTING +#endif // ENABLE_BASIC_PRINTING // Whether to block scripted printing for our tab or not. void UpdateScriptedPrintingBlocked(); // PrintedPagesSource implementation. - virtual base::string16 RenderSourceName() OVERRIDE; + base::string16 RenderSourceName() override; protected: explicit PrintViewManagerBase(content::WebContents* web_contents); @@ -55,26 +55,26 @@ class PrintViewManagerBase : public content::NotificationObserver, bool PrintNowInternal(IPC::Message* message); // Terminates or cancels the print job if one was pending. - virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; + void RenderProcessGone(base::TerminationStatus status) override; // content::WebContentsObserver implementation. - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + bool OnMessageReceived(const IPC::Message& message) override; // IPC Message handlers. virtual void OnPrintingFailed(int cookie); private: // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // content::WebContentsObserver implementation. - virtual void DidStartLoading( - content::RenderViewHost* render_view_host) OVERRIDE; + void DidStartLoading( + content::RenderViewHost* render_view_host) override; // Cancels the print job. - virtual void NavigationStopped() OVERRIDE; + void NavigationStopped() override; // IPC Message handlers. void OnDidGetPrintedPagesCount(int cookie, int number_pages); diff --git a/libcef/browser/printing/printing_message_filter.h b/libcef/browser/printing/printing_message_filter.h index 1e94e4f1a..35c0ced89 100644 --- a/libcef/browser/printing/printing_message_filter.h +++ b/libcef/browser/printing/printing_message_filter.h @@ -38,13 +38,13 @@ class PrintingMessageFilter : public content::BrowserMessageFilter { explicit PrintingMessageFilter(int render_process_id); // content::BrowserMessageFilter methods. - virtual void OverrideThreadForMessage( + void OverrideThreadForMessage( const IPC::Message& message, - content::BrowserThread::ID* thread) OVERRIDE; - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + content::BrowserThread::ID* thread) override; + bool OnMessageReceived(const IPC::Message& message) override; private: - virtual ~PrintingMessageFilter(); + ~PrintingMessageFilter() override; #if defined(OS_WIN) // Used to pass resulting EMF from renderer to browser in printing. diff --git a/libcef/browser/render_widget_host_view_osr.cc b/libcef/browser/render_widget_host_view_osr.cc index 949bc02d2..470627cfd 100644 --- a/libcef/browser/render_widget_host_view_osr.cc +++ b/libcef/browser/render_widget_host_view_osr.cc @@ -54,35 +54,6 @@ static blink::WebScreenInfo webScreenInfoFrom(const CefScreenInfo& src) { return webScreenInfo; } -// Root layer passed to the ui::Compositor. -class CefRootLayer : public ui::Layer, public ui::LayerDelegate { - public: - CefRootLayer() - : Layer(ui::LAYER_TEXTURED) { - set_delegate(this); - } - - virtual ~CefRootLayer() { } - - // Overridden from LayerDelegate: - virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE { - } - - virtual void OnDelegatedFrameDamage( - const gfx::Rect& damage_rect_in_dip) OVERRIDE { - } - - virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE { - } - - virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE { - return base::Closure(); - } - - private: - DISALLOW_COPY_AND_ASSIGN(CefRootLayer); -}; - // Used to prevent further resizes while a resize is pending. class CefResizeLock : public content::ResizeLock { public: @@ -104,21 +75,21 @@ class CefResizeLock : public content::ResizeLock { timeout); } - virtual ~CefResizeLock() { + ~CefResizeLock() override { CancelLock(); } - virtual bool GrabDeferredLock() OVERRIDE { + bool GrabDeferredLock() override { return ResizeLock::GrabDeferredLock(); } - virtual void UnlockCompositor() OVERRIDE { + void UnlockCompositor() override { ResizeLock::UnlockCompositor(); compositor_lock_ = NULL; } protected: - virtual void LockCompositor() OVERRIDE { + void LockCompositor() override { ResizeLock::LockCompositor(); compositor_lock_ = host_->compositor()->GetCompositorLock(); } @@ -171,7 +142,7 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( content::RenderViewHost::From(render_widget_host_)); } - root_layer_.reset(new CefRootLayer); + root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); PlatformCreateCompositorWidget(); #if !defined(OS_MACOSX) @@ -276,8 +247,9 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetViewBounds() const { return gfx::Rect(rc.x, rc.y, rc.width, rc.height); } -void CefRenderWidgetHostViewOSR::SetBackgroundOpaque(bool opaque) { - content::RenderWidgetHostViewBase::SetBackgroundOpaque(opaque); +void CefRenderWidgetHostViewOSR::SetBackgroundColor(SkColor color) { + content::RenderWidgetHostViewBase::SetBackgroundColor(color); + bool opaque = GetBackgroundOpaque(); if (render_widget_host_) render_widget_host_->SetBackgroundOpaque(opaque); } @@ -435,8 +407,10 @@ void CefRenderWidgetHostViewOSR::SetIsLoading(bool is_loading) { } #if !defined(OS_MACOSX) -void CefRenderWidgetHostViewOSR::TextInputStateChanged( - const ViewHostMsg_TextInputState_Params& params) { +void CefRenderWidgetHostViewOSR::TextInputTypeChanged(ui::TextInputType type, + ui::TextInputMode mode, + bool can_compose_inline, + int flags) { } void CefRenderWidgetHostViewOSR::ImeCancelComposition() { @@ -537,28 +511,9 @@ void CefRenderWidgetHostViewOSR::EndFrameSubscription() { } void CefRenderWidgetHostViewOSR::AcceleratedSurfaceInitialized( - int host_id, int route_id) { } -void CefRenderWidgetHostViewOSR::AcceleratedSurfaceBuffersSwapped( - const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, - int gpu_host_id) { - // Oldschool composited mode is no longer supported. -} - -void CefRenderWidgetHostViewOSR::AcceleratedSurfacePostSubBuffer( - const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, - int gpu_host_id) { - // Oldschool composited mode is no longer supported. -} - -void CefRenderWidgetHostViewOSR::AcceleratedSurfaceSuspend() { -} - -void CefRenderWidgetHostViewOSR::AcceleratedSurfaceRelease() { -} - bool CefRenderWidgetHostViewOSR::HasAcceleratedSurface( const gfx::Size& desired_size) { // CEF doesn't use GetBackingStore for accelerated pages, so it doesn't @@ -695,7 +650,7 @@ content::DelegatedFrameHost* bool CefRenderWidgetHostViewOSR::InstallTransparency() { if (browser_impl_.get() && browser_impl_->IsTransparent()) { - SetBackgroundOpaque(false); + SetBackgroundColor(SkColorSetARGB(SK_AlphaTRANSPARENT, 0, 0, 0)); return true; } return false; diff --git a/libcef/browser/render_widget_host_view_osr.h b/libcef/browser/render_widget_host_view_osr.h index 94a42f599..5a405de36 100644 --- a/libcef/browser/render_widget_host_view_osr.h +++ b/libcef/browser/render_widget_host_view_osr.h @@ -74,145 +74,135 @@ class CefRenderWidgetHostViewOSR public content::DelegatedFrameHostClient { public: explicit CefRenderWidgetHostViewOSR(content::RenderWidgetHost* widget); - virtual ~CefRenderWidgetHostViewOSR(); + ~CefRenderWidgetHostViewOSR() override; // RenderWidgetHostView implementation. - virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; - virtual content::RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; - virtual void SetSize(const gfx::Size& size) OVERRIDE; - virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; - virtual gfx::Vector2dF GetLastScrollOffset() const OVERRIDE; - virtual gfx::NativeView GetNativeView() const OVERRIDE; - virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE; - virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; - virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; - virtual void Focus() OVERRIDE; - virtual bool HasFocus() const OVERRIDE; - virtual bool IsSurfaceAvailableForCopy() const OVERRIDE; - virtual void Show() OVERRIDE; - virtual void Hide() OVERRIDE; - virtual bool IsShowing() OVERRIDE; - virtual gfx::Rect GetViewBounds() const OVERRIDE; - virtual void SetBackgroundOpaque(bool opaque) OVERRIDE; - virtual bool LockMouse() OVERRIDE; - virtual void UnlockMouse() OVERRIDE; + void InitAsChild(gfx::NativeView parent_view) override; + content::RenderWidgetHost* GetRenderWidgetHost() const override; + void SetSize(const gfx::Size& size) override; + void SetBounds(const gfx::Rect& rect) override; + gfx::Vector2dF GetLastScrollOffset() const override; + gfx::NativeView GetNativeView() const override; + gfx::NativeViewId GetNativeViewId() const override; + gfx::NativeViewAccessible GetNativeViewAccessible() override; + ui::TextInputClient* GetTextInputClient() override; + void Focus() override; + bool HasFocus() const override; + bool IsSurfaceAvailableForCopy() const override; + void Show() override; + void Hide() override; + bool IsShowing() override; + gfx::Rect GetViewBounds() const override; + void SetBackgroundColor(SkColor color) override; + bool LockMouse() override; + void UnlockMouse() override; #if defined(OS_MACOSX) - virtual void SetActive(bool active) OVERRIDE; - virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE; - virtual void SetWindowVisibility(bool visible) OVERRIDE; - virtual void WindowFrameChanged() OVERRIDE; - virtual void ShowDefinitionForSelection() OVERRIDE; - virtual bool SupportsSpeech() const OVERRIDE; - virtual void SpeakSelection() OVERRIDE; - virtual bool IsSpeaking() const OVERRIDE; - virtual void StopSpeaking() OVERRIDE; + void SetActive(bool active) override; + void SetWindowVisibility(bool visible) override; + void WindowFrameChanged() override; + void ShowDefinitionForSelection() override; + bool SupportsSpeech() const override; + void SpeakSelection() override; + bool IsSpeaking() const override; + void StopSpeaking() override; #endif // defined(OS_MACOSX) // RenderWidgetHostViewBase implementation. - virtual void OnSwapCompositorFrame( + void OnSwapCompositorFrame( uint32 output_surface_id, - scoped_ptr frame) OVERRIDE; - virtual void InitAsPopup(content::RenderWidgetHostView* parent_host_view, - const gfx::Rect& pos) OVERRIDE; - virtual void InitAsFullscreen( - content::RenderWidgetHostView* reference_host_view) OVERRIDE; - virtual void WasShown() OVERRIDE; - virtual void WasHidden() OVERRIDE; - virtual void MovePluginWindows( - const std::vector& moves) OVERRIDE; - virtual void Blur() OVERRIDE; - virtual void UpdateCursor(const content::WebCursor& cursor) OVERRIDE; - virtual void SetIsLoading(bool is_loading) OVERRIDE; - virtual void TextInputStateChanged( - const ViewHostMsg_TextInputState_Params& params) OVERRIDE; - virtual void ImeCancelComposition() OVERRIDE; - virtual void RenderProcessGone(base::TerminationStatus status, - int error_code) OVERRIDE; - virtual void Destroy() OVERRIDE; - virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE; - virtual void SelectionChanged(const base::string16& text, - size_t offset, - const gfx::Range& range) OVERRIDE; - virtual gfx::Size GetRequestedRendererSize() const OVERRIDE; - virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE; - virtual void SelectionBoundsChanged( - const ViewHostMsg_SelectionBounds_Params& params) OVERRIDE; - virtual void CopyFromCompositingSurface( + scoped_ptr frame) override; + void InitAsPopup(content::RenderWidgetHostView* parent_host_view, + const gfx::Rect& pos) override; + void InitAsFullscreen( + content::RenderWidgetHostView* reference_host_view) override; + void WasShown() override; + void WasHidden() override; + void MovePluginWindows( + const std::vector& moves) override; + void Blur() override; + void UpdateCursor(const content::WebCursor& cursor) override; + void SetIsLoading(bool is_loading) override; + void TextInputTypeChanged(ui::TextInputType type, + ui::TextInputMode mode, + bool can_compose_inline, + int flags) override; + void ImeCancelComposition() override; + void RenderProcessGone(base::TerminationStatus status, + int error_code) override; + void Destroy() override; + void SetTooltipText(const base::string16& tooltip_text) override; + void SelectionChanged(const base::string16& text, + size_t offset, + const gfx::Range& range) override; + gfx::Size GetRequestedRendererSize() const override; + gfx::Size GetPhysicalBackingSize() const override; + void SelectionBoundsChanged( + const ViewHostMsg_SelectionBounds_Params& params) override; + void CopyFromCompositingSurface( const gfx::Rect& src_subrect, const gfx::Size& dst_size, const base::Callback& callback, - const SkColorType color_type) OVERRIDE; - virtual void CopyFromCompositingSurfaceToVideoFrame( + const SkColorType color_type) override; + void CopyFromCompositingSurfaceToVideoFrame( const gfx::Rect& src_subrect, const scoped_refptr& target, - const base::Callback& callback) OVERRIDE; - virtual bool CanCopyToVideoFrame() const OVERRIDE; - virtual bool CanSubscribeFrame() const OVERRIDE; - virtual void BeginFrameSubscription( + const base::Callback& callback) override; + bool CanCopyToVideoFrame() const override; + bool CanSubscribeFrame() const override; + void BeginFrameSubscription( scoped_ptr subscriber) - OVERRIDE; - virtual void EndFrameSubscription() OVERRIDE; - virtual void AcceleratedSurfaceInitialized(int host_id, - int route_id) OVERRIDE; - virtual void AcceleratedSurfaceBuffersSwapped( - const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, - int gpu_host_id) OVERRIDE; - virtual void AcceleratedSurfacePostSubBuffer( - const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel, - int gpu_host_id) OVERRIDE; - virtual void AcceleratedSurfaceSuspend() OVERRIDE; - virtual void AcceleratedSurfaceRelease() OVERRIDE; - virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; - virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE; - virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; - virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; - virtual content::BrowserAccessibilityManager* + override; + void EndFrameSubscription() override; + void AcceleratedSurfaceInitialized(int route_id) override; + bool HasAcceleratedSurface(const gfx::Size& desired_size) override; + void GetScreenInfo(blink::WebScreenInfo* results) override; + gfx::Rect GetBoundsInRootWindow() override; + gfx::GLSurfaceHandle GetCompositingSurface() override; + content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager( - content::BrowserAccessibilityDelegate* delegate) OVERRIDE; + content::BrowserAccessibilityDelegate* delegate) override; #if defined(TOOLKIT_VIEWS) || defined(USE_AURA) - virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, - const SkBitmap& zoomed_bitmap) OVERRIDE; + void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, + const SkBitmap& zoomed_bitmap) override; #endif #if defined(OS_MACOSX) - virtual bool PostProcessEventForPluginIme( - const content::NativeWebKeyboardEvent& event) OVERRIDE; + bool PostProcessEventForPluginIme( + const content::NativeWebKeyboardEvent& event) override; #endif #if defined(OS_MACOSX) || defined(USE_AURA) - virtual void ImeCompositionRangeChanged( + void ImeCompositionRangeChanged( const gfx::Range& range, - const std::vector& character_bounds) OVERRIDE; + const std::vector& character_bounds) override; #endif #if defined(OS_WIN) - virtual void SetParentNativeViewAccessible( - gfx::NativeViewAccessible accessible_parent) OVERRIDE; - virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; + void SetParentNativeViewAccessible( + gfx::NativeViewAccessible accessible_parent) override; + gfx::NativeViewId GetParentForWindowlessPlugin() const override; #endif #if defined(OS_MACOSX) // BrowserCompositorViewMacClient implementation. - virtual bool BrowserCompositorViewShouldAckImmediately() const OVERRIDE; - virtual void BrowserCompositorViewFrameSwapped( - const std::vector& latency_info) OVERRIDE; - virtual NSView* BrowserCompositorSuperview() OVERRIDE; - virtual ui::Layer* BrowserCompositorRootLayer() OVERRIDE; + bool BrowserCompositorViewShouldAckImmediately() const override; + void BrowserCompositorViewFrameSwapped( + const std::vector& latency_info) override; #endif // defined(OS_MACOSX) // DelegatedFrameHostClient implementation. - virtual ui::Compositor* GetCompositor() const OVERRIDE; - virtual ui::Layer* GetLayer() OVERRIDE; - virtual content::RenderWidgetHostImpl* GetHost() OVERRIDE; - virtual bool IsVisible() OVERRIDE; - virtual scoped_ptr CreateResizeLock( - bool defer_compositor_lock) OVERRIDE; - virtual gfx::Size DesiredFrameSize() OVERRIDE; - virtual float CurrentDeviceScaleFactor() OVERRIDE; - virtual gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) OVERRIDE; - virtual content::DelegatedFrameHost* GetDelegatedFrameHost() const OVERRIDE; + ui::Compositor* GetCompositor() const override; + ui::Layer* GetLayer() override; + content::RenderWidgetHostImpl* GetHost() override; + bool IsVisible() override; + scoped_ptr CreateResizeLock( + bool defer_compositor_lock) override; + gfx::Size DesiredFrameSize() override; + float CurrentDeviceScaleFactor() override; + gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) override; + content::DelegatedFrameHost* GetDelegatedFrameHost() const override; bool InstallTransparency(); diff --git a/libcef/browser/render_widget_host_view_osr_mac.mm b/libcef/browser/render_widget_host_view_osr_mac.mm index 39e3accac..d663385d7 100644 --- a/libcef/browser/render_widget_host_view_osr_mac.mm +++ b/libcef/browser/render_widget_host_view_osr_mac.mm @@ -31,9 +31,6 @@ CefTextInputClientOSRMac* GetInputClientFromContext( void CefRenderWidgetHostViewOSR::SetActive(bool active) { } -void CefRenderWidgetHostViewOSR::SetTakesFocusOnlyOnMouseDown(bool flag) { -} - void CefRenderWidgetHostViewOSR::SetWindowVisibility(bool visible) { if (visible) WasShown(); @@ -61,8 +58,10 @@ bool CefRenderWidgetHostViewOSR::IsSpeaking() const { void CefRenderWidgetHostViewOSR::StopSpeaking() { } -void CefRenderWidgetHostViewOSR::TextInputStateChanged( - const ViewHostMsg_TextInputState_Params& params) { +void CefRenderWidgetHostViewOSR::TextInputTypeChanged(ui::TextInputType type, + ui::TextInputMode mode, + bool can_compose_inline, + int flags) { [NSApp updateWindows]; } @@ -107,14 +106,6 @@ void CefRenderWidgetHostViewOSR::BrowserCompositorViewFrameSwapped( } } -NSView* CefRenderWidgetHostViewOSR::BrowserCompositorSuperview() { - return [window_ contentView]; -} - -ui::Layer* CefRenderWidgetHostViewOSR::BrowserCompositorRootLayer() { - return root_layer_.get(); -} - CefTextInputContext CefRenderWidgetHostViewOSR::GetNSTextInputContext() { if (!text_input_context_osr_mac_) { CefTextInputClientOSRMac* text_input_client_osr_mac = @@ -297,7 +288,9 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() { [content_view setLayer:background_layer_]; [content_view setWantsLayer:YES]; - compositor_view_.reset(new content::BrowserCompositorViewMac(this)); + compositor_view_.reset( + new content::BrowserCompositorViewMac(this, content_view, + root_layer_.get())); compositor_.reset(compositor_view_->GetCompositor()); DCHECK(compositor_); } diff --git a/libcef/browser/render_widget_host_view_osr_win.cc b/libcef/browser/render_widget_host_view_osr_win.cc index 9d1643b3d..48e9829d3 100644 --- a/libcef/browser/render_widget_host_view_osr_win.cc +++ b/libcef/browser/render_widget_host_view_osr_win.cc @@ -16,7 +16,7 @@ class CefCompositorHostWin : public gfx::WindowImpl { Init(NULL, gfx::Rect(0, 0, 1, 1)); } - virtual ~CefCompositorHostWin() { + ~CefCompositorHostWin() override { DestroyWindow(hwnd()); } diff --git a/libcef/browser/request_context_impl.h b/libcef/browser/request_context_impl.h index 97266a2ec..346005e8e 100644 --- a/libcef/browser/request_context_impl.h +++ b/libcef/browser/request_context_impl.h @@ -14,13 +14,13 @@ class CefRequestContextImpl : public CefRequestContext { public: explicit CefRequestContextImpl(CefBrowserContext* browser_context); explicit CefRequestContextImpl(CefRefPtr handler); - virtual ~CefRequestContextImpl(); + ~CefRequestContextImpl() override; CefBrowserContext* GetOrCreateBrowserContext(); - virtual bool IsSame(CefRefPtr other) OVERRIDE; - virtual bool IsGlobal() OVERRIDE; - virtual CefRefPtr GetHandler() OVERRIDE; + bool IsSame(CefRefPtr other) override; + bool IsGlobal() override; + CefRefPtr GetHandler() override; protected: CefBrowserContext* browser_context_; diff --git a/libcef/browser/resource_dispatcher_host_delegate.h b/libcef/browser/resource_dispatcher_host_delegate.h index e33445b06..cc9c0bff6 100644 --- a/libcef/browser/resource_dispatcher_host_delegate.h +++ b/libcef/browser/resource_dispatcher_host_delegate.h @@ -14,23 +14,23 @@ class CefResourceDispatcherHostDelegate : public content::ResourceDispatcherHostDelegate { public: CefResourceDispatcherHostDelegate(); - virtual ~CefResourceDispatcherHostDelegate(); + ~CefResourceDispatcherHostDelegate() override; // ResourceDispatcherHostDelegate methods. - virtual void RequestBeginning( + void RequestBeginning( net::URLRequest* request, content::ResourceContext* resource_context, content::AppCacheService* appcache_service, content::ResourceType resource_type, - ScopedVector* throttles) OVERRIDE; - virtual bool HandleExternalProtocol(const GURL& url, - int child_id, - int route_id) OVERRIDE; - virtual void OnRequestRedirected( + ScopedVector* throttles) override; + bool HandleExternalProtocol(const GURL& url, + int child_id, + int route_id) override; + void OnRequestRedirected( const GURL& redirect_url, net::URLRequest* request, content::ResourceContext* resource_context, - content::ResourceResponse* response) OVERRIDE; + content::ResourceResponse* response) override; private: DISALLOW_COPY_AND_ASSIGN(CefResourceDispatcherHostDelegate); diff --git a/libcef/browser/resource_request_job.cc b/libcef/browser/resource_request_job.cc index 070a4b8a9..12d124a66 100644 --- a/libcef/browser/resource_request_job.cc +++ b/libcef/browser/resource_request_job.cc @@ -57,13 +57,13 @@ class CefResourceRequestJobCallback : public CefCallback { dest_(NULL), dest_size_(0) {} - virtual void Continue() OVERRIDE { + void Continue() override { // Continue asynchronously. CEF_POST_TASK(CEF_IOT, base::Bind(&CefResourceRequestJobCallback::ContinueOnIOThread, this)); } - virtual void Cancel() OVERRIDE { + void Cancel() override { // Cancel asynchronously. CEF_POST_TASK(CEF_IOT, base::Bind(&CefResourceRequestJobCallback::CancelOnIOThread, this)); diff --git a/libcef/browser/resource_request_job.h b/libcef/browser/resource_request_job.h index 0bfd4f6e0..df32f2b6c 100644 --- a/libcef/browser/resource_request_job.h +++ b/libcef/browser/resource_request_job.h @@ -27,21 +27,20 @@ class CefResourceRequestJob : public net::URLRequestJob { CefResourceRequestJob(net::URLRequest* request, net::NetworkDelegate* network_delegate, CefRefPtr handler); - virtual ~CefResourceRequestJob(); + ~CefResourceRequestJob() override; private: // net::URLRequestJob methods. - virtual void Start() OVERRIDE; - virtual void Kill() OVERRIDE; - virtual bool ReadRawData(net::IOBuffer* dest, int dest_size, int* bytes_read) - OVERRIDE; - virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE; - virtual void GetLoadTimingInfo( - net::LoadTimingInfo* load_timing_info) const OVERRIDE; - virtual bool GetResponseCookies(std::vector* cookies) OVERRIDE; - virtual bool IsRedirectResponse(GURL* location, int* http_status_code) - OVERRIDE; - virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; + void Start() override; + void Kill() override; + bool ReadRawData(net::IOBuffer* dest, int dest_size, int* bytes_read) override; + void GetResponseInfo(net::HttpResponseInfo* info) override; + void GetLoadTimingInfo( + net::LoadTimingInfo* load_timing_info) const override; + bool GetResponseCookies(std::vector* cookies) override; + bool IsRedirectResponse(GURL* location, int* http_status_code) + override; + bool GetMimeType(std::string* mime_type) const override; void SendHeaders(); diff --git a/libcef/browser/scheme_impl.cc b/libcef/browser/scheme_impl.cc index b3d78305d..216a5b3c3 100644 --- a/libcef/browser/scheme_impl.cc +++ b/libcef/browser/scheme_impl.cc @@ -100,9 +100,9 @@ class CefUrlRequestManager { : scheme_(scheme) {} // From net::URLRequestJobFactory::ProtocolHandler - virtual net::URLRequestJob* MaybeCreateJob( + net::URLRequestJob* MaybeCreateJob( net::URLRequest* request, - net::NetworkDelegate* network_delegate) const OVERRIDE { + net::NetworkDelegate* network_delegate) const override { CEF_REQUIRE_IOT(); return CefUrlRequestManager::GetInstance()->GetRequestJob( request, network_delegate, scheme_); diff --git a/libcef/browser/speech_recognition_manager_delegate.cc b/libcef/browser/speech_recognition_manager_delegate.cc index 147ead94d..9fcaf5afb 100644 --- a/libcef/browser/speech_recognition_manager_delegate.cc +++ b/libcef/browser/speech_recognition_manager_delegate.cc @@ -7,10 +7,10 @@ #include #include -#include "libcef/common/cef_switches.h" +#include "libcef/common/cef_switches.h" #include "base/bind.h" -#include "base/command_line.h" +#include "base/command_line.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -80,9 +80,9 @@ class CefSpeechRecognitionManagerDelegate::WebContentsWatcher } // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type); @@ -102,7 +102,7 @@ class CefSpeechRecognitionManagerDelegate::WebContentsWatcher private: friend class base::RefCountedThreadSafe; - virtual ~WebContentsWatcher() { + ~WebContentsWatcher() override { // Must be destroyed on the UI thread due to |registrar_| non thread-safety. DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); } diff --git a/libcef/browser/speech_recognition_manager_delegate.h b/libcef/browser/speech_recognition_manager_delegate.h index 5553079ef..cfc2e8232 100644 --- a/libcef/browser/speech_recognition_manager_delegate.h +++ b/libcef/browser/speech_recognition_manager_delegate.h @@ -20,32 +20,32 @@ class CefSpeechRecognitionManagerDelegate public content::SpeechRecognitionEventListener { public: CefSpeechRecognitionManagerDelegate(); - virtual ~CefSpeechRecognitionManagerDelegate(); + ~CefSpeechRecognitionManagerDelegate() override; protected: // SpeechRecognitionEventListener methods. - virtual void OnRecognitionStart(int session_id) OVERRIDE; - virtual void OnAudioStart(int session_id) OVERRIDE; - virtual void OnEnvironmentEstimationComplete(int session_id) OVERRIDE; - virtual void OnSoundStart(int session_id) OVERRIDE; - virtual void OnSoundEnd(int session_id) OVERRIDE; - virtual void OnAudioEnd(int session_id) OVERRIDE; - virtual void OnRecognitionEnd(int session_id) OVERRIDE; - virtual void OnRecognitionResults( - int session_id, const content::SpeechRecognitionResults& result) OVERRIDE; - virtual void OnRecognitionError( - int session_id, const content::SpeechRecognitionError& error) OVERRIDE; - virtual void OnAudioLevelsChange(int session_id, float volume, - float noise_volume) OVERRIDE; + void OnRecognitionStart(int session_id) override; + void OnAudioStart(int session_id) override; + void OnEnvironmentEstimationComplete(int session_id) override; + void OnSoundStart(int session_id) override; + void OnSoundEnd(int session_id) override; + void OnAudioEnd(int session_id) override; + void OnRecognitionEnd(int session_id) override; + void OnRecognitionResults( + int session_id, const content::SpeechRecognitionResults& result) override; + void OnRecognitionError( + int session_id, const content::SpeechRecognitionError& error) override; + void OnAudioLevelsChange(int session_id, float volume, + float noise_volume) override; // SpeechRecognitionManagerDelegate methods. - virtual void GetDiagnosticInformation(bool* can_report_metrics, - std::string* hardware_info) OVERRIDE; - virtual void CheckRecognitionIsAllowed( + void GetDiagnosticInformation(bool* can_report_metrics, + std::string* hardware_info) override; + void CheckRecognitionIsAllowed( int session_id, - base::Callback callback) OVERRIDE; - virtual content::SpeechRecognitionEventListener* GetEventListener() OVERRIDE; - virtual bool FilterProfanities(int render_process_id) OVERRIDE; + base::Callback callback) override; + content::SpeechRecognitionEventListener* GetEventListener() override; + bool FilterProfanities(int render_process_id) override; private: class WebContentsWatcher; diff --git a/libcef/browser/stream_impl.cc b/libcef/browser/stream_impl.cc index 472b442a9..6d30aec0c 100644 --- a/libcef/browser/stream_impl.cc +++ b/libcef/browser/stream_impl.cc @@ -4,7 +4,7 @@ #include "libcef/browser/stream_impl.h" #include -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/logging.h" #include "base/threading/thread_restrictions.h" diff --git a/libcef/browser/stream_impl.h b/libcef/browser/stream_impl.h index f07eebaab..0d5a97673 100644 --- a/libcef/browser/stream_impl.h +++ b/libcef/browser/stream_impl.h @@ -17,13 +17,13 @@ class CefFileReader : public CefStreamReader { public: CefFileReader(FILE* file, bool close); - virtual ~CefFileReader(); + ~CefFileReader() override; - virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Eof() OVERRIDE; - virtual bool MayBlock() OVERRIDE { return true; } + size_t Read(void* ptr, size_t size, size_t n) override; + int Seek(int64 offset, int whence) override; + int64 Tell() override; + int Eof() override; + bool MayBlock() override { return true; } protected: bool close_; @@ -38,13 +38,13 @@ class CefFileReader : public CefStreamReader { class CefFileWriter : public CefStreamWriter { public: CefFileWriter(FILE* file, bool close); - virtual ~CefFileWriter(); + ~CefFileWriter() override; - virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Flush() OVERRIDE; - virtual bool MayBlock() OVERRIDE { return true; } + size_t Write(const void* ptr, size_t size, size_t n) override; + int Seek(int64 offset, int whence) override; + int64 Tell() override; + int Flush() override; + bool MayBlock() override { return true; } protected: FILE* file_; @@ -59,13 +59,13 @@ class CefFileWriter : public CefStreamWriter { class CefBytesReader : public CefStreamReader { public: CefBytesReader(void* data, int64 datasize, bool copy); - virtual ~CefBytesReader(); + ~CefBytesReader() override; - virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Eof() OVERRIDE; - virtual bool MayBlock() OVERRIDE { return false; } + size_t Read(void* ptr, size_t size, size_t n) override; + int Seek(int64 offset, int whence) override; + int64 Tell() override; + int Eof() override; + bool MayBlock() override { return false; } void SetData(void* data, int64 datasize, bool copy); @@ -87,13 +87,13 @@ class CefBytesReader : public CefStreamReader { class CefBytesWriter : public CefStreamWriter { public: explicit CefBytesWriter(size_t grow); - virtual ~CefBytesWriter(); + ~CefBytesWriter() override; - virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Flush() OVERRIDE; - virtual bool MayBlock() OVERRIDE { return false; } + size_t Write(const void* ptr, size_t size, size_t n) override; + int Seek(int64 offset, int whence) override; + int64 Tell() override; + int Flush() override; + bool MayBlock() override { return false; } void* GetData() { return data_; } int64 GetDataSize() { return offset_; } @@ -118,19 +118,19 @@ class CefHandlerReader : public CefStreamReader { explicit CefHandlerReader(CefRefPtr handler) : handler_(handler) {} - virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE { + size_t Read(void* ptr, size_t size, size_t n) override { return handler_->Read(ptr, size, n); } - virtual int Seek(int64 offset, int whence) OVERRIDE { + int Seek(int64 offset, int whence) override { return handler_->Seek(offset, whence); } - virtual int64 Tell() OVERRIDE { + int64 Tell() override { return handler_->Tell(); } - virtual int Eof() OVERRIDE { + int Eof() override { return handler_->Eof(); } - virtual bool MayBlock() OVERRIDE { + bool MayBlock() override { return handler_->MayBlock(); } @@ -146,19 +146,19 @@ class CefHandlerWriter : public CefStreamWriter { explicit CefHandlerWriter(CefRefPtr handler) : handler_(handler) {} - virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE { + size_t Write(const void* ptr, size_t size, size_t n) override { return handler_->Write(ptr, size, n); } - virtual int Seek(int64 offset, int whence) OVERRIDE { + int Seek(int64 offset, int whence) override { return handler_->Seek(offset, whence); } - virtual int64 Tell() OVERRIDE { + int64 Tell() override { return handler_->Tell(); } - virtual int Flush() OVERRIDE { + int Flush() override { return handler_->Flush(); } - virtual bool MayBlock() OVERRIDE { + bool MayBlock() override { return handler_->MayBlock(); } diff --git a/libcef/browser/url_network_delegate.cc b/libcef/browser/url_network_delegate.cc index 26c6a4001..df7916a62 100644 --- a/libcef/browser/url_network_delegate.cc +++ b/libcef/browser/url_network_delegate.cc @@ -24,7 +24,7 @@ class CefAuthCallbackImpl : public CefAuthCallback { : callback_(callback), credentials_(credentials) { } - ~CefAuthCallbackImpl() { + ~CefAuthCallbackImpl() override { if (!callback_.is_null()) { // The auth callback is still pending. Cancel it now. if (CEF_CURRENTLY_ON_IOT()) { @@ -36,8 +36,8 @@ class CefAuthCallbackImpl : public CefAuthCallback { } } - virtual void Continue(const CefString& username, - const CefString& password) OVERRIDE { + void Continue(const CefString& username, + const CefString& password) override { if (CEF_CURRENTLY_ON_IOT()) { if (!callback_.is_null()) { credentials_->Set(username, password); @@ -50,7 +50,7 @@ class CefAuthCallbackImpl : public CefAuthCallback { } } - virtual void Cancel() OVERRIDE { + void Cancel() override { if (CEF_CURRENTLY_ON_IOT()) { if (!callback_.is_null()) { CancelNow(callback_); diff --git a/libcef/browser/url_network_delegate.h b/libcef/browser/url_network_delegate.h index 420fa69fa..ce254ca6f 100644 --- a/libcef/browser/url_network_delegate.h +++ b/libcef/browser/url_network_delegate.h @@ -13,20 +13,20 @@ class CefNetworkDelegate : public net::NetworkDelegate { public: CefNetworkDelegate(); - ~CefNetworkDelegate(); + ~CefNetworkDelegate() override; private: // net::NetworkDelegate methods. - virtual int OnBeforeURLRequest(net::URLRequest* request, - const net::CompletionCallback& callback, - GURL* new_url) OVERRIDE; - virtual AuthRequiredResponse OnAuthRequired( + int OnBeforeURLRequest(net::URLRequest* request, + const net::CompletionCallback& callback, + GURL* new_url) override; + AuthRequiredResponse OnAuthRequired( net::URLRequest* request, const net::AuthChallengeInfo& auth_info, const AuthCallback& callback, - net::AuthCredentials* credentials) OVERRIDE; - virtual bool OnCanAccessFile(const net::URLRequest& request, - const base::FilePath& path) const; + net::AuthCredentials* credentials) override; + bool OnCanAccessFile(const net::URLRequest& request, + const base::FilePath& path) const; DISALLOW_COPY_AND_ASSIGN(CefNetworkDelegate); }; diff --git a/libcef/browser/url_request_context_getter.cc b/libcef/browser/url_request_context_getter.cc index 4154e5022..8aeff909b 100644 --- a/libcef/browser/url_request_context_getter.cc +++ b/libcef/browser/url_request_context_getter.cc @@ -21,7 +21,7 @@ #include "libcef/common/content_client.h" #include "base/command_line.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/logging.h" #include "base/stl_util.h" #include "base/strings/string_util.h" @@ -75,17 +75,13 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings { CEF_REQUIRE_IOT(); } - virtual ~CefHttpUserAgentSettings() { - CEF_REQUIRE_IOT(); - } - // net::HttpUserAgentSettings implementation - virtual std::string GetAcceptLanguage() const OVERRIDE { + std::string GetAcceptLanguage() const override { CEF_REQUIRE_IOT(); return http_accept_language_; } - virtual std::string GetUserAgent() const OVERRIDE { + std::string GetUserAgent() const override { CEF_REQUIRE_IOT(); return CefContentClient::Get()->GetUserAgent(); } @@ -237,7 +233,7 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() { // Set up interceptors in the reverse order. scoped_ptr top_job_factory = - job_factory.PassAs(); + job_factory.Pass(); for (content::URLRequestInterceptorScopedVector::reverse_iterator i = request_interceptors_.rbegin(); i != request_interceptors_.rend(); diff --git a/libcef/browser/url_request_context_getter.h b/libcef/browser/url_request_context_getter.h index 656cdcd28..d4b4a0b09 100644 --- a/libcef/browser/url_request_context_getter.h +++ b/libcef/browser/url_request_context_getter.h @@ -83,12 +83,12 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter { base::MessageLoop* file_loop, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors); - virtual ~CefURLRequestContextGetter(); + ~CefURLRequestContextGetter() override; // net::URLRequestContextGetter implementation. - virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; - virtual scoped_refptr - GetNetworkTaskRunner() const OVERRIDE; + net::URLRequestContext* GetURLRequestContext() override; + scoped_refptr + GetNetworkTaskRunner() const override; net::HostResolver* host_resolver(); net::URLRequestJobFactoryImpl* job_factory_impl() const { diff --git a/libcef/browser/url_request_context_getter_proxy.h b/libcef/browser/url_request_context_getter_proxy.h index c134fb533..c86c26d22 100644 --- a/libcef/browser/url_request_context_getter_proxy.h +++ b/libcef/browser/url_request_context_getter_proxy.h @@ -22,12 +22,12 @@ class CefURLRequestContextGetterProxy : public net::URLRequestContextGetter { public: CefURLRequestContextGetterProxy(CefRefPtr handler, CefURLRequestContextGetter* parent); - virtual ~CefURLRequestContextGetterProxy(); + ~CefURLRequestContextGetterProxy() override; // net::URLRequestContextGetter implementation. - virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; - virtual scoped_refptr - GetNetworkTaskRunner() const OVERRIDE; + net::URLRequestContext* GetURLRequestContext() override; + scoped_refptr + GetNetworkTaskRunner() const override; net::HostResolver* GetHostResolver() const; diff --git a/libcef/browser/url_request_context_proxy.cc b/libcef/browser/url_request_context_proxy.cc index 0846297d8..fbdc551de 100644 --- a/libcef/browser/url_request_context_proxy.cc +++ b/libcef/browser/url_request_context_proxy.cc @@ -24,72 +24,78 @@ class CefCookieStoreProxy : public net::CookieStore { : parent_(parent), handler_(handler) { } - virtual ~CefCookieStoreProxy() { + ~CefCookieStoreProxy() override { CEF_REQUIRE_IOT(); } // net::CookieStore methods. - virtual void SetCookieWithOptionsAsync( + void SetCookieWithOptionsAsync( const GURL& url, const std::string& cookie_line, const net::CookieOptions& options, - const SetCookiesCallback& callback) OVERRIDE { + const SetCookiesCallback& callback) override { scoped_refptr cookie_store = GetCookieStore(); cookie_store->SetCookieWithOptionsAsync(url, cookie_line, options, callback); } - virtual void GetCookiesWithOptionsAsync( + void GetCookiesWithOptionsAsync( const GURL& url, const net::CookieOptions& options, - const GetCookiesCallback& callback) OVERRIDE { + const GetCookiesCallback& callback) override { scoped_refptr cookie_store = GetCookieStore(); cookie_store->GetCookiesWithOptionsAsync(url, options, callback); } - virtual void DeleteCookieAsync(const GURL& url, - const std::string& cookie_name, - const base::Closure& callback) OVERRIDE { + void DeleteCookieAsync(const GURL& url, + const std::string& cookie_name, + const base::Closure& callback) override { scoped_refptr cookie_store = GetCookieStore(); cookie_store->DeleteCookieAsync(url, cookie_name, callback); } - virtual void GetAllCookiesForURLAsync( + void GetAllCookiesForURLAsync( const GURL& url, - const GetCookieListCallback& callback) OVERRIDE { + const GetCookieListCallback& callback) override { scoped_refptr cookie_store = GetCookieStore(); cookie_store->GetAllCookiesForURLAsync(url, callback); } - virtual void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, - const base::Time& delete_end, - const DeleteCallback& callback) - OVERRIDE { + void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, + const base::Time& delete_end, + const DeleteCallback& callback) override { scoped_refptr cookie_store = GetCookieStore(); cookie_store->DeleteAllCreatedBetweenAsync(delete_begin, delete_end, callback); } - virtual void DeleteAllCreatedBetweenForHostAsync( + void DeleteAllCreatedBetweenForHostAsync( const base::Time delete_begin, const base::Time delete_end, const GURL& url, - const DeleteCallback& callback) OVERRIDE { + const DeleteCallback& callback) override { scoped_refptr cookie_store = GetCookieStore(); cookie_store->DeleteAllCreatedBetweenForHostAsync(delete_begin, delete_end, url, callback); } - virtual void DeleteSessionCookiesAsync(const DeleteCallback& callback) - OVERRIDE { + void DeleteSessionCookiesAsync(const DeleteCallback& callback) override { scoped_refptr cookie_store = GetCookieStore(); cookie_store->DeleteSessionCookiesAsync(callback); } - virtual net::CookieMonster* GetCookieMonster() OVERRIDE { + net::CookieMonster* GetCookieMonster() override { scoped_refptr cookie_store = GetCookieStore(); return cookie_store->GetCookieMonster(); } + scoped_ptr AddCallbackForCookie( + const GURL& url, + const std::string& name, + const CookieChangedCallback& callback) override { + scoped_refptr cookie_store = GetCookieStore(); + return cookie_store->AddCallbackForCookie(url, name, callback); + } + private: net::CookieStore* GetCookieStore() { CEF_REQUIRE_IOT(); diff --git a/libcef/browser/url_request_context_proxy.h b/libcef/browser/url_request_context_proxy.h index bf7a3bc31..06ea1f8ae 100644 --- a/libcef/browser/url_request_context_proxy.h +++ b/libcef/browser/url_request_context_proxy.h @@ -21,7 +21,7 @@ class URLRequestContextGetter; class CefURLRequestContextProxy : public net::URLRequestContext { public: explicit CefURLRequestContextProxy(net::URLRequestContextGetter* parent); - virtual ~CefURLRequestContextProxy(); + ~CefURLRequestContextProxy() override; void Initialize(CefRefPtr handler); diff --git a/libcef/browser/url_request_interceptor.h b/libcef/browser/url_request_interceptor.h index 6dacc7e15..153935e18 100644 --- a/libcef/browser/url_request_interceptor.h +++ b/libcef/browser/url_request_interceptor.h @@ -13,19 +13,19 @@ class CefRequestInterceptor : public net::URLRequest::Interceptor { public: CefRequestInterceptor(); - ~CefRequestInterceptor(); + ~CefRequestInterceptor() override; // net::URLRequest::Interceptor methods. - virtual net::URLRequestJob* MaybeIntercept( + net::URLRequestJob* MaybeIntercept( net::URLRequest* request, - net::NetworkDelegate* network_delegate) OVERRIDE; - virtual net::URLRequestJob* MaybeInterceptRedirect( + net::NetworkDelegate* network_delegate) override; + net::URLRequestJob* MaybeInterceptRedirect( net::URLRequest* request, net::NetworkDelegate* network_delegate, - const GURL& location) OVERRIDE; - virtual net::URLRequestJob* MaybeInterceptResponse( + const GURL& location) override; + net::URLRequestJob* MaybeInterceptResponse( net::URLRequest* request, - net::NetworkDelegate* network_delegate) OVERRIDE; + net::NetworkDelegate* network_delegate) override; DISALLOW_COPY_AND_ASSIGN(CefRequestInterceptor); }; diff --git a/libcef/browser/url_request_user_data.h b/libcef/browser/url_request_user_data.h index 37b8c0253..b1352e71c 100644 --- a/libcef/browser/url_request_user_data.h +++ b/libcef/browser/url_request_user_data.h @@ -15,7 +15,7 @@ class CefURLRequestUserData : public base::SupportsUserData::Data { public: CefURLRequestUserData(CefRefPtr client); - virtual ~CefURLRequestUserData(); + ~CefURLRequestUserData() override; CefRefPtr GetClient(); static const void* kUserDataKey; diff --git a/libcef/browser/web_contents_view_osr.cc b/libcef/browser/web_contents_view_osr.cc index bb8f3dfac..d3db727e4 100644 --- a/libcef/browser/web_contents_view_osr.cc +++ b/libcef/browser/web_contents_view_osr.cc @@ -68,7 +68,8 @@ void CefWebContentsViewOSR::CreateView(const gfx::Size& initial_size, } content::RenderWidgetHostViewBase* CefWebContentsViewOSR::CreateViewForWidget( - content::RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host, + bool is_guest_view_hack) { if (render_widget_host->GetView()) { return static_cast( render_widget_host->GetView()); diff --git a/libcef/browser/web_contents_view_osr.h b/libcef/browser/web_contents_view_osr.h index de23ee3c8..0246c385d 100644 --- a/libcef/browser/web_contents_view_osr.h +++ b/libcef/browser/web_contents_view_osr.h @@ -21,48 +21,49 @@ class CefWebContentsViewOSR : public content::WebContentsView, public content::RenderViewHostDelegateView { public: CefWebContentsViewOSR(); - virtual ~CefWebContentsViewOSR(); + ~CefWebContentsViewOSR() override; void set_web_contents(content::WebContents* web_contents); // WebContentsView methods. - virtual gfx::NativeView GetNativeView() const OVERRIDE; - virtual gfx::NativeView GetContentNativeView() const OVERRIDE; - virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; - virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; - virtual void SizeContents(const gfx::Size& size) OVERRIDE; - virtual void Focus() OVERRIDE; - virtual void SetInitialFocus() OVERRIDE; - virtual void StoreFocus() OVERRIDE; - virtual void RestoreFocus() OVERRIDE; - virtual content::DropData* GetDropData() const OVERRIDE; - virtual gfx::Rect GetViewBounds() const OVERRIDE; - virtual void CreateView(const gfx::Size& initial_size, - gfx::NativeView context) OVERRIDE; - virtual content::RenderWidgetHostViewBase* CreateViewForWidget( - content::RenderWidgetHost* render_widget_host) OVERRIDE; - virtual content::RenderWidgetHostViewBase* CreateViewForPopupWidget( - content::RenderWidgetHost* render_widget_host) OVERRIDE; - virtual void SetPageTitle(const base::string16& title) OVERRIDE; - virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; - virtual void RenderViewSwappedIn(content::RenderViewHost* host) OVERRIDE; - virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; + gfx::NativeView GetNativeView() const override; + gfx::NativeView GetContentNativeView() const override; + gfx::NativeWindow GetTopLevelNativeWindow() const override; + void GetContainerBounds(gfx::Rect* out) const override; + void SizeContents(const gfx::Size& size) override; + void Focus() override; + void SetInitialFocus() override; + void StoreFocus() override; + void RestoreFocus() override; + content::DropData* GetDropData() const override; + gfx::Rect GetViewBounds() const override; + void CreateView(const gfx::Size& initial_size, + gfx::NativeView context) override; + content::RenderWidgetHostViewBase* CreateViewForWidget( + content::RenderWidgetHost* render_widget_host, + bool is_guest_view_hack) override; + content::RenderWidgetHostViewBase* CreateViewForPopupWidget( + content::RenderWidgetHost* render_widget_host) override; + void SetPageTitle(const base::string16& title) override; + void RenderViewCreated(content::RenderViewHost* host) override; + void RenderViewSwappedIn(content::RenderViewHost* host) override; + void SetOverscrollControllerEnabled(bool enabled) override; #if defined(OS_MACOSX) - virtual void SetAllowOtherViews(bool allow) OVERRIDE; - virtual bool GetAllowOtherViews() const OVERRIDE; - virtual bool IsEventTracking() const OVERRIDE; - virtual void CloseTabAfterEventTracking() OVERRIDE; + void SetAllowOtherViews(bool allow) override; + bool GetAllowOtherViews() const override; + bool IsEventTracking() const override; + void CloseTabAfterEventTracking() override; #endif // RenderViewHostDelegateView methods. - virtual void StartDragging( + void StartDragging( const content::DropData& drop_data, blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, - const content::DragEventSourceInfo& event_info) OVERRIDE; - virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; + const content::DragEventSourceInfo& event_info) override; + void UpdateDragCursor(blink::WebDragOperation operation) override; private: content::WebContents* web_contents_; diff --git a/libcef/browser/web_plugin_impl.h b/libcef/browser/web_plugin_impl.h index 20acd73dc..2a4fbee68 100644 --- a/libcef/browser/web_plugin_impl.h +++ b/libcef/browser/web_plugin_impl.h @@ -13,10 +13,10 @@ class CefWebPluginInfoImpl : public CefWebPluginInfo { public: explicit CefWebPluginInfoImpl(const content::WebPluginInfo& plugin_info); - virtual CefString GetName() OVERRIDE; - virtual CefString GetPath() OVERRIDE; - virtual CefString GetVersion() OVERRIDE; - virtual CefString GetDescription() OVERRIDE; + CefString GetName() override; + CefString GetPath() override; + CefString GetVersion() override; + CefString GetDescription() override; private: content::WebPluginInfo plugin_info_; diff --git a/libcef/browser/window_delegate_view.h b/libcef/browser/window_delegate_view.h index 8380a77c3..9b0e2f7b3 100644 --- a/libcef/browser/window_delegate_view.h +++ b/libcef/browser/window_delegate_view.h @@ -32,13 +32,13 @@ class CefWindowDelegateView : public views::WidgetDelegateView { void InitContent(); // WidgetDelegateView methods: - virtual bool CanResize() const OVERRIDE { return true; } - virtual bool CanMaximize() const OVERRIDE { return true; } - virtual View* GetContentsView() OVERRIDE { return this; } + bool CanResize() const override { return true; } + bool CanMaximize() const override { return true; } + View* GetContentsView() override { return this; } // View methods: - virtual void ViewHierarchyChanged( - const ViewHierarchyChangedDetails& details) OVERRIDE; + void ViewHierarchyChanged( + const ViewHierarchyChangedDetails& details) override; private: SkColor background_color_; diff --git a/libcef/browser/window_x11.h b/libcef/browser/window_x11.h index 01e926566..cc508d39a 100644 --- a/libcef/browser/window_x11.h +++ b/libcef/browser/window_x11.h @@ -27,7 +27,7 @@ class CefWindowX11 : public ui::PlatformEventDispatcher { CefWindowX11(CefRefPtr browser, ::Window parent_xwindow, const gfx::Rect& bounds); - virtual ~CefWindowX11(); + ~CefWindowX11() override; void Close(); @@ -43,8 +43,8 @@ class CefWindowX11 : public ui::PlatformEventDispatcher { views::DesktopWindowTreeHostX11* GetHost(); // ui::PlatformEventDispatcher methods: - virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; - virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; + bool CanDispatchEvent(const ui::PlatformEvent& event) override; + uint32_t DispatchEvent(const ui::PlatformEvent& event) override; ::Window xwindow() const { return xwindow_; } gfx::Rect bounds() const { return bounds_; } diff --git a/libcef/browser/xml_reader_impl.h b/libcef/browser/xml_reader_impl.h index 5f8af1629..7afb51cb0 100644 --- a/libcef/browser/xml_reader_impl.h +++ b/libcef/browser/xml_reader_impl.h @@ -16,43 +16,43 @@ class CefXmlReaderImpl : public CefXmlReader { public: CefXmlReaderImpl(); - ~CefXmlReaderImpl(); + ~CefXmlReaderImpl() override; // Initialize the reader context. bool Initialize(CefRefPtr stream, EncodingType encodingType, const CefString& URI); - virtual bool MoveToNextNode() OVERRIDE; - virtual bool Close() OVERRIDE; - virtual bool HasError() OVERRIDE; - virtual CefString GetError() OVERRIDE; - virtual NodeType GetType() OVERRIDE; - virtual int GetDepth() OVERRIDE; - virtual CefString GetLocalName() OVERRIDE; - virtual CefString GetPrefix() OVERRIDE; - virtual CefString GetQualifiedName() OVERRIDE; - virtual CefString GetNamespaceURI() OVERRIDE; - virtual CefString GetBaseURI() OVERRIDE; - virtual CefString GetXmlLang() OVERRIDE; - virtual bool IsEmptyElement() OVERRIDE; - virtual bool HasValue() OVERRIDE; - virtual CefString GetValue() OVERRIDE; - virtual bool HasAttributes() OVERRIDE; - virtual size_t GetAttributeCount() OVERRIDE; - virtual CefString GetAttribute(int index) OVERRIDE; - virtual CefString GetAttribute(const CefString& qualifiedName) OVERRIDE; - virtual CefString GetAttribute(const CefString& localName, - const CefString& namespaceURI) OVERRIDE; - virtual CefString GetInnerXml() OVERRIDE; - virtual CefString GetOuterXml() OVERRIDE; - virtual int GetLineNumber() OVERRIDE; - virtual bool MoveToAttribute(int index) OVERRIDE; - virtual bool MoveToAttribute(const CefString& qualifiedName) OVERRIDE; - virtual bool MoveToAttribute(const CefString& localName, - const CefString& namespaceURI) OVERRIDE; - virtual bool MoveToFirstAttribute() OVERRIDE; - virtual bool MoveToNextAttribute() OVERRIDE; - virtual bool MoveToCarryingElement() OVERRIDE; + bool MoveToNextNode() override; + bool Close() override; + bool HasError() override; + CefString GetError() override; + NodeType GetType() override; + int GetDepth() override; + CefString GetLocalName() override; + CefString GetPrefix() override; + CefString GetQualifiedName() override; + CefString GetNamespaceURI() override; + CefString GetBaseURI() override; + CefString GetXmlLang() override; + bool IsEmptyElement() override; + bool HasValue() override; + CefString GetValue() override; + bool HasAttributes() override; + size_t GetAttributeCount() override; + CefString GetAttribute(int index) override; + CefString GetAttribute(const CefString& qualifiedName) override; + CefString GetAttribute(const CefString& localName, + const CefString& namespaceURI) override; + CefString GetInnerXml() override; + CefString GetOuterXml() override; + int GetLineNumber() override; + bool MoveToAttribute(int index) override; + bool MoveToAttribute(const CefString& qualifiedName) override; + bool MoveToAttribute(const CefString& localName, + const CefString& namespaceURI) override; + bool MoveToFirstAttribute() override; + bool MoveToNextAttribute() override; + bool MoveToCarryingElement() override; // Add another line to the error string. void AppendError(const CefString& error_str); diff --git a/libcef/browser/zip_reader_impl.h b/libcef/browser/zip_reader_impl.h index d53d157a0..d3a9c0968 100644 --- a/libcef/browser/zip_reader_impl.h +++ b/libcef/browser/zip_reader_impl.h @@ -16,23 +16,23 @@ class CefZipReaderImpl : public CefZipReader { public: CefZipReaderImpl(); - ~CefZipReaderImpl(); + ~CefZipReaderImpl() override; // Initialize the reader context. bool Initialize(CefRefPtr stream); - virtual bool MoveToFirstFile(); - virtual bool MoveToNextFile(); - virtual bool MoveToFile(const CefString& fileName, bool caseSensitive); - virtual bool Close(); - virtual CefString GetFileName(); - virtual int64 GetFileSize(); - virtual time_t GetFileLastModified(); - virtual bool OpenFile(const CefString& password); - virtual bool CloseFile(); - virtual int ReadFile(void* buffer, size_t bufferSize); - virtual int64 Tell(); - virtual bool Eof(); + bool MoveToFirstFile() override; + bool MoveToNextFile() override; + bool MoveToFile(const CefString& fileName, bool caseSensitive) override; + bool Close() override; + CefString GetFileName() override; + int64 GetFileSize() override; + time_t GetFileLastModified() override; + bool OpenFile(const CefString& password) override; + bool CloseFile() override; + int ReadFile(void* buffer, size_t bufferSize) override; + int64 Tell() override; + bool Eof() override; bool GetFileInfo(); diff --git a/libcef/common/command_line_impl.h b/libcef/common/command_line_impl.h index 85f472657..f535e4251 100644 --- a/libcef/common/command_line_impl.h +++ b/libcef/common/command_line_impl.h @@ -19,27 +19,27 @@ class CefCommandLineImpl : public CefValueBase { bool read_only); // CefCommandLine methods. - virtual bool IsValid() OVERRIDE; - virtual bool IsReadOnly() OVERRIDE; - virtual CefRefPtr Copy() OVERRIDE; - virtual void InitFromArgv(int argc, const char* const* argv) OVERRIDE; - virtual void InitFromString(const CefString& command_line) OVERRIDE; - virtual void Reset() OVERRIDE; - virtual void GetArgv(std::vector& argv) OVERRIDE; - virtual CefString GetCommandLineString() OVERRIDE; - virtual CefString GetProgram() OVERRIDE; - virtual void SetProgram(const CefString& program) OVERRIDE; - virtual bool HasSwitches() OVERRIDE; - virtual bool HasSwitch(const CefString& name) OVERRIDE; - virtual CefString GetSwitchValue(const CefString& name) OVERRIDE; - virtual void GetSwitches(SwitchMap& switches) OVERRIDE; - virtual void AppendSwitch(const CefString& name) OVERRIDE; - virtual void AppendSwitchWithValue(const CefString& name, - const CefString& value) OVERRIDE; - virtual bool HasArguments() OVERRIDE; - virtual void GetArguments(ArgumentList& arguments) OVERRIDE; - virtual void AppendArgument(const CefString& argument) OVERRIDE; - virtual void PrependWrapper(const CefString& wrapper) OVERRIDE; + bool IsValid() override; + bool IsReadOnly() override; + CefRefPtr Copy() override; + void InitFromArgv(int argc, const char* const* argv) override; + void InitFromString(const CefString& command_line) override; + void Reset() override; + void GetArgv(std::vector& argv) override; + CefString GetCommandLineString() override; + CefString GetProgram() override; + void SetProgram(const CefString& program) override; + bool HasSwitches() override; + bool HasSwitch(const CefString& name) override; + CefString GetSwitchValue(const CefString& name) override; + void GetSwitches(SwitchMap& switches) override; + void AppendSwitch(const CefString& name) override; + void AppendSwitchWithValue(const CefString& name, + const CefString& value) override; + bool HasArguments() override; + void GetArguments(ArgumentList& arguments) override; + void AppendArgument(const CefString& argument) override; + void PrependWrapper(const CefString& wrapper) override; // Must hold the controller lock while using this value. const CommandLine& command_line() { return const_value(); } diff --git a/libcef/common/content_client.cc b/libcef/common/content_client.cc index d4558c701..1c783978e 100644 --- a/libcef/common/content_client.cc +++ b/libcef/common/content_client.cc @@ -10,7 +10,7 @@ #include "libcef/common/scheme_registration.h" #include "base/command_line.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/logging.h" #include "base/path_service.h" #include "base/strings/string_piece.h" diff --git a/libcef/common/content_client.h b/libcef/common/content_client.h index 70ddb1f57..3ff4cc22d 100644 --- a/libcef/common/content_client.h +++ b/libcef/common/content_client.h @@ -20,23 +20,23 @@ class CefContentClient : public content::ContentClient, public ui::ResourceBundle::Delegate { public: explicit CefContentClient(CefRefPtr application); - virtual ~CefContentClient(); + ~CefContentClient() override; // Returns the singleton CefContentClient instance. static CefContentClient* Get(); // content::ContentClient methods. - virtual void AddPepperPlugins( - std::vector* plugins) OVERRIDE; - virtual void AddAdditionalSchemes( + void AddPepperPlugins( + std::vector* plugins) override; + void AddAdditionalSchemes( std::vector* standard_schemes, - std::vector* savable_schemes) OVERRIDE; - virtual std::string GetUserAgent() const OVERRIDE; - virtual base::string16 GetLocalizedString(int message_id) const OVERRIDE; - virtual base::StringPiece GetDataResource( + std::vector* savable_schemes) override; + std::string GetUserAgent() const override; + base::string16 GetLocalizedString(int message_id) const override; + base::StringPiece GetDataResource( int resource_id, - ui::ScaleFactor scale_factor) const OVERRIDE; - virtual gfx::Image& GetNativeImageNamed(int resource_id) const OVERRIDE; + ui::ScaleFactor scale_factor) const override; + gfx::Image& GetNativeImageNamed(int resource_id) const override; struct SchemeInfo { std::string scheme_name; @@ -59,26 +59,26 @@ class CefContentClient : public content::ContentClient, private: // ui::ResourceBundle::Delegate methods. - virtual base::FilePath GetPathForResourcePack( + base::FilePath GetPathForResourcePack( const base::FilePath& pack_path, - ui::ScaleFactor scale_factor) OVERRIDE; - virtual base::FilePath GetPathForLocalePack( + ui::ScaleFactor scale_factor) override; + base::FilePath GetPathForLocalePack( const base::FilePath& pack_path, - const std::string& locale) OVERRIDE; - virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE; - virtual gfx::Image GetNativeImageNamed( + const std::string& locale) override; + gfx::Image GetImageNamed(int resource_id) override; + gfx::Image GetNativeImageNamed( int resource_id, - ui::ResourceBundle::ImageRTL rtl) OVERRIDE; - virtual base::RefCountedStaticMemory* LoadDataResourceBytes( + ui::ResourceBundle::ImageRTL rtl) override; + base::RefCountedStaticMemory* LoadDataResourceBytes( int resource_id, - ui::ScaleFactor scale_factor) OVERRIDE; - virtual bool GetRawDataResource(int resource_id, - ui::ScaleFactor scale_factor, - base::StringPiece* value) OVERRIDE; - virtual bool GetLocalizedString(int message_id, - base::string16* value) OVERRIDE; - virtual scoped_ptr GetFont( - ui::ResourceBundle::FontStyle style) OVERRIDE; + ui::ScaleFactor scale_factor) override; + bool GetRawDataResource(int resource_id, + ui::ScaleFactor scale_factor, + base::StringPiece* value) override; + bool GetLocalizedString(int message_id, + base::string16* value) override; + scoped_ptr GetFont( + ui::ResourceBundle::FontStyle style) override; CefRefPtr application_; bool pack_loading_disabled_; diff --git a/libcef/common/crash_reporter_client.cc b/libcef/common/crash_reporter_client.cc index 2fe448d7d..650d0fbfe 100644 --- a/libcef/common/crash_reporter_client.cc +++ b/libcef/common/crash_reporter_client.cc @@ -32,11 +32,16 @@ void CefCrashReporterClient::GetProductNameAndVersion( #endif #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) -void CefCrashReporterClient::GetProductNameAndVersion(std::string* product_name, - std::string* version) { +#define PRODUCT_VERSION \ + MAKE_STRING(CEF_VERSION_MAJOR) "." \ + MAKE_STRING(CHROME_VERSION_BUILD) "." \ + MAKE_STRING(CEF_REVISION) + +void CefCrashReporterClient::GetProductNameAndVersion( + const char** product_name, + const char** version) { *product_name = "cef"; - *version = base::StringPrintf( - "%d.%d.%d", CEF_VERSION_MAJOR, CHROME_VERSION_BUILD, CEF_REVISION); + *version = PRODUCT_VERSION; } base::FilePath CefCrashReporterClient::GetReporterLogFilename() { diff --git a/libcef/common/crash_reporter_client.h b/libcef/common/crash_reporter_client.h index 9b51f5f53..0ed6d4077 100644 --- a/libcef/common/crash_reporter_client.h +++ b/libcef/common/crash_reporter_client.h @@ -11,30 +11,30 @@ class CefCrashReporterClient : public crash_reporter::CrashReporterClient { public: CefCrashReporterClient(); - virtual ~CefCrashReporterClient(); + ~CefCrashReporterClient() override; #if defined(OS_WIN) // Returns a textual description of the product type and version to include // in the crash report. - virtual void GetProductNameAndVersion(const base::FilePath& exe_path, - base::string16* product_name, - base::string16* version, - base::string16* special_build, - base::string16* channel_name) OVERRIDE; + void GetProductNameAndVersion(const base::FilePath& exe_path, + base::string16* product_name, + base::string16* version, + base::string16* special_build, + base::string16* channel_name) override; #endif #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) // Returns a textual description of the product type and version to include // in the crash report. - virtual void GetProductNameAndVersion(std::string* product_name, - std::string* version) OVERRIDE; + void GetProductNameAndVersion(const char** product_name, + const char** version) override; - virtual base::FilePath GetReporterLogFilename() OVERRIDE; + base::FilePath GetReporterLogFilename() override; #endif // The location where minidump files should be written. Returns true if // |crash_dir| was set. - virtual bool GetCrashDumpLocation(base::FilePath* crash_dir) OVERRIDE; + bool GetCrashDumpLocation(base::FilePath* crash_dir) override; private: DISALLOW_COPY_AND_ASSIGN(CefCrashReporterClient); diff --git a/libcef/common/drag_data_impl.h b/libcef/common/drag_data_impl.h index 61e6d14aa..1c1533c0b 100644 --- a/libcef/common/drag_data_impl.h +++ b/libcef/common/drag_data_impl.h @@ -18,30 +18,29 @@ class CefDragDataImpl : public CefDragData { public: CefDragDataImpl(); explicit CefDragDataImpl(const content::DropData& data); - virtual CefRefPtr Clone(); - virtual bool IsReadOnly(); - virtual bool IsLink(); - virtual bool IsFragment(); - virtual bool IsFile(); - virtual CefString GetLinkURL(); - virtual CefString GetLinkTitle(); - virtual CefString GetLinkMetadata(); - virtual CefString GetFragmentText(); - virtual CefString GetFragmentHtml(); - virtual CefString GetFragmentBaseURL(); - virtual CefString GetFileName(); - virtual size_t GetFileContents(CefRefPtr writer); - virtual bool GetFileNames(std::vector& names); - - virtual void SetLinkURL(const CefString& url); - virtual void SetLinkTitle(const CefString& title); - virtual void SetLinkMetadata(const CefString& data); - virtual void SetFragmentText(const CefString& text); - virtual void SetFragmentHtml(const CefString& fragment); - virtual void SetFragmentBaseURL(const CefString& fragment); - virtual void ResetFileContents(); - virtual void AddFile(const CefString& path, const CefString& display_name); + CefRefPtr Clone() override; + bool IsReadOnly() override; + bool IsLink() override; + bool IsFragment() override; + bool IsFile() override; + CefString GetLinkURL() override; + CefString GetLinkTitle() override; + CefString GetLinkMetadata() override; + CefString GetFragmentText() override; + CefString GetFragmentHtml() override; + CefString GetFragmentBaseURL() override; + CefString GetFileName() override; + size_t GetFileContents(CefRefPtr writer) override; + bool GetFileNames(std::vector& names) override; + void SetLinkURL(const CefString& url) override; + void SetLinkTitle(const CefString& title) override; + void SetLinkMetadata(const CefString& data) override; + void SetFragmentText(const CefString& text) override; + void SetFragmentHtml(const CefString& fragment) override; + void SetFragmentBaseURL(const CefString& fragment) override; + void ResetFileContents() override; + void AddFile(const CefString& path, const CefString& display_name) override; // This method is not safe. Use Lock/Unlock to get mutually exclusive access. const content::DropData& drop_data() { diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index 396caa42f..de151e379 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -14,7 +14,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/files/file_path.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/lazy_instance.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" @@ -151,7 +151,7 @@ class CefUIThread : public base::Thread { main_function_params_(main_function_params) { } - virtual void Init() OVERRIDE { + void Init() override { #if defined(OS_WIN) // Initializes the COM library on the current thread. CoInitialize(NULL); @@ -165,7 +165,7 @@ class CefUIThread : public base::Thread { CHECK_EQ(exit_code, -1); } - virtual void CleanUp() OVERRIDE { + void CleanUp() override { browser_runner_->Shutdown(); browser_runner_.reset(NULL); diff --git a/libcef/common/main_delegate.h b/libcef/common/main_delegate.h index da1fdbe84..e5089ac2e 100644 --- a/libcef/common/main_delegate.h +++ b/libcef/common/main_delegate.h @@ -30,21 +30,21 @@ class CefContentUtilityClient; class CefMainDelegate : public content::ContentMainDelegate { public: explicit CefMainDelegate(CefRefPtr application); - virtual ~CefMainDelegate(); + ~CefMainDelegate() override; - virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; - virtual void PreSandboxStartup() OVERRIDE; - virtual int RunProcess( + bool BasicStartupComplete(int* exit_code) override; + void PreSandboxStartup() override; + int RunProcess( const std::string& process_type, - const content::MainFunctionParams& main_function_params) OVERRIDE; - virtual void ProcessExiting(const std::string& process_type) OVERRIDE; + const content::MainFunctionParams& main_function_params) override; + void ProcessExiting(const std::string& process_type) override; #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) - virtual void ZygoteForked() OVERRIDE; + void ZygoteForked() override; #endif - virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; - virtual content::ContentRendererClient* - CreateContentRendererClient() OVERRIDE; - virtual content::ContentUtilityClient* CreateContentUtilityClient() OVERRIDE; + content::ContentBrowserClient* CreateContentBrowserClient() override; + content::ContentRendererClient* + CreateContentRendererClient() override; + content::ContentUtilityClient* CreateContentUtilityClient() override; // Shut down the browser runner. void ShutdownBrowser(); diff --git a/libcef/common/process_message_impl.h b/libcef/common/process_message_impl.h index 28e078a90..30dfc72ae 100644 --- a/libcef/common/process_message_impl.h +++ b/libcef/common/process_message_impl.h @@ -23,11 +23,11 @@ class CefProcessMessageImpl bool CopyTo(Cef_Request_Params& target); // CefProcessMessage methods. - virtual bool IsValid() OVERRIDE; - virtual bool IsReadOnly() OVERRIDE; - virtual CefRefPtr Copy() OVERRIDE; - virtual CefString GetName() OVERRIDE; - virtual CefRefPtr GetArgumentList() OVERRIDE; + bool IsValid() override; + bool IsReadOnly() override; + CefRefPtr Copy() override; + CefString GetName() override; + CefRefPtr GetArgumentList() override; DISALLOW_COPY_AND_ASSIGN(CefProcessMessageImpl); }; diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index fa8b8847f..6a4f8be6e 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -13,6 +13,7 @@ #include "base/logging.h" #include "content/public/browser/resource_request_info.h" #include "content/public/common/resource_type.h" +#include "net/base/elements_upload_data_stream.h" #include "net/base/upload_data_stream.h" #include "net/base/upload_element_reader.h" #include "net/base/upload_bytes_element_reader.h" @@ -38,8 +39,6 @@ class BytesElementReader : public net::UploadBytesElementReader { DCHECK_EQ(net::UploadElement::TYPE_BYTES, element_->type()); } - virtual ~BytesElementReader() {} - private: scoped_ptr element_; @@ -68,8 +67,6 @@ class FileElementReader : public net::UploadFileElementReader { DCHECK_EQ(net::UploadElement::TYPE_FILE, element_->type()); } - virtual ~FileElementReader() {} - private: scoped_ptr element_; @@ -385,8 +382,8 @@ void CefRequestImpl::GetHeaderMap(const blink::WebURLRequest& request, public: explicit HeaderVisitor(HeaderMap* map) : map_(map) {} - virtual void visitHeader(const blink::WebString& name, - const blink::WebString& value) { + void visitHeader(const blink::WebString& name, + const blink::WebString& value) override { map_->insert(std::make_pair(base::string16(name), base::string16(value))); } @@ -505,13 +502,16 @@ void CefPostDataImpl::Set(const net::UploadDataStream& data_stream) { CefRefPtr postelem; - const ScopedVector& elements = - data_stream.element_readers(); - ScopedVector::const_iterator it = elements.begin(); - for (; it != elements.end(); ++it) { - postelem = CefPostDataElement::Create(); - static_cast(postelem.get())->Set(**it); - AddElement(postelem); + const ScopedVector* elements = + data_stream.GetElementReaders(); + if (elements) { + ScopedVector::const_iterator it = + elements->begin(); + for (; it != elements->end(); ++it) { + postelem = CefPostDataElement::Create(); + static_cast(postelem.get())->Set(**it); + AddElement(postelem); + } } } @@ -538,7 +538,7 @@ net::UploadDataStream* CefPostDataImpl::Get() { static_cast(it->get())->Get()); } - return new net::UploadDataStream(element_readers.Pass(), 0); + return new net::ElementsUploadDataStream(element_readers.Pass(), 0); } void CefPostDataImpl::Set(const blink::WebHTTPBody& data) { diff --git a/libcef/common/request_impl.h b/libcef/common/request_impl.h index f9cfdfc46..6e6ac9053 100644 --- a/libcef/common/request_impl.h +++ b/libcef/common/request_impl.h @@ -28,27 +28,26 @@ class WebURLRequest; class CefRequestImpl : public CefRequest { public: CefRequestImpl(); - ~CefRequestImpl() {} - virtual bool IsReadOnly() OVERRIDE; - virtual CefString GetURL() OVERRIDE; - virtual void SetURL(const CefString& url) OVERRIDE; - virtual CefString GetMethod() OVERRIDE; - virtual void SetMethod(const CefString& method) OVERRIDE; - virtual CefRefPtr GetPostData() OVERRIDE; - virtual void SetPostData(CefRefPtr postData) OVERRIDE; - virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; - virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; - virtual void Set(const CefString& url, - const CefString& method, - CefRefPtr postData, - const HeaderMap& headerMap) OVERRIDE; - virtual int GetFlags() OVERRIDE; - virtual void SetFlags(int flags) OVERRIDE; - virtual CefString GetFirstPartyForCookies() OVERRIDE; - virtual void SetFirstPartyForCookies(const CefString& url) OVERRIDE; - virtual ResourceType GetResourceType() OVERRIDE; - virtual TransitionType GetTransitionType() OVERRIDE; + bool IsReadOnly() override; + CefString GetURL() override; + void SetURL(const CefString& url) override; + CefString GetMethod() override; + void SetMethod(const CefString& method) override; + CefRefPtr GetPostData() override; + void SetPostData(CefRefPtr postData) override; + void GetHeaderMap(HeaderMap& headerMap) override; + void SetHeaderMap(const HeaderMap& headerMap) override; + void Set(const CefString& url, + const CefString& method, + CefRefPtr postData, + const HeaderMap& headerMap) override; + int GetFlags() override; + void SetFlags(int flags) override; + CefString GetFirstPartyForCookies() override; + void SetFirstPartyForCookies(const CefString& url) override; + ResourceType GetResourceType() override; + TransitionType GetTransitionType() override; // Populate this object from the URLRequest object. void Set(net::URLRequest* request); @@ -95,14 +94,13 @@ class CefRequestImpl : public CefRequest { class CefPostDataImpl : public CefPostData { public: CefPostDataImpl(); - ~CefPostDataImpl() {} - virtual bool IsReadOnly() OVERRIDE; - virtual size_t GetElementCount() OVERRIDE; - virtual void GetElements(ElementVector& elements) OVERRIDE; - virtual bool RemoveElement(CefRefPtr element) OVERRIDE; - virtual bool AddElement(CefRefPtr element) OVERRIDE; - virtual void RemoveElements(); + bool IsReadOnly() override; + size_t GetElementCount() override; + void GetElements(ElementVector& elements) override; + bool RemoveElement(CefRefPtr element) override; + bool AddElement(CefRefPtr element) override; + void RemoveElements() override; void Set(const net::UploadData& data); void Set(const net::UploadDataStream& data_stream); @@ -128,16 +126,16 @@ class CefPostDataImpl : public CefPostData { class CefPostDataElementImpl : public CefPostDataElement { public: CefPostDataElementImpl(); - ~CefPostDataElementImpl(); + ~CefPostDataElementImpl() override; - virtual bool IsReadOnly() OVERRIDE; - virtual void SetToEmpty() OVERRIDE; - virtual void SetToFile(const CefString& fileName) OVERRIDE; - virtual void SetToBytes(size_t size, const void* bytes) OVERRIDE; - virtual Type GetType() OVERRIDE; - virtual CefString GetFile() OVERRIDE; - virtual size_t GetBytesCount() OVERRIDE; - virtual size_t GetBytes(size_t size, void* bytes) OVERRIDE; + bool IsReadOnly() override; + void SetToEmpty() override; + void SetToFile(const CefString& fileName) override; + void SetToBytes(size_t size, const void* bytes) override; + Type GetType() override; + CefString GetFile() override; + size_t GetBytesCount() override; + size_t GetBytes(size_t size, void* bytes) override; void* GetBytes() { return data_.bytes.bytes; } diff --git a/libcef/common/response_impl.cc b/libcef/common/response_impl.cc index 903f007bb..6cd79ec14 100644 --- a/libcef/common/response_impl.cc +++ b/libcef/common/response_impl.cc @@ -185,8 +185,8 @@ void CefResponseImpl::Set(const blink::WebURLResponse& response) { public: explicit HeaderVisitor(HeaderMap* map) : map_(map) {} - virtual void visitHeader(const blink::WebString& name, - const blink::WebString& value) { + void visitHeader(const blink::WebString& name, + const blink::WebString& value) override { map_->insert(std::make_pair(base::string16(name), base::string16(value))); } diff --git a/libcef/common/response_impl.h b/libcef/common/response_impl.h index 084cabce3..df78a0c11 100644 --- a/libcef/common/response_impl.h +++ b/libcef/common/response_impl.h @@ -22,19 +22,18 @@ class WebURLResponse; class CefResponseImpl : public CefResponse { public: CefResponseImpl(); - ~CefResponseImpl() {} // CefResponse methods. - virtual bool IsReadOnly() OVERRIDE; - virtual int GetStatus() OVERRIDE; - virtual void SetStatus(int status) OVERRIDE; - virtual CefString GetStatusText() OVERRIDE; - virtual void SetStatusText(const CefString& statusText) OVERRIDE; - virtual CefString GetMimeType() OVERRIDE; - virtual void SetMimeType(const CefString& mimeType) OVERRIDE; - virtual CefString GetHeader(const CefString& name) OVERRIDE; - virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; - virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; + bool IsReadOnly() override; + int GetStatus() override; + void SetStatus(int status) override; + CefString GetStatusText() override; + void SetStatusText(const CefString& statusText) override; + CefString GetMimeType() override; + void SetMimeType(const CefString& mimeType) override; + CefString GetHeader(const CefString& name) override; + void GetHeaderMap(HeaderMap& headerMap) override; + void SetHeaderMap(const HeaderMap& headerMap) override; net::HttpResponseHeaders* GetResponseHeaders(); void SetResponseHeaders(const net::HttpResponseHeaders& headers); diff --git a/libcef/common/scheme_registrar_impl.h b/libcef/common/scheme_registrar_impl.h index ad7d01186..aeb3c01aa 100644 --- a/libcef/common/scheme_registrar_impl.h +++ b/libcef/common/scheme_registrar_impl.h @@ -18,10 +18,10 @@ class CefSchemeRegistrarImpl : public CefSchemeRegistrar { CefSchemeRegistrarImpl(); // CefSchemeRegistrar methods. - virtual bool AddCustomScheme(const CefString& scheme_name, - bool is_standard, - bool is_local, - bool is_display_isolated) OVERRIDE; + bool AddCustomScheme(const CefString& scheme_name, + bool is_standard, + bool is_local, + bool is_display_isolated) override; void GetStandardSchemes(std::vector* standard_schemes); diff --git a/libcef/common/task_runner_impl.h b/libcef/common/task_runner_impl.h index 709476221..c0b3aa821 100644 --- a/libcef/common/task_runner_impl.h +++ b/libcef/common/task_runner_impl.h @@ -21,12 +21,12 @@ class CefTaskRunnerImpl : public CefTaskRunner { static scoped_refptr GetCurrentTaskRunner(); // CefTaskRunner methods: - virtual bool IsSame(CefRefPtr that) OVERRIDE; - virtual bool BelongsToCurrentThread() OVERRIDE; - virtual bool BelongsToThread(CefThreadId threadId) OVERRIDE; - virtual bool PostTask(CefRefPtr task) OVERRIDE; - virtual bool PostDelayedTask(CefRefPtr task, - int64 delay_ms) OVERRIDE; + bool IsSame(CefRefPtr that) override; + bool BelongsToCurrentThread() override; + bool BelongsToThread(CefThreadId threadId) override; + bool PostTask(CefRefPtr task) override; + bool PostDelayedTask(CefRefPtr task, + int64 delay_ms) override; private: scoped_refptr task_runner_; diff --git a/libcef/common/tracker.h b/libcef/common/tracker.h index 3491bb713..cf6f8b8c6 100644 --- a/libcef/common/tracker.h +++ b/libcef/common/tracker.h @@ -51,7 +51,7 @@ class CefTrackNode { class CefTrackManager : public CefBase { public: CefTrackManager(); - virtual ~CefTrackManager(); + ~CefTrackManager() override; // Add an object to be tracked by this manager. void Add(CefTrackNode* object); diff --git a/libcef/common/upload_data.h b/libcef/common/upload_data.h index 2a5a94876..2e3b89b6b 100644 --- a/libcef/common/upload_data.h +++ b/libcef/common/upload_data.h @@ -69,7 +69,7 @@ class NET_EXPORT UploadData private: friend class base::RefCounted; - virtual ~UploadData(); + ~UploadData() override; ScopedVector elements_; int64 identifier_; diff --git a/libcef/common/value_base.h b/libcef/common/value_base.h index 1bb0acaf0..d9483ee21 100644 --- a/libcef/common/value_base.h +++ b/libcef/common/value_base.h @@ -40,7 +40,7 @@ class CefValueController if (verified_) impl_->lock(); } - virtual ~AutoLock() { + ~AutoLock() { if (verified_) impl_->unlock(); } @@ -55,7 +55,6 @@ class CefValueController }; CefValueController(); - virtual ~CefValueController(); // Returns true if this controller is thread safe. virtual bool thread_safe() =0; @@ -108,6 +107,11 @@ class CefValueController // |other|. The |other| controller must already be locked. void TakeFrom(CefValueController* other); + protected: + friend class base::RefCountedThreadSafe; + + virtual ~CefValueController(); + private: // Owner object. void* owner_value_; @@ -132,17 +136,17 @@ class CefValueControllerThreadSafe : public CefValueController { : locked_thread_id_(0) {} // CefValueController methods. - virtual bool thread_safe() OVERRIDE { return true; } - virtual bool on_correct_thread() OVERRIDE { return true; } - virtual void lock() OVERRIDE { + bool thread_safe() override { return true; } + bool on_correct_thread() override { return true; } + void lock() override { lock_.Acquire(); locked_thread_id_ = base::PlatformThread::CurrentId(); } - virtual void unlock() OVERRIDE { + void unlock() override { locked_thread_id_ = 0; lock_.Release(); } - virtual bool locked() OVERRIDE { + bool locked() override { return (locked_thread_id_ == base::PlatformThread::CurrentId()); } @@ -160,13 +164,13 @@ class CefValueControllerNonThreadSafe : public CefValueController { : thread_id_(base::PlatformThread::CurrentId()) {} // CefValueController methods. - virtual bool thread_safe() OVERRIDE { return false; } - virtual bool on_correct_thread() OVERRIDE { + bool thread_safe() override { return false; } + bool on_correct_thread() override { return (thread_id_ == base::PlatformThread::CurrentId()); } - virtual void lock() OVERRIDE {} - virtual void unlock() OVERRIDE {} - virtual bool locked() OVERRIDE { return on_correct_thread(); } + void lock() override {} + void unlock() override {} + bool locked() override { return on_correct_thread(); } private: base::PlatformThreadId thread_id_; @@ -256,7 +260,8 @@ class CefValueBase : public CefType, public CefValueController::Object { controller_->AddDependency(parent_value, value_); } } - virtual ~CefValueBase() { + + ~CefValueBase() override { if (controller_.get() && value_) Delete(); } @@ -334,7 +339,7 @@ class CefValueBase : public CefType, public CefValueController::Object { protected: // CefValueController::Object methods. - virtual void OnControlRemoved() { + void OnControlRemoved() override { DCHECK(controller()->locked()); // Only references should be removed in this manner. @@ -389,7 +394,6 @@ class CefValueBase : public CefType, public CefValueController::Object { : auto_lock_(impl->controller()) { verified_ = (auto_lock_.verified() && impl->VerifyAccess(modify)); } - virtual ~AutoLock() {} inline bool verified() { return verified_; } diff --git a/libcef/common/values_impl.h b/libcef/common/values_impl.h index 2148c1b13..ef4e25c93 100644 --- a/libcef/common/values_impl.h +++ b/libcef/common/values_impl.h @@ -38,13 +38,13 @@ class CefBinaryValueImpl base::BinaryValue* CopyOrDetachValue(CefValueController* new_controller); // CefBinaryValue methods. - virtual bool IsValid() OVERRIDE; - virtual bool IsOwned() OVERRIDE; - virtual CefRefPtr Copy() OVERRIDE; - virtual size_t GetSize() OVERRIDE; - virtual size_t GetData(void* buffer, - size_t buffer_size, - size_t data_offset) OVERRIDE; + bool IsValid() override; + bool IsOwned() override; + CefRefPtr Copy() override; + size_t GetSize() override; + size_t GetData(void* buffer, + size_t buffer_size, + size_t data_offset) override; private: // See the CefValueBase constructor for usage. Binary values are always @@ -90,37 +90,37 @@ class CefDictionaryValueImpl base::DictionaryValue* CopyOrDetachValue(CefValueController* new_controller); // CefDictionaryValue methods. - virtual bool IsValid() OVERRIDE; - virtual bool IsOwned() OVERRIDE; - virtual bool IsReadOnly() OVERRIDE; - virtual CefRefPtr Copy( - bool exclude_empty_children) OVERRIDE; - virtual size_t GetSize() OVERRIDE; - virtual bool Clear() OVERRIDE; - virtual bool HasKey(const CefString& key) OVERRIDE; - virtual bool GetKeys(KeyList& keys) OVERRIDE; - virtual bool Remove(const CefString& key) OVERRIDE; - virtual CefValueType GetType(const CefString& key) OVERRIDE; - virtual bool GetBool(const CefString& key) OVERRIDE; - virtual int GetInt(const CefString& key) OVERRIDE; - virtual double GetDouble(const CefString& key) OVERRIDE; - virtual CefString GetString(const CefString& key) OVERRIDE; - virtual CefRefPtr GetBinary(const CefString& key) OVERRIDE; - virtual CefRefPtr GetDictionary( - const CefString& key) OVERRIDE; - virtual CefRefPtr GetList(const CefString& key) OVERRIDE; - virtual bool SetNull(const CefString& key) OVERRIDE; - virtual bool SetBool(const CefString& key, bool value) OVERRIDE; - virtual bool SetInt(const CefString& key, int value) OVERRIDE; - virtual bool SetDouble(const CefString& key, double value) OVERRIDE; - virtual bool SetString(const CefString& key, - const CefString& value) OVERRIDE; - virtual bool SetBinary(const CefString& key, - CefRefPtr value) OVERRIDE; - virtual bool SetDictionary(const CefString& key, - CefRefPtr value) OVERRIDE; - virtual bool SetList(const CefString& key, - CefRefPtr value) OVERRIDE; + bool IsValid() override; + bool IsOwned() override; + bool IsReadOnly() override; + CefRefPtr Copy( + bool exclude_empty_children) override; + size_t GetSize() override; + bool Clear() override; + bool HasKey(const CefString& key) override; + bool GetKeys(KeyList& keys) override; + bool Remove(const CefString& key) override; + CefValueType GetType(const CefString& key) override; + bool GetBool(const CefString& key) override; + int GetInt(const CefString& key) override; + double GetDouble(const CefString& key) override; + CefString GetString(const CefString& key) override; + CefRefPtr GetBinary(const CefString& key) override; + CefRefPtr GetDictionary( + const CefString& key) override; + CefRefPtr GetList(const CefString& key) override; + bool SetNull(const CefString& key) override; + bool SetBool(const CefString& key, bool value) override; + bool SetInt(const CefString& key, int value) override; + bool SetDouble(const CefString& key, double value) override; + bool SetString(const CefString& key, + const CefString& value) override; + bool SetBinary(const CefString& key, + CefRefPtr value) override; + bool SetDictionary(const CefString& key, + CefRefPtr value) override; + bool SetList(const CefString& key, + CefRefPtr value) override; private: // See the CefValueBase constructor for usage. @@ -163,31 +163,31 @@ class CefListValueImpl base::ListValue* CopyOrDetachValue(CefValueController* new_controller); /// CefListValue methods. - virtual bool IsValid() OVERRIDE; - virtual bool IsOwned() OVERRIDE; - virtual bool IsReadOnly() OVERRIDE; - virtual CefRefPtr Copy() OVERRIDE; - virtual bool SetSize(size_t size) OVERRIDE; - virtual size_t GetSize() OVERRIDE; - virtual bool Clear() OVERRIDE; - virtual bool Remove(int index) OVERRIDE; - virtual CefValueType GetType(int index) OVERRIDE; - virtual bool GetBool(int index) OVERRIDE; - virtual int GetInt(int index) OVERRIDE; - virtual double GetDouble(int index) OVERRIDE; - virtual CefString GetString(int index) OVERRIDE; - virtual CefRefPtr GetBinary(int index) OVERRIDE; - virtual CefRefPtr GetDictionary(int index) OVERRIDE; - virtual CefRefPtr GetList(int index) OVERRIDE; - virtual bool SetNull(int index) OVERRIDE; - virtual bool SetBool(int index, bool value) OVERRIDE; - virtual bool SetInt(int index, int value) OVERRIDE; - virtual bool SetDouble(int index, double value) OVERRIDE; - virtual bool SetString(int index, const CefString& value) OVERRIDE; - virtual bool SetBinary(int index, CefRefPtr value) OVERRIDE; - virtual bool SetDictionary(int index, - CefRefPtr value) OVERRIDE; - virtual bool SetList(int index, CefRefPtr value) OVERRIDE; + bool IsValid() override; + bool IsOwned() override; + bool IsReadOnly() override; + CefRefPtr Copy() override; + bool SetSize(size_t size) override; + size_t GetSize() override; + bool Clear() override; + bool Remove(int index) override; + CefValueType GetType(int index) override; + bool GetBool(int index) override; + int GetInt(int index) override; + double GetDouble(int index) override; + CefString GetString(int index) override; + CefRefPtr GetBinary(int index) override; + CefRefPtr GetDictionary(int index) override; + CefRefPtr GetList(int index) override; + bool SetNull(int index) override; + bool SetBool(int index, bool value) override; + bool SetInt(int index, int value) override; + bool SetDouble(int index, double value) override; + bool SetString(int index, const CefString& value) override; + bool SetBinary(int index, CefRefPtr value) override; + bool SetDictionary(int index, + CefRefPtr value) override; + bool SetList(int index, CefRefPtr value) override; private: // See the CefValueBase constructor for usage. diff --git a/libcef/renderer/browser_impl.h b/libcef/renderer/browser_impl.h index 534dd43aa..ee9060035 100644 --- a/libcef/renderer/browser_impl.h +++ b/libcef/renderer/browser_impl.h @@ -49,35 +49,35 @@ class CefBrowserImpl : public CefBrowser, blink::WebFrame* frame); // CefBrowser methods. - virtual CefRefPtr GetHost() OVERRIDE; - virtual bool CanGoBack() OVERRIDE; - virtual void GoBack() OVERRIDE; - virtual bool CanGoForward() OVERRIDE; - virtual void GoForward() OVERRIDE; - virtual bool IsLoading() OVERRIDE; - virtual void Reload() OVERRIDE; - virtual void ReloadIgnoreCache() OVERRIDE; - virtual void StopLoad() OVERRIDE; - virtual int GetIdentifier() OVERRIDE; - virtual bool IsSame(CefRefPtr that) OVERRIDE; - virtual bool IsPopup() OVERRIDE; - virtual bool HasDocument() OVERRIDE; - virtual CefRefPtr GetMainFrame() OVERRIDE; - virtual CefRefPtr GetFocusedFrame() OVERRIDE; - virtual CefRefPtr GetFrame(int64 identifier) OVERRIDE; - virtual CefRefPtr GetFrame(const CefString& name) OVERRIDE; - virtual size_t GetFrameCount() OVERRIDE; - virtual void GetFrameIdentifiers(std::vector& identifiers) OVERRIDE; - virtual void GetFrameNames(std::vector& names) OVERRIDE; - virtual bool SendProcessMessage( + CefRefPtr GetHost() override; + bool CanGoBack() override; + void GoBack() override; + bool CanGoForward() override; + void GoForward() override; + bool IsLoading() override; + void Reload() override; + void ReloadIgnoreCache() override; + void StopLoad() override; + int GetIdentifier() override; + bool IsSame(CefRefPtr that) override; + bool IsPopup() override; + bool HasDocument() override; + CefRefPtr GetMainFrame() override; + CefRefPtr GetFocusedFrame() override; + CefRefPtr GetFrame(int64 identifier) override; + CefRefPtr GetFrame(const CefString& name) override; + size_t GetFrameCount() override; + void GetFrameIdentifiers(std::vector& identifiers) override; + void GetFrameNames(std::vector& names) override; + bool SendProcessMessage( CefProcessId target_process, - CefRefPtr message) OVERRIDE; + CefRefPtr message) override; CefBrowserImpl(content::RenderView* render_view, int browser_id, bool is_popup, bool is_windowless); - virtual ~CefBrowserImpl(); + ~CefBrowserImpl() override; void LoadRequest(const CefMsg_LoadRequest_Params& params); @@ -105,23 +105,23 @@ class CefBrowserImpl : public CefBrowser, private: // RenderViewObserver methods. - virtual void OnDestruct() OVERRIDE; - virtual void DidStartLoading() OVERRIDE; - virtual void DidStopLoading() OVERRIDE; - virtual void DidFailLoad(blink::WebLocalFrame* frame, - const blink::WebURLError& error) OVERRIDE; - virtual void DidFinishLoad(blink::WebLocalFrame* frame) OVERRIDE; - virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) OVERRIDE; - virtual void DidFailProvisionalLoad( + void OnDestruct() override; + void DidStartLoading() override; + void DidStopLoading() override; + void DidFailLoad(blink::WebLocalFrame* frame, + const blink::WebURLError& error) override; + void DidFinishLoad(blink::WebLocalFrame* frame) override; + void DidStartProvisionalLoad(blink::WebLocalFrame* frame) override; + void DidFailProvisionalLoad( blink::WebLocalFrame* frame, - const blink::WebURLError& error) OVERRIDE; - virtual void DidCommitProvisionalLoad(blink::WebLocalFrame* frame, - bool is_new_navigation) OVERRIDE; - virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE; - virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE; - virtual void DidCreateDataSource(blink::WebLocalFrame* frame, - blink::WebDataSource* ds) OVERRIDE; - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + const blink::WebURLError& error) override; + void DidCommitProvisionalLoad(blink::WebLocalFrame* frame, + bool is_new_navigation) override; + void FrameDetached(blink::WebFrame* frame) override; + void FocusedNodeChanged(const blink::WebNode& node) override; + void DidCreateDataSource(blink::WebLocalFrame* frame, + blink::WebDataSource* ds) override; + bool OnMessageReceived(const IPC::Message& message) override; // RenderViewObserver::OnMessageReceived message handlers. void OnRequest(const Cef_Request_Params& params); diff --git a/libcef/renderer/content_renderer_client.cc b/libcef/renderer/content_renderer_client.cc index 2ab476ee6..24d055850 100644 --- a/libcef/renderer/content_renderer_client.cc +++ b/libcef/renderer/content_renderer_client.cc @@ -31,7 +31,7 @@ MSVC_POP_WARNING(); #include "libcef/renderer/webkit_glue.h" #include "base/command_line.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" @@ -80,13 +80,10 @@ namespace { // Stub implementation of blink::WebPrerenderingSupport. class CefPrerenderingSupport : public blink::WebPrerenderingSupport { - public: - virtual ~CefPrerenderingSupport() {} - private: - virtual void add(const blink::WebPrerender& prerender) OVERRIDE {} - virtual void cancel(const blink::WebPrerender& prerender) OVERRIDE {} - virtual void abandon(const blink::WebPrerender& prerender) OVERRIDE {} + void add(const blink::WebPrerender& prerender) override {} + void cancel(const blink::WebPrerender& prerender) override {} + void abandon(const blink::WebPrerender& prerender) override {} }; // Stub implementation of blink::WebPrerendererClient. @@ -100,9 +97,9 @@ class CefPrerendererClient : public content::RenderViewObserver, } private: - virtual ~CefPrerendererClient() {} + ~CefPrerendererClient() override {} - virtual void willAddPrerender(blink::WebPrerender* prerender) OVERRIDE {} + void willAddPrerender(blink::WebPrerender* prerender) override {} }; // Implementation of SequencedTaskRunner for WebWorker threads. @@ -122,29 +119,29 @@ class CefWebWorkerTaskRunner : public base::SequencedTaskRunner, } // SequencedTaskRunner methods: - virtual bool PostNonNestableDelayedTask( + bool PostNonNestableDelayedTask( const tracked_objects::Location& from_here, const base::Closure& task, - base::TimeDelta delay) OVERRIDE { + base::TimeDelta delay) override { return PostDelayedTask(from_here, task, delay); } // TaskRunner methods: - virtual bool PostDelayedTask(const tracked_objects::Location& from_here, - const base::Closure& task, - base::TimeDelta delay) OVERRIDE { + bool PostDelayedTask(const tracked_objects::Location& from_here, + const base::Closure& task, + base::TimeDelta delay) override { if (delay != base::TimeDelta()) LOG(WARNING) << "Delayed tasks are not supported on WebWorker threads"; runner_->PostTask(worker_id_, task); return true; } - virtual bool RunsTasksOnCurrentThread() const OVERRIDE { + bool RunsTasksOnCurrentThread() const override { return (runner_->CurrentWorkerId() == worker_id_); } // WorkerTaskRunner::Observer methods: - virtual void OnWorkerRunLoopStopped() OVERRIDE { + void OnWorkerRunLoopStopped() override { CefContentRendererClient::Get()->RemoveWorkerTaskRunner(worker_id_); } @@ -258,9 +255,6 @@ void CefContentRendererClient::WebKitInitialized() { // TODO(cef): Enable these once the implementation supports it. blink::WebRuntimeFeatures::enableNotifications(false); - blink::WebRuntimeFeatures::enableMediaStream( - command_line.HasSwitch(switches::kEnableMediaStream)); - #if defined(OS_WIN) // Need to patch a few functions for font loading to work correctly. // From chrome/renderer/chrome_render_process_observer.cc. diff --git a/libcef/renderer/content_renderer_client.h b/libcef/renderer/content_renderer_client.h index ee387219a..4dde06deb 100644 --- a/libcef/renderer/content_renderer_client.h +++ b/libcef/renderer/content_renderer_client.h @@ -33,7 +33,7 @@ class CefContentRendererClient : public content::ContentRendererClient, public base::MessageLoop::DestructionObserver { public: CefContentRendererClient(); - virtual ~CefContentRendererClient(); + ~CefContentRendererClient() override; // Returns the singleton CefContentRendererClient instance. static CefContentRendererClient* Get(); @@ -79,35 +79,35 @@ class CefContentRendererClient : public content::ContentRendererClient, void RunSingleProcessCleanup(); // ContentRendererClient implementation. - virtual void RenderThreadStarted() OVERRIDE; - virtual void RenderFrameCreated(content::RenderFrame* render_frame) OVERRIDE; - virtual void RenderViewCreated(content::RenderView* render_view) OVERRIDE; - virtual bool OverrideCreatePlugin( + void RenderThreadStarted() override; + void RenderFrameCreated(content::RenderFrame* render_frame) override; + void RenderViewCreated(content::RenderView* render_view) override; + bool OverrideCreatePlugin( content::RenderFrame* render_frame, blink::WebLocalFrame* frame, const blink::WebPluginParams& params, - blink::WebPlugin** plugin) OVERRIDE; - virtual bool HandleNavigation(content::RenderFrame* render_frame, - content::DocumentState* document_state, - int opener_id, - blink::WebFrame* frame, - const blink::WebURLRequest& request, - blink::WebNavigationType type, - blink::WebNavigationPolicy default_policy, - bool is_redirect) OVERRIDE; - virtual void DidCreateScriptContext(blink::WebFrame* frame, - v8::Handle context, - int extension_group, - int world_id) OVERRIDE; - virtual const void* CreatePPAPIInterface( - const std::string& interface_name) OVERRIDE; + blink::WebPlugin** plugin) override; + bool HandleNavigation(content::RenderFrame* render_frame, + content::DocumentState* document_state, + int opener_id, + blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationType type, + blink::WebNavigationPolicy default_policy, + bool is_redirect) override; + void DidCreateScriptContext(blink::WebFrame* frame, + v8::Handle context, + int extension_group, + int world_id) override; + const void* CreatePPAPIInterface( + const std::string& interface_name) override; void WillReleaseScriptContext(blink::WebLocalFrame* frame, v8::Handle context, int world_id); // MessageLoop::DestructionObserver implementation. - virtual void WillDestroyCurrentMessageLoop() OVERRIDE; + void WillDestroyCurrentMessageLoop() override; private: void BrowserCreated(content::RenderView* render_view, diff --git a/libcef/renderer/dom_document_impl.h b/libcef/renderer/dom_document_impl.h index 5aa7356ae..04a013979 100644 --- a/libcef/renderer/dom_document_impl.h +++ b/libcef/renderer/dom_document_impl.h @@ -20,25 +20,25 @@ class CefDOMDocumentImpl : public CefDOMDocument { public: CefDOMDocumentImpl(CefBrowserImpl* browser, blink::WebFrame* frame); - virtual ~CefDOMDocumentImpl(); + ~CefDOMDocumentImpl() override; // CefDOMDocument methods. - virtual Type GetType() OVERRIDE; - virtual CefRefPtr GetDocument() OVERRIDE; - virtual CefRefPtr GetBody() OVERRIDE; - virtual CefRefPtr GetHead() OVERRIDE; - virtual CefString GetTitle() OVERRIDE; - virtual CefRefPtr GetElementById(const CefString& id) OVERRIDE; - virtual CefRefPtr GetFocusedNode() OVERRIDE; - virtual bool HasSelection() OVERRIDE; - virtual CefRefPtr GetSelectionStartNode() OVERRIDE; - virtual int GetSelectionStartOffset() OVERRIDE; - virtual CefRefPtr GetSelectionEndNode() OVERRIDE; - virtual int GetSelectionEndOffset() OVERRIDE; - virtual CefString GetSelectionAsMarkup() OVERRIDE; - virtual CefString GetSelectionAsText() OVERRIDE; - virtual CefString GetBaseURL() OVERRIDE; - virtual CefString GetCompleteURL(const CefString& partialURL) OVERRIDE; + Type GetType() override; + CefRefPtr GetDocument() override; + CefRefPtr GetBody() override; + CefRefPtr GetHead() override; + CefString GetTitle() override; + CefRefPtr GetElementById(const CefString& id) override; + CefRefPtr GetFocusedNode() override; + bool HasSelection() override; + CefRefPtr GetSelectionStartNode() override; + int GetSelectionStartOffset() override; + CefRefPtr GetSelectionEndNode() override; + int GetSelectionEndOffset() override; + CefString GetSelectionAsMarkup() override; + CefString GetSelectionAsText() override; + CefString GetBaseURL() override; + CefString GetCompleteURL(const CefString& partialURL) override; CefBrowserImpl* GetBrowser() { return browser_; } blink::WebFrame* GetFrame() { return frame_; } diff --git a/libcef/renderer/dom_node_impl.h b/libcef/renderer/dom_node_impl.h index 15e591f00..d2d33ef2a 100644 --- a/libcef/renderer/dom_node_impl.h +++ b/libcef/renderer/dom_node_impl.h @@ -15,35 +15,35 @@ class CefDOMNodeImpl : public CefDOMNode { public: CefDOMNodeImpl(CefRefPtr document, const blink::WebNode& node); - virtual ~CefDOMNodeImpl(); + ~CefDOMNodeImpl() override; // CefDOMNode methods. - virtual Type GetType() OVERRIDE; - virtual bool IsText() OVERRIDE; - virtual bool IsElement() OVERRIDE; - virtual bool IsEditable() OVERRIDE; - virtual bool IsFormControlElement() OVERRIDE; - virtual CefString GetFormControlElementType() OVERRIDE; - virtual bool IsSame(CefRefPtr that) OVERRIDE; - virtual CefString GetName() OVERRIDE; - virtual CefString GetValue() OVERRIDE; - virtual bool SetValue(const CefString& value) OVERRIDE; - virtual CefString GetAsMarkup() OVERRIDE; - virtual CefRefPtr GetDocument() OVERRIDE; - virtual CefRefPtr GetParent() OVERRIDE; - virtual CefRefPtr GetPreviousSibling() OVERRIDE; - virtual CefRefPtr GetNextSibling() OVERRIDE; - virtual bool HasChildren() OVERRIDE; - virtual CefRefPtr GetFirstChild() OVERRIDE; - virtual CefRefPtr GetLastChild() OVERRIDE; - virtual CefString GetElementTagName() OVERRIDE; - virtual bool HasElementAttributes() OVERRIDE; - virtual bool HasElementAttribute(const CefString& attrName) OVERRIDE; - virtual CefString GetElementAttribute(const CefString& attrName) OVERRIDE; - virtual void GetElementAttributes(AttributeMap& attrMap) OVERRIDE; - virtual bool SetElementAttribute(const CefString& attrName, - const CefString& value) OVERRIDE; - virtual CefString GetElementInnerText() OVERRIDE; + Type GetType() override; + bool IsText() override; + bool IsElement() override; + bool IsEditable() override; + bool IsFormControlElement() override; + CefString GetFormControlElementType() override; + bool IsSame(CefRefPtr that) override; + CefString GetName() override; + CefString GetValue() override; + bool SetValue(const CefString& value) override; + CefString GetAsMarkup() override; + CefRefPtr GetDocument() override; + CefRefPtr GetParent() override; + CefRefPtr GetPreviousSibling() override; + CefRefPtr GetNextSibling() override; + bool HasChildren() override; + CefRefPtr GetFirstChild() override; + CefRefPtr GetLastChild() override; + CefString GetElementTagName() override; + bool HasElementAttributes() override; + bool HasElementAttribute(const CefString& attrName) override; + CefString GetElementAttribute(const CefString& attrName) override; + void GetElementAttributes(AttributeMap& attrMap) override; + bool SetElementAttribute(const CefString& attrName, + const CefString& value) override; + CefString GetElementInnerText() override; // Will be called from CefDOMDocumentImpl::Detach(). void Detach(); diff --git a/libcef/renderer/frame_impl.h b/libcef/renderer/frame_impl.h index 414561bb0..605346d7c 100644 --- a/libcef/renderer/frame_impl.h +++ b/libcef/renderer/frame_impl.h @@ -23,36 +23,36 @@ class CefFrameImpl : public CefFrame { public: CefFrameImpl(CefBrowserImpl* browser, blink::WebFrame* frame); - virtual ~CefFrameImpl(); + ~CefFrameImpl() override; // CefFrame implementation. - virtual bool IsValid() OVERRIDE; - virtual void Undo() OVERRIDE; - virtual void Redo() OVERRIDE; - virtual void Cut() OVERRIDE; - virtual void Copy() OVERRIDE; - virtual void Paste() OVERRIDE; - virtual void Delete() OVERRIDE; - virtual void SelectAll() OVERRIDE; - virtual void ViewSource() OVERRIDE; - virtual void GetSource(CefRefPtr visitor) OVERRIDE; - virtual void GetText(CefRefPtr visitor) OVERRIDE; - virtual void LoadRequest(CefRefPtr request) OVERRIDE; - virtual void LoadURL(const CefString& url) OVERRIDE; - virtual void LoadString(const CefString& string, - const CefString& url) OVERRIDE; - virtual void ExecuteJavaScript(const CefString& jsCode, - const CefString& scriptUrl, - int startLine) OVERRIDE; - virtual bool IsMain() OVERRIDE; - virtual bool IsFocused() OVERRIDE; - virtual CefString GetName() OVERRIDE; - virtual int64 GetIdentifier() OVERRIDE; - virtual CefRefPtr GetParent() OVERRIDE; - virtual CefString GetURL() OVERRIDE; - virtual CefRefPtr GetBrowser() OVERRIDE; - virtual CefRefPtr GetV8Context() OVERRIDE; - virtual void VisitDOM(CefRefPtr visitor) OVERRIDE; + bool IsValid() override; + void Undo() override; + void Redo() override; + void Cut() override; + void Copy() override; + void Paste() override; + void Delete() override; + void SelectAll() override; + void ViewSource() override; + void GetSource(CefRefPtr visitor) override; + void GetText(CefRefPtr visitor) override; + void LoadRequest(CefRefPtr request) override; + void LoadURL(const CefString& url) override; + void LoadString(const CefString& string, + const CefString& url) override; + void ExecuteJavaScript(const CefString& jsCode, + const CefString& scriptUrl, + int startLine) override; + bool IsMain() override; + bool IsFocused() override; + CefString GetName() override; + int64 GetIdentifier() override; + CefRefPtr GetParent() override; + CefString GetURL() override; + CefRefPtr GetBrowser() override; + CefRefPtr GetV8Context() override; + void VisitDOM(CefRefPtr visitor) override; void Detach(); diff --git a/libcef/renderer/render_frame_observer.h b/libcef/renderer/render_frame_observer.h index f18d1b9f3..cb8cdc32c 100644 --- a/libcef/renderer/render_frame_observer.h +++ b/libcef/renderer/render_frame_observer.h @@ -14,10 +14,10 @@ class RenderFrame; class CefRenderFrameObserver : public content::RenderFrameObserver { public: explicit CefRenderFrameObserver(content::RenderFrame* render_frame); - virtual ~CefRenderFrameObserver(); + ~CefRenderFrameObserver() override; - virtual void WillReleaseScriptContext(v8::Handle context, - int world_id) OVERRIDE; + void WillReleaseScriptContext(v8::Handle context, + int world_id) override; private: DISALLOW_COPY_AND_ASSIGN(CefRenderFrameObserver); diff --git a/libcef/renderer/render_message_filter.h b/libcef/renderer/render_message_filter.h index 7dbd67bd1..7ba73e123 100644 --- a/libcef/renderer/render_message_filter.h +++ b/libcef/renderer/render_message_filter.h @@ -14,12 +14,12 @@ class CefRenderMessageFilter : public IPC::MessageFilter { public: CefRenderMessageFilter(); - virtual ~CefRenderMessageFilter(); + ~CefRenderMessageFilter() override; // IPC::ChannelProxy::MessageFilter implementation. - virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE; - virtual void OnFilterRemoved() OVERRIDE; - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + void OnFilterAdded(IPC::Sender* sender) override; + void OnFilterRemoved() override; + bool OnMessageReceived(const IPC::Message& message) override; private: // Message handlers called on the IO thread. diff --git a/libcef/renderer/render_process_observer.h b/libcef/renderer/render_process_observer.h index b29c16674..68891d00a 100644 --- a/libcef/renderer/render_process_observer.h +++ b/libcef/renderer/render_process_observer.h @@ -15,12 +15,12 @@ struct Cef_CrossOriginWhiteListEntry_Params; class CefRenderProcessObserver : public content::RenderProcessObserver { public: CefRenderProcessObserver(); - virtual ~CefRenderProcessObserver(); + ~CefRenderProcessObserver() override; // RenderProcessObserver implementation. - virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; - virtual void WebKitInitialized() OVERRIDE; - virtual void OnRenderProcessShutdown() OVERRIDE; + bool OnControlMessageReceived(const IPC::Message& message) override; + void WebKitInitialized() override; + void OnRenderProcessShutdown() override; private: // Message handlers called on the render thread. diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index 74f102f7e..8f537a7ae 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -31,35 +31,35 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient { public: CefWebURLLoaderClient(CefRenderURLRequest::Context* context, int request_flags); - virtual ~CefWebURLLoaderClient(); + ~CefWebURLLoaderClient() override; // blink::WebURLLoaderClient methods. - virtual void willSendRequest( + void willSendRequest( WebURLLoader* loader, WebURLRequest& newRequest, - const WebURLResponse& redirectResponse) OVERRIDE; - virtual void didSendData( + const WebURLResponse& redirectResponse) override; + void didSendData( WebURLLoader* loader, unsigned long long bytesSent, - unsigned long long totalBytesToBeSent) OVERRIDE; - virtual void didReceiveResponse( + unsigned long long totalBytesToBeSent) override; + void didReceiveResponse( WebURLLoader* loader, - const WebURLResponse& response) OVERRIDE; - virtual void didDownloadData(WebURLLoader* loader, - int dataLength, - int encodedDataLength) OVERRIDE; - virtual void didReceiveData(WebURLLoader* loader, - const char* data, - int dataLength, - int encodedDataLength) OVERRIDE; - virtual void didReceiveCachedMetadata(WebURLLoader* loader, - const char* data, - int dataLength) OVERRIDE; - virtual void didFinishLoading(WebURLLoader* loader, - double finishTime, - int64_t totalEncodedDataLength) OVERRIDE; - virtual void didFail(WebURLLoader* loader, - const WebURLError& error) OVERRIDE; + const WebURLResponse& response) override; + void didDownloadData(WebURLLoader* loader, + int dataLength, + int encodedDataLength) override; + void didReceiveData(WebURLLoader* loader, + const char* data, + int dataLength, + int encodedDataLength) override; + void didReceiveCachedMetadata(WebURLLoader* loader, + const char* data, + int dataLength) override; + void didFinishLoading(WebURLLoader* loader, + double finishTime, + int64_t totalEncodedDataLength) override; + void didFail(WebURLLoader* loader, + const WebURLError& error) override; protected: // The context_ pointer will outlive this object. @@ -92,9 +92,6 @@ class CefRenderURLRequest::Context static_cast(request_.get())->SetReadOnly(true); } - virtual ~Context() { - } - inline bool CalledOnValidThread() { return message_loop_proxy_->BelongsToCurrentThread(); } @@ -217,6 +214,10 @@ class CefRenderURLRequest::Context CefRefPtr response() { return response_; } private: + friend class base::RefCountedThreadSafe; + + virtual ~Context() {} + void NotifyUploadProgressIfNecessary() { if (!got_upload_progress_complete_ && upload_data_size_ > 0) { // URLFetcher sends upload notifications using a timer and will not send diff --git a/libcef/renderer/render_urlrequest_impl.h b/libcef/renderer/render_urlrequest_impl.h index 50d894caf..5db7e993b 100644 --- a/libcef/renderer/render_urlrequest_impl.h +++ b/libcef/renderer/render_urlrequest_impl.h @@ -14,17 +14,17 @@ class CefRenderURLRequest : public CefURLRequest { CefRenderURLRequest(CefRefPtr request, CefRefPtr client); - virtual ~CefRenderURLRequest(); + ~CefRenderURLRequest() override; bool Start(); // CefURLRequest methods. - virtual CefRefPtr GetRequest() OVERRIDE; - virtual CefRefPtr GetClient() OVERRIDE; - virtual Status GetRequestStatus() OVERRIDE; - virtual ErrorCode GetRequestError() OVERRIDE; - virtual CefRefPtr GetResponse() OVERRIDE; - virtual void Cancel() OVERRIDE; + CefRefPtr GetRequest() override; + CefRefPtr GetClient() override; + Status GetRequestStatus() override; + ErrorCode GetRequestError() override; + CefRefPtr GetResponse() override; + void Cancel() override; private: bool VerifyContext(); diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index 4eb5ba747..6ba6c73c7 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -577,9 +577,9 @@ class ExtensionWrapper : public v8::Extension { : v8::Extension(extension_name, javascript_code), handler_(handler) { } - virtual v8::Handle GetNativeFunctionTemplate( + v8::Handle GetNativeFunctionTemplate( v8::Isolate* isolate, - v8::Handle name) OVERRIDE { + v8::Handle name) override { if (!handler_) return v8::Handle(); @@ -616,14 +616,14 @@ class CefV8ExceptionImpl : public CefV8Exception { end_column_ = message->GetEndColumn(); } - virtual CefString GetMessage() OVERRIDE { return message_; } - virtual CefString GetSourceLine() OVERRIDE { return source_line_; } - virtual CefString GetScriptResourceName() OVERRIDE { return script_; } - virtual int GetLineNumber() OVERRIDE { return line_number_; } - virtual int GetStartPosition() OVERRIDE { return start_position_; } - virtual int GetEndPosition() OVERRIDE { return end_position_; } - virtual int GetStartColumn() OVERRIDE { return start_column_; } - virtual int GetEndColumn() OVERRIDE { return end_column_; } + CefString GetMessage() override { return message_; } + CefString GetSourceLine() override { return source_line_; } + CefString GetScriptResourceName() override { return script_; } + int GetLineNumber() override { return line_number_; } + int GetStartPosition() override { return start_position_; } + int GetEndPosition() override { return end_position_; } + int GetStartColumn() override { return start_column_; } + int GetEndColumn() override { return end_column_; } protected: CefString message_; diff --git a/libcef/renderer/v8_impl.h b/libcef/renderer/v8_impl.h index 09935a2db..4d3f40f1c 100644 --- a/libcef/renderer/v8_impl.h +++ b/libcef/renderer/v8_impl.h @@ -43,7 +43,6 @@ void CefV8SetWorkerAttributes(int worker_id, const GURL& worker_url); class CefV8ContextState : public base::RefCounted { public: CefV8ContextState() : valid_(true) {} - virtual ~CefV8ContextState() {} bool IsValid() { return valid_; } void Detach() { @@ -63,6 +62,10 @@ class CefV8ContextState : public base::RefCounted { } private: + friend class base::RefCounted; + + ~CefV8ContextState() {} + bool valid_; CefTrackManager track_manager_; }; @@ -92,8 +95,6 @@ class CefV8HandleBase : public base::RefCountedThreadSafe { public: - virtual ~CefV8HandleBase(); - // Returns true if there is no underlying context or if the underlying context // is valid. bool IsValid() const { @@ -108,10 +109,16 @@ class CefV8HandleBase : } protected: + friend class base::DeleteHelper; + friend class base::RefCountedThreadSafe; + friend struct CefV8DeleteOnMessageLoopThread; + // |context| is the context that owns this handle. If empty the current // context will be used. CefV8HandleBase(v8::Isolate* isolate, v8::Handle context); + virtual ~CefV8HandleBase(); protected: v8::Isolate* isolate_; @@ -133,9 +140,6 @@ class CefV8Handle : public CefV8HandleBase { : CefV8HandleBase(isolate, context), handle_(isolate, v) { } - virtual ~CefV8Handle() { - handle_.Reset(); - } handleType GetNewV8Handle() { DCHECK(IsValid()); @@ -147,6 +151,10 @@ class CefV8Handle : public CefV8HandleBase { } protected: + ~CefV8Handle() override { + handle_.Reset(); + } + persistentType handle_; DISALLOW_COPY_AND_ASSIGN(CefV8Handle); @@ -163,19 +171,19 @@ class CefV8ContextImpl : public CefV8Context { public: CefV8ContextImpl(v8::Isolate* isolate, v8::Handle context); - virtual ~CefV8ContextImpl(); + ~CefV8ContextImpl() override; - virtual CefRefPtr GetTaskRunner() OVERRIDE; - virtual bool IsValid() OVERRIDE; - virtual CefRefPtr GetBrowser() OVERRIDE; - virtual CefRefPtr GetFrame() OVERRIDE; - virtual CefRefPtr GetGlobal() OVERRIDE; - virtual bool Enter() OVERRIDE; - virtual bool Exit() OVERRIDE; - virtual bool IsSame(CefRefPtr that) OVERRIDE; - virtual bool Eval(const CefString& code, - CefRefPtr& retval, - CefRefPtr& exception) OVERRIDE; + CefRefPtr GetTaskRunner() override; + bool IsValid() override; + CefRefPtr GetBrowser() override; + CefRefPtr GetFrame() override; + CefRefPtr GetGlobal() override; + bool Enter() override; + bool Exit() override; + bool IsSame(CefRefPtr that) override; + bool Eval(const CefString& code, + CefRefPtr& retval, + CefRefPtr& exception) override; v8::Handle GetV8Context(); blink::WebFrame* GetWebFrame(); @@ -198,7 +206,7 @@ class CefV8ValueImpl : public CefV8Value { explicit CefV8ValueImpl(v8::Isolate* isolate); CefV8ValueImpl(v8::Isolate* isolate, v8::Handle value); - virtual ~CefV8ValueImpl(); + ~CefV8ValueImpl() override; // Used for initializing the CefV8ValueImpl. Should be called a single time // after the CefV8ValueImpl is created. @@ -217,57 +225,57 @@ class CefV8ValueImpl : public CefV8Value { // object handle. v8::Handle GetV8Value(bool should_persist); - virtual bool IsValid() OVERRIDE; - virtual bool IsUndefined() OVERRIDE; - virtual bool IsNull() OVERRIDE; - virtual bool IsBool() OVERRIDE; - virtual bool IsInt() OVERRIDE; - virtual bool IsUInt() OVERRIDE; - virtual bool IsDouble() OVERRIDE; - virtual bool IsDate() OVERRIDE; - virtual bool IsString() OVERRIDE; - virtual bool IsObject() OVERRIDE; - virtual bool IsArray() OVERRIDE; - virtual bool IsFunction() OVERRIDE; - virtual bool IsSame(CefRefPtr value) OVERRIDE; - virtual bool GetBoolValue() OVERRIDE; - virtual int32 GetIntValue() OVERRIDE; - virtual uint32 GetUIntValue() OVERRIDE; - virtual double GetDoubleValue() OVERRIDE; - virtual CefTime GetDateValue() OVERRIDE; - virtual CefString GetStringValue() OVERRIDE; - virtual bool IsUserCreated() OVERRIDE; - virtual bool HasException() OVERRIDE; - virtual CefRefPtr GetException() OVERRIDE; - virtual bool ClearException() OVERRIDE; - virtual bool WillRethrowExceptions() OVERRIDE; - virtual bool SetRethrowExceptions(bool rethrow) OVERRIDE; - virtual bool HasValue(const CefString& key) OVERRIDE; - virtual bool HasValue(int index) OVERRIDE; - virtual bool DeleteValue(const CefString& key) OVERRIDE; - virtual bool DeleteValue(int index) OVERRIDE; - virtual CefRefPtr GetValue(const CefString& key) OVERRIDE; - virtual CefRefPtr GetValue(int index) OVERRIDE; - virtual bool SetValue(const CefString& key, CefRefPtr value, - PropertyAttribute attribute) OVERRIDE; - virtual bool SetValue(int index, CefRefPtr value) OVERRIDE; - virtual bool SetValue(const CefString& key, AccessControl settings, - PropertyAttribute attribute) OVERRIDE; - virtual bool GetKeys(std::vector& keys) OVERRIDE; - virtual bool SetUserData(CefRefPtr user_data) OVERRIDE; - virtual CefRefPtr GetUserData() OVERRIDE; - virtual int GetExternallyAllocatedMemory() OVERRIDE; - virtual int AdjustExternallyAllocatedMemory(int change_in_bytes) OVERRIDE; - virtual int GetArrayLength() OVERRIDE; - virtual CefString GetFunctionName() OVERRIDE; - virtual CefRefPtr GetFunctionHandler() OVERRIDE; - virtual CefRefPtr ExecuteFunction( + bool IsValid() override; + bool IsUndefined() override; + bool IsNull() override; + bool IsBool() override; + bool IsInt() override; + bool IsUInt() override; + bool IsDouble() override; + bool IsDate() override; + bool IsString() override; + bool IsObject() override; + bool IsArray() override; + bool IsFunction() override; + bool IsSame(CefRefPtr value) override; + bool GetBoolValue() override; + int32 GetIntValue() override; + uint32 GetUIntValue() override; + double GetDoubleValue() override; + CefTime GetDateValue() override; + CefString GetStringValue() override; + bool IsUserCreated() override; + bool HasException() override; + CefRefPtr GetException() override; + bool ClearException() override; + bool WillRethrowExceptions() override; + bool SetRethrowExceptions(bool rethrow) override; + bool HasValue(const CefString& key) override; + bool HasValue(int index) override; + bool DeleteValue(const CefString& key) override; + bool DeleteValue(int index) override; + CefRefPtr GetValue(const CefString& key) override; + CefRefPtr GetValue(int index) override; + bool SetValue(const CefString& key, CefRefPtr value, + PropertyAttribute attribute) override; + bool SetValue(int index, CefRefPtr value) override; + bool SetValue(const CefString& key, AccessControl settings, + PropertyAttribute attribute) override; + bool GetKeys(std::vector& keys) override; + bool SetUserData(CefRefPtr user_data) override; + CefRefPtr GetUserData() override; + int GetExternallyAllocatedMemory() override; + int AdjustExternallyAllocatedMemory(int change_in_bytes) override; + int GetArrayLength() override; + CefString GetFunctionName() override; + CefRefPtr GetFunctionHandler() override; + CefRefPtr ExecuteFunction( CefRefPtr object, - const CefV8ValueList& arguments) OVERRIDE; - virtual CefRefPtr ExecuteFunctionWithContext( + const CefV8ValueList& arguments) override; + CefRefPtr ExecuteFunctionWithContext( CefRefPtr context, CefRefPtr object, - const CefV8ValueList& arguments) OVERRIDE; + const CefV8ValueList& arguments) override; protected: // Test for and record any exception. @@ -282,7 +290,6 @@ class CefV8ValueImpl : public CefV8Value { v8::Handle context, handleType v, CefTrackNode* tracker); - virtual ~Handle(); handleType GetNewV8Handle(bool should_persist); @@ -290,6 +297,9 @@ class CefV8ValueImpl : public CefV8Value { void SetWeakIfNecessary(); + protected: + ~Handle() override; + private: // Callback for weak persistent reference destruction. static void Destructor(const v8::WeakCallbackData& data); @@ -347,11 +357,11 @@ class CefV8StackTraceImpl : public CefV8StackTrace { public: CefV8StackTraceImpl(v8::Isolate* isolate, v8::Handle handle); - virtual ~CefV8StackTraceImpl(); + ~CefV8StackTraceImpl() override; - virtual bool IsValid() OVERRIDE; - virtual int GetFrameCount() OVERRIDE; - virtual CefRefPtr GetFrame(int index) OVERRIDE; + bool IsValid() override; + int GetFrameCount() override; + CefRefPtr GetFrame(int index) override; protected: std::vector > frames_; @@ -364,16 +374,16 @@ class CefV8StackFrameImpl : public CefV8StackFrame { public: CefV8StackFrameImpl(v8::Isolate* isolate, v8::Handle handle); - virtual ~CefV8StackFrameImpl(); + ~CefV8StackFrameImpl() override; - virtual bool IsValid() OVERRIDE; - virtual CefString GetScriptName() OVERRIDE; - virtual CefString GetScriptNameOrSourceURL() OVERRIDE; - virtual CefString GetFunctionName() OVERRIDE; - virtual int GetLineNumber() OVERRIDE; - virtual int GetColumn() OVERRIDE; - virtual bool IsEval() OVERRIDE; - virtual bool IsConstructor() OVERRIDE; + bool IsValid() override; + CefString GetScriptName() override; + CefString GetScriptNameOrSourceURL() override; + CefString GetFunctionName() override; + int GetLineNumber() override; + int GetColumn() override; + bool IsEval() override; + bool IsConstructor() override; protected: CefString script_name_; diff --git a/libcef/utility/content_utility_client.h b/libcef/utility/content_utility_client.h index aed828481..2e067e806 100644 --- a/libcef/utility/content_utility_client.h +++ b/libcef/utility/content_utility_client.h @@ -14,9 +14,9 @@ class UtilityMessageHandler; class CefContentUtilityClient : public content::ContentUtilityClient { public: CefContentUtilityClient(); - virtual ~CefContentUtilityClient(); + ~CefContentUtilityClient() override; - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + bool OnMessageReceived(const IPC::Message& message) override; static void PreSandboxStartup(); diff --git a/libcef/utility/printing_handler.cc b/libcef/utility/printing_handler.cc index dda82c24c..82dc46a1d 100644 --- a/libcef/utility/printing_handler.cc +++ b/libcef/utility/printing_handler.cc @@ -172,7 +172,7 @@ class PdfFunctionsWin : public PdfFunctionsBase { bool PlatformInit( const base::FilePath& pdf_module_path, - const base::ScopedNativeLibrary& pdf_lib) OVERRIDE { + const base::ScopedNativeLibrary& pdf_lib) override { // Patch the IAT for handling specific APIs known to fail in the sandbox. if (!g_iat_patch_createdca.is_patched()) { g_iat_patch_createdca.Patch(pdf_module_path.value().c_str(), diff --git a/libcef/utility/printing_handler.h b/libcef/utility/printing_handler.h index 0da9b23a2..41503fa5a 100644 --- a/libcef/utility/printing_handler.h +++ b/libcef/utility/printing_handler.h @@ -25,12 +25,12 @@ struct PageRange; class PrintingHandler : public UtilityMessageHandler { public: PrintingHandler(); - virtual ~PrintingHandler(); + ~PrintingHandler() override; static void PreSandboxStartup(); // IPC::Listener: - virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; + bool OnMessageReceived(const IPC::Message& message) override; private: // IPC message handlers. diff --git a/libcef_dll/cpptoc/allow_certificate_error_callback_cpptoc.h b/libcef_dll/cpptoc/allow_certificate_error_callback_cpptoc.h index 4e8a7dd39..abc79b5a2 100644 --- a/libcef_dll/cpptoc/allow_certificate_error_callback_cpptoc.h +++ b/libcef_dll/cpptoc/allow_certificate_error_callback_cpptoc.h @@ -31,7 +31,6 @@ class CefAllowCertificateErrorCallbackCppToC public: explicit CefAllowCertificateErrorCallbackCppToC( CefAllowCertificateErrorCallback* cls); - virtual ~CefAllowCertificateErrorCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/app_cpptoc.h b/libcef_dll/cpptoc/app_cpptoc.h index 27379e399..0947ded96 100644 --- a/libcef_dll/cpptoc/app_cpptoc.h +++ b/libcef_dll/cpptoc/app_cpptoc.h @@ -28,7 +28,6 @@ class CefAppCppToC : public CefCppToC { public: explicit CefAppCppToC(CefApp* cls); - virtual ~CefAppCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/auth_callback_cpptoc.h b/libcef_dll/cpptoc/auth_callback_cpptoc.h index fbfb7b260..8315fe7c9 100644 --- a/libcef_dll/cpptoc/auth_callback_cpptoc.h +++ b/libcef_dll/cpptoc/auth_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefAuthCallbackCppToC cef_auth_callback_t> { public: explicit CefAuthCallbackCppToC(CefAuthCallback* cls); - virtual ~CefAuthCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/before_download_callback_cpptoc.h b/libcef_dll/cpptoc/before_download_callback_cpptoc.h index 06d40c760..b6f89bb9e 100644 --- a/libcef_dll/cpptoc/before_download_callback_cpptoc.h +++ b/libcef_dll/cpptoc/before_download_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefBeforeDownloadCallbackCppToC CefBeforeDownloadCallback, cef_before_download_callback_t> { public: explicit CefBeforeDownloadCallbackCppToC(CefBeforeDownloadCallback* cls); - virtual ~CefBeforeDownloadCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/binary_value_cpptoc.h b/libcef_dll/cpptoc/binary_value_cpptoc.h index 4bdbfe6c7..418cd3599 100644 --- a/libcef_dll/cpptoc/binary_value_cpptoc.h +++ b/libcef_dll/cpptoc/binary_value_cpptoc.h @@ -29,7 +29,6 @@ class CefBinaryValueCppToC cef_binary_value_t> { public: explicit CefBinaryValueCppToC(CefBinaryValue* cls); - virtual ~CefBinaryValueCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/browser_cpptoc.h b/libcef_dll/cpptoc/browser_cpptoc.h index 5c1fc02ea..fa87b42c3 100644 --- a/libcef_dll/cpptoc/browser_cpptoc.h +++ b/libcef_dll/cpptoc/browser_cpptoc.h @@ -30,7 +30,6 @@ class CefBrowserCppToC : public CefCppToC { public: explicit CefBrowserCppToC(CefBrowser* cls); - virtual ~CefBrowserCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/browser_host_cpptoc.h b/libcef_dll/cpptoc/browser_host_cpptoc.h index 939439aa4..2c6c3daec 100644 --- a/libcef_dll/cpptoc/browser_host_cpptoc.h +++ b/libcef_dll/cpptoc/browser_host_cpptoc.h @@ -31,7 +31,6 @@ class CefBrowserHostCppToC cef_browser_host_t> { public: explicit CefBrowserHostCppToC(CefBrowserHost* cls); - virtual ~CefBrowserHostCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/browser_process_handler_cpptoc.h b/libcef_dll/cpptoc/browser_process_handler_cpptoc.h index f8fba2758..94db7ba28 100644 --- a/libcef_dll/cpptoc/browser_process_handler_cpptoc.h +++ b/libcef_dll/cpptoc/browser_process_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefBrowserProcessHandlerCppToC cef_browser_process_handler_t> { public: explicit CefBrowserProcessHandlerCppToC(CefBrowserProcessHandler* cls); - virtual ~CefBrowserProcessHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/callback_cpptoc.h b/libcef_dll/cpptoc/callback_cpptoc.h index 69d7d3a4a..f03d34396 100644 --- a/libcef_dll/cpptoc/callback_cpptoc.h +++ b/libcef_dll/cpptoc/callback_cpptoc.h @@ -28,7 +28,6 @@ class CefCallbackCppToC : public CefCppToC { public: explicit CefCallbackCppToC(CefCallback* cls); - virtual ~CefCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/client_cpptoc.h b/libcef_dll/cpptoc/client_cpptoc.h index 16919e89b..21f4c2215 100644 --- a/libcef_dll/cpptoc/client_cpptoc.h +++ b/libcef_dll/cpptoc/client_cpptoc.h @@ -28,7 +28,6 @@ class CefClientCppToC : public CefCppToC { public: explicit CefClientCppToC(CefClient* cls); - virtual ~CefClientCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/command_line_cpptoc.h b/libcef_dll/cpptoc/command_line_cpptoc.h index 8d172772e..b6caf7373 100644 --- a/libcef_dll/cpptoc/command_line_cpptoc.h +++ b/libcef_dll/cpptoc/command_line_cpptoc.h @@ -29,7 +29,6 @@ class CefCommandLineCppToC cef_command_line_t> { public: explicit CefCommandLineCppToC(CefCommandLine* cls); - virtual ~CefCommandLineCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/completion_callback_cpptoc.h b/libcef_dll/cpptoc/completion_callback_cpptoc.h index b198ad8ab..7335a265c 100644 --- a/libcef_dll/cpptoc/completion_callback_cpptoc.h +++ b/libcef_dll/cpptoc/completion_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefCompletionCallbackCppToC cef_completion_callback_t> { public: explicit CefCompletionCallbackCppToC(CefCompletionCallback* cls); - virtual ~CefCompletionCallbackCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/context_menu_handler_cpptoc.h b/libcef_dll/cpptoc/context_menu_handler_cpptoc.h index e84bc23b7..4616c4dc6 100644 --- a/libcef_dll/cpptoc/context_menu_handler_cpptoc.h +++ b/libcef_dll/cpptoc/context_menu_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefContextMenuHandlerCppToC cef_context_menu_handler_t> { public: explicit CefContextMenuHandlerCppToC(CefContextMenuHandler* cls); - virtual ~CefContextMenuHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/context_menu_params_cpptoc.h b/libcef_dll/cpptoc/context_menu_params_cpptoc.h index ef24da9cf..6b6d5259c 100644 --- a/libcef_dll/cpptoc/context_menu_params_cpptoc.h +++ b/libcef_dll/cpptoc/context_menu_params_cpptoc.h @@ -29,7 +29,6 @@ class CefContextMenuParamsCppToC cef_context_menu_params_t> { public: explicit CefContextMenuParamsCppToC(CefContextMenuParams* cls); - virtual ~CefContextMenuParamsCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/cookie_manager_cpptoc.h b/libcef_dll/cpptoc/cookie_manager_cpptoc.h index 960459b3c..7da19a254 100644 --- a/libcef_dll/cpptoc/cookie_manager_cpptoc.h +++ b/libcef_dll/cpptoc/cookie_manager_cpptoc.h @@ -29,7 +29,6 @@ class CefCookieManagerCppToC cef_cookie_manager_t> { public: explicit CefCookieManagerCppToC(CefCookieManager* cls); - virtual ~CefCookieManagerCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/cookie_visitor_cpptoc.h b/libcef_dll/cpptoc/cookie_visitor_cpptoc.h index 5b1417621..102a77c3b 100644 --- a/libcef_dll/cpptoc/cookie_visitor_cpptoc.h +++ b/libcef_dll/cpptoc/cookie_visitor_cpptoc.h @@ -29,7 +29,6 @@ class CefCookieVisitorCppToC cef_cookie_visitor_t> { public: explicit CefCookieVisitorCppToC(CefCookieVisitor* cls); - virtual ~CefCookieVisitorCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/dialog_handler_cpptoc.h b/libcef_dll/cpptoc/dialog_handler_cpptoc.h index a629a5ee0..bbc3e7b16 100644 --- a/libcef_dll/cpptoc/dialog_handler_cpptoc.h +++ b/libcef_dll/cpptoc/dialog_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefDialogHandlerCppToC cef_dialog_handler_t> { public: explicit CefDialogHandlerCppToC(CefDialogHandler* cls); - virtual ~CefDialogHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/dictionary_value_cpptoc.h b/libcef_dll/cpptoc/dictionary_value_cpptoc.h index 2f1416559..a113c8f63 100644 --- a/libcef_dll/cpptoc/dictionary_value_cpptoc.h +++ b/libcef_dll/cpptoc/dictionary_value_cpptoc.h @@ -29,7 +29,6 @@ class CefDictionaryValueCppToC cef_dictionary_value_t> { public: explicit CefDictionaryValueCppToC(CefDictionaryValue* cls); - virtual ~CefDictionaryValueCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/display_handler_cpptoc.h b/libcef_dll/cpptoc/display_handler_cpptoc.h index 305600d54..7192cbafc 100644 --- a/libcef_dll/cpptoc/display_handler_cpptoc.h +++ b/libcef_dll/cpptoc/display_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefDisplayHandlerCppToC cef_display_handler_t> { public: explicit CefDisplayHandlerCppToC(CefDisplayHandler* cls); - virtual ~CefDisplayHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/domdocument_cpptoc.h b/libcef_dll/cpptoc/domdocument_cpptoc.h index c922eb009..ddda40046 100644 --- a/libcef_dll/cpptoc/domdocument_cpptoc.h +++ b/libcef_dll/cpptoc/domdocument_cpptoc.h @@ -29,7 +29,6 @@ class CefDOMDocumentCppToC cef_domdocument_t> { public: explicit CefDOMDocumentCppToC(CefDOMDocument* cls); - virtual ~CefDOMDocumentCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/domnode_cpptoc.h b/libcef_dll/cpptoc/domnode_cpptoc.h index 0de62bac4..5b6640766 100644 --- a/libcef_dll/cpptoc/domnode_cpptoc.h +++ b/libcef_dll/cpptoc/domnode_cpptoc.h @@ -28,7 +28,6 @@ class CefDOMNodeCppToC : public CefCppToC { public: explicit CefDOMNodeCppToC(CefDOMNode* cls); - virtual ~CefDOMNodeCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/domvisitor_cpptoc.h b/libcef_dll/cpptoc/domvisitor_cpptoc.h index c5196b2db..a8bbe2ad3 100644 --- a/libcef_dll/cpptoc/domvisitor_cpptoc.h +++ b/libcef_dll/cpptoc/domvisitor_cpptoc.h @@ -28,7 +28,6 @@ class CefDOMVisitorCppToC : public CefCppToC { public: explicit CefDOMVisitorCppToC(CefDOMVisitor* cls); - virtual ~CefDOMVisitorCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/download_handler_cpptoc.h b/libcef_dll/cpptoc/download_handler_cpptoc.h index dbb13f3b3..e7a06bf9e 100644 --- a/libcef_dll/cpptoc/download_handler_cpptoc.h +++ b/libcef_dll/cpptoc/download_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefDownloadHandlerCppToC cef_download_handler_t> { public: explicit CefDownloadHandlerCppToC(CefDownloadHandler* cls); - virtual ~CefDownloadHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/download_item_callback_cpptoc.h b/libcef_dll/cpptoc/download_item_callback_cpptoc.h index eb779fae5..604df5b64 100644 --- a/libcef_dll/cpptoc/download_item_callback_cpptoc.h +++ b/libcef_dll/cpptoc/download_item_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefDownloadItemCallbackCppToC cef_download_item_callback_t> { public: explicit CefDownloadItemCallbackCppToC(CefDownloadItemCallback* cls); - virtual ~CefDownloadItemCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/download_item_cpptoc.h b/libcef_dll/cpptoc/download_item_cpptoc.h index 61f134b96..8024df908 100644 --- a/libcef_dll/cpptoc/download_item_cpptoc.h +++ b/libcef_dll/cpptoc/download_item_cpptoc.h @@ -29,7 +29,6 @@ class CefDownloadItemCppToC cef_download_item_t> { public: explicit CefDownloadItemCppToC(CefDownloadItem* cls); - virtual ~CefDownloadItemCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/drag_data_cpptoc.h b/libcef_dll/cpptoc/drag_data_cpptoc.h index 2fe9fe2e0..9888f4983 100644 --- a/libcef_dll/cpptoc/drag_data_cpptoc.h +++ b/libcef_dll/cpptoc/drag_data_cpptoc.h @@ -28,7 +28,6 @@ class CefDragDataCppToC : public CefCppToC { public: explicit CefDragDataCppToC(CefDragData* cls); - virtual ~CefDragDataCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/drag_handler_cpptoc.h b/libcef_dll/cpptoc/drag_handler_cpptoc.h index 91aee16e4..0272f0394 100644 --- a/libcef_dll/cpptoc/drag_handler_cpptoc.h +++ b/libcef_dll/cpptoc/drag_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefDragHandlerCppToC cef_drag_handler_t> { public: explicit CefDragHandlerCppToC(CefDragHandler* cls); - virtual ~CefDragHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h b/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h index 6e0f4aade..7d3c4251c 100644 --- a/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h +++ b/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefEndTracingCallbackCppToC cef_end_tracing_callback_t> { public: explicit CefEndTracingCallbackCppToC(CefEndTracingCallback* cls); - virtual ~CefEndTracingCallbackCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h b/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h index b2adbc696..010001941 100644 --- a/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h +++ b/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefFileDialogCallbackCppToC cef_file_dialog_callback_t> { public: explicit CefFileDialogCallbackCppToC(CefFileDialogCallback* cls); - virtual ~CefFileDialogCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/focus_handler_cpptoc.h b/libcef_dll/cpptoc/focus_handler_cpptoc.h index 96734c863..c74bc502e 100644 --- a/libcef_dll/cpptoc/focus_handler_cpptoc.h +++ b/libcef_dll/cpptoc/focus_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefFocusHandlerCppToC cef_focus_handler_t> { public: explicit CefFocusHandlerCppToC(CefFocusHandler* cls); - virtual ~CefFocusHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/frame_cpptoc.h b/libcef_dll/cpptoc/frame_cpptoc.h index 8a5f6ca1c..866bbd6b6 100644 --- a/libcef_dll/cpptoc/frame_cpptoc.h +++ b/libcef_dll/cpptoc/frame_cpptoc.h @@ -32,7 +32,6 @@ class CefFrameCppToC : public CefCppToC { public: explicit CefFrameCppToC(CefFrame* cls); - virtual ~CefFrameCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/geolocation_callback_cpptoc.h b/libcef_dll/cpptoc/geolocation_callback_cpptoc.h index 23b3248d8..7e2f947cd 100644 --- a/libcef_dll/cpptoc/geolocation_callback_cpptoc.h +++ b/libcef_dll/cpptoc/geolocation_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefGeolocationCallbackCppToC cef_geolocation_callback_t> { public: explicit CefGeolocationCallbackCppToC(CefGeolocationCallback* cls); - virtual ~CefGeolocationCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/geolocation_handler_cpptoc.h b/libcef_dll/cpptoc/geolocation_handler_cpptoc.h index a82ad420b..908a1afe2 100644 --- a/libcef_dll/cpptoc/geolocation_handler_cpptoc.h +++ b/libcef_dll/cpptoc/geolocation_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefGeolocationHandlerCppToC cef_geolocation_handler_t> { public: explicit CefGeolocationHandlerCppToC(CefGeolocationHandler* cls); - virtual ~CefGeolocationHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h b/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h index 30d03775a..9785561e3 100644 --- a/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h +++ b/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefGetGeolocationCallbackCppToC CefGetGeolocationCallback, cef_get_geolocation_callback_t> { public: explicit CefGetGeolocationCallbackCppToC(CefGetGeolocationCallback* cls); - virtual ~CefGetGeolocationCallbackCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h b/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h index 1f4561658..e36d1572c 100644 --- a/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h +++ b/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefJSDialogCallbackCppToC cef_jsdialog_callback_t> { public: explicit CefJSDialogCallbackCppToC(CefJSDialogCallback* cls); - virtual ~CefJSDialogCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h b/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h index 0097c80d3..c7cf426f1 100644 --- a/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h +++ b/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefJSDialogHandlerCppToC cef_jsdialog_handler_t> { public: explicit CefJSDialogHandlerCppToC(CefJSDialogHandler* cls); - virtual ~CefJSDialogHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/keyboard_handler_cpptoc.h b/libcef_dll/cpptoc/keyboard_handler_cpptoc.h index bb861b6c7..7d61da4d6 100644 --- a/libcef_dll/cpptoc/keyboard_handler_cpptoc.h +++ b/libcef_dll/cpptoc/keyboard_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefKeyboardHandlerCppToC cef_keyboard_handler_t> { public: explicit CefKeyboardHandlerCppToC(CefKeyboardHandler* cls); - virtual ~CefKeyboardHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/life_span_handler_cpptoc.h b/libcef_dll/cpptoc/life_span_handler_cpptoc.h index 01021dca6..7137e1c33 100644 --- a/libcef_dll/cpptoc/life_span_handler_cpptoc.h +++ b/libcef_dll/cpptoc/life_span_handler_cpptoc.h @@ -31,7 +31,6 @@ class CefLifeSpanHandlerCppToC cef_life_span_handler_t> { public: explicit CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls); - virtual ~CefLifeSpanHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/list_value_cpptoc.h b/libcef_dll/cpptoc/list_value_cpptoc.h index 9ce7d2748..eb2da639c 100644 --- a/libcef_dll/cpptoc/list_value_cpptoc.h +++ b/libcef_dll/cpptoc/list_value_cpptoc.h @@ -28,7 +28,6 @@ class CefListValueCppToC : public CefCppToC { public: explicit CefListValueCppToC(CefListValue* cls); - virtual ~CefListValueCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/load_handler_cpptoc.h b/libcef_dll/cpptoc/load_handler_cpptoc.h index b17f33e84..92b30b0c5 100644 --- a/libcef_dll/cpptoc/load_handler_cpptoc.h +++ b/libcef_dll/cpptoc/load_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefLoadHandlerCppToC cef_load_handler_t> { public: explicit CefLoadHandlerCppToC(CefLoadHandler* cls); - virtual ~CefLoadHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/menu_model_cpptoc.h b/libcef_dll/cpptoc/menu_model_cpptoc.h index f70595df9..aafc66653 100644 --- a/libcef_dll/cpptoc/menu_model_cpptoc.h +++ b/libcef_dll/cpptoc/menu_model_cpptoc.h @@ -28,7 +28,6 @@ class CefMenuModelCppToC : public CefCppToC { public: explicit CefMenuModelCppToC(CefMenuModel* cls); - virtual ~CefMenuModelCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/post_data_cpptoc.h b/libcef_dll/cpptoc/post_data_cpptoc.h index 4990e1e7a..973d56756 100644 --- a/libcef_dll/cpptoc/post_data_cpptoc.h +++ b/libcef_dll/cpptoc/post_data_cpptoc.h @@ -28,7 +28,6 @@ class CefPostDataCppToC : public CefCppToC { public: explicit CefPostDataCppToC(CefPostData* cls); - virtual ~CefPostDataCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/post_data_element_cpptoc.h b/libcef_dll/cpptoc/post_data_element_cpptoc.h index 5abd54509..72e3d97bc 100644 --- a/libcef_dll/cpptoc/post_data_element_cpptoc.h +++ b/libcef_dll/cpptoc/post_data_element_cpptoc.h @@ -29,7 +29,6 @@ class CefPostDataElementCppToC cef_post_data_element_t> { public: explicit CefPostDataElementCppToC(CefPostDataElement* cls); - virtual ~CefPostDataElementCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h b/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h index c8330768f..cd552e560 100644 --- a/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h +++ b/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefPrintDialogCallbackCppToC cef_print_dialog_callback_t> { public: explicit CefPrintDialogCallbackCppToC(CefPrintDialogCallback* cls); - virtual ~CefPrintDialogCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/print_handler_cpptoc.h b/libcef_dll/cpptoc/print_handler_cpptoc.h index 775d1166a..9d1742b9c 100644 --- a/libcef_dll/cpptoc/print_handler_cpptoc.h +++ b/libcef_dll/cpptoc/print_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefPrintHandlerCppToC cef_print_handler_t> { public: explicit CefPrintHandlerCppToC(CefPrintHandler* cls); - virtual ~CefPrintHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/print_job_callback_cpptoc.h b/libcef_dll/cpptoc/print_job_callback_cpptoc.h index ca30cc4d6..6b3be396f 100644 --- a/libcef_dll/cpptoc/print_job_callback_cpptoc.h +++ b/libcef_dll/cpptoc/print_job_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefPrintJobCallbackCppToC cef_print_job_callback_t> { public: explicit CefPrintJobCallbackCppToC(CefPrintJobCallback* cls); - virtual ~CefPrintJobCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/print_settings_cpptoc.h b/libcef_dll/cpptoc/print_settings_cpptoc.h index 01dac3a42..10e99ea58 100644 --- a/libcef_dll/cpptoc/print_settings_cpptoc.h +++ b/libcef_dll/cpptoc/print_settings_cpptoc.h @@ -29,7 +29,6 @@ class CefPrintSettingsCppToC cef_print_settings_t> { public: explicit CefPrintSettingsCppToC(CefPrintSettings* cls); - virtual ~CefPrintSettingsCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/process_message_cpptoc.h b/libcef_dll/cpptoc/process_message_cpptoc.h index d051520ed..296e5b430 100644 --- a/libcef_dll/cpptoc/process_message_cpptoc.h +++ b/libcef_dll/cpptoc/process_message_cpptoc.h @@ -29,7 +29,6 @@ class CefProcessMessageCppToC cef_process_message_t> { public: explicit CefProcessMessageCppToC(CefProcessMessage* cls); - virtual ~CefProcessMessageCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/quota_callback_cpptoc.h b/libcef_dll/cpptoc/quota_callback_cpptoc.h index 7f3f19872..e1794a036 100644 --- a/libcef_dll/cpptoc/quota_callback_cpptoc.h +++ b/libcef_dll/cpptoc/quota_callback_cpptoc.h @@ -29,7 +29,6 @@ class CefQuotaCallbackCppToC cef_quota_callback_t> { public: explicit CefQuotaCallbackCppToC(CefQuotaCallback* cls); - virtual ~CefQuotaCallbackCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/read_handler_cpptoc.h b/libcef_dll/cpptoc/read_handler_cpptoc.h index eabe85782..a8352547b 100644 --- a/libcef_dll/cpptoc/read_handler_cpptoc.h +++ b/libcef_dll/cpptoc/read_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefReadHandlerCppToC cef_read_handler_t> { public: explicit CefReadHandlerCppToC(CefReadHandler* cls); - virtual ~CefReadHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/render_handler_cpptoc.h b/libcef_dll/cpptoc/render_handler_cpptoc.h index 3c0498af7..be4fd13a3 100644 --- a/libcef_dll/cpptoc/render_handler_cpptoc.h +++ b/libcef_dll/cpptoc/render_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefRenderHandlerCppToC cef_render_handler_t> { public: explicit CefRenderHandlerCppToC(CefRenderHandler* cls); - virtual ~CefRenderHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/render_process_handler_cpptoc.h b/libcef_dll/cpptoc/render_process_handler_cpptoc.h index e21e54715..0ff183b63 100644 --- a/libcef_dll/cpptoc/render_process_handler_cpptoc.h +++ b/libcef_dll/cpptoc/render_process_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefRenderProcessHandlerCppToC cef_render_process_handler_t> { public: explicit CefRenderProcessHandlerCppToC(CefRenderProcessHandler* cls); - virtual ~CefRenderProcessHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/request_context_cpptoc.h b/libcef_dll/cpptoc/request_context_cpptoc.h index c6a0e5d2c..1dcbaaced 100644 --- a/libcef_dll/cpptoc/request_context_cpptoc.h +++ b/libcef_dll/cpptoc/request_context_cpptoc.h @@ -29,7 +29,6 @@ class CefRequestContextCppToC cef_request_context_t> { public: explicit CefRequestContextCppToC(CefRequestContext* cls); - virtual ~CefRequestContextCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/request_context_handler_cpptoc.h b/libcef_dll/cpptoc/request_context_handler_cpptoc.h index 60d27f742..45753bb1a 100644 --- a/libcef_dll/cpptoc/request_context_handler_cpptoc.h +++ b/libcef_dll/cpptoc/request_context_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefRequestContextHandlerCppToC cef_request_context_handler_t> { public: explicit CefRequestContextHandlerCppToC(CefRequestContextHandler* cls); - virtual ~CefRequestContextHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/request_cpptoc.h b/libcef_dll/cpptoc/request_cpptoc.h index adbf037fc..fdcb2c200 100644 --- a/libcef_dll/cpptoc/request_cpptoc.h +++ b/libcef_dll/cpptoc/request_cpptoc.h @@ -28,7 +28,6 @@ class CefRequestCppToC : public CefCppToC { public: explicit CefRequestCppToC(CefRequest* cls); - virtual ~CefRequestCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/request_handler_cpptoc.h b/libcef_dll/cpptoc/request_handler_cpptoc.h index 75a7b6d01..692eb1d5c 100644 --- a/libcef_dll/cpptoc/request_handler_cpptoc.h +++ b/libcef_dll/cpptoc/request_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefRequestHandlerCppToC cef_request_handler_t> { public: explicit CefRequestHandlerCppToC(CefRequestHandler* cls); - virtual ~CefRequestHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h b/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h index 7ebf47172..e2d658057 100644 --- a/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h +++ b/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefResourceBundleHandlerCppToC cef_resource_bundle_handler_t> { public: explicit CefResourceBundleHandlerCppToC(CefResourceBundleHandler* cls); - virtual ~CefResourceBundleHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/resource_handler_cpptoc.h b/libcef_dll/cpptoc/resource_handler_cpptoc.h index 7e59d6191..e89c504bb 100644 --- a/libcef_dll/cpptoc/resource_handler_cpptoc.h +++ b/libcef_dll/cpptoc/resource_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefResourceHandlerCppToC cef_resource_handler_t> { public: explicit CefResourceHandlerCppToC(CefResourceHandler* cls); - virtual ~CefResourceHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/response_cpptoc.h b/libcef_dll/cpptoc/response_cpptoc.h index d045be776..63abc9b3f 100644 --- a/libcef_dll/cpptoc/response_cpptoc.h +++ b/libcef_dll/cpptoc/response_cpptoc.h @@ -28,7 +28,6 @@ class CefResponseCppToC : public CefCppToC { public: explicit CefResponseCppToC(CefResponse* cls); - virtual ~CefResponseCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h b/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h index 6f0154624..aeba8af3e 100644 --- a/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h +++ b/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h @@ -31,7 +31,6 @@ class CefRunFileDialogCallbackCppToC cef_run_file_dialog_callback_t> { public: explicit CefRunFileDialogCallbackCppToC(CefRunFileDialogCallback* cls); - virtual ~CefRunFileDialogCallbackCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h b/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h index 82bfa1c68..c4ba91c87 100644 --- a/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h +++ b/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h @@ -29,7 +29,6 @@ class CefSchemeHandlerFactoryCppToC cef_scheme_handler_factory_t> { public: explicit CefSchemeHandlerFactoryCppToC(CefSchemeHandlerFactory* cls); - virtual ~CefSchemeHandlerFactoryCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/scheme_registrar_cpptoc.h b/libcef_dll/cpptoc/scheme_registrar_cpptoc.h index 5d719bc0d..70eb567f6 100644 --- a/libcef_dll/cpptoc/scheme_registrar_cpptoc.h +++ b/libcef_dll/cpptoc/scheme_registrar_cpptoc.h @@ -29,7 +29,6 @@ class CefSchemeRegistrarCppToC cef_scheme_registrar_t> { public: explicit CefSchemeRegistrarCppToC(CefSchemeRegistrar* cls); - virtual ~CefSchemeRegistrarCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/stream_reader_cpptoc.h b/libcef_dll/cpptoc/stream_reader_cpptoc.h index 8eb3dcd48..76ae4dbfb 100644 --- a/libcef_dll/cpptoc/stream_reader_cpptoc.h +++ b/libcef_dll/cpptoc/stream_reader_cpptoc.h @@ -29,7 +29,6 @@ class CefStreamReaderCppToC cef_stream_reader_t> { public: explicit CefStreamReaderCppToC(CefStreamReader* cls); - virtual ~CefStreamReaderCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/stream_writer_cpptoc.h b/libcef_dll/cpptoc/stream_writer_cpptoc.h index f94ca001f..31219201e 100644 --- a/libcef_dll/cpptoc/stream_writer_cpptoc.h +++ b/libcef_dll/cpptoc/stream_writer_cpptoc.h @@ -29,7 +29,6 @@ class CefStreamWriterCppToC cef_stream_writer_t> { public: explicit CefStreamWriterCppToC(CefStreamWriter* cls); - virtual ~CefStreamWriterCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/string_visitor_cpptoc.h b/libcef_dll/cpptoc/string_visitor_cpptoc.h index 8b24a92cb..4a7dd9a75 100644 --- a/libcef_dll/cpptoc/string_visitor_cpptoc.h +++ b/libcef_dll/cpptoc/string_visitor_cpptoc.h @@ -29,7 +29,6 @@ class CefStringVisitorCppToC cef_string_visitor_t> { public: explicit CefStringVisitorCppToC(CefStringVisitor* cls); - virtual ~CefStringVisitorCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/task_cpptoc.h b/libcef_dll/cpptoc/task_cpptoc.h index 118ef926b..25a3c7d71 100644 --- a/libcef_dll/cpptoc/task_cpptoc.h +++ b/libcef_dll/cpptoc/task_cpptoc.h @@ -28,7 +28,6 @@ class CefTaskCppToC : public CefCppToC { public: explicit CefTaskCppToC(CefTask* cls); - virtual ~CefTaskCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/task_runner_cpptoc.h b/libcef_dll/cpptoc/task_runner_cpptoc.h index 8d0c67143..f85e7a746 100644 --- a/libcef_dll/cpptoc/task_runner_cpptoc.h +++ b/libcef_dll/cpptoc/task_runner_cpptoc.h @@ -28,7 +28,6 @@ class CefTaskRunnerCppToC : public CefCppToC { public: explicit CefTaskRunnerCppToC(CefTaskRunner* cls); - virtual ~CefTaskRunnerCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/urlrequest_client_cpptoc.h b/libcef_dll/cpptoc/urlrequest_client_cpptoc.h index ff185d684..47f560191 100644 --- a/libcef_dll/cpptoc/urlrequest_client_cpptoc.h +++ b/libcef_dll/cpptoc/urlrequest_client_cpptoc.h @@ -29,7 +29,6 @@ class CefURLRequestClientCppToC cef_urlrequest_client_t> { public: explicit CefURLRequestClientCppToC(CefURLRequestClient* cls); - virtual ~CefURLRequestClientCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/urlrequest_cpptoc.h b/libcef_dll/cpptoc/urlrequest_cpptoc.h index 6bd1d585a..d4abb8594 100644 --- a/libcef_dll/cpptoc/urlrequest_cpptoc.h +++ b/libcef_dll/cpptoc/urlrequest_cpptoc.h @@ -28,7 +28,6 @@ class CefURLRequestCppToC : public CefCppToC { public: explicit CefURLRequestCppToC(CefURLRequest* cls); - virtual ~CefURLRequestCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/v8accessor_cpptoc.h b/libcef_dll/cpptoc/v8accessor_cpptoc.h index d73e8ca3b..ea417aed0 100644 --- a/libcef_dll/cpptoc/v8accessor_cpptoc.h +++ b/libcef_dll/cpptoc/v8accessor_cpptoc.h @@ -28,7 +28,6 @@ class CefV8AccessorCppToC : public CefCppToC { public: explicit CefV8AccessorCppToC(CefV8Accessor* cls); - virtual ~CefV8AccessorCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/v8context_cpptoc.h b/libcef_dll/cpptoc/v8context_cpptoc.h index 278f0a7ec..c8734686e 100644 --- a/libcef_dll/cpptoc/v8context_cpptoc.h +++ b/libcef_dll/cpptoc/v8context_cpptoc.h @@ -28,7 +28,6 @@ class CefV8ContextCppToC : public CefCppToC { public: explicit CefV8ContextCppToC(CefV8Context* cls); - virtual ~CefV8ContextCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/v8exception_cpptoc.h b/libcef_dll/cpptoc/v8exception_cpptoc.h index 5f9a789ea..8f57b46fc 100644 --- a/libcef_dll/cpptoc/v8exception_cpptoc.h +++ b/libcef_dll/cpptoc/v8exception_cpptoc.h @@ -29,7 +29,6 @@ class CefV8ExceptionCppToC cef_v8exception_t> { public: explicit CefV8ExceptionCppToC(CefV8Exception* cls); - virtual ~CefV8ExceptionCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/v8handler_cpptoc.h b/libcef_dll/cpptoc/v8handler_cpptoc.h index e2cbe1a79..588e6305c 100644 --- a/libcef_dll/cpptoc/v8handler_cpptoc.h +++ b/libcef_dll/cpptoc/v8handler_cpptoc.h @@ -28,7 +28,6 @@ class CefV8HandlerCppToC : public CefCppToC { public: explicit CefV8HandlerCppToC(CefV8Handler* cls); - virtual ~CefV8HandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/v8stack_frame_cpptoc.h b/libcef_dll/cpptoc/v8stack_frame_cpptoc.h index 843d3f258..8c4047067 100644 --- a/libcef_dll/cpptoc/v8stack_frame_cpptoc.h +++ b/libcef_dll/cpptoc/v8stack_frame_cpptoc.h @@ -29,7 +29,6 @@ class CefV8StackFrameCppToC cef_v8stack_frame_t> { public: explicit CefV8StackFrameCppToC(CefV8StackFrame* cls); - virtual ~CefV8StackFrameCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/v8stack_trace_cpptoc.h b/libcef_dll/cpptoc/v8stack_trace_cpptoc.h index a3c5ee552..0e26b1245 100644 --- a/libcef_dll/cpptoc/v8stack_trace_cpptoc.h +++ b/libcef_dll/cpptoc/v8stack_trace_cpptoc.h @@ -29,7 +29,6 @@ class CefV8StackTraceCppToC cef_v8stack_trace_t> { public: explicit CefV8StackTraceCppToC(CefV8StackTrace* cls); - virtual ~CefV8StackTraceCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/v8value_cpptoc.h b/libcef_dll/cpptoc/v8value_cpptoc.h index c7692f99d..0f32d8b1e 100644 --- a/libcef_dll/cpptoc/v8value_cpptoc.h +++ b/libcef_dll/cpptoc/v8value_cpptoc.h @@ -28,7 +28,6 @@ class CefV8ValueCppToC : public CefCppToC { public: explicit CefV8ValueCppToC(CefV8Value* cls); - virtual ~CefV8ValueCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/web_plugin_info_cpptoc.h b/libcef_dll/cpptoc/web_plugin_info_cpptoc.h index d18df6280..db816f9a3 100644 --- a/libcef_dll/cpptoc/web_plugin_info_cpptoc.h +++ b/libcef_dll/cpptoc/web_plugin_info_cpptoc.h @@ -29,7 +29,6 @@ class CefWebPluginInfoCppToC cef_web_plugin_info_t> { public: explicit CefWebPluginInfoCppToC(CefWebPluginInfo* cls); - virtual ~CefWebPluginInfoCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h b/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h index a3182ff1e..767fe3de8 100644 --- a/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h +++ b/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h @@ -29,7 +29,6 @@ class CefWebPluginInfoVisitorCppToC cef_web_plugin_info_visitor_t> { public: explicit CefWebPluginInfoVisitorCppToC(CefWebPluginInfoVisitor* cls); - virtual ~CefWebPluginInfoVisitorCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h b/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h index 0dc0cb6e7..f0a35fab4 100644 --- a/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h +++ b/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h @@ -30,7 +30,6 @@ class CefWebPluginUnstableCallbackCppToC public: explicit CefWebPluginUnstableCallbackCppToC( CefWebPluginUnstableCallback* cls); - virtual ~CefWebPluginUnstableCallbackCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/write_handler_cpptoc.h b/libcef_dll/cpptoc/write_handler_cpptoc.h index 5852e4eba..63a76b21d 100644 --- a/libcef_dll/cpptoc/write_handler_cpptoc.h +++ b/libcef_dll/cpptoc/write_handler_cpptoc.h @@ -29,7 +29,6 @@ class CefWriteHandlerCppToC cef_write_handler_t> { public: explicit CefWriteHandlerCppToC(CefWriteHandler* cls); - virtual ~CefWriteHandlerCppToC() {} }; #endif // USING_CEF_SHARED diff --git a/libcef_dll/cpptoc/xml_reader_cpptoc.h b/libcef_dll/cpptoc/xml_reader_cpptoc.h index 42b61f7d5..8c82012e4 100644 --- a/libcef_dll/cpptoc/xml_reader_cpptoc.h +++ b/libcef_dll/cpptoc/xml_reader_cpptoc.h @@ -28,7 +28,6 @@ class CefXmlReaderCppToC : public CefCppToC { public: explicit CefXmlReaderCppToC(CefXmlReader* cls); - virtual ~CefXmlReaderCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/cpptoc/zip_reader_cpptoc.h b/libcef_dll/cpptoc/zip_reader_cpptoc.h index 011bf2f7b..5c83c3d52 100644 --- a/libcef_dll/cpptoc/zip_reader_cpptoc.h +++ b/libcef_dll/cpptoc/zip_reader_cpptoc.h @@ -28,7 +28,6 @@ class CefZipReaderCppToC : public CefCppToC { public: explicit CefZipReaderCppToC(CefZipReader* cls); - virtual ~CefZipReaderCppToC() {} }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.h b/libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.h index ae35463cf..95f800c08 100644 --- a/libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.h +++ b/libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.h @@ -34,7 +34,6 @@ class CefAllowCertificateErrorCallbackCToCpp : CefCToCpp(str) {} - virtual ~CefAllowCertificateErrorCallbackCToCpp() {} // CefAllowCertificateErrorCallback methods virtual void Continue(bool allow) OVERRIDE; diff --git a/libcef_dll/ctocpp/app_ctocpp.h b/libcef_dll/ctocpp/app_ctocpp.h index 632eaf0c6..99c3310f2 100644 --- a/libcef_dll/ctocpp/app_ctocpp.h +++ b/libcef_dll/ctocpp/app_ctocpp.h @@ -29,18 +29,15 @@ class CefAppCToCpp public: explicit CefAppCToCpp(cef_app_t* str) : CefCToCpp(str) {} - virtual ~CefAppCToCpp() {} // CefApp methods - virtual void OnBeforeCommandLineProcessing(const CefString& process_type, - CefRefPtr command_line) OVERRIDE; - virtual void OnRegisterCustomSchemes( - CefRefPtr registrar) OVERRIDE; - virtual CefRefPtr GetResourceBundleHandler( - ) OVERRIDE; - virtual CefRefPtr GetBrowserProcessHandler( - ) OVERRIDE; - virtual CefRefPtr GetRenderProcessHandler() OVERRIDE; + void OnBeforeCommandLineProcessing(const CefString& process_type, + CefRefPtr command_line) override; + void OnRegisterCustomSchemes( + CefRefPtr registrar) override; + CefRefPtr GetResourceBundleHandler() override; + CefRefPtr GetBrowserProcessHandler() override; + CefRefPtr GetRenderProcessHandler() override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/auth_callback_ctocpp.h b/libcef_dll/ctocpp/auth_callback_ctocpp.h index 2171f67e5..14b32bea5 100644 --- a/libcef_dll/ctocpp/auth_callback_ctocpp.h +++ b/libcef_dll/ctocpp/auth_callback_ctocpp.h @@ -31,7 +31,6 @@ class CefAuthCallbackCToCpp explicit CefAuthCallbackCToCpp(cef_auth_callback_t* str) : CefCToCpp( str) {} - virtual ~CefAuthCallbackCToCpp() {} // CefAuthCallback methods virtual void Continue(const CefString& username, diff --git a/libcef_dll/ctocpp/before_download_callback_ctocpp.h b/libcef_dll/ctocpp/before_download_callback_ctocpp.h index 30e1c0c10..fbd2e2116 100644 --- a/libcef_dll/ctocpp/before_download_callback_ctocpp.h +++ b/libcef_dll/ctocpp/before_download_callback_ctocpp.h @@ -31,7 +31,6 @@ class CefBeforeDownloadCallbackCToCpp explicit CefBeforeDownloadCallbackCToCpp(cef_before_download_callback_t* str) : CefCToCpp(str) {} - virtual ~CefBeforeDownloadCallbackCToCpp() {} // CefBeforeDownloadCallback methods virtual void Continue(const CefString& download_path, diff --git a/libcef_dll/ctocpp/binary_value_ctocpp.h b/libcef_dll/ctocpp/binary_value_ctocpp.h index bd0f359bb..c44c98b58 100644 --- a/libcef_dll/ctocpp/binary_value_ctocpp.h +++ b/libcef_dll/ctocpp/binary_value_ctocpp.h @@ -31,7 +31,6 @@ class CefBinaryValueCToCpp explicit CefBinaryValueCToCpp(cef_binary_value_t* str) : CefCToCpp( str) {} - virtual ~CefBinaryValueCToCpp() {} // CefBinaryValue methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/browser_ctocpp.h b/libcef_dll/ctocpp/browser_ctocpp.h index 8f73e4837..2ec7c1f6d 100644 --- a/libcef_dll/ctocpp/browser_ctocpp.h +++ b/libcef_dll/ctocpp/browser_ctocpp.h @@ -32,7 +32,6 @@ class CefBrowserCToCpp public: explicit CefBrowserCToCpp(cef_browser_t* str) : CefCToCpp(str) {} - virtual ~CefBrowserCToCpp() {} // CefBrowser methods virtual CefRefPtr GetHost() OVERRIDE; diff --git a/libcef_dll/ctocpp/browser_host_ctocpp.h b/libcef_dll/ctocpp/browser_host_ctocpp.h index 4e6e2493c..57aaf1949 100644 --- a/libcef_dll/ctocpp/browser_host_ctocpp.h +++ b/libcef_dll/ctocpp/browser_host_ctocpp.h @@ -34,7 +34,6 @@ class CefBrowserHostCToCpp explicit CefBrowserHostCToCpp(cef_browser_host_t* str) : CefCToCpp( str) {} - virtual ~CefBrowserHostCToCpp() {} // CefBrowserHost methods virtual CefRefPtr GetBrowser() OVERRIDE; diff --git a/libcef_dll/ctocpp/browser_process_handler_ctocpp.h b/libcef_dll/ctocpp/browser_process_handler_ctocpp.h index 07495972c..55b1061ad 100644 --- a/libcef_dll/ctocpp/browser_process_handler_ctocpp.h +++ b/libcef_dll/ctocpp/browser_process_handler_ctocpp.h @@ -31,15 +31,14 @@ class CefBrowserProcessHandlerCToCpp explicit CefBrowserProcessHandlerCToCpp(cef_browser_process_handler_t* str) : CefCToCpp(str) {} - virtual ~CefBrowserProcessHandlerCToCpp() {} // CefBrowserProcessHandler methods - virtual void OnContextInitialized() OVERRIDE; - virtual void OnBeforeChildProcessLaunch( - CefRefPtr command_line) OVERRIDE; - virtual void OnRenderProcessThreadCreated( - CefRefPtr extra_info) OVERRIDE; - virtual CefRefPtr GetPrintHandler() OVERRIDE; + void OnContextInitialized() override; + void OnBeforeChildProcessLaunch( + CefRefPtr command_line) override; + void OnRenderProcessThreadCreated( + CefRefPtr extra_info) override; + CefRefPtr GetPrintHandler() override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/callback_ctocpp.h b/libcef_dll/ctocpp/callback_ctocpp.h index ade67876c..4bd19cb9d 100644 --- a/libcef_dll/ctocpp/callback_ctocpp.h +++ b/libcef_dll/ctocpp/callback_ctocpp.h @@ -29,7 +29,6 @@ class CefCallbackCToCpp public: explicit CefCallbackCToCpp(cef_callback_t* str) : CefCToCpp(str) {} - virtual ~CefCallbackCToCpp() {} // CefCallback methods virtual void Continue() OVERRIDE; diff --git a/libcef_dll/ctocpp/client_ctocpp.h b/libcef_dll/ctocpp/client_ctocpp.h index e793c39f1..03bfd1f1a 100644 --- a/libcef_dll/ctocpp/client_ctocpp.h +++ b/libcef_dll/ctocpp/client_ctocpp.h @@ -29,25 +29,24 @@ class CefClientCToCpp public: explicit CefClientCToCpp(cef_client_t* str) : CefCToCpp(str) {} - virtual ~CefClientCToCpp() {} // CefClient methods - virtual CefRefPtr GetContextMenuHandler() OVERRIDE; - virtual CefRefPtr GetDialogHandler() OVERRIDE; - virtual CefRefPtr GetDisplayHandler() OVERRIDE; - virtual CefRefPtr GetDownloadHandler() OVERRIDE; - virtual CefRefPtr GetDragHandler() OVERRIDE; - virtual CefRefPtr GetFocusHandler() OVERRIDE; - virtual CefRefPtr GetGeolocationHandler() OVERRIDE; - virtual CefRefPtr GetJSDialogHandler() OVERRIDE; - virtual CefRefPtr GetKeyboardHandler() OVERRIDE; - virtual CefRefPtr GetLifeSpanHandler() OVERRIDE; - virtual CefRefPtr GetLoadHandler() OVERRIDE; - virtual CefRefPtr GetRenderHandler() OVERRIDE; - virtual CefRefPtr GetRequestHandler() OVERRIDE; - virtual bool OnProcessMessageReceived(CefRefPtr browser, + CefRefPtr GetContextMenuHandler() override; + CefRefPtr GetDialogHandler() override; + CefRefPtr GetDisplayHandler() override; + CefRefPtr GetDownloadHandler() override; + CefRefPtr GetDragHandler() override; + CefRefPtr GetFocusHandler() override; + CefRefPtr GetGeolocationHandler() override; + CefRefPtr GetJSDialogHandler() override; + CefRefPtr GetKeyboardHandler() override; + CefRefPtr GetLifeSpanHandler() override; + CefRefPtr GetLoadHandler() override; + CefRefPtr GetRenderHandler() override; + CefRefPtr GetRequestHandler() override; + bool OnProcessMessageReceived(CefRefPtr browser, CefProcessId source_process, - CefRefPtr message) OVERRIDE; + CefRefPtr message) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/command_line_ctocpp.h b/libcef_dll/ctocpp/command_line_ctocpp.h index b73bff999..9b4c3e9bb 100644 --- a/libcef_dll/ctocpp/command_line_ctocpp.h +++ b/libcef_dll/ctocpp/command_line_ctocpp.h @@ -32,7 +32,6 @@ class CefCommandLineCToCpp explicit CefCommandLineCToCpp(cef_command_line_t* str) : CefCToCpp( str) {} - virtual ~CefCommandLineCToCpp() {} // CefCommandLine methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/completion_callback_ctocpp.h b/libcef_dll/ctocpp/completion_callback_ctocpp.h index 7435c0088..0c894ff56 100644 --- a/libcef_dll/ctocpp/completion_callback_ctocpp.h +++ b/libcef_dll/ctocpp/completion_callback_ctocpp.h @@ -31,10 +31,9 @@ class CefCompletionCallbackCToCpp explicit CefCompletionCallbackCToCpp(cef_completion_callback_t* str) : CefCToCpp(str) {} - virtual ~CefCompletionCallbackCToCpp() {} // CefCompletionCallback methods - virtual void OnComplete() OVERRIDE; + void OnComplete() override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/context_menu_handler_ctocpp.h b/libcef_dll/ctocpp/context_menu_handler_ctocpp.h index 2fc4afda8..d3a3fd6a6 100644 --- a/libcef_dll/ctocpp/context_menu_handler_ctocpp.h +++ b/libcef_dll/ctocpp/context_menu_handler_ctocpp.h @@ -31,17 +31,16 @@ class CefContextMenuHandlerCToCpp explicit CefContextMenuHandlerCToCpp(cef_context_menu_handler_t* str) : CefCToCpp(str) {} - virtual ~CefContextMenuHandlerCToCpp() {} // CefContextMenuHandler methods - virtual void OnBeforeContextMenu(CefRefPtr browser, + void OnBeforeContextMenu(CefRefPtr browser, CefRefPtr frame, CefRefPtr params, - CefRefPtr model) OVERRIDE; - virtual bool OnContextMenuCommand(CefRefPtr browser, + CefRefPtr model) override; + bool OnContextMenuCommand(CefRefPtr browser, CefRefPtr frame, CefRefPtr params, - int command_id, EventFlags event_flags) OVERRIDE; - virtual void OnContextMenuDismissed(CefRefPtr browser, - CefRefPtr frame) OVERRIDE; + int command_id, EventFlags event_flags) override; + void OnContextMenuDismissed(CefRefPtr browser, + CefRefPtr frame) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/context_menu_params_ctocpp.h b/libcef_dll/ctocpp/context_menu_params_ctocpp.h index 33b6481f6..b436265cc 100644 --- a/libcef_dll/ctocpp/context_menu_params_ctocpp.h +++ b/libcef_dll/ctocpp/context_menu_params_ctocpp.h @@ -32,7 +32,6 @@ class CefContextMenuParamsCToCpp explicit CefContextMenuParamsCToCpp(cef_context_menu_params_t* str) : CefCToCpp(str) {} - virtual ~CefContextMenuParamsCToCpp() {} // CefContextMenuParams methods virtual int GetXCoord() OVERRIDE; diff --git a/libcef_dll/ctocpp/cookie_manager_ctocpp.h b/libcef_dll/ctocpp/cookie_manager_ctocpp.h index f6c2127c7..de2c55e28 100644 --- a/libcef_dll/ctocpp/cookie_manager_ctocpp.h +++ b/libcef_dll/ctocpp/cookie_manager_ctocpp.h @@ -32,7 +32,6 @@ class CefCookieManagerCToCpp explicit CefCookieManagerCToCpp(cef_cookie_manager_t* str) : CefCToCpp(str) {} - virtual ~CefCookieManagerCToCpp() {} // CefCookieManager methods virtual void SetSupportedSchemes( diff --git a/libcef_dll/ctocpp/cookie_visitor_ctocpp.h b/libcef_dll/ctocpp/cookie_visitor_ctocpp.h index 02ce5ce73..e748ef221 100644 --- a/libcef_dll/ctocpp/cookie_visitor_ctocpp.h +++ b/libcef_dll/ctocpp/cookie_visitor_ctocpp.h @@ -31,11 +31,10 @@ class CefCookieVisitorCToCpp explicit CefCookieVisitorCToCpp(cef_cookie_visitor_t* str) : CefCToCpp(str) {} - virtual ~CefCookieVisitorCToCpp() {} // CefCookieVisitor methods - virtual bool Visit(const CefCookie& cookie, int count, int total, - bool& deleteCookie) OVERRIDE; + bool Visit(const CefCookie& cookie, int count, int total, + bool& deleteCookie) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/dialog_handler_ctocpp.h b/libcef_dll/ctocpp/dialog_handler_ctocpp.h index 8ecc578cd..e81ceab25 100644 --- a/libcef_dll/ctocpp/dialog_handler_ctocpp.h +++ b/libcef_dll/ctocpp/dialog_handler_ctocpp.h @@ -32,13 +32,12 @@ class CefDialogHandlerCToCpp explicit CefDialogHandlerCToCpp(cef_dialog_handler_t* str) : CefCToCpp(str) {} - virtual ~CefDialogHandlerCToCpp() {} // CefDialogHandler methods - virtual bool OnFileDialog(CefRefPtr browser, FileDialogMode mode, + bool OnFileDialog(CefRefPtr browser, FileDialogMode mode, const CefString& title, const CefString& default_file_name, const std::vector& accept_types, - CefRefPtr callback) OVERRIDE; + CefRefPtr callback) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/dictionary_value_ctocpp.h b/libcef_dll/ctocpp/dictionary_value_ctocpp.h index 6d7b7e486..00cfaba5c 100644 --- a/libcef_dll/ctocpp/dictionary_value_ctocpp.h +++ b/libcef_dll/ctocpp/dictionary_value_ctocpp.h @@ -31,7 +31,6 @@ class CefDictionaryValueCToCpp explicit CefDictionaryValueCToCpp(cef_dictionary_value_t* str) : CefCToCpp(str) {} - virtual ~CefDictionaryValueCToCpp() {} // CefDictionaryValue methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/display_handler_ctocpp.h b/libcef_dll/ctocpp/display_handler_ctocpp.h index f2fd5b3a7..6dbb44594 100644 --- a/libcef_dll/ctocpp/display_handler_ctocpp.h +++ b/libcef_dll/ctocpp/display_handler_ctocpp.h @@ -31,19 +31,17 @@ class CefDisplayHandlerCToCpp explicit CefDisplayHandlerCToCpp(cef_display_handler_t* str) : CefCToCpp(str) {} - virtual ~CefDisplayHandlerCToCpp() {} // CefDisplayHandler methods - virtual void OnAddressChange(CefRefPtr browser, - CefRefPtr frame, const CefString& url) OVERRIDE; - virtual void OnTitleChange(CefRefPtr browser, - const CefString& title) OVERRIDE; - virtual bool OnTooltip(CefRefPtr browser, - CefString& text) OVERRIDE; - virtual void OnStatusMessage(CefRefPtr browser, - const CefString& value) OVERRIDE; - virtual bool OnConsoleMessage(CefRefPtr browser, - const CefString& message, const CefString& source, int line) OVERRIDE; + void OnAddressChange(CefRefPtr browser, CefRefPtr frame, + const CefString& url) override; + void OnTitleChange(CefRefPtr browser, + const CefString& title) override; + bool OnTooltip(CefRefPtr browser, CefString& text) override; + void OnStatusMessage(CefRefPtr browser, + const CefString& value) override; + bool OnConsoleMessage(CefRefPtr browser, const CefString& message, + const CefString& source, int line) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/domdocument_ctocpp.h b/libcef_dll/ctocpp/domdocument_ctocpp.h index b69afb549..991c80f94 100644 --- a/libcef_dll/ctocpp/domdocument_ctocpp.h +++ b/libcef_dll/ctocpp/domdocument_ctocpp.h @@ -31,7 +31,6 @@ class CefDOMDocumentCToCpp explicit CefDOMDocumentCToCpp(cef_domdocument_t* str) : CefCToCpp( str) {} - virtual ~CefDOMDocumentCToCpp() {} // CefDOMDocument methods virtual Type GetType() OVERRIDE; diff --git a/libcef_dll/ctocpp/domnode_ctocpp.h b/libcef_dll/ctocpp/domnode_ctocpp.h index dd0365bd1..a8ce493d6 100644 --- a/libcef_dll/ctocpp/domnode_ctocpp.h +++ b/libcef_dll/ctocpp/domnode_ctocpp.h @@ -29,7 +29,6 @@ class CefDOMNodeCToCpp public: explicit CefDOMNodeCToCpp(cef_domnode_t* str) : CefCToCpp(str) {} - virtual ~CefDOMNodeCToCpp() {} // CefDOMNode methods virtual Type GetType() OVERRIDE; diff --git a/libcef_dll/ctocpp/domvisitor_ctocpp.h b/libcef_dll/ctocpp/domvisitor_ctocpp.h index e2f7fa371..73f752035 100644 --- a/libcef_dll/ctocpp/domvisitor_ctocpp.h +++ b/libcef_dll/ctocpp/domvisitor_ctocpp.h @@ -29,10 +29,9 @@ class CefDOMVisitorCToCpp public: explicit CefDOMVisitorCToCpp(cef_domvisitor_t* str) : CefCToCpp(str) {} - virtual ~CefDOMVisitorCToCpp() {} // CefDOMVisitor methods - virtual void Visit(CefRefPtr document) OVERRIDE; + void Visit(CefRefPtr document) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/download_handler_ctocpp.h b/libcef_dll/ctocpp/download_handler_ctocpp.h index 302251d06..2548dab71 100644 --- a/libcef_dll/ctocpp/download_handler_ctocpp.h +++ b/libcef_dll/ctocpp/download_handler_ctocpp.h @@ -31,16 +31,15 @@ class CefDownloadHandlerCToCpp explicit CefDownloadHandlerCToCpp(cef_download_handler_t* str) : CefCToCpp(str) {} - virtual ~CefDownloadHandlerCToCpp() {} // CefDownloadHandler methods - virtual void OnBeforeDownload(CefRefPtr browser, + void OnBeforeDownload(CefRefPtr browser, CefRefPtr download_item, const CefString& suggested_name, - CefRefPtr callback) OVERRIDE; - virtual void OnDownloadUpdated(CefRefPtr browser, + CefRefPtr callback) override; + void OnDownloadUpdated(CefRefPtr browser, CefRefPtr download_item, - CefRefPtr callback) OVERRIDE; + CefRefPtr callback) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/download_item_callback_ctocpp.h b/libcef_dll/ctocpp/download_item_callback_ctocpp.h index 706048dba..0c8433086 100644 --- a/libcef_dll/ctocpp/download_item_callback_ctocpp.h +++ b/libcef_dll/ctocpp/download_item_callback_ctocpp.h @@ -31,7 +31,6 @@ class CefDownloadItemCallbackCToCpp explicit CefDownloadItemCallbackCToCpp(cef_download_item_callback_t* str) : CefCToCpp(str) {} - virtual ~CefDownloadItemCallbackCToCpp() {} // CefDownloadItemCallback methods virtual void Cancel() OVERRIDE; diff --git a/libcef_dll/ctocpp/download_item_ctocpp.h b/libcef_dll/ctocpp/download_item_ctocpp.h index 77125f197..9ba7c46d1 100644 --- a/libcef_dll/ctocpp/download_item_ctocpp.h +++ b/libcef_dll/ctocpp/download_item_ctocpp.h @@ -31,7 +31,6 @@ class CefDownloadItemCToCpp explicit CefDownloadItemCToCpp(cef_download_item_t* str) : CefCToCpp( str) {} - virtual ~CefDownloadItemCToCpp() {} // CefDownloadItem methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/drag_data_ctocpp.h b/libcef_dll/ctocpp/drag_data_ctocpp.h index 01be310ca..bf6076db5 100644 --- a/libcef_dll/ctocpp/drag_data_ctocpp.h +++ b/libcef_dll/ctocpp/drag_data_ctocpp.h @@ -30,7 +30,6 @@ class CefDragDataCToCpp public: explicit CefDragDataCToCpp(cef_drag_data_t* str) : CefCToCpp(str) {} - virtual ~CefDragDataCToCpp() {} // CefDragData methods virtual CefRefPtr Clone() OVERRIDE; diff --git a/libcef_dll/ctocpp/drag_handler_ctocpp.h b/libcef_dll/ctocpp/drag_handler_ctocpp.h index b942b6d8e..de08c5074 100644 --- a/libcef_dll/ctocpp/drag_handler_ctocpp.h +++ b/libcef_dll/ctocpp/drag_handler_ctocpp.h @@ -31,11 +31,10 @@ class CefDragHandlerCToCpp explicit CefDragHandlerCToCpp(cef_drag_handler_t* str) : CefCToCpp( str) {} - virtual ~CefDragHandlerCToCpp() {} // CefDragHandler methods - virtual bool OnDragEnter(CefRefPtr browser, - CefRefPtr dragData, DragOperationsMask mask) OVERRIDE; + bool OnDragEnter(CefRefPtr browser, + CefRefPtr dragData, DragOperationsMask mask) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h b/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h index 4d5ad69fc..be2a8de22 100644 --- a/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h +++ b/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h @@ -31,10 +31,9 @@ class CefEndTracingCallbackCToCpp explicit CefEndTracingCallbackCToCpp(cef_end_tracing_callback_t* str) : CefCToCpp(str) {} - virtual ~CefEndTracingCallbackCToCpp() {} // CefEndTracingCallback methods - virtual void OnEndTracingComplete(const CefString& tracing_file) OVERRIDE; + void OnEndTracingComplete(const CefString& tracing_file) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h b/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h index b7c8695b6..879e5c36a 100644 --- a/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h +++ b/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h @@ -32,7 +32,6 @@ class CefFileDialogCallbackCToCpp explicit CefFileDialogCallbackCToCpp(cef_file_dialog_callback_t* str) : CefCToCpp(str) {} - virtual ~CefFileDialogCallbackCToCpp() {} // CefFileDialogCallback methods virtual void Continue(const std::vector& file_paths) OVERRIDE; diff --git a/libcef_dll/ctocpp/focus_handler_ctocpp.h b/libcef_dll/ctocpp/focus_handler_ctocpp.h index 701a40e99..822218ce0 100644 --- a/libcef_dll/ctocpp/focus_handler_ctocpp.h +++ b/libcef_dll/ctocpp/focus_handler_ctocpp.h @@ -31,13 +31,11 @@ class CefFocusHandlerCToCpp explicit CefFocusHandlerCToCpp(cef_focus_handler_t* str) : CefCToCpp( str) {} - virtual ~CefFocusHandlerCToCpp() {} // CefFocusHandler methods - virtual void OnTakeFocus(CefRefPtr browser, bool next) OVERRIDE; - virtual bool OnSetFocus(CefRefPtr browser, - FocusSource source) OVERRIDE; - virtual void OnGotFocus(CefRefPtr browser) OVERRIDE; + void OnTakeFocus(CefRefPtr browser, bool next) override; + bool OnSetFocus(CefRefPtr browser, FocusSource source) override; + void OnGotFocus(CefRefPtr browser) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/frame_ctocpp.h b/libcef_dll/ctocpp/frame_ctocpp.h index 5285ad347..152e08f38 100644 --- a/libcef_dll/ctocpp/frame_ctocpp.h +++ b/libcef_dll/ctocpp/frame_ctocpp.h @@ -33,7 +33,6 @@ class CefFrameCToCpp public: explicit CefFrameCToCpp(cef_frame_t* str) : CefCToCpp(str) {} - virtual ~CefFrameCToCpp() {} // CefFrame methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/geolocation_callback_ctocpp.h b/libcef_dll/ctocpp/geolocation_callback_ctocpp.h index 42b25d089..a30da1e7d 100644 --- a/libcef_dll/ctocpp/geolocation_callback_ctocpp.h +++ b/libcef_dll/ctocpp/geolocation_callback_ctocpp.h @@ -31,7 +31,6 @@ class CefGeolocationCallbackCToCpp explicit CefGeolocationCallbackCToCpp(cef_geolocation_callback_t* str) : CefCToCpp(str) {} - virtual ~CefGeolocationCallbackCToCpp() {} // CefGeolocationCallback methods virtual void Continue(bool allow) OVERRIDE; diff --git a/libcef_dll/ctocpp/geolocation_handler_ctocpp.h b/libcef_dll/ctocpp/geolocation_handler_ctocpp.h index e4d88ee70..c187f59f9 100644 --- a/libcef_dll/ctocpp/geolocation_handler_ctocpp.h +++ b/libcef_dll/ctocpp/geolocation_handler_ctocpp.h @@ -31,14 +31,13 @@ class CefGeolocationHandlerCToCpp explicit CefGeolocationHandlerCToCpp(cef_geolocation_handler_t* str) : CefCToCpp(str) {} - virtual ~CefGeolocationHandlerCToCpp() {} // CefGeolocationHandler methods - virtual bool OnRequestGeolocationPermission(CefRefPtr browser, + bool OnRequestGeolocationPermission(CefRefPtr browser, const CefString& requesting_url, int request_id, - CefRefPtr callback) OVERRIDE; - virtual void OnCancelGeolocationPermission(CefRefPtr browser, - const CefString& requesting_url, int request_id) OVERRIDE; + CefRefPtr callback) override; + void OnCancelGeolocationPermission(CefRefPtr browser, + const CefString& requesting_url, int request_id) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/get_geolocation_callback_ctocpp.h b/libcef_dll/ctocpp/get_geolocation_callback_ctocpp.h index d9b1276cc..90b9ec28a 100644 --- a/libcef_dll/ctocpp/get_geolocation_callback_ctocpp.h +++ b/libcef_dll/ctocpp/get_geolocation_callback_ctocpp.h @@ -31,10 +31,9 @@ class CefGetGeolocationCallbackCToCpp explicit CefGetGeolocationCallbackCToCpp(cef_get_geolocation_callback_t* str) : CefCToCpp(str) {} - virtual ~CefGetGeolocationCallbackCToCpp() {} // CefGetGeolocationCallback methods - virtual void OnLocationUpdate(const CefGeoposition& position) OVERRIDE; + void OnLocationUpdate(const CefGeoposition& position) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h b/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h index fda751ad5..7c96c6461 100644 --- a/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h +++ b/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h @@ -31,7 +31,6 @@ class CefJSDialogCallbackCToCpp explicit CefJSDialogCallbackCToCpp(cef_jsdialog_callback_t* str) : CefCToCpp(str) {} - virtual ~CefJSDialogCallbackCToCpp() {} // CefJSDialogCallback methods virtual void Continue(bool success, const CefString& user_input) OVERRIDE; diff --git a/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h b/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h index 0acbb6a6b..928081b8d 100644 --- a/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h +++ b/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h @@ -31,20 +31,18 @@ class CefJSDialogHandlerCToCpp explicit CefJSDialogHandlerCToCpp(cef_jsdialog_handler_t* str) : CefCToCpp(str) {} - virtual ~CefJSDialogHandlerCToCpp() {} // CefJSDialogHandler methods - virtual bool OnJSDialog(CefRefPtr browser, - const CefString& origin_url, const CefString& accept_lang, - JSDialogType dialog_type, const CefString& message_text, - const CefString& default_prompt_text, + bool OnJSDialog(CefRefPtr browser, const CefString& origin_url, + const CefString& accept_lang, JSDialogType dialog_type, + const CefString& message_text, const CefString& default_prompt_text, CefRefPtr callback, - bool& suppress_message) OVERRIDE; - virtual bool OnBeforeUnloadDialog(CefRefPtr browser, + bool& suppress_message) override; + bool OnBeforeUnloadDialog(CefRefPtr browser, const CefString& message_text, bool is_reload, - CefRefPtr callback) OVERRIDE; - virtual void OnResetDialogState(CefRefPtr browser) OVERRIDE; - virtual void OnDialogClosed(CefRefPtr browser) OVERRIDE; + CefRefPtr callback) override; + void OnResetDialogState(CefRefPtr browser) override; + void OnDialogClosed(CefRefPtr browser) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/keyboard_handler_ctocpp.h b/libcef_dll/ctocpp/keyboard_handler_ctocpp.h index 3d661cbd5..07a07a70b 100644 --- a/libcef_dll/ctocpp/keyboard_handler_ctocpp.h +++ b/libcef_dll/ctocpp/keyboard_handler_ctocpp.h @@ -31,14 +31,12 @@ class CefKeyboardHandlerCToCpp explicit CefKeyboardHandlerCToCpp(cef_keyboard_handler_t* str) : CefCToCpp(str) {} - virtual ~CefKeyboardHandlerCToCpp() {} // CefKeyboardHandler methods - virtual bool OnPreKeyEvent(CefRefPtr browser, - const CefKeyEvent& event, CefEventHandle os_event, - bool* is_keyboard_shortcut) OVERRIDE; - virtual bool OnKeyEvent(CefRefPtr browser, - const CefKeyEvent& event, CefEventHandle os_event) OVERRIDE; + bool OnPreKeyEvent(CefRefPtr browser, const CefKeyEvent& event, + CefEventHandle os_event, bool* is_keyboard_shortcut) override; + bool OnKeyEvent(CefRefPtr browser, const CefKeyEvent& event, + CefEventHandle os_event) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/life_span_handler_ctocpp.h b/libcef_dll/ctocpp/life_span_handler_ctocpp.h index 85fd68c5a..ecbe3b5c7 100644 --- a/libcef_dll/ctocpp/life_span_handler_ctocpp.h +++ b/libcef_dll/ctocpp/life_span_handler_ctocpp.h @@ -33,19 +33,17 @@ class CefLifeSpanHandlerCToCpp explicit CefLifeSpanHandlerCToCpp(cef_life_span_handler_t* str) : CefCToCpp(str) {} - virtual ~CefLifeSpanHandlerCToCpp() {} // CefLifeSpanHandler methods - virtual bool OnBeforePopup(CefRefPtr browser, - CefRefPtr frame, const CefString& target_url, - const CefString& target_frame_name, + bool OnBeforePopup(CefRefPtr browser, CefRefPtr frame, + const CefString& target_url, const CefString& target_frame_name, const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo, CefRefPtr& client, CefBrowserSettings& settings, - bool* no_javascript_access) OVERRIDE; - virtual void OnAfterCreated(CefRefPtr browser) OVERRIDE; - virtual bool RunModal(CefRefPtr browser) OVERRIDE; - virtual bool DoClose(CefRefPtr browser) OVERRIDE; - virtual void OnBeforeClose(CefRefPtr browser) OVERRIDE; + bool* no_javascript_access) override; + void OnAfterCreated(CefRefPtr browser) override; + bool RunModal(CefRefPtr browser) override; + bool DoClose(CefRefPtr browser) override; + void OnBeforeClose(CefRefPtr browser) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/list_value_ctocpp.h b/libcef_dll/ctocpp/list_value_ctocpp.h index 8967344bb..1481c43f0 100644 --- a/libcef_dll/ctocpp/list_value_ctocpp.h +++ b/libcef_dll/ctocpp/list_value_ctocpp.h @@ -29,7 +29,6 @@ class CefListValueCToCpp public: explicit CefListValueCToCpp(cef_list_value_t* str) : CefCToCpp(str) {} - virtual ~CefListValueCToCpp() {} // CefListValue methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/load_handler_ctocpp.h b/libcef_dll/ctocpp/load_handler_ctocpp.h index 578059640..b53a584eb 100644 --- a/libcef_dll/ctocpp/load_handler_ctocpp.h +++ b/libcef_dll/ctocpp/load_handler_ctocpp.h @@ -31,18 +31,17 @@ class CefLoadHandlerCToCpp explicit CefLoadHandlerCToCpp(cef_load_handler_t* str) : CefCToCpp( str) {} - virtual ~CefLoadHandlerCToCpp() {} // CefLoadHandler methods - virtual void OnLoadingStateChange(CefRefPtr browser, - bool isLoading, bool canGoBack, bool canGoForward) OVERRIDE; - virtual void OnLoadStart(CefRefPtr browser, - CefRefPtr frame) OVERRIDE; - virtual void OnLoadEnd(CefRefPtr browser, - CefRefPtr frame, int httpStatusCode) OVERRIDE; - virtual void OnLoadError(CefRefPtr browser, - CefRefPtr frame, ErrorCode errorCode, - const CefString& errorText, const CefString& failedUrl) OVERRIDE; + void OnLoadingStateChange(CefRefPtr browser, bool isLoading, + bool canGoBack, bool canGoForward) override; + void OnLoadStart(CefRefPtr browser, + CefRefPtr frame) override; + void OnLoadEnd(CefRefPtr browser, CefRefPtr frame, + int httpStatusCode) override; + void OnLoadError(CefRefPtr browser, CefRefPtr frame, + ErrorCode errorCode, const CefString& errorText, + const CefString& failedUrl) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/menu_model_ctocpp.h b/libcef_dll/ctocpp/menu_model_ctocpp.h index ba8c369a2..5c750704d 100644 --- a/libcef_dll/ctocpp/menu_model_ctocpp.h +++ b/libcef_dll/ctocpp/menu_model_ctocpp.h @@ -29,7 +29,6 @@ class CefMenuModelCToCpp public: explicit CefMenuModelCToCpp(cef_menu_model_t* str) : CefCToCpp(str) {} - virtual ~CefMenuModelCToCpp() {} // CefMenuModel methods virtual bool Clear() OVERRIDE; diff --git a/libcef_dll/ctocpp/post_data_ctocpp.h b/libcef_dll/ctocpp/post_data_ctocpp.h index 7622a382d..48054b77a 100644 --- a/libcef_dll/ctocpp/post_data_ctocpp.h +++ b/libcef_dll/ctocpp/post_data_ctocpp.h @@ -29,7 +29,6 @@ class CefPostDataCToCpp public: explicit CefPostDataCToCpp(cef_post_data_t* str) : CefCToCpp(str) {} - virtual ~CefPostDataCToCpp() {} // CefPostData methods virtual bool IsReadOnly() OVERRIDE; diff --git a/libcef_dll/ctocpp/post_data_element_ctocpp.h b/libcef_dll/ctocpp/post_data_element_ctocpp.h index ccc6e2b1b..46c6a1dca 100644 --- a/libcef_dll/ctocpp/post_data_element_ctocpp.h +++ b/libcef_dll/ctocpp/post_data_element_ctocpp.h @@ -31,7 +31,6 @@ class CefPostDataElementCToCpp explicit CefPostDataElementCToCpp(cef_post_data_element_t* str) : CefCToCpp(str) {} - virtual ~CefPostDataElementCToCpp() {} // CefPostDataElement methods virtual bool IsReadOnly() OVERRIDE; diff --git a/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h b/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h index 11797393b..5a1b9ab09 100644 --- a/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h +++ b/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h @@ -31,7 +31,6 @@ class CefPrintDialogCallbackCToCpp explicit CefPrintDialogCallbackCToCpp(cef_print_dialog_callback_t* str) : CefCToCpp(str) {} - virtual ~CefPrintDialogCallbackCToCpp() {} // CefPrintDialogCallback methods virtual void Continue(CefRefPtr settings) OVERRIDE; diff --git a/libcef_dll/ctocpp/print_handler_ctocpp.h b/libcef_dll/ctocpp/print_handler_ctocpp.h index f826c173a..36131e204 100644 --- a/libcef_dll/ctocpp/print_handler_ctocpp.h +++ b/libcef_dll/ctocpp/print_handler_ctocpp.h @@ -31,17 +31,16 @@ class CefPrintHandlerCToCpp explicit CefPrintHandlerCToCpp(cef_print_handler_t* str) : CefCToCpp( str) {} - virtual ~CefPrintHandlerCToCpp() {} // CefPrintHandler methods - virtual void OnPrintSettings(CefRefPtr settings, - bool get_defaults) OVERRIDE; - virtual bool OnPrintDialog(bool has_selection, - CefRefPtr callback) OVERRIDE; - virtual bool OnPrintJob(const CefString& document_name, + void OnPrintSettings(CefRefPtr settings, + bool get_defaults) override; + bool OnPrintDialog(bool has_selection, + CefRefPtr callback) override; + bool OnPrintJob(const CefString& document_name, const CefString& pdf_file_path, - CefRefPtr callback) OVERRIDE; - virtual void OnPrintReset() OVERRIDE; + CefRefPtr callback) override; + void OnPrintReset() override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/print_job_callback_ctocpp.h b/libcef_dll/ctocpp/print_job_callback_ctocpp.h index 4cb4f68ce..173a158bb 100644 --- a/libcef_dll/ctocpp/print_job_callback_ctocpp.h +++ b/libcef_dll/ctocpp/print_job_callback_ctocpp.h @@ -31,7 +31,6 @@ class CefPrintJobCallbackCToCpp explicit CefPrintJobCallbackCToCpp(cef_print_job_callback_t* str) : CefCToCpp(str) {} - virtual ~CefPrintJobCallbackCToCpp() {} // CefPrintJobCallback methods virtual void Continue() OVERRIDE; diff --git a/libcef_dll/ctocpp/print_settings_ctocpp.h b/libcef_dll/ctocpp/print_settings_ctocpp.h index 8299b7ffd..5659e9ce8 100644 --- a/libcef_dll/ctocpp/print_settings_ctocpp.h +++ b/libcef_dll/ctocpp/print_settings_ctocpp.h @@ -31,7 +31,6 @@ class CefPrintSettingsCToCpp explicit CefPrintSettingsCToCpp(cef_print_settings_t* str) : CefCToCpp(str) {} - virtual ~CefPrintSettingsCToCpp() {} // CefPrintSettings methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/process_message_ctocpp.h b/libcef_dll/ctocpp/process_message_ctocpp.h index 242681a13..5a17e17fd 100644 --- a/libcef_dll/ctocpp/process_message_ctocpp.h +++ b/libcef_dll/ctocpp/process_message_ctocpp.h @@ -31,7 +31,6 @@ class CefProcessMessageCToCpp explicit CefProcessMessageCToCpp(cef_process_message_t* str) : CefCToCpp(str) {} - virtual ~CefProcessMessageCToCpp() {} // CefProcessMessage methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/quota_callback_ctocpp.h b/libcef_dll/ctocpp/quota_callback_ctocpp.h index 76ca72f24..0f0816e35 100644 --- a/libcef_dll/ctocpp/quota_callback_ctocpp.h +++ b/libcef_dll/ctocpp/quota_callback_ctocpp.h @@ -31,7 +31,6 @@ class CefQuotaCallbackCToCpp explicit CefQuotaCallbackCToCpp(cef_quota_callback_t* str) : CefCToCpp(str) {} - virtual ~CefQuotaCallbackCToCpp() {} // CefQuotaCallback methods virtual void Continue(bool allow) OVERRIDE; diff --git a/libcef_dll/ctocpp/read_handler_ctocpp.h b/libcef_dll/ctocpp/read_handler_ctocpp.h index 85ebf2de6..1d404afaf 100644 --- a/libcef_dll/ctocpp/read_handler_ctocpp.h +++ b/libcef_dll/ctocpp/read_handler_ctocpp.h @@ -31,14 +31,13 @@ class CefReadHandlerCToCpp explicit CefReadHandlerCToCpp(cef_read_handler_t* str) : CefCToCpp( str) {} - virtual ~CefReadHandlerCToCpp() {} // CefReadHandler methods - virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Eof() OVERRIDE; - virtual bool MayBlock() OVERRIDE; + size_t Read(void* ptr, size_t size, size_t n) override; + int Seek(int64 offset, int whence) override; + int64 Tell() override; + int Eof() override; + bool MayBlock() override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/render_handler_ctocpp.h b/libcef_dll/ctocpp/render_handler_ctocpp.h index 9d8b790e6..ac03608d6 100644 --- a/libcef_dll/ctocpp/render_handler_ctocpp.h +++ b/libcef_dll/ctocpp/render_handler_ctocpp.h @@ -31,31 +31,27 @@ class CefRenderHandlerCToCpp explicit CefRenderHandlerCToCpp(cef_render_handler_t* str) : CefCToCpp(str) {} - virtual ~CefRenderHandlerCToCpp() {} // CefRenderHandler methods - virtual bool GetRootScreenRect(CefRefPtr browser, - CefRect& rect) OVERRIDE; - virtual bool GetViewRect(CefRefPtr browser, - CefRect& rect) OVERRIDE; - virtual bool GetScreenPoint(CefRefPtr browser, int viewX, - int viewY, int& screenX, int& screenY) OVERRIDE; - virtual bool GetScreenInfo(CefRefPtr browser, - CefScreenInfo& screen_info) OVERRIDE; - virtual void OnPopupShow(CefRefPtr browser, bool show) OVERRIDE; - virtual void OnPopupSize(CefRefPtr browser, - const CefRect& rect) OVERRIDE; - virtual void OnPaint(CefRefPtr browser, PaintElementType type, + bool GetRootScreenRect(CefRefPtr browser, CefRect& rect) override; + bool GetViewRect(CefRefPtr browser, CefRect& rect) override; + bool GetScreenPoint(CefRefPtr browser, int viewX, int viewY, + int& screenX, int& screenY) override; + bool GetScreenInfo(CefRefPtr browser, + CefScreenInfo& screen_info) override; + void OnPopupShow(CefRefPtr browser, bool show) override; + void OnPopupSize(CefRefPtr browser, const CefRect& rect) override; + void OnPaint(CefRefPtr browser, PaintElementType type, const RectList& dirtyRects, const void* buffer, int width, - int height) OVERRIDE; - virtual void OnCursorChange(CefRefPtr browser, - CefCursorHandle cursor) OVERRIDE; - virtual bool StartDragging(CefRefPtr browser, + int height) override; + void OnCursorChange(CefRefPtr browser, + CefCursorHandle cursor) override; + bool StartDragging(CefRefPtr browser, CefRefPtr drag_data, DragOperationsMask allowed_ops, int x, - int y) OVERRIDE; - virtual void UpdateDragCursor(CefRefPtr browser, - DragOperation operation) OVERRIDE; - virtual void OnScrollOffsetChanged(CefRefPtr browser) OVERRIDE; + int y) override; + void UpdateDragCursor(CefRefPtr browser, + DragOperation operation) override; + void OnScrollOffsetChanged(CefRefPtr browser) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/render_process_handler_ctocpp.h b/libcef_dll/ctocpp/render_process_handler_ctocpp.h index d6c4d32eb..ae7f03d3e 100644 --- a/libcef_dll/ctocpp/render_process_handler_ctocpp.h +++ b/libcef_dll/ctocpp/render_process_handler_ctocpp.h @@ -31,31 +31,29 @@ class CefRenderProcessHandlerCToCpp explicit CefRenderProcessHandlerCToCpp(cef_render_process_handler_t* str) : CefCToCpp(str) {} - virtual ~CefRenderProcessHandlerCToCpp() {} // CefRenderProcessHandler methods - virtual void OnRenderThreadCreated( - CefRefPtr extra_info) OVERRIDE; - virtual void OnWebKitInitialized() OVERRIDE; - virtual void OnBrowserCreated(CefRefPtr browser) OVERRIDE; - virtual void OnBrowserDestroyed(CefRefPtr browser) OVERRIDE; - virtual CefRefPtr GetLoadHandler() OVERRIDE; - virtual bool OnBeforeNavigation(CefRefPtr browser, + void OnRenderThreadCreated(CefRefPtr extra_info) override; + void OnWebKitInitialized() override; + void OnBrowserCreated(CefRefPtr browser) override; + void OnBrowserDestroyed(CefRefPtr browser) override; + CefRefPtr GetLoadHandler() override; + bool OnBeforeNavigation(CefRefPtr browser, CefRefPtr frame, CefRefPtr request, - NavigationType navigation_type, bool is_redirect) OVERRIDE; - virtual void OnContextCreated(CefRefPtr browser, - CefRefPtr frame, CefRefPtr context) OVERRIDE; - virtual void OnContextReleased(CefRefPtr browser, - CefRefPtr frame, CefRefPtr context) OVERRIDE; - virtual void OnUncaughtException(CefRefPtr browser, + NavigationType navigation_type, bool is_redirect) override; + void OnContextCreated(CefRefPtr browser, + CefRefPtr frame, CefRefPtr context) override; + void OnContextReleased(CefRefPtr browser, + CefRefPtr frame, CefRefPtr context) override; + void OnUncaughtException(CefRefPtr browser, CefRefPtr frame, CefRefPtr context, CefRefPtr exception, - CefRefPtr stackTrace) OVERRIDE; - virtual void OnFocusedNodeChanged(CefRefPtr browser, - CefRefPtr frame, CefRefPtr node) OVERRIDE; - virtual bool OnProcessMessageReceived(CefRefPtr browser, + CefRefPtr stackTrace) override; + void OnFocusedNodeChanged(CefRefPtr browser, + CefRefPtr frame, CefRefPtr node) override; + bool OnProcessMessageReceived(CefRefPtr browser, CefProcessId source_process, - CefRefPtr message) OVERRIDE; + CefRefPtr message) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/request_context_ctocpp.h b/libcef_dll/ctocpp/request_context_ctocpp.h index 961150aa3..6b7b57e66 100644 --- a/libcef_dll/ctocpp/request_context_ctocpp.h +++ b/libcef_dll/ctocpp/request_context_ctocpp.h @@ -31,7 +31,6 @@ class CefRequestContextCToCpp explicit CefRequestContextCToCpp(cef_request_context_t* str) : CefCToCpp(str) {} - virtual ~CefRequestContextCToCpp() {} // CefRequestContext methods virtual bool IsSame(CefRefPtr other) OVERRIDE; diff --git a/libcef_dll/ctocpp/request_context_handler_ctocpp.h b/libcef_dll/ctocpp/request_context_handler_ctocpp.h index 099fdb1bd..2fd716bbe 100644 --- a/libcef_dll/ctocpp/request_context_handler_ctocpp.h +++ b/libcef_dll/ctocpp/request_context_handler_ctocpp.h @@ -31,10 +31,9 @@ class CefRequestContextHandlerCToCpp explicit CefRequestContextHandlerCToCpp(cef_request_context_handler_t* str) : CefCToCpp(str) {} - virtual ~CefRequestContextHandlerCToCpp() {} // CefRequestContextHandler methods - virtual CefRefPtr GetCookieManager() OVERRIDE; + CefRefPtr GetCookieManager() override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/request_ctocpp.h b/libcef_dll/ctocpp/request_ctocpp.h index 574ac7f4c..ff9dfc0ac 100644 --- a/libcef_dll/ctocpp/request_ctocpp.h +++ b/libcef_dll/ctocpp/request_ctocpp.h @@ -29,7 +29,6 @@ class CefRequestCToCpp public: explicit CefRequestCToCpp(cef_request_t* str) : CefCToCpp(str) {} - virtual ~CefRequestCToCpp() {} // CefRequest methods virtual bool IsReadOnly() OVERRIDE; diff --git a/libcef_dll/ctocpp/request_handler_ctocpp.h b/libcef_dll/ctocpp/request_handler_ctocpp.h index b30ecf267..7862785f3 100644 --- a/libcef_dll/ctocpp/request_handler_ctocpp.h +++ b/libcef_dll/ctocpp/request_handler_ctocpp.h @@ -31,39 +31,36 @@ class CefRequestHandlerCToCpp explicit CefRequestHandlerCToCpp(cef_request_handler_t* str) : CefCToCpp(str) {} - virtual ~CefRequestHandlerCToCpp() {} // CefRequestHandler methods - virtual bool OnBeforeBrowse(CefRefPtr browser, - CefRefPtr frame, CefRefPtr request, - bool is_redirect) OVERRIDE; - virtual bool OnBeforeResourceLoad(CefRefPtr browser, - CefRefPtr frame, CefRefPtr request) OVERRIDE; - virtual CefRefPtr GetResourceHandler( + bool OnBeforeBrowse(CefRefPtr browser, CefRefPtr frame, + CefRefPtr request, bool is_redirect) override; + bool OnBeforeResourceLoad(CefRefPtr browser, + CefRefPtr frame, CefRefPtr request) override; + CefRefPtr GetResourceHandler( CefRefPtr browser, CefRefPtr frame, - CefRefPtr request) OVERRIDE; - virtual void OnResourceRedirect(CefRefPtr browser, + CefRefPtr request) override; + void OnResourceRedirect(CefRefPtr browser, CefRefPtr frame, const CefString& old_url, - CefString& new_url) OVERRIDE; - virtual bool GetAuthCredentials(CefRefPtr browser, + CefString& new_url) override; + bool GetAuthCredentials(CefRefPtr browser, CefRefPtr frame, bool isProxy, const CefString& host, int port, const CefString& realm, const CefString& scheme, - CefRefPtr callback) OVERRIDE; - virtual bool OnQuotaRequest(CefRefPtr browser, + CefRefPtr callback) override; + bool OnQuotaRequest(CefRefPtr browser, const CefString& origin_url, int64 new_size, - CefRefPtr callback) OVERRIDE; - virtual void OnProtocolExecution(CefRefPtr browser, - const CefString& url, bool& allow_os_execution) OVERRIDE; - virtual bool OnCertificateError(cef_errorcode_t cert_error, + CefRefPtr callback) override; + void OnProtocolExecution(CefRefPtr browser, const CefString& url, + bool& allow_os_execution) override; + bool OnCertificateError(cef_errorcode_t cert_error, const CefString& request_url, - CefRefPtr callback) OVERRIDE; - virtual bool OnBeforePluginLoad(CefRefPtr browser, - const CefString& url, const CefString& policy_url, - CefRefPtr info) OVERRIDE; - virtual void OnPluginCrashed(CefRefPtr browser, - const CefString& plugin_path) OVERRIDE; - virtual void OnRenderProcessTerminated(CefRefPtr browser, - TerminationStatus status) OVERRIDE; + CefRefPtr callback) override; + bool OnBeforePluginLoad(CefRefPtr browser, const CefString& url, + const CefString& policy_url, CefRefPtr info) override; + void OnPluginCrashed(CefRefPtr browser, + const CefString& plugin_path) override; + void OnRenderProcessTerminated(CefRefPtr browser, + TerminationStatus status) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h b/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h index bbe56638d..d01470b14 100644 --- a/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h +++ b/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h @@ -31,12 +31,11 @@ class CefResourceBundleHandlerCToCpp explicit CefResourceBundleHandlerCToCpp(cef_resource_bundle_handler_t* str) : CefCToCpp(str) {} - virtual ~CefResourceBundleHandlerCToCpp() {} // CefResourceBundleHandler methods - virtual bool GetLocalizedString(int message_id, CefString& string) OVERRIDE; - virtual bool GetDataResource(int resource_id, void*& data, - size_t& data_size) OVERRIDE; + bool GetLocalizedString(int message_id, CefString& string) override; + bool GetDataResource(int resource_id, void*& data, + size_t& data_size) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/resource_handler_ctocpp.h b/libcef_dll/ctocpp/resource_handler_ctocpp.h index e0b7dbaaf..26adda76a 100644 --- a/libcef_dll/ctocpp/resource_handler_ctocpp.h +++ b/libcef_dll/ctocpp/resource_handler_ctocpp.h @@ -31,18 +31,17 @@ class CefResourceHandlerCToCpp explicit CefResourceHandlerCToCpp(cef_resource_handler_t* str) : CefCToCpp(str) {} - virtual ~CefResourceHandlerCToCpp() {} // CefResourceHandler methods - virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback) OVERRIDE; - virtual void GetResponseHeaders(CefRefPtr response, - int64& response_length, CefString& redirectUrl) OVERRIDE; - virtual bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, - CefRefPtr callback) OVERRIDE; - virtual bool CanGetCookie(const CefCookie& cookie) OVERRIDE; - virtual bool CanSetCookie(const CefCookie& cookie) OVERRIDE; - virtual void Cancel() OVERRIDE; + bool ProcessRequest(CefRefPtr request, + CefRefPtr callback) override; + void GetResponseHeaders(CefRefPtr response, + int64& response_length, CefString& redirectUrl) override; + bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, + CefRefPtr callback) override; + bool CanGetCookie(const CefCookie& cookie) override; + bool CanSetCookie(const CefCookie& cookie) override; + void Cancel() override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/response_ctocpp.h b/libcef_dll/ctocpp/response_ctocpp.h index 8dd92d519..4ab8e6dd4 100644 --- a/libcef_dll/ctocpp/response_ctocpp.h +++ b/libcef_dll/ctocpp/response_ctocpp.h @@ -29,7 +29,6 @@ class CefResponseCToCpp public: explicit CefResponseCToCpp(cef_response_t* str) : CefCToCpp(str) {} - virtual ~CefResponseCToCpp() {} // CefResponse methods virtual bool IsReadOnly() OVERRIDE; diff --git a/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h b/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h index 85e947fab..662eed65b 100644 --- a/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h +++ b/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h @@ -34,11 +34,10 @@ class CefRunFileDialogCallbackCToCpp explicit CefRunFileDialogCallbackCToCpp(cef_run_file_dialog_callback_t* str) : CefCToCpp(str) {} - virtual ~CefRunFileDialogCallbackCToCpp() {} // CefRunFileDialogCallback methods - virtual void OnFileDialogDismissed(CefRefPtr browser_host, - const std::vector& file_paths) OVERRIDE; + void OnFileDialogDismissed(CefRefPtr browser_host, + const std::vector& file_paths) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h b/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h index a7ef13e62..8a544af65 100644 --- a/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h +++ b/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h @@ -31,12 +31,11 @@ class CefSchemeHandlerFactoryCToCpp explicit CefSchemeHandlerFactoryCToCpp(cef_scheme_handler_factory_t* str) : CefCToCpp(str) {} - virtual ~CefSchemeHandlerFactoryCToCpp() {} // CefSchemeHandlerFactory methods - virtual CefRefPtr Create(CefRefPtr browser, + CefRefPtr Create(CefRefPtr browser, CefRefPtr frame, const CefString& scheme_name, - CefRefPtr request) OVERRIDE; + CefRefPtr request) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/scheme_registrar_ctocpp.h b/libcef_dll/ctocpp/scheme_registrar_ctocpp.h index 14658e135..f4f0a3ba2 100644 --- a/libcef_dll/ctocpp/scheme_registrar_ctocpp.h +++ b/libcef_dll/ctocpp/scheme_registrar_ctocpp.h @@ -31,7 +31,6 @@ class CefSchemeRegistrarCToCpp explicit CefSchemeRegistrarCToCpp(cef_scheme_registrar_t* str) : CefCToCpp(str) {} - virtual ~CefSchemeRegistrarCToCpp() {} // CefSchemeRegistrar methods virtual bool AddCustomScheme(const CefString& scheme_name, bool is_standard, diff --git a/libcef_dll/ctocpp/stream_reader_ctocpp.h b/libcef_dll/ctocpp/stream_reader_ctocpp.h index 7b3f0b790..aa70a833d 100644 --- a/libcef_dll/ctocpp/stream_reader_ctocpp.h +++ b/libcef_dll/ctocpp/stream_reader_ctocpp.h @@ -31,7 +31,6 @@ class CefStreamReaderCToCpp explicit CefStreamReaderCToCpp(cef_stream_reader_t* str) : CefCToCpp( str) {} - virtual ~CefStreamReaderCToCpp() {} // CefStreamReader methods virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; diff --git a/libcef_dll/ctocpp/stream_writer_ctocpp.h b/libcef_dll/ctocpp/stream_writer_ctocpp.h index 6e1b5d779..425bed0a5 100644 --- a/libcef_dll/ctocpp/stream_writer_ctocpp.h +++ b/libcef_dll/ctocpp/stream_writer_ctocpp.h @@ -31,7 +31,6 @@ class CefStreamWriterCToCpp explicit CefStreamWriterCToCpp(cef_stream_writer_t* str) : CefCToCpp( str) {} - virtual ~CefStreamWriterCToCpp() {} // CefStreamWriter methods virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE; diff --git a/libcef_dll/ctocpp/string_visitor_ctocpp.h b/libcef_dll/ctocpp/string_visitor_ctocpp.h index b6aaf2ecc..9e6081da9 100644 --- a/libcef_dll/ctocpp/string_visitor_ctocpp.h +++ b/libcef_dll/ctocpp/string_visitor_ctocpp.h @@ -31,10 +31,9 @@ class CefStringVisitorCToCpp explicit CefStringVisitorCToCpp(cef_string_visitor_t* str) : CefCToCpp(str) {} - virtual ~CefStringVisitorCToCpp() {} // CefStringVisitor methods - virtual void Visit(const CefString& string) OVERRIDE; + void Visit(const CefString& string) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/task_ctocpp.h b/libcef_dll/ctocpp/task_ctocpp.h index dc8096bf7..e5f7871cf 100644 --- a/libcef_dll/ctocpp/task_ctocpp.h +++ b/libcef_dll/ctocpp/task_ctocpp.h @@ -29,10 +29,9 @@ class CefTaskCToCpp public: explicit CefTaskCToCpp(cef_task_t* str) : CefCToCpp(str) {} - virtual ~CefTaskCToCpp() {} // CefTask methods - virtual void Execute() OVERRIDE; + void Execute() override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/task_runner_ctocpp.h b/libcef_dll/ctocpp/task_runner_ctocpp.h index 39672c412..f4aecf47c 100644 --- a/libcef_dll/ctocpp/task_runner_ctocpp.h +++ b/libcef_dll/ctocpp/task_runner_ctocpp.h @@ -29,7 +29,6 @@ class CefTaskRunnerCToCpp public: explicit CefTaskRunnerCToCpp(cef_task_runner_t* str) : CefCToCpp(str) {} - virtual ~CefTaskRunnerCToCpp() {} // CefTaskRunner methods virtual bool IsSame(CefRefPtr that) OVERRIDE; diff --git a/libcef_dll/ctocpp/urlrequest_client_ctocpp.h b/libcef_dll/ctocpp/urlrequest_client_ctocpp.h index 0f6ba9c89..1e9b7b27b 100644 --- a/libcef_dll/ctocpp/urlrequest_client_ctocpp.h +++ b/libcef_dll/ctocpp/urlrequest_client_ctocpp.h @@ -31,19 +31,18 @@ class CefURLRequestClientCToCpp explicit CefURLRequestClientCToCpp(cef_urlrequest_client_t* str) : CefCToCpp(str) {} - virtual ~CefURLRequestClientCToCpp() {} // CefURLRequestClient methods - virtual void OnRequestComplete(CefRefPtr request) OVERRIDE; - virtual void OnUploadProgress(CefRefPtr request, - uint64 current, uint64 total) OVERRIDE; - virtual void OnDownloadProgress(CefRefPtr request, - uint64 current, uint64 total) OVERRIDE; - virtual void OnDownloadData(CefRefPtr request, - const void* data, size_t data_length) OVERRIDE; - virtual bool GetAuthCredentials(bool isProxy, const CefString& host, int port, + void OnRequestComplete(CefRefPtr request) override; + void OnUploadProgress(CefRefPtr request, uint64 current, + uint64 total) override; + void OnDownloadProgress(CefRefPtr request, uint64 current, + uint64 total) override; + void OnDownloadData(CefRefPtr request, const void* data, + size_t data_length) override; + bool GetAuthCredentials(bool isProxy, const CefString& host, int port, const CefString& realm, const CefString& scheme, - CefRefPtr callback) OVERRIDE; + CefRefPtr callback) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/urlrequest_ctocpp.h b/libcef_dll/ctocpp/urlrequest_ctocpp.h index b383d967a..962ad8403 100644 --- a/libcef_dll/ctocpp/urlrequest_ctocpp.h +++ b/libcef_dll/ctocpp/urlrequest_ctocpp.h @@ -29,7 +29,6 @@ class CefURLRequestCToCpp public: explicit CefURLRequestCToCpp(cef_urlrequest_t* str) : CefCToCpp(str) {} - virtual ~CefURLRequestCToCpp() {} // CefURLRequest methods virtual CefRefPtr GetRequest() OVERRIDE; diff --git a/libcef_dll/ctocpp/v8accessor_ctocpp.h b/libcef_dll/ctocpp/v8accessor_ctocpp.h index a53f86eeb..28df7382f 100644 --- a/libcef_dll/ctocpp/v8accessor_ctocpp.h +++ b/libcef_dll/ctocpp/v8accessor_ctocpp.h @@ -29,13 +29,12 @@ class CefV8AccessorCToCpp public: explicit CefV8AccessorCToCpp(cef_v8accessor_t* str) : CefCToCpp(str) {} - virtual ~CefV8AccessorCToCpp() {} // CefV8Accessor methods - virtual bool Get(const CefString& name, const CefRefPtr object, - CefRefPtr& retval, CefString& exception) OVERRIDE; - virtual bool Set(const CefString& name, const CefRefPtr object, - const CefRefPtr value, CefString& exception) OVERRIDE; + bool Get(const CefString& name, const CefRefPtr object, + CefRefPtr& retval, CefString& exception) override; + bool Set(const CefString& name, const CefRefPtr object, + const CefRefPtr value, CefString& exception) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/v8context_ctocpp.h b/libcef_dll/ctocpp/v8context_ctocpp.h index bc87bdad9..632fe07d8 100644 --- a/libcef_dll/ctocpp/v8context_ctocpp.h +++ b/libcef_dll/ctocpp/v8context_ctocpp.h @@ -29,7 +29,6 @@ class CefV8ContextCToCpp public: explicit CefV8ContextCToCpp(cef_v8context_t* str) : CefCToCpp(str) {} - virtual ~CefV8ContextCToCpp() {} // CefV8Context methods virtual CefRefPtr GetTaskRunner() OVERRIDE; diff --git a/libcef_dll/ctocpp/v8exception_ctocpp.h b/libcef_dll/ctocpp/v8exception_ctocpp.h index 7ca626e55..dd5ffa01d 100644 --- a/libcef_dll/ctocpp/v8exception_ctocpp.h +++ b/libcef_dll/ctocpp/v8exception_ctocpp.h @@ -31,7 +31,6 @@ class CefV8ExceptionCToCpp explicit CefV8ExceptionCToCpp(cef_v8exception_t* str) : CefCToCpp( str) {} - virtual ~CefV8ExceptionCToCpp() {} // CefV8Exception methods virtual CefString GetMessage() OVERRIDE; diff --git a/libcef_dll/ctocpp/v8handler_ctocpp.h b/libcef_dll/ctocpp/v8handler_ctocpp.h index 4f8845cbb..4faea3a7f 100644 --- a/libcef_dll/ctocpp/v8handler_ctocpp.h +++ b/libcef_dll/ctocpp/v8handler_ctocpp.h @@ -29,12 +29,11 @@ class CefV8HandlerCToCpp public: explicit CefV8HandlerCToCpp(cef_v8handler_t* str) : CefCToCpp(str) {} - virtual ~CefV8HandlerCToCpp() {} // CefV8Handler methods - virtual bool Execute(const CefString& name, CefRefPtr object, + bool Execute(const CefString& name, CefRefPtr object, const CefV8ValueList& arguments, CefRefPtr& retval, - CefString& exception) OVERRIDE; + CefString& exception) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/v8stack_frame_ctocpp.h b/libcef_dll/ctocpp/v8stack_frame_ctocpp.h index a6c1fa51a..1024a6e1e 100644 --- a/libcef_dll/ctocpp/v8stack_frame_ctocpp.h +++ b/libcef_dll/ctocpp/v8stack_frame_ctocpp.h @@ -31,7 +31,6 @@ class CefV8StackFrameCToCpp explicit CefV8StackFrameCToCpp(cef_v8stack_frame_t* str) : CefCToCpp( str) {} - virtual ~CefV8StackFrameCToCpp() {} // CefV8StackFrame methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/v8stack_trace_ctocpp.h b/libcef_dll/ctocpp/v8stack_trace_ctocpp.h index e94e2ec77..413107aa8 100644 --- a/libcef_dll/ctocpp/v8stack_trace_ctocpp.h +++ b/libcef_dll/ctocpp/v8stack_trace_ctocpp.h @@ -31,7 +31,6 @@ class CefV8StackTraceCToCpp explicit CefV8StackTraceCToCpp(cef_v8stack_trace_t* str) : CefCToCpp( str) {} - virtual ~CefV8StackTraceCToCpp() {} // CefV8StackTrace methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/v8value_ctocpp.h b/libcef_dll/ctocpp/v8value_ctocpp.h index fb3b168c7..aea8d6c26 100644 --- a/libcef_dll/ctocpp/v8value_ctocpp.h +++ b/libcef_dll/ctocpp/v8value_ctocpp.h @@ -30,7 +30,6 @@ class CefV8ValueCToCpp public: explicit CefV8ValueCToCpp(cef_v8value_t* str) : CefCToCpp(str) {} - virtual ~CefV8ValueCToCpp() {} // CefV8Value methods virtual bool IsValid() OVERRIDE; diff --git a/libcef_dll/ctocpp/web_plugin_info_ctocpp.h b/libcef_dll/ctocpp/web_plugin_info_ctocpp.h index b241d877a..078adf082 100644 --- a/libcef_dll/ctocpp/web_plugin_info_ctocpp.h +++ b/libcef_dll/ctocpp/web_plugin_info_ctocpp.h @@ -31,7 +31,6 @@ class CefWebPluginInfoCToCpp explicit CefWebPluginInfoCToCpp(cef_web_plugin_info_t* str) : CefCToCpp(str) {} - virtual ~CefWebPluginInfoCToCpp() {} // CefWebPluginInfo methods virtual CefString GetName() OVERRIDE; diff --git a/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h b/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h index b4ccf3b0f..78c0be15a 100644 --- a/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h +++ b/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h @@ -31,11 +31,9 @@ class CefWebPluginInfoVisitorCToCpp explicit CefWebPluginInfoVisitorCToCpp(cef_web_plugin_info_visitor_t* str) : CefCToCpp(str) {} - virtual ~CefWebPluginInfoVisitorCToCpp() {} // CefWebPluginInfoVisitor methods - virtual bool Visit(CefRefPtr info, int count, - int total) OVERRIDE; + bool Visit(CefRefPtr info, int count, int total) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h b/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h index bfef9a951..32bfe77e1 100644 --- a/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h +++ b/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h @@ -33,10 +33,9 @@ class CefWebPluginUnstableCallbackCToCpp : CefCToCpp( str) {} - virtual ~CefWebPluginUnstableCallbackCToCpp() {} // CefWebPluginUnstableCallback methods - virtual void IsUnstable(const CefString& path, bool unstable) OVERRIDE; + void IsUnstable(const CefString& path, bool unstable) override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/write_handler_ctocpp.h b/libcef_dll/ctocpp/write_handler_ctocpp.h index 211cac37b..464f893cf 100644 --- a/libcef_dll/ctocpp/write_handler_ctocpp.h +++ b/libcef_dll/ctocpp/write_handler_ctocpp.h @@ -31,14 +31,13 @@ class CefWriteHandlerCToCpp explicit CefWriteHandlerCToCpp(cef_write_handler_t* str) : CefCToCpp( str) {} - virtual ~CefWriteHandlerCToCpp() {} // CefWriteHandler methods - virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE; - virtual int Seek(int64 offset, int whence) OVERRIDE; - virtual int64 Tell() OVERRIDE; - virtual int Flush() OVERRIDE; - virtual bool MayBlock() OVERRIDE; + size_t Write(const void* ptr, size_t size, size_t n) override; + int Seek(int64 offset, int whence) override; + int64 Tell() override; + int Flush() override; + bool MayBlock() override; }; #endif // BUILDING_CEF_SHARED diff --git a/libcef_dll/ctocpp/xml_reader_ctocpp.h b/libcef_dll/ctocpp/xml_reader_ctocpp.h index a997b8807..e40ac9750 100644 --- a/libcef_dll/ctocpp/xml_reader_ctocpp.h +++ b/libcef_dll/ctocpp/xml_reader_ctocpp.h @@ -29,7 +29,6 @@ class CefXmlReaderCToCpp public: explicit CefXmlReaderCToCpp(cef_xml_reader_t* str) : CefCToCpp(str) {} - virtual ~CefXmlReaderCToCpp() {} // CefXmlReader methods virtual bool MoveToNextNode() OVERRIDE; diff --git a/libcef_dll/ctocpp/zip_reader_ctocpp.h b/libcef_dll/ctocpp/zip_reader_ctocpp.h index 4bf24604a..9c667e940 100644 --- a/libcef_dll/ctocpp/zip_reader_ctocpp.h +++ b/libcef_dll/ctocpp/zip_reader_ctocpp.h @@ -29,7 +29,6 @@ class CefZipReaderCToCpp public: explicit CefZipReaderCToCpp(cef_zip_reader_t* str) : CefCToCpp(str) {} - virtual ~CefZipReaderCToCpp() {} // CefZipReader methods virtual bool MoveToFirstFile() OVERRIDE; diff --git a/patch/patch.cfg b/patch/patch.cfg index 82d650115..473fecc09 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -64,12 +64,6 @@ patches = [ 'name': 'content_nav_1129', 'path': '../content/', }, - { - # Allow customization of the background color on OS X. - # http://code.google.com/p/chromiumembedded/issues/detail?id=1161 - 'name': 'browser_1161', - 'path': '../content/browser/', - }, { # Allow customization of the background color with Aura. # http://code.google.com/p/chromiumembedded/issues/detail?id=1161 @@ -106,9 +100,9 @@ patches = [ 'path': '../ui/base/dragdrop/', }, { - # Fix printing on Windows. - # https://codereview.chromium.org/599633007/ - 'name': 'printing_win', + # Fix printing on Windows and Mac. + # https://codereview.chromium.org/719693002 + 'name': 'printing', 'path': '../', }, { diff --git a/patch/patches/browser_1161.patch b/patch/patches/browser_1161.patch deleted file mode 100644 index f96ea2e3a..000000000 --- a/patch/patches/browser_1161.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git compositor/io_surface_layer_mac.mm compositor/io_surface_layer_mac.mm -index 357c65e..371e3c4 100644 ---- compositor/io_surface_layer_mac.mm -+++ compositor/io_surface_layer_mac.mm -@@ -295,7 +295,7 @@ void IOSurfaceLayerHelper::EndPumpingFrames() { - TRACE_EVENT0("browser", "IOSurfaceLayer::drawInCGLContext"); - - if (!iosurface_->HasIOSurface() || context_->cgl_context() != glContext) { -- glClearColor(1, 1, 1, 1); -+ glClearColor(0, 0, 0, 0); - glClear(GL_COLOR_BUFFER_BIT); - return; - } -diff --git renderer_host/compositing_iosurface_mac.mm renderer_host/compositing_iosurface_mac.mm -index ba67fc9..2c6a410 100644 ---- renderer_host/compositing_iosurface_mac.mm -+++ renderer_host/compositing_iosurface_mac.mm -@@ -168,7 +168,7 @@ bool CompositingIOSurfaceMac::DrawIOSurface( - CHECK_AND_SAVE_GL_ERROR(); - } else { - // Should match the clear color of RenderWidgetHostViewMac. -- glClearColor(1.0f, 1.0f, 1.0f, 1.0f); -+ glClearColor(0, 0, 0, 0); - glClear(GL_COLOR_BUFFER_BIT); - } - -diff --git renderer_host/render_widget_host_view_aura.cc renderer_host/render_widget_host_view_aura.cc -index 6ad6e41..9f33679 100644 ---- renderer_host/render_widget_host_view_aura.cc -+++ renderer_host/render_widget_host_view_aura.cc -@@ -1706,8 +1706,14 @@ void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) { - // For non-opaque windows, we don't draw anything, since we depend on the - // canvas coming from the compositor to already be initialized as - // transparent. -- if (window_->layer()->fills_bounds_opaquely()) -- canvas->DrawColor(SK_ColorWHITE); -+ if (window_->layer()->fills_bounds_opaquely()) { -+ if (host_->IsRenderView()) { -+ canvas->DrawColor(GetContentClient()->browser()->GetBaseBackgroundColor( -+ RenderViewHost::From(host_))); -+ } else { -+ canvas->DrawColor(SK_ColorWHITE); -+ } -+ } - } - - void RenderWidgetHostViewAura::OnDeviceScaleFactorChanged( -diff --git renderer_host/render_widget_host_view_mac.mm renderer_host/render_widget_host_view_mac.mm -index 0d4d03c..8615203 100644 ---- renderer_host/render_widget_host_view_mac.mm -+++ renderer_host/render_widget_host_view_mac.mm -@@ -541,7 +541,7 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget) - // draw. - background_layer_.reset([[CALayer alloc] init]); - [background_layer_ -- setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)]; -+ setBackgroundColor:CGColorGetConstantColor(kCGColorClear)]; - [cocoa_view_ setLayer:background_layer_]; - [cocoa_view_ setWantsLayer:YES]; - diff --git a/patch/patches/browser_web_contents_1257.patch b/patch/patches/browser_web_contents_1257.patch index 5a9dd7d07..add691591 100644 --- a/patch/patches/browser_web_contents_1257.patch +++ b/patch/patches/browser_web_contents_1257.patch @@ -1,8 +1,8 @@ diff --git web_contents_impl.cc web_contents_impl.cc -index b6ff810..e783922 100644 +index 3119566..32c43dd 100644 --- web_contents_impl.cc +++ web_contents_impl.cc -@@ -1195,22 +1195,29 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1153,22 +1153,29 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { params.browser_context, params.site_instance, params.routing_id, params.main_frame_routing_id); @@ -48,7 +48,7 @@ index b6ff810..e783922 100644 } CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -1529,6 +1536,9 @@ void WebContentsImpl::CreateNewWindow( +@@ -1501,6 +1508,9 @@ void WebContentsImpl::CreateNewWindow( static_cast(session_storage_namespace); CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); @@ -58,7 +58,7 @@ index b6ff810..e783922 100644 if (delegate_ && !delegate_->ShouldCreateWebContents(this, route_id, -@@ -1536,7 +1546,9 @@ void WebContentsImpl::CreateNewWindow( +@@ -1508,7 +1518,9 @@ void WebContentsImpl::CreateNewWindow( params.frame_name, params.target_url, partition_id, @@ -69,7 +69,7 @@ index b6ff810..e783922 100644 if (route_id != MSG_ROUTING_NONE && !RenderViewHost::FromID(render_process_id, route_id)) { // If the embedder didn't create a WebContents for this route, we need to -@@ -1556,6 +1568,8 @@ void WebContentsImpl::CreateNewWindow( +@@ -1528,6 +1540,8 @@ void WebContentsImpl::CreateNewWindow( create_params.main_frame_routing_id = main_frame_route_id; create_params.opener = this; create_params.opener_suppressed = params.opener_suppressed; diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 54c134d59..54b52a804 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,5 +1,5 @@ diff --git common.gypi common.gypi -index dc0f525..fb1889c 100644 +index f97bf66..116c7bc 100644 --- common.gypi +++ common.gypi @@ -9,6 +9,9 @@ @@ -12,7 +12,7 @@ index dc0f525..fb1889c 100644 # Putting a variables dict inside another variables dict looks kind of # weird. This is done so that 'host_arch', 'chromeos', etc are defined as # variables within the outer variables dict here. This is necessary -@@ -5391,6 +5394,9 @@ +@@ -5486,6 +5489,9 @@ 4510, # Default constructor could not be generated 4512, # Assignment operator could not be generated 4610, # Object can never be instantiated @@ -23,10 +23,10 @@ index dc0f525..fb1889c 100644 'msvs_settings': { 'VCCLCompilerTool': { diff --git gyp_chromium gyp_chromium -index 326919c0..67d0a00 100755 +index ad2796b..1407d9c 100755 --- gyp_chromium +++ gyp_chromium -@@ -263,12 +263,6 @@ if __name__ == '__main__': +@@ -269,12 +269,6 @@ if __name__ == '__main__': if sys.platform not in ('darwin',): args.append('--no-circular-check') diff --git a/patch/patches/content_nav_1129.patch b/patch/patches/content_nav_1129.patch index b4a16c60c..2b4057996 100644 --- a/patch/patches/content_nav_1129.patch +++ b/patch/patches/content_nav_1129.patch @@ -1,8 +1,8 @@ diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc -index 2435d2c..50bb688 100644 +index ca1b9fe..1868fc8 100644 --- public/renderer/content_renderer_client.cc +++ public/renderer/content_renderer_client.cc -@@ -92,7 +92,6 @@ bool ContentRendererClient::AllowPopup() { +@@ -98,7 +98,6 @@ bool ContentRendererClient::AllowPopup() { return false; } @@ -10,7 +10,7 @@ index 2435d2c..50bb688 100644 bool ContentRendererClient::HandleNavigation( RenderFrame* render_frame, DocumentState* document_state, -@@ -104,7 +103,6 @@ bool ContentRendererClient::HandleNavigation( +@@ -110,7 +109,6 @@ bool ContentRendererClient::HandleNavigation( bool is_redirect) { return false; } @@ -19,10 +19,10 @@ index 2435d2c..50bb688 100644 bool ContentRendererClient::ShouldFork(blink::WebFrame* frame, const GURL& url, diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h -index 55db98c..8f155d6 100644 +index 7b79a5c..1a8784b 100644 --- public/renderer/content_renderer_client.h +++ public/renderer/content_renderer_client.h -@@ -182,7 +182,6 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -193,7 +193,6 @@ class CONTENT_EXPORT ContentRendererClient { // Returns true if a popup window should be allowed. virtual bool AllowPopup(); @@ -30,7 +30,7 @@ index 55db98c..8f155d6 100644 // TODO(sgurun) This callback is deprecated and will be removed as soon // as android webview completes implementation of a resource throttle based // shouldoverrideurl implementation. See crbug.com/325351 -@@ -197,7 +196,6 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -208,7 +207,6 @@ class CONTENT_EXPORT ContentRendererClient { blink::WebNavigationType type, blink::WebNavigationPolicy default_policy, bool is_redirect); @@ -39,10 +39,10 @@ index 55db98c..8f155d6 100644 // Returns true if we should fork a new process for the given navigation. // If |send_referrer| is set to false (which is the default), no referrer diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc -index fcea3a1..f1f1df3 100644 +index 9dfdf6b..da8622d 100644 --- renderer/render_frame_impl.cc +++ renderer/render_frame_impl.cc -@@ -3468,7 +3468,6 @@ void RenderFrameImpl::FocusedNodeChanged(const WebNode& node) { +@@ -3714,7 +3714,6 @@ void RenderFrameImpl::OnCommitNavigation( WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( RenderFrame* render_frame, const NavigationPolicyInfo& info) { @@ -50,7 +50,7 @@ index fcea3a1..f1f1df3 100644 // The handlenavigation API is deprecated and will be removed once // crbug.com/325351 is resolved. if (info.urlRequest.url() != GURL(kSwappedOutURL) && -@@ -3483,7 +3482,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( +@@ -3729,7 +3728,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( info.isRedirect)) { return blink::WebNavigationPolicyIgnore; } diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index ca2b67d33..f276f68ee 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,5 +1,5 @@ diff --git resource_ids resource_ids -index c4a6337..127433b 100644 +index 4681b25..9b63284 100644 --- resource_ids +++ resource_ids @@ -14,6 +14,12 @@ diff --git a/patch/patches/gyp_331.patch b/patch/patches/gyp_331.patch index ccec7092d..63bbcbe98 100644 --- a/patch/patches/gyp_331.patch +++ b/patch/patches/gyp_331.patch @@ -1,8 +1,8 @@ diff --git gyp/generator/ninja.py gyp/generator/ninja.py -index 4484f93..8a94869 100644 +index cfb13fc..132bb8c 100644 --- gyp/generator/ninja.py +++ gyp/generator/ninja.py -@@ -743,7 +743,16 @@ class NinjaWriter: +@@ -742,7 +742,16 @@ class NinjaWriter: for path in copy['files']: # Normalize the path so trailing slashes don't confuse us. path = os.path.normpath(path) diff --git a/patch/patches/message_loop_443.patch b/patch/patches/message_loop_443.patch index 8138180ac..011f6021b 100644 --- a/patch/patches/message_loop_443.patch +++ b/patch/patches/message_loop_443.patch @@ -1,5 +1,5 @@ diff --git message_loop.cc message_loop.cc -index c01e542..232e7bf 100644 +index 01402d0..dd910bd 100644 --- message_loop.cc +++ message_loop.cc @@ -158,7 +158,6 @@ MessageLoop::MessageLoop(scoped_ptr pump) diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index 28346f02d..6269f76ba 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -1,8 +1,8 @@ diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h -index 1d045b0..e336118 100644 +index cb17472..9fac25e 100644 --- public/common/common_param_traits_macros.h +++ public/common/common_param_traits_macros.h -@@ -172,6 +172,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) +@@ -177,6 +177,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) @@ -11,34 +11,34 @@ index 1d045b0..e336118 100644 IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) diff --git public/common/web_preferences.cc public/common/web_preferences.cc -index 32f7987..7e166c4 100644 +index dbe1629..c14ac82 100644 --- public/common/web_preferences.cc +++ public/common/web_preferences.cc -@@ -135,6 +135,7 @@ WebPreferences::WebPreferences() +@@ -150,6 +150,7 @@ WebPreferences::WebPreferences() pinch_overlay_scrollbar_thickness(0), use_solid_color_scrollbars(false), navigate_on_drag_drop(true), + base_background_color(0xFFFFFFFF), // Color::white v8_cache_options(V8_CACHE_OPTIONS_OFF), v8_script_streaming_enabled(false), - cookie_enabled(true), + v8_script_streaming_mode(V8_SCRIPT_STREAMING_MODE_ALL), diff --git public/common/web_preferences.h public/common/web_preferences.h -index b0a95ca..8c0781e 100644 +index 057174f..a76d7a7 100644 --- public/common/web_preferences.h +++ public/common/web_preferences.h -@@ -141,6 +141,7 @@ struct CONTENT_EXPORT WebPreferences { +@@ -152,6 +152,7 @@ struct CONTENT_EXPORT WebPreferences { int pinch_overlay_scrollbar_thickness; bool use_solid_color_scrollbars; bool navigate_on_drag_drop; + uint32_t base_background_color; V8CacheOptions v8_cache_options; bool v8_script_streaming_enabled; - + V8ScriptStreamingMode v8_script_streaming_mode; diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc -index b931da5..73b30b4 100644 +index 56a719e..d61c1cb 100644 --- renderer/render_view_impl.cc +++ renderer/render_view_impl.cc -@@ -971,6 +971,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, +@@ -963,6 +963,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, settings->setJavaEnabled(prefs.java_enabled); diff --git a/patch/patches/printing.patch b/patch/patches/printing.patch new file mode 100644 index 000000000..fc35544c8 --- /dev/null +++ b/patch/patches/printing.patch @@ -0,0 +1,38 @@ +diff --git chrome/renderer/printing/print_web_view_helper_mac.mm chrome/renderer/printing/print_web_view_helper_mac.mm +index ffde22c..6c776ce 100644 +--- chrome/renderer/printing/print_web_view_helper_mac.mm ++++ chrome/renderer/printing/print_web_view_helper_mac.mm +@@ -127,12 +127,14 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params, + skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_); + skia::SetIsPreviewMetafile(*canvas, is_preview); + ++#if defined(ENABLE_PRINT_PREVIEW) + if (params.display_header_footer) { + PrintHeaderAndFooter(static_cast(canvas), + page_number + 1, + print_preview_context_.total_page_count(), *frame, + scale_factor, page_layout_in_points, params); + } ++#endif // ENABLE_PRINT_PREVIEW + RenderPageContent(frame, page_number, canvas_area, content_area, + scale_factor, static_cast(canvas)); + } +diff --git chrome/renderer/printing/print_web_view_helper_pdf_win.cc chrome/renderer/printing/print_web_view_helper_pdf_win.cc +index d9554d7..9ca18a7 100644 +--- chrome/renderer/printing/print_web_view_helper_pdf_win.cc ++++ chrome/renderer/printing/print_web_view_helper_pdf_win.cc +@@ -187,12 +187,14 @@ void PrintWebViewHelper::PrintPageInternal( + MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile); + skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_); + ++#if defined(ENABLE_PRINT_PREVIEW) + if (params.params.display_header_footer) { + // |page_number| is 0-based, so 1 is added. + PrintHeaderAndFooter(canvas, params.page_number + 1, + print_preview_context_.total_page_count(), *frame, + scale_factor, page_layout_in_points, params.params); + } ++#endif // ENABLE_PRINT_PREVIEW + + float webkit_scale_factor = + RenderPageContent(frame, params.page_number, canvas_area, content_area, diff --git a/patch/patches/printing_win.patch b/patch/patches/printing_win.patch deleted file mode 100644 index a6429138d..000000000 --- a/patch/patches/printing_win.patch +++ /dev/null @@ -1,296 +0,0 @@ -diff --git chrome/common/chrome_utility_printing_messages.h chrome/common/chrome_utility_printing_messages.h -index d5ddd6e..7d90287 100644 ---- chrome/common/chrome_utility_printing_messages.h -+++ chrome/common/chrome_utility_printing_messages.h -@@ -16,8 +16,8 @@ - - #define IPC_MESSAGE_START ChromeUtilityPrintingMsgStart - -+// Preview and Cloud Print messages. - #if defined(ENABLE_FULL_PRINTING) -- - IPC_STRUCT_TRAITS_BEGIN(printing::PrinterCapsAndDefaults) - IPC_STRUCT_TRAITS_MEMBER(printer_capabilities) - IPC_STRUCT_TRAITS_MEMBER(caps_mime_type) -@@ -61,23 +61,6 @@ IPC_STRUCT_TRAITS_END() - // Utility process messages: - // These are messages from the browser to the utility process. - --#if defined(OS_WIN) --// Tell the utility process to start rendering the given PDF into a metafile. --// Utility process would be alive until --// ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop message. --IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles, -- IPC::PlatformFileForTransit, /* input_file */ -- printing::PdfRenderSettings /* settings */) -- --// Requests conversion of the next page. --IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles_GetPage, -- int /* page_number */, -- IPC::PlatformFileForTransit /* output_file */) -- --// Requests utility process to stop conversion and exit. --IPC_MESSAGE_CONTROL0(ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop) --#endif // OS_WIN -- - // Tell the utility process to render the given PDF into a PWGRaster. - IPC_MESSAGE_CONTROL4(ChromeUtilityMsg_RenderPDFPagesToPWGRaster, - IPC::PlatformFileForTransit, /* Input PDF file */ -@@ -99,23 +82,32 @@ IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterCapsAndDefaults, - // sandbox. Returns result as printing::PrinterSemanticCapsAndDefaults. - IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterSemanticCapsAndDefaults, - std::string /* printer name */) -+#endif // ENABLE_FULL_PRINTING -+ -+// Windows uses messages for printing even without preview. crbug.com/170859 -+// Primary user of Windows without preview is CEF. crbug.com/417967 -+#if defined(ENABLE_PRINTING) && defined(OS_WIN) -+// Tell the utility process to start rendering the given PDF into a metafile. -+// Utility process would be alive until -+// ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop message. -+IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles, -+ IPC::PlatformFileForTransit, /* input_file */ -+ printing::PdfRenderSettings /* settings */) -+ -+// Requests conversion of the next page. -+IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles_GetPage, -+ int /* page_number */, -+ IPC::PlatformFileForTransit /* output_file */) -+ -+// Requests utility process to stop conversion and exit. -+IPC_MESSAGE_CONTROL0(ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop) -+#endif // ENABLE_PRINTING && OS_WIN - - //------------------------------------------------------------------------------ - // Utility process host messages: - // These are messages from the utility process to the browser. - --#if defined(OS_WIN) --// Reply when the utility process loaded PDF. |page_count| is 0, if loading --// failed. --IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageCount, -- int /* page_count */) -- --// Reply when the utility process rendered the PDF page. --IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageDone, -- bool /* success */, -- double /* scale_factor */) --#endif // OS_WIN -- -+#if defined(ENABLE_FULL_PRINTING) - // Reply when the utility process has succeeded in rendering the PDF to PWG. - IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToPWGRaster_Succeeded) - -@@ -145,5 +137,16 @@ IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed, - IPC_MESSAGE_CONTROL1( - ChromeUtilityHostMsg_GetPrinterSemanticCapsAndDefaults_Failed, - std::string /* printer name */) -- - #endif // ENABLE_FULL_PRINTING -+ -+#if defined(ENABLE_PRINTING) && defined(OS_WIN) -+// Reply when the utility process loaded PDF. |page_count| is 0, if loading -+// failed. -+IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageCount, -+ int /* page_count */) -+ -+// Reply when the utility process rendered the PDF page. -+IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageDone, -+ bool /* success */, -+ double /* scale_factor */) -+#endif // ENABLE_PRINTING && OS_WIN -diff --git content/renderer/pepper/pepper_plugin_instance_impl.cc content/renderer/pepper/pepper_plugin_instance_impl.cc -index 1a57335..4414095 100644 ---- content/renderer/pepper/pepper_plugin_instance_impl.cc -+++ content/renderer/pepper/pepper_plugin_instance_impl.cc -@@ -94,9 +94,7 @@ - #include "ppapi/thunk/ppb_buffer_api.h" - #include "printing/metafile_skia_wrapper.h" - #include "printing/pdf_metafile_skia.h" --#include "printing/units.h" - #include "skia/ext/platform_canvas.h" --#include "skia/ext/platform_device.h" - #include "third_party/WebKit/public/platform/WebCursorInfo.h" - #include "third_party/WebKit/public/platform/WebGamepads.h" - #include "third_party/WebKit/public/platform/WebRect.h" -@@ -120,13 +118,9 @@ - #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" - #include "third_party/WebKit/public/web/WebView.h" - #include "third_party/khronos/GLES2/gl2.h" --#include "third_party/skia/include/core/SkCanvas.h" --#include "third_party/skia/include/core/SkRect.h" - #include "ui/gfx/image/image_skia.h" - #include "ui/gfx/image/image_skia_rep.h" - #include "ui/gfx/range/range.h" --#include "ui/gfx/rect_conversions.h" --#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" - #include "v8/include/v8.h" - - #if defined(OS_CHROMEOS) -@@ -137,8 +131,6 @@ - #include "base/metrics/histogram.h" - #include "base/win/windows_version.h" - #include "skia/ext/platform_canvas.h" --#include "ui/gfx/codec/jpeg_codec.h" --#include "ui/gfx/gdi_util.h" - #endif - - using base::StringPrintf; -@@ -186,35 +178,6 @@ using blink::WebView; - - namespace content { - --#if defined(OS_WIN) --// Exported by pdf.dll --typedef bool (*RenderPDFPageToDCProc)(const unsigned char* pdf_buffer, -- int buffer_size, -- int page_number, -- HDC dc, -- int dpi_x, -- int dpi_y, -- int bounds_origin_x, -- int bounds_origin_y, -- int bounds_width, -- int bounds_height, -- bool fit_to_bounds, -- bool stretch_to_bounds, -- bool keep_aspect_ratio, -- bool center_in_bounds, -- bool autorotate); -- --void DrawEmptyRectangle(HDC dc) { -- // TODO(sanjeevr): This is a temporary hack. If we output a JPEG -- // to the EMF, the EnumEnhMetaFile call fails in the browser -- // process. The failure also happens if we output nothing here. -- // We need to investigate the reason for this failure and fix it. -- // In the meantime this temporary hack of drawing an empty -- // rectangle in the DC gets us by. -- Rectangle(dc, 0, 0, 0, 0); --} --#endif // defined(OS_WIN) -- - namespace { - - // Check PP_TextInput_Type and ui::TextInputType are kept in sync. -@@ -1782,7 +1745,7 @@ int PepperPluginInstanceImpl::PrintBegin(const WebPrintParams& print_params) { - - bool PepperPluginInstanceImpl::PrintPage(int page_number, - blink::WebCanvas* canvas) { --#if defined(ENABLE_FULL_PRINTING) -+#if defined(ENABLE_PRINTING) - DCHECK(plugin_print_interface_); - PP_PrintPageNumberRange_Dev page_range; - page_range.first_page_number = page_range.last_page_number = page_number; -@@ -1799,7 +1762,7 @@ bool PepperPluginInstanceImpl::PrintPage(int page_number, - } else { - return PrintPageHelper(&page_range, 1, canvas); - } --#else // defined(ENABLED_PRINTING) -+#else // ENABLE_PRINTING - return false; - #endif - } -@@ -1966,7 +1929,7 @@ bool PepperPluginInstanceImpl::IsViewAccelerated() { - - bool PepperPluginInstanceImpl::PrintPDFOutput(PP_Resource print_output, - blink::WebCanvas* canvas) { --#if defined(ENABLE_FULL_PRINTING) -+#if defined(ENABLE_PRINTING) - ppapi::thunk::EnterResourceNoLock enter(print_output, true); - if (enter.failed()) - return false; -@@ -1976,91 +1939,15 @@ bool PepperPluginInstanceImpl::PrintPDFOutput(PP_Resource print_output, - NOTREACHED(); - return false; - } --#if defined(OS_WIN) -- // For Windows, we need the PDF DLL to render the output PDF to a DC. -- HMODULE pdf_module = GetModuleHandle(L"pdf.dll"); -- if (!pdf_module) -- return false; -- RenderPDFPageToDCProc render_proc = reinterpret_cast( -- GetProcAddress(pdf_module, "RenderPDFPageToDC")); -- if (!render_proc) -- return false; --#endif // defined(OS_WIN) - -- bool ret = false; --#if defined(OS_POSIX) && !defined(OS_ANDROID) - printing::PdfMetafileSkia* metafile = - printing::MetafileSkiaWrapper::GetMetafileFromCanvas(*canvas); -- DCHECK(metafile != NULL); - if (metafile) -- ret = metafile->InitFromData(mapper.data(), mapper.size()); --#elif defined(OS_WIN) -- printing::PdfMetafileSkia* metafile = -- printing::MetafileSkiaWrapper::GetMetafileFromCanvas(*canvas); -- if (metafile) { -- // We only have a metafile when doing print preview, so we just want to -- // pass the PDF off to preview. -- ret = metafile->InitFromData(mapper.data(), mapper.size()); -- } else { -- // On Windows, we now need to render the PDF to the DC that backs the -- // supplied canvas. -- HDC dc = skia::BeginPlatformPaint(canvas); -- DrawEmptyRectangle(dc); -- gfx::Size size_in_pixels; -- size_in_pixels.set_width( -- printing::ConvertUnit(current_print_settings_.printable_area.size.width, -- static_cast(printing::kPointsPerInch), -- current_print_settings_.dpi)); -- size_in_pixels.set_height(printing::ConvertUnit( -- current_print_settings_.printable_area.size.height, -- static_cast(printing::kPointsPerInch), -- current_print_settings_.dpi)); -- // We need to scale down DC to fit an entire page into DC available area. -- // First, we'll try to use default scaling based on the 72dpi that is -- // used in webkit for printing. -- // If default scaling is not enough to fit the entire PDF without -- // Current metafile is based on screen DC and have current screen size. -- // Writing outside of those boundaries will result in the cut-off output. -- // On metafiles (this is the case here), scaling down will still record -- // original coordinates and we'll be able to print in full resolution. -- // Before playback we'll need to counter the scaling up that will happen -- // in the browser (printed_document_win.cc). -- double dynamic_scale = gfx::CalculatePageScale( -- dc, size_in_pixels.width(), size_in_pixels.height()); -- double page_scale = static_cast(printing::kPointsPerInch) / -- static_cast(current_print_settings_.dpi); -- -- if (dynamic_scale < page_scale) { -- page_scale = dynamic_scale; -- printing::MetafileSkiaWrapper::SetCustomScaleOnCanvas(*canvas, -- page_scale); -- } -- -- gfx::ScaleDC(dc, page_scale); -- -- ret = render_proc(static_cast(mapper.data()), -- mapper.size(), -- 0, -- dc, -- current_print_settings_.dpi, -- current_print_settings_.dpi, -- 0, -- 0, -- size_in_pixels.width(), -- size_in_pixels.height(), -- true, -- false, -- true, -- true, -- true); -- skia::EndPlatformPaint(canvas); -- } --#endif // defined(OS_WIN) -+ return metafile->InitFromData(mapper.data(), mapper.size()); - -- return ret; --#else // defined(ENABLE_FULL_PRINTING) -+ NOTREACHED(); -+#endif // ENABLE_PRINTING - return false; --#endif - } - - void PepperPluginInstanceImpl::UpdateLayer(bool device_changed) { diff --git a/patch/patches/public_browser_1161_1257.patch b/patch/patches/public_browser_1161_1257.patch index a8e7bcebb..14b5ebc05 100644 --- a/patch/patches/public_browser_1161_1257.patch +++ b/patch/patches/public_browser_1161_1257.patch @@ -1,8 +1,8 @@ diff --git content_browser_client.cc content_browser_client.cc -index a72bc67..ff64d68 100644 +index 728d822..cbbd248 100644 --- content_browser_client.cc +++ content_browser_client.cc -@@ -276,6 +276,10 @@ bool ContentBrowserClient::IsFastShutdownPossible() { +@@ -273,6 +273,10 @@ bool ContentBrowserClient::IsFastShutdownPossible() { return true; } @@ -14,10 +14,10 @@ index a72bc67..ff64d68 100644 return base::FilePath(); } diff --git content_browser_client.h content_browser_client.h -index 455bff9..a8c80fc 100644 +index 5a27d98..74184f1 100644 --- content_browser_client.h +++ content_browser_client.h -@@ -27,6 +27,7 @@ +@@ -28,6 +28,7 @@ #include "net/url_request/url_request_interceptor.h" #include "net/url_request/url_request_job_factory.h" #include "storage/browser/fileapi/file_system_context.h" @@ -25,7 +25,7 @@ index 455bff9..a8c80fc 100644 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" #include "ui/base/window_open_disposition.h" -@@ -527,6 +528,9 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -507,6 +508,9 @@ class CONTENT_EXPORT ContentBrowserClient { // Clears browser cookies. virtual void ClearCookies(RenderViewHost* rvh) {} @@ -62,7 +62,7 @@ index 7afc338..c014439 100644 WebContents::CreateParams::~CreateParams() { } diff --git web_contents.h web_contents.h -index 4f0d625..01083ac 100644 +index 5478a37..d34c1da 100644 --- web_contents.h +++ web_contents.h @@ -52,9 +52,11 @@ class PageState; @@ -104,7 +104,7 @@ index f264df7..bded79a 100644 } diff --git web_contents_delegate.h web_contents_delegate.h -index 2cfcdf7..7adde8e 100644 +index bcd5caf..35b8934 100644 --- web_contents_delegate.h +++ web_contents_delegate.h @@ -36,9 +36,11 @@ class DownloadItem; diff --git a/patch/patches/spellcheck_137.patch b/patch/patches/spellcheck_137.patch index f5339541f..17d1888e0 100644 --- a/patch/patches/spellcheck_137.patch +++ b/patch/patches/spellcheck_137.patch @@ -26,7 +26,7 @@ index 8df78f4..909840e 100644 SpellcheckServiceFactory::SpellcheckServiceFactory() diff --git spellcheck_factory.h spellcheck_factory.h -index d2f4679..c1a790c 100644 +index 3e4ad0e..d52b881 100644 --- spellcheck_factory.h +++ spellcheck_factory.h @@ -7,7 +7,7 @@ @@ -46,4 +46,4 @@ index d2f4679..c1a790c 100644 + friend struct base::DefaultLazyInstanceTraits; SpellcheckServiceFactory(); - virtual ~SpellcheckServiceFactory(); + ~SpellcheckServiceFactory() override; diff --git a/patch/patches/spi_webcore_364.patch b/patch/patches/spi_webcore_364.patch index f1caadd42..14607b31e 100644 --- a/patch/patches/spi_webcore_364.patch +++ b/patch/patches/spi_webcore_364.patch @@ -1,8 +1,8 @@ diff --git core/frame/FrameView.cpp core/frame/FrameView.cpp -index 3a1981b..95cb146 100644 +index 8a77e1c..06e6c47 100644 --- core/frame/FrameView.cpp +++ core/frame/FrameView.cpp -@@ -129,8 +129,10 @@ FrameView::FrameView(LocalFrame* frame) +@@ -145,8 +145,10 @@ FrameView::FrameView(LocalFrame* frame) if (!m_frame->isMainFrame()) return; @@ -12,7 +12,7 @@ index 3a1981b..95cb146 100644 +#endif } - PassRefPtr FrameView::create(LocalFrame* frame) + PassRefPtrWillBeRawPtr FrameView::create(LocalFrame* frame) diff --git platform/scroll/ScrollbarThemeMacCommon.mm platform/scroll/ScrollbarThemeMacCommon.mm index 90abb7c..6bb16c6 100644 --- platform/scroll/ScrollbarThemeMacCommon.mm diff --git a/patch/patches/views_widget_180.patch b/patch/patches/views_widget_180.patch index c7f99a23a..e8556c0f6 100644 --- a/patch/patches/views_widget_180.patch +++ b/patch/patches/views_widget_180.patch @@ -1,8 +1,8 @@ diff --git desktop_aura/desktop_screen_win.cc desktop_aura/desktop_screen_win.cc -index aede179..abad021 100644 +index a8e088c..838b6a0 100644 --- desktop_aura/desktop_screen_win.cc +++ desktop_aura/desktop_screen_win.cc -@@ -36,6 +36,8 @@ gfx::Display DesktopScreenWin::GetDisplayMatching( +@@ -32,6 +32,8 @@ gfx::Display DesktopScreenWin::GetDisplayMatching( } HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const { @@ -11,22 +11,8 @@ index aede179..abad021 100644 aura::WindowTreeHost* host = window->GetHost(); return host ? host->GetAcceleratedWidget() : NULL; } -diff --git desktop_aura/desktop_screen_x11.cc desktop_aura/desktop_screen_x11.cc -index f4c03da..bb253cf 100644 ---- desktop_aura/desktop_screen_x11.cc -+++ desktop_aura/desktop_screen_x11.cc -@@ -157,6 +157,9 @@ std::vector DesktopScreenX11::GetAllDisplays() const { - - gfx::Display DesktopScreenX11::GetDisplayNearestWindow( - gfx::NativeView window) const { -+ if (!window) -+ return GetPrimaryDisplay(); -+ - // Getting screen bounds here safely is hard. - // - // You'd think we'd be able to just call window->GetBoundsInScreen(), but we diff --git desktop_aura/desktop_window_tree_host_win.cc desktop_aura/desktop_window_tree_host_win.cc -index d184ae4..92ffd42 100644 +index 8fac698..11dcd60 100644 --- desktop_aura/desktop_window_tree_host_win.cc +++ desktop_aura/desktop_window_tree_host_win.cc @@ -131,7 +131,9 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window, @@ -40,7 +26,7 @@ index d184ae4..92ffd42 100644 parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget(); message_handler_->set_remove_standard_frame(params.remove_standard_frame); -@@ -822,6 +824,7 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -818,6 +820,7 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { // TODO(beng): inform the native_widget_delegate_. @@ -48,7 +34,7 @@ index d184ae4..92ffd42 100644 InputMethod* input_method = GetInputMethod(); if (input_method) input_method->OnFocus(); -@@ -829,6 +832,7 @@ void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { +@@ -825,6 +828,7 @@ void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) { // TODO(beng): inform the native_widget_delegate_. @@ -57,10 +43,10 @@ index d184ae4..92ffd42 100644 if (input_method) input_method->OnBlur(); diff --git desktop_aura/desktop_window_tree_host_x11.cc desktop_aura/desktop_window_tree_host_x11.cc -index 9831992..23a00a9 100644 +index 3c99281..e6c56b7 100644 --- desktop_aura/desktop_window_tree_host_x11.cc +++ desktop_aura/desktop_window_tree_host_x11.cc -@@ -147,7 +147,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( +@@ -150,7 +150,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( window_shape_(NULL), custom_window_shape_(false), urgency_hint_set_(false), @@ -70,7 +56,7 @@ index 9831992..23a00a9 100644 } DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() { -@@ -350,7 +351,8 @@ void DesktopWindowTreeHostX11::CloseNow() { +@@ -353,7 +354,8 @@ void DesktopWindowTreeHostX11::CloseNow() { // Actually free our native resources. if (ui::PlatformEventSource::GetInstance()) ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); @@ -80,7 +66,7 @@ index 9831992..23a00a9 100644 xwindow_ = None; desktop_native_widget_aura_->OnHostClosed(); -@@ -444,6 +446,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement( +@@ -447,6 +449,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement( } gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const { @@ -89,7 +75,7 @@ index 9831992..23a00a9 100644 return bounds_; } -@@ -456,6 +460,8 @@ gfx::Rect DesktopWindowTreeHostX11::GetClientAreaBoundsInScreen() const { +@@ -459,6 +463,8 @@ gfx::Rect DesktopWindowTreeHostX11::GetClientAreaBoundsInScreen() const { // Attempts to calculate the rect by asking the NonClientFrameView what it // thought its GetBoundsForClientView() were broke combobox drop down // placement. @@ -98,7 +84,7 @@ index 9831992..23a00a9 100644 return bounds_; } -@@ -879,6 +885,8 @@ void DesktopWindowTreeHostX11::Hide() { +@@ -882,6 +888,8 @@ void DesktopWindowTreeHostX11::Hide() { } gfx::Rect DesktopWindowTreeHostX11::GetBounds() const { @@ -107,7 +93,7 @@ index 9831992..23a00a9 100644 return bounds_; } -@@ -933,6 +941,8 @@ void DesktopWindowTreeHostX11::SetBounds(const gfx::Rect& requested_bounds) { +@@ -937,6 +945,8 @@ void DesktopWindowTreeHostX11::SetBounds(const gfx::Rect& requested_bounds) { } gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const { @@ -116,7 +102,7 @@ index 9831992..23a00a9 100644 return bounds_.origin(); } -@@ -1085,10 +1095,14 @@ void DesktopWindowTreeHostX11::InitX11Window( +@@ -1056,10 +1066,14 @@ void DesktopWindowTreeHostX11::InitX11Window( } } @@ -132,7 +118,7 @@ index 9831992..23a00a9 100644 bounds_.x(), bounds_.y(), bounds_.width(), bounds_.height(), 0, // border width -@@ -1706,6 +1720,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( +@@ -1695,6 +1709,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( } break; } @@ -144,7 +130,7 @@ index 9831992..23a00a9 100644 if (xev->xfocus.mode != NotifyGrab) { ReleaseCapture(); diff --git desktop_aura/desktop_window_tree_host_x11.h desktop_aura/desktop_window_tree_host_x11.h -index 8a5e51f..4d5a777 100644 +index 1a4f725..c7ad0148 100644 --- desktop_aura/desktop_window_tree_host_x11.h +++ desktop_aura/desktop_window_tree_host_x11.h @@ -85,6 +85,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 @@ -155,8 +141,8 @@ index 8a5e51f..4d5a777 100644 + protected: // Overridden from DesktopWindowTreeHost: - virtual void Init(aura::Window* content_window, -@@ -256,6 +258,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 + void Init(aura::Window* content_window, +@@ -253,6 +255,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 // The bounds of |xwindow_|. gfx::Rect bounds_; @@ -166,7 +152,7 @@ index 8a5e51f..4d5a777 100644 // Whenever the bounds are set, we keep the previous set of bounds around so // we can have a better chance of getting the real |restored_bounds_|. Window // managers tend to send a Configure message with the maximized bounds, and -@@ -340,6 +345,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 +@@ -337,6 +342,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 base::WeakPtrFactory close_widget_factory_; @@ -177,26 +163,26 @@ index 8a5e51f..4d5a777 100644 }; diff --git widget.cc widget.cc -index 8a9fa71..1e7536e 100644 +index 7f649c0..5352f6a 100644 --- widget.cc +++ widget.cc -@@ -116,6 +116,7 @@ Widget::InitParams::InitParams() +@@ -109,6 +109,7 @@ Widget::InitParams::InitParams() + use_system_default_icon(false), show_state(ui::SHOW_STATE_DEFAULT), - double_buffer(false), parent(NULL), + parent_widget(gfx::kNullAcceleratedWidget), native_widget(NULL), desktop_window_tree_host(NULL), layer_type(aura::WINDOW_LAYER_TEXTURED), -@@ -140,6 +141,7 @@ Widget::InitParams::InitParams(Type type) +@@ -132,6 +133,7 @@ Widget::InitParams::InitParams(Type type) + use_system_default_icon(false), show_state(ui::SHOW_STATE_DEFAULT), - double_buffer(false), parent(NULL), + parent_widget(gfx::kNullAcceleratedWidget), native_widget(NULL), desktop_window_tree_host(NULL), layer_type(aura::WINDOW_LAYER_TEXTURED), -@@ -314,7 +316,7 @@ void Widget::Init(const InitParams& in_params) { +@@ -306,7 +308,7 @@ void Widget::Init(const InitParams& in_params) { InitParams params = in_params; params.child |= (params.type == InitParams::TYPE_CONTROL); @@ -205,7 +191,7 @@ index 8a9fa71..1e7536e 100644 if (params.opacity == views::Widget::InitParams::INFER_OPACITY && params.type != views::Widget::InitParams::TYPE_WINDOW && -@@ -375,7 +377,12 @@ void Widget::Init(const InitParams& in_params) { +@@ -367,7 +369,12 @@ void Widget::Init(const InitParams& in_params) { Minimize(); } else if (params.delegate) { SetContentsView(params.delegate->GetContentsView()); @@ -220,12 +206,12 @@ index 8a9fa71..1e7536e 100644 // This must come after SetContentsView() or it might not be able to find // the correct NativeTheme (on Linux). See http://crbug.com/384492 diff --git widget.h widget.h -index 96ab8b2..1cbd5d8 100644 +index e208d5f..89c9cac 100644 --- widget.h +++ widget.h -@@ -225,6 +225,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, - // Should the widget be double buffered? Default is false. - bool double_buffer; +@@ -235,6 +235,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, + // Whether the widget should be maximized or minimized. + ui::WindowShowState show_state; gfx::NativeView parent; + gfx::AcceleratedWidget parent_widget; // Specifies the initial bounds of the Widget. Default is empty, which means diff --git a/patch/patches/webkit_platform_mac_328814.patch b/patch/patches/webkit_platform_mac_328814.patch index 2d86b47dc..2dcfbbb83 100644 --- a/patch/patches/webkit_platform_mac_328814.patch +++ b/patch/patches/webkit_platform_mac_328814.patch @@ -1,5 +1,5 @@ diff --git ThemeMac.mm ThemeMac.mm -index a405ba5..e20144d 100644 +index 5f2596f..8ecf698 100644 --- ThemeMac.mm +++ ThemeMac.mm @@ -490,7 +490,7 @@ static void paintButton(ControlPart part, ControlStates states, GraphicsContext* diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index eae7e0c5c..505c814fc 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,8 +1,8 @@ diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp -index ee5bdbe..919addf 100644 +index e0dc3d4..4789bc7 100644 --- Source/web/ChromeClientImpl.cpp +++ Source/web/ChromeClientImpl.cpp -@@ -728,7 +728,7 @@ bool ChromeClientImpl::hasOpenedPopup() const +@@ -724,7 +724,7 @@ bool ChromeClientImpl::hasOpenedPopup() const PassRefPtrWillBeRawPtr ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) const { @@ -12,10 +12,10 @@ index ee5bdbe..919addf 100644 return adoptRefWillBeNoop(new PopupMenuChromium(frame, client)); diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp -index c9ca40a..9cff683 100644 +index 722513b..a36ca46 100644 --- Source/web/WebViewImpl.cpp +++ Source/web/WebViewImpl.cpp -@@ -386,6 +386,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) +@@ -385,6 +385,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) , m_fakePageScaleAnimationPageScaleFactor(0) , m_fakePageScaleAnimationUseAnchor(false) , m_contextMenuAllowed(false) @@ -23,7 +23,7 @@ index c9ca40a..9cff683 100644 , m_doingDragAndDrop(false) , m_ignoreInputEvents(false) , m_compositorDeviceScaleFactorOverride(0) -@@ -3919,9 +3920,14 @@ void WebViewImpl::deviceOrPageScaleFactorChanged() +@@ -3971,9 +3972,14 @@ void WebViewImpl::deviceOrPageScaleFactorChanged() m_page->inspectorController().deviceOrPageScaleFactorChanged(); } @@ -40,10 +40,10 @@ index c9ca40a..9cff683 100644 void WebViewImpl::startDragging(LocalFrame* frame, diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h -index 9bd645b..5da0cae 100644 +index e3b2985..13a6ee0 100644 --- Source/web/WebViewImpl.h +++ Source/web/WebViewImpl.h -@@ -372,7 +372,8 @@ public: +@@ -373,7 +373,8 @@ public: // Returns true if popup menus should be rendered by the browser, false if // they should be rendered by WebKit (which is the default). @@ -53,7 +53,7 @@ index 9bd645b..5da0cae 100644 bool contextMenuAllowed() const { -@@ -660,6 +661,8 @@ private: +@@ -662,6 +663,8 @@ private: bool m_contextMenuAllowed; diff --git a/tests/unittests/browser_info_map_unittest.cc b/tests/unittests/browser_info_map_unittest.cc index bcb8b9655..cede17bec 100644 --- a/tests/unittests/browser_info_map_unittest.cc +++ b/tests/unittests/browser_info_map_unittest.cc @@ -36,10 +36,10 @@ class MyVisitor : public MyObjectMap::Visitor { remove_browser_id_(remove_browser_id), remove_info_id_(remove_info_id) {} - virtual bool OnNextInfo(int browser_id, - InfoIdType info_id, - InfoObjectType info, - bool* remove) OVERRIDE { + bool OnNextInfo(int browser_id, + InfoIdType info_id, + InfoObjectType info, + bool* remove) override { Info info_rec; info_rec.browser_id = browser_id; info_rec.info_id = info_id; diff --git a/tests/unittests/cookie_unittest.cc b/tests/unittests/cookie_unittest.cc index 15d148862..7599753d2 100644 --- a/tests/unittests/cookie_unittest.cc +++ b/tests/unittests/cookie_unittest.cc @@ -52,12 +52,12 @@ class TestVisitor : public CefCookieVisitor { delete_cookies_(deleteCookies), event_(event) { } - virtual ~TestVisitor() { + ~TestVisitor() override { event_->Signal(); } - virtual bool Visit(const CefCookie& cookie, int count, int total, - bool& deleteCookie) { + bool Visit(const CefCookie& cookie, int count, int total, + bool& deleteCookie) override { cookies_->push_back(cookie); if (delete_cookies_) deleteCookie = true; @@ -586,7 +586,7 @@ class TestCompletionCallback : public CefCompletionCallback { explicit TestCompletionCallback(base::WaitableEvent* event) : event_(event) {} - virtual void OnComplete() OVERRIDE { + void OnComplete() override { event_->Signal(); } @@ -671,7 +671,7 @@ class CookieTestJSHandler : public TestHandler { explicit RequestContextHandler(CookieTestJSHandler* handler) : handler_(handler) {} - virtual CefRefPtr GetCookieManager() OVERRIDE { + CefRefPtr GetCookieManager() override { EXPECT_TRUE(handler_); EXPECT_TRUE(CefCurrentlyOn(TID_IO)); @@ -703,7 +703,7 @@ class CookieTestJSHandler : public TestHandler { CookieTestJSHandler() {} - virtual void RunTest() OVERRIDE { + void RunTest() override { // Create =new in-memory managers. manager1_ = CefCookieManager::CreateManager(CefString(), false); manager2_ = CefCookieManager::CreateManager(CefString(), false); @@ -732,9 +732,9 @@ class CookieTestJSHandler : public TestHandler { CefRequestContext::CreateContext(context_handler_.get())); } - virtual void OnLoadEnd(CefRefPtr browser, - CefRefPtr frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr browser, + CefRefPtr frame, + int httpStatusCode) override { std::string url = frame->GetURL(); if (url == kCookieJSUrl1) { got_load_end1_.yes(); @@ -751,7 +751,7 @@ class CookieTestJSHandler : public TestHandler { } } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { context_handler_->Detach(); context_handler_ = NULL; @@ -815,9 +815,8 @@ class CookieTestSchemeHandler : public TestHandler { : handler_(handler), offset_(0) {} - virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback) - OVERRIDE { + bool ProcessRequest(CefRefPtr request, + CefRefPtr callback) override { std::string url = request->GetURL(); if (url == handler_->url1_) { content_ = "COOKIE TEST1"; @@ -843,9 +842,9 @@ class CookieTestSchemeHandler : public TestHandler { return true; } - virtual void GetResponseHeaders(CefRefPtr response, - int64& response_length, - CefString& redirectUrl) OVERRIDE { + void GetResponseHeaders(CefRefPtr response, + int64& response_length, + CefString& redirectUrl) override { response_length = content_.size(); response->SetStatus(200); @@ -859,11 +858,10 @@ class CookieTestSchemeHandler : public TestHandler { } } - virtual bool ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr callback) - OVERRIDE { + bool ReadResponse(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr callback) override { bool has_data = false; bytes_read = 0; @@ -881,7 +879,7 @@ class CookieTestSchemeHandler : public TestHandler { return has_data; } - virtual void Cancel() OVERRIDE { + void Cancel() override { } private: @@ -898,11 +896,11 @@ class CookieTestSchemeHandler : public TestHandler { explicit SchemeHandlerFactory(CookieTestSchemeHandler* handler) : handler_(handler) {} - virtual CefRefPtr Create( + CefRefPtr Create( CefRefPtr browser, CefRefPtr frame, const CefString& scheme_name, - CefRefPtr request) OVERRIDE { + CefRefPtr request) override { std::string url = request->GetURL(); if (url == handler_->url3_) { // Verify that the cookie was not passed in. @@ -927,7 +925,7 @@ class CookieTestSchemeHandler : public TestHandler { explicit RequestContextHandler(CookieTestSchemeHandler* handler) : handler_(handler) {} - virtual CefRefPtr GetCookieManager() OVERRIDE { + CefRefPtr GetCookieManager() override { EXPECT_TRUE(handler_); EXPECT_TRUE(CefCurrentlyOn(TID_IO)); @@ -963,7 +961,7 @@ class CookieTestSchemeHandler : public TestHandler { url3_ = scheme + "://cookie-tests/cookie3.html"; } - virtual void RunTest() OVERRIDE { + void RunTest() override { // Create new in-memory managers. manager1_ = CefCookieManager::CreateManager(CefString(), false); manager2_ = CefCookieManager::CreateManager(CefString(), false); @@ -990,9 +988,9 @@ class CookieTestSchemeHandler : public TestHandler { CefRequestContext::CreateContext(context_handler_.get())); } - virtual void OnLoadEnd(CefRefPtr browser, - CefRefPtr frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr browser, + CefRefPtr frame, + int httpStatusCode) override { std::string url = frame->GetURL(); if (url == url1_) { got_load_end1_.yes(); @@ -1019,7 +1017,7 @@ class CookieTestSchemeHandler : public TestHandler { } } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { context_handler_->Detach(); context_handler_ = NULL; diff --git a/tests/unittests/dialog_unittest.cc b/tests/unittests/dialog_unittest.cc index 4a1c982f7..53b2b89ff 100644 --- a/tests/unittests/dialog_unittest.cc +++ b/tests/unittests/dialog_unittest.cc @@ -45,9 +45,9 @@ class DialogTestHandler : public TestHandler { : handler_(handler) { } - virtual void OnFileDialogDismissed( + void OnFileDialogDismissed( CefRefPtr browser_host, - const std::vector& file_paths) OVERRIDE { + const std::vector& file_paths) override { handler_->got_onfiledialogdismissed_.yes(); std::string url = browser_host->GetBrowser()->GetMainFrame()->GetURL(); @@ -72,16 +72,16 @@ class DialogTestHandler : public TestHandler { : config_(config) { } - virtual void RunTest() OVERRIDE { + void RunTest() override { AddResource(kTestUrl, "TEST", "text/html"); // Create the browser CreateBrowser(kTestUrl); } - virtual void OnLoadEnd(CefRefPtr browser, - CefRefPtr frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr browser, + CefRefPtr frame, + int httpStatusCode) override { browser->GetHost()->RunFileDialog(config_.mode, config_.title, config_.default_file_name, @@ -97,13 +97,13 @@ class DialogTestHandler : public TestHandler { } // CefDialogHandler - virtual bool OnFileDialog( + bool OnFileDialog( CefRefPtr browser, FileDialogMode mode, const CefString& title, const CefString& default_file_name, const std::vector& accept_types, - CefRefPtr callback) OVERRIDE { + CefRefPtr callback) override { got_onfiledialog_.yes(); std::string url = browser->GetMainFrame()->GetURL(); @@ -125,7 +125,7 @@ class DialogTestHandler : public TestHandler { return true; } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { EXPECT_TRUE(got_onfiledialog_); EXPECT_TRUE(got_onfiledialogdismissed_); diff --git a/tests/unittests/display_unittest.cc b/tests/unittests/display_unittest.cc index ffd17ab9c..54a3fdff2 100644 --- a/tests/unittests/display_unittest.cc +++ b/tests/unittests/display_unittest.cc @@ -31,7 +31,7 @@ class TitleTestHandler : public TestHandler { TitleTestHandler() : step_(0) {} - virtual void RunTest() OVERRIDE { + void RunTest() override { // Add the resources that we will navigate to/from. AddResource(kTitleUrl1, "" + std::string(kTitleStr1) + @@ -47,8 +47,8 @@ class TitleTestHandler : public TestHandler { CreateBrowser(kTitleUrl1); } - virtual void OnTitleChange(CefRefPtr<CefBrowser> browser, - const CefString& title) OVERRIDE { + void OnTitleChange(CefRefPtr<CefBrowser> browser, + const CefString& title) override { std::string title_str = title; if (step_ == 0 || step_ == 2) { EXPECT_STREQ(kTitleStr1, title_str.c_str()); @@ -69,9 +69,9 @@ class TitleTestHandler : public TestHandler { DestroyTest(); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { switch (step_++) { case 0: frame->LoadURL(kTitleUrl2); @@ -91,7 +91,7 @@ class TitleTestHandler : public TestHandler { } private: - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { for (int i = 0; i < 5; ++i) EXPECT_TRUE(got_title_[i]) << "step " << i; diff --git a/tests/unittests/dom_unittest.cc b/tests/unittests/dom_unittest.cc index 8a76547c3..2c0d893cb 100644 --- a/tests/unittests/dom_unittest.cc +++ b/tests/unittests/dom_unittest.cc @@ -196,7 +196,7 @@ class TestDOMVisitor : public CefDOMVisitor { ASSERT_FALSE(h1Node->SetValue("Something Different")); } - virtual void Visit(CefRefPtr<CefDOMDocument> document) OVERRIDE { + void Visit(CefRefPtr<CefDOMDocument> document) override { if (test_type_ == DOM_TEST_STRUCTURE) TestStructure(document); else if (test_type_ == DOM_TEST_MODIFY) @@ -230,11 +230,11 @@ class DOMRendererTest : public ClientApp::RenderDelegate { DOMRendererTest() { } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<ClientApp> app, CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { if (message->GetName() == kTestMessage) { EXPECT_EQ(message->GetArgumentList()->GetSize(), (size_t)1); int test_type = message->GetArgumentList()->GetInt(0); @@ -257,7 +257,7 @@ class TestDOMHandler : public TestHandler { : test_type_(test) { } - virtual void RunTest() OVERRIDE { + void RunTest() override { std::stringstream mainHtml; mainHtml << "<html>" @@ -272,9 +272,9 @@ class TestDOMHandler : public TestHandler { CreateBrowser(kTestUrl); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { if (frame->IsMain()) { // Start the test in the render process. CefRefPtr<CefProcessMessage> message( @@ -284,10 +284,10 @@ class TestDOMHandler : public TestHandler { } } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { EXPECT_STREQ(message->GetName().ToString().c_str(), kTestMessage); got_message_.yes(); diff --git a/tests/unittests/download_unittest.cc b/tests/unittests/download_unittest.cc index 771b50d6a..719b523c2 100644 --- a/tests/unittests/download_unittest.cc +++ b/tests/unittests/download_unittest.cc @@ -5,7 +5,7 @@ // Include this first to avoid type conflicts with CEF headers. #include "tests/unittests/chromium_includes.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "include/cef_scheme.h" @@ -29,9 +29,8 @@ class DownloadSchemeHandler : public CefResourceHandler { : got_download_request_(got_download_request), offset_(0) {} - virtual bool ProcessRequest(CefRefPtr<CefRequest> request, - CefRefPtr<CefCallback> callback) - OVERRIDE { + bool ProcessRequest(CefRefPtr<CefRequest> request, + CefRefPtr<CefCallback> callback) override { std::string url = request->GetURL(); if (url == kTestEntryUrl) { content_ = "<html><body>Download Test</body></html>"; @@ -50,9 +49,9 @@ class DownloadSchemeHandler : public CefResourceHandler { return true; } - virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, - int64& response_length, - CefString& redirectUrl) OVERRIDE { + void GetResponseHeaders(CefRefPtr<CefResponse> response, + int64& response_length, + CefString& redirectUrl) override { response_length = content_.size(); response->SetStatus(200); @@ -67,11 +66,10 @@ class DownloadSchemeHandler : public CefResourceHandler { } } - virtual bool ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr<CefCallback> callback) - OVERRIDE { + bool ReadResponse(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr<CefCallback> callback) override { bool has_data = false; bytes_read = 0; @@ -89,7 +87,7 @@ class DownloadSchemeHandler : public CefResourceHandler { return has_data; } - virtual void Cancel() OVERRIDE { + void Cancel() override { } private: @@ -107,11 +105,11 @@ class DownloadSchemeHandlerFactory : public CefSchemeHandlerFactory { explicit DownloadSchemeHandlerFactory(TrackCallback* got_download_request) : got_download_request_(got_download_request) {} - virtual CefRefPtr<CefResourceHandler> Create( + CefRefPtr<CefResourceHandler> Create( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& scheme_name, - CefRefPtr<CefRequest> request) OVERRIDE { + CefRefPtr<CefRequest> request) override { return new DownloadSchemeHandler(got_download_request_); } @@ -125,7 +123,7 @@ class DownloadTestHandler : public TestHandler { public: DownloadTestHandler() {} - virtual void RunTest() OVERRIDE { + void RunTest() override { CefRegisterSchemeHandlerFactory("http", kTestDomain, new DownloadSchemeHandlerFactory(&got_download_request_)); @@ -137,20 +135,20 @@ class DownloadTestHandler : public TestHandler { CreateBrowser(kTestEntryUrl); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { EXPECT_STREQ(kTestEntryUrl, frame->GetURL().ToString().c_str()); // Begin the download. browser->GetHost()->StartDownload(kTestDownloadUrl); } - virtual void OnBeforeDownload( + void OnBeforeDownload( CefRefPtr<CefBrowser> browser, CefRefPtr<CefDownloadItem> download_item, const CefString& suggested_name, - CefRefPtr<CefBeforeDownloadCallback> callback) OVERRIDE { + CefRefPtr<CefBeforeDownloadCallback> callback) override { EXPECT_TRUE(CefCurrentlyOn(TID_UI)); EXPECT_FALSE(got_on_before_download_); @@ -180,10 +178,10 @@ class DownloadTestHandler : public TestHandler { callback->Continue(test_path_.value(), false); } - virtual void OnDownloadUpdated( + void OnDownloadUpdated( CefRefPtr<CefBrowser> browser, CefRefPtr<CefDownloadItem> download_item, - CefRefPtr<CefDownloadItemCallback> callback) OVERRIDE { + CefRefPtr<CefDownloadItemCallback> callback) override { EXPECT_TRUE(CefCurrentlyOn(TID_UI)); got_on_download_updated_.yes(); @@ -228,7 +226,7 @@ class DownloadTestHandler : public TestHandler { } } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { CefRegisterSchemeHandlerFactory("http", kTestDomain, NULL); EXPECT_TRUE(got_download_request_); diff --git a/tests/unittests/frame_unittest.cc b/tests/unittests/frame_unittest.cc index 22e1982fd..47bf43505 100644 --- a/tests/unittests/frame_unittest.cc +++ b/tests/unittests/frame_unittest.cc @@ -268,9 +268,9 @@ class FrameNavBrowserTest : public ClientApp::BrowserDelegate { public: FrameNavBrowserTest() {} - virtual void OnBeforeChildProcessLaunch( + void OnBeforeChildProcessLaunch( CefRefPtr<ClientApp> app, - CefRefPtr<CefCommandLine> command_line) OVERRIDE { + CefRefPtr<CefCommandLine> command_line) override { if (!g_frame_nav_test) return; @@ -294,9 +294,9 @@ class FrameNavRendererTest : public ClientApp::RenderDelegate, : run_test_(false), nav_(0) {} - virtual void OnRenderThreadCreated( + void OnRenderThreadCreated( CefRefPtr<ClientApp> app, - CefRefPtr<CefListValue> extra_info) OVERRIDE { + CefRefPtr<CefListValue> extra_info) override { // The g_* values will be set when running in single-process mode. if (!g_frame_nav_test) { // Check that the test should be run. @@ -325,42 +325,42 @@ class FrameNavRendererTest : public ClientApp::RenderDelegate, factory_ = FrameNavExpectationsFactoryRenderer::FromID(factory_id); } - virtual CefRefPtr<CefLoadHandler> GetLoadHandler( - CefRefPtr<ClientApp> app) OVERRIDE { + CefRefPtr<CefLoadHandler> GetLoadHandler( + CefRefPtr<ClientApp> app) override { if (!run_test_) return NULL; return this; } - virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading, - bool canGoBack, - bool canGoForward) OVERRIDE { + void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading, + bool canGoBack, + bool canGoForward) override { CreateExpectationsIfNecessary(); EXPECT_TRUE(expectations_->OnLoadingStateChange(browser, isLoading)) << "isLoading = " << isLoading << ", nav = " << nav_; } - virtual void OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + void OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { CreateExpectationsIfNecessary(); EXPECT_TRUE(expectations_->OnLoadStart(browser, frame)) << "nav = " << nav_; } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { CreateExpectationsIfNecessary(); EXPECT_TRUE(expectations_->OnLoadEnd(browser, frame)) << "nav = " << nav_; } - virtual bool OnBeforeNavigation(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - cef_navigation_type_t navigation_type, - bool is_redirect) OVERRIDE { + bool OnBeforeNavigation(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + cef_navigation_type_t navigation_type, + bool is_redirect) override { if (!run_test_) return false; @@ -427,13 +427,13 @@ class FrameNavTestHandler : public TestHandler { g_frame_nav_factory_id = factory_id; } - virtual ~FrameNavTestHandler() { + ~FrameNavTestHandler() override { EXPECT_TRUE(got_destroyed_); g_frame_nav_test = false; g_frame_nav_factory_id = FNF_ID_INVALID; } - virtual void RunTest() OVERRIDE { + void RunTest() override { // Create the first expectations object. expectations_ = factory_->Create( nav_, @@ -475,16 +475,16 @@ class FrameNavTestHandler : public TestHandler { browser->GetMainFrame()->LoadURL(expectations_->GetMainURL()); } - virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnAfterCreated(CefRefPtr<CefBrowser> browser) override { TestHandler::OnAfterCreated(browser); EXPECT_TRUE(expectations_->OnAfterCreated(browser)) << "nav = " << nav_; } - virtual CefRefPtr<CefResourceHandler> GetResourceHandler( + CefRefPtr<CefResourceHandler> GetResourceHandler( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + CefRefPtr<CefRequest> request) override { EXPECT_TRUE(expectations_->GetResourceHandler(browser, frame)) << "nav = " << nav_; @@ -499,39 +499,39 @@ class FrameNavTestHandler : public TestHandler { return new CefStreamResourceHandler("text/html", stream); } - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - bool is_redirect) OVERRIDE { + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool is_redirect) override { EXPECT_TRUE(expectations_->OnBeforeBrowse(browser, frame)) << "nav = " << nav_; return false; } - virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading, - bool canGoBack, - bool canGoForward) OVERRIDE { + void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading, + bool canGoBack, + bool canGoForward) override { EXPECT_TRUE(expectations_->OnLoadingStateChange(browser, isLoading)) << "isLoading = " << isLoading << ", nav = " << nav_;; } - virtual void OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + void OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_TRUE(expectations_->OnLoadStart(browser, frame)) << "nav = " << nav_; } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { EXPECT_TRUE(expectations_->OnLoadEnd(browser, frame)) << "nav = " << nav_; } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { if (message->GetName().ToString() == kFrameNavMsg) { // Test that the renderer side succeeded. CefRefPtr<CefListValue> args = message->GetArgumentList(); @@ -546,7 +546,7 @@ class FrameNavTestHandler : public TestHandler { return false; } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { if (got_destroyed_) return; @@ -603,12 +603,12 @@ class FrameNavExpectationsBrowserSingleNav : : FrameNavExpectationsBrowser(nav) { } - virtual ~FrameNavExpectationsBrowserSingleNav() { + ~FrameNavExpectationsBrowserSingleNav() override { EXPECT_TRUE(got_finalize_); } - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { if (isLoading) { EXPECT_FALSE(got_loading_state_change_start_); got_loading_state_change_start_.yes(); @@ -620,44 +620,44 @@ class FrameNavExpectationsBrowserSingleNav : return true; } - virtual bool OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_FALSE(got_load_start_); got_load_start_.yes(); return true; } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_FALSE(got_load_end_); got_load_end_.yes(); SignalCompleteIfDone(browser); return true; } - virtual bool OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + bool OnAfterCreated(CefRefPtr<CefBrowser> browser) override { EXPECT_FALSE(got_after_created_); got_after_created_.yes(); return true; } - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_FALSE(got_before_browse_); got_before_browse_.yes(); return true; } - virtual bool GetResourceHandler(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool GetResourceHandler(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_FALSE(got_get_resource_handler_); got_get_resource_handler_.yes(); return true; } - virtual bool OnRendererComplete(CefRefPtr<CefBrowser> browser, - int renderer_nav, - bool renderer_result) OVERRIDE { + bool OnRendererComplete(CefRefPtr<CefBrowser> browser, + int renderer_nav, + bool renderer_result) override { EXPECT_EQ(nav(), renderer_nav); EXPECT_TRUE(renderer_result); EXPECT_FALSE(got_renderer_done_); @@ -666,7 +666,7 @@ class FrameNavExpectationsBrowserSingleNav : return true; } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_TRUE(got_load_start_); V_EXPECT_TRUE(got_load_end_); @@ -708,12 +708,12 @@ class FrameNavExpectationsRendererSingleNav : : FrameNavExpectationsRenderer(nav) { } - virtual ~FrameNavExpectationsRendererSingleNav() { + ~FrameNavExpectationsRendererSingleNav() override { EXPECT_TRUE(got_finalize_); } - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { if (isLoading) { EXPECT_FALSE(got_loading_state_change_start_); got_loading_state_change_start_.yes(); @@ -725,29 +725,29 @@ class FrameNavExpectationsRendererSingleNav : return true; } - virtual bool OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_FALSE(got_load_start_); got_load_start_.yes(); return true; } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_FALSE(got_load_end_); got_load_end_.yes(); SignalCompleteIfDone(browser); return true; } - virtual bool OnBeforeNavigation(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnBeforeNavigation(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_FALSE(got_before_navigation_); got_before_navigation_.yes(); return true; } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_TRUE(got_load_start_); V_EXPECT_TRUE(got_load_end_); @@ -785,24 +785,24 @@ class FrameNavExpectationsBrowserTestSingleNavHarness : : parent(nav) { } - virtual ~FrameNavExpectationsBrowserTestSingleNavHarness() { + ~FrameNavExpectationsBrowserTestSingleNavHarness() override { EXPECT_TRUE(got_finalize_); } - virtual std::string GetMainURL() OVERRIDE { + std::string GetMainURL() override { EXPECT_FALSE(got_get_main_url_); got_get_main_url_.yes(); return kFrameNavOrigin0; } - virtual std::string GetContentForURL(const std::string& url) OVERRIDE { + std::string GetContentForURL(const std::string& url) override { EXPECT_FALSE(got_get_content_for_url_); got_get_content_for_url_.yes(); EXPECT_STREQ(kFrameNavOrigin0, url.c_str()); return "<html><body>Nav</body></html>"; } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { EXPECT_FALSE(got_finalize_); got_finalize_.yes(); @@ -828,11 +828,11 @@ class FrameNavExpectationsRendererTestSingleNavHarness : : parent(nav) { } - virtual ~FrameNavExpectationsRendererTestSingleNavHarness() { + ~FrameNavExpectationsRendererTestSingleNavHarness() override { EXPECT_TRUE(got_finalize_); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { EXPECT_FALSE(got_finalize_); got_finalize_.yes(); return parent::Finalize(); @@ -847,21 +847,21 @@ class FrameNavExpectationsFactoryBrowserTestSingleNavHarness : public: FrameNavExpectationsFactoryBrowserTestSingleNavHarness() {} - virtual ~FrameNavExpectationsFactoryBrowserTestSingleNavHarness() { + ~FrameNavExpectationsFactoryBrowserTestSingleNavHarness() override { EXPECT_TRUE(got_finalize_); } - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_SINGLE_NAV_HARNESS; } - virtual bool HasMoreNavigations() const OVERRIDE { + bool HasMoreNavigations() const override { EXPECT_FALSE(got_get_browser_navigation_count_); got_get_browser_navigation_count_.yes(); return false; } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { EXPECT_FALSE(got_finalize_); got_finalize_.yes(); @@ -872,7 +872,7 @@ class FrameNavExpectationsFactoryBrowserTestSingleNavHarness : } protected: - virtual scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) override { EXPECT_FALSE(got_create_); got_create_.yes(); return make_scoped_ptr<FrameNavExpectationsBrowser>( @@ -890,12 +890,12 @@ class FrameNavExpectationsFactoryRendererTestSingleNavHarness : public: FrameNavExpectationsFactoryRendererTestSingleNavHarness() {} - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_SINGLE_NAV_HARNESS; } protected: - virtual scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) override { return make_scoped_ptr<FrameNavExpectationsRenderer>( new FrameNavExpectationsRendererTestSingleNavHarness(nav)); } @@ -993,16 +993,16 @@ class FrameNavExpectationsBrowserTestSingleNav : : parent(nav) { } - virtual std::string GetMainURL() OVERRIDE { + std::string GetMainURL() override { return kFrameNavOrigin0; } - virtual std::string GetContentForURL(const std::string& url) OVERRIDE { + std::string GetContentForURL(const std::string& url) override { return "<html><body>Nav</body></html>"; } - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { V_DECLARE(); if (isLoading) { // No frame exists before the first load. @@ -1016,8 +1016,8 @@ class FrameNavExpectationsBrowserTestSingleNav : V_RETURN(); } - virtual bool OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, frame, true, kFrameNavOrigin0)); @@ -1025,8 +1025,8 @@ class FrameNavExpectationsBrowserTestSingleNav : V_RETURN(); } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, frame, true, kFrameNavOrigin0)); @@ -1034,7 +1034,7 @@ class FrameNavExpectationsBrowserTestSingleNav : V_RETURN(); } - virtual bool OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + bool OnAfterCreated(CefRefPtr<CefBrowser> browser) override { V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, NULL, false, std::string())); @@ -1042,8 +1042,8 @@ class FrameNavExpectationsBrowserTestSingleNav : V_RETURN(); } - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, frame, true, std::string())); @@ -1051,8 +1051,8 @@ class FrameNavExpectationsBrowserTestSingleNav : V_RETURN(); } - virtual bool GetResourceHandler(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool GetResourceHandler(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, frame, true, std::string())); @@ -1060,13 +1060,13 @@ class FrameNavExpectationsBrowserTestSingleNav : V_RETURN(); } - virtual bool OnRendererComplete(CefRefPtr<CefBrowser> browser, - int renderer_nav, - bool renderer_result) OVERRIDE { + bool OnRendererComplete(CefRefPtr<CefBrowser> browser, + int renderer_nav, + bool renderer_result) override { return parent::OnRendererComplete(browser, renderer_nav, renderer_result); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { return parent::Finalize(); } }; @@ -1080,8 +1080,8 @@ class FrameNavExpectationsRendererTestSingleNav : : parent(nav) { } - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { V_DECLARE(); // A frame should always exist in the renderer process. if (isLoading) { @@ -1095,8 +1095,8 @@ class FrameNavExpectationsRendererTestSingleNav : V_RETURN(); } - virtual bool OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, frame, true, kFrameNavOrigin0)); @@ -1104,8 +1104,8 @@ class FrameNavExpectationsRendererTestSingleNav : V_RETURN(); } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, frame, true, kFrameNavOrigin0)); @@ -1113,7 +1113,7 @@ class FrameNavExpectationsRendererTestSingleNav : V_RETURN(); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { return parent::Finalize(); } }; @@ -1123,20 +1123,20 @@ class FrameNavExpectationsFactoryBrowserTestSingleNav : public: FrameNavExpectationsFactoryBrowserTestSingleNav() {} - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_SINGLE_NAV; } - virtual bool HasMoreNavigations() const OVERRIDE { + bool HasMoreNavigations() const override { return false; } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { return true; } protected: - virtual scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) override { return make_scoped_ptr<FrameNavExpectationsBrowser>( new FrameNavExpectationsBrowserTestSingleNav(nav)); } @@ -1147,12 +1147,12 @@ class FrameNavExpectationsFactoryRendererTestSingleNav : public: FrameNavExpectationsFactoryRendererTestSingleNav() {} - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_SINGLE_NAV; } protected: - virtual scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) override { return make_scoped_ptr<FrameNavExpectationsRenderer>( new FrameNavExpectationsRendererTestSingleNav(nav)); } @@ -1174,35 +1174,35 @@ class FrameNavExpectationsBrowserMultiNav : : FrameNavExpectationsBrowser(nav) { } - virtual ~FrameNavExpectationsBrowserMultiNav() { + ~FrameNavExpectationsBrowserMultiNav() override { EXPECT_TRUE(got_finalize_); } // Returns true if all navigation is done. virtual bool IsNavigationDone() const =0; - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { if (!isLoading) SignalCompleteIfDone(browser); return true; } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { SignalCompleteIfDone(browser); return true; } - virtual bool OnRendererComplete(CefRefPtr<CefBrowser> browser, - int renderer_nav, - bool renderer_result) OVERRIDE { + bool OnRendererComplete(CefRefPtr<CefBrowser> browser, + int renderer_nav, + bool renderer_result) override { EXPECT_TRUE(renderer_result); SignalCompleteIfDone(browser); return true; } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_FALSE(got_finalize_); @@ -1228,27 +1228,27 @@ class FrameNavExpectationsRendererMultiNav : : FrameNavExpectationsRenderer(nav) { } - virtual ~FrameNavExpectationsRendererMultiNav() { + ~FrameNavExpectationsRendererMultiNav() override { EXPECT_TRUE(got_finalize_); } // Returns true if all navigation is done. virtual bool IsNavigationDone() const =0; - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { if (!isLoading) SignalCompleteIfDone(browser); return true; } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { SignalCompleteIfDone(browser); return true; } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_FALSE(got_finalize_); @@ -1301,31 +1301,31 @@ class FrameNavExpectationsBrowserTestMultiNavHarness : navigation_done_count_(0) { } - virtual ~FrameNavExpectationsBrowserTestMultiNavHarness() { + ~FrameNavExpectationsBrowserTestMultiNavHarness() override { EXPECT_TRUE(got_finalize_); } - virtual std::string GetMainURL() OVERRIDE { + std::string GetMainURL() override { EXPECT_FALSE(got_get_main_url_); got_get_main_url_.yes(); return GetMultiNavURL(kFrameNavOrigin0, nav()); } - virtual std::string GetContentForURL(const std::string& url) OVERRIDE { + std::string GetContentForURL(const std::string& url) override { EXPECT_FALSE(got_get_content_for_url_); got_get_content_for_url_.yes(); EXPECT_STREQ(GetMultiNavURL(kFrameNavOrigin0, nav()).c_str(), url.c_str()); return "<html><body>Nav</body></html>"; } - virtual bool IsNavigationDone() const OVERRIDE { + bool IsNavigationDone() const override { navigation_done_count_++; return got_load_state_change_done_ && got_load_end_ && got_renderer_complete_; } - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { if (!isLoading) { EXPECT_FALSE(got_load_state_change_done_); got_load_state_change_done_.yes(); @@ -1333,29 +1333,29 @@ class FrameNavExpectationsBrowserTestMultiNavHarness : return parent::OnLoadingStateChange(browser, isLoading); } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_FALSE(got_load_end_); got_load_end_.yes(); return parent::OnLoadEnd(browser, frame); } - virtual bool OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + bool OnAfterCreated(CefRefPtr<CefBrowser> browser) override { EXPECT_FALSE(got_on_after_created_); got_on_after_created_.yes(); return parent::OnAfterCreated(browser); } - virtual bool OnRendererComplete(CefRefPtr<CefBrowser> browser, - int renderer_nav, - bool renderer_result) OVERRIDE { + bool OnRendererComplete(CefRefPtr<CefBrowser> browser, + int renderer_nav, + bool renderer_result) override { EXPECT_FALSE(got_renderer_complete_); got_renderer_complete_.yes(); EXPECT_EQ(nav(), renderer_nav); return parent::OnRendererComplete(browser, renderer_nav, renderer_result); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { EXPECT_FALSE(got_finalize_); got_finalize_.yes(); @@ -1396,17 +1396,17 @@ class FrameNavExpectationsRendererTestMultiNavHarness : navigation_done_count_(0) { } - virtual ~FrameNavExpectationsRendererTestMultiNavHarness() { + ~FrameNavExpectationsRendererTestMultiNavHarness() override { EXPECT_TRUE(got_finalize_); } - virtual bool IsNavigationDone() const OVERRIDE { + bool IsNavigationDone() const override { navigation_done_count_++; return got_load_state_change_done_ && got_load_end_; } - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { if (!isLoading) { EXPECT_FALSE(got_load_state_change_done_); got_load_state_change_done_.yes(); @@ -1414,14 +1414,14 @@ class FrameNavExpectationsRendererTestMultiNavHarness : return parent::OnLoadingStateChange(browser, isLoading); } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_FALSE(got_load_end_); got_load_end_.yes(); return parent::OnLoadEnd(browser, frame); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { EXPECT_FALSE(got_finalize_); got_finalize_.yes(); @@ -1447,20 +1447,20 @@ class FrameNavExpectationsFactoryBrowserTestMultiNavHarness : : get_browser_navigation_count_(0), create_count_(0) {} - virtual ~FrameNavExpectationsFactoryBrowserTestMultiNavHarness() { + ~FrameNavExpectationsFactoryBrowserTestMultiNavHarness() override { EXPECT_TRUE(got_finalize_); } - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_MULTI_NAV_HARNESS; } - virtual bool HasMoreNavigations() const OVERRIDE { + bool HasMoreNavigations() const override { get_browser_navigation_count_++; return (get_browser_navigation_count_ < kMaxMultiNavNavigations); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { EXPECT_FALSE(got_finalize_); got_finalize_.yes(); @@ -1471,7 +1471,7 @@ class FrameNavExpectationsFactoryBrowserTestMultiNavHarness : } protected: - virtual scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) override { create_count_++; return make_scoped_ptr<FrameNavExpectationsBrowser>( new FrameNavExpectationsBrowserTestMultiNavHarness(nav)); @@ -1488,12 +1488,12 @@ class FrameNavExpectationsFactoryRendererTestMultiNavHarness : public: FrameNavExpectationsFactoryRendererTestMultiNavHarness() {} - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_MULTI_NAV_HARNESS; } protected: - virtual scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) override { return make_scoped_ptr<FrameNavExpectationsRenderer>( new FrameNavExpectationsRendererTestMultiNavHarness(nav)); } @@ -1517,21 +1517,21 @@ class FrameNavExpectationsBrowserTestMultiNav : : parent(nav) { } - virtual std::string GetMainURL() OVERRIDE { + std::string GetMainURL() override { return GetMultiNavURL(kFrameNavOrigin0, nav()); } - virtual std::string GetContentForURL(const std::string& url) OVERRIDE { + std::string GetContentForURL(const std::string& url) override { return "<html><body>Nav</body></html>"; } - virtual bool IsNavigationDone() const OVERRIDE { + bool IsNavigationDone() const override { return got_load_state_change_done_ && got_load_end_ && got_renderer_complete_; } - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { if (!isLoading) got_load_state_change_done_.yes(); V_DECLARE(); @@ -1551,8 +1551,8 @@ class FrameNavExpectationsBrowserTestMultiNav : V_RETURN(); } - virtual bool OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, frame, true, GetMainURL())); @@ -1560,8 +1560,8 @@ class FrameNavExpectationsBrowserTestMultiNav : V_RETURN(); } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { got_load_end_.yes(); V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, frame, true, @@ -1570,7 +1570,7 @@ class FrameNavExpectationsBrowserTestMultiNav : V_RETURN(); } - virtual bool OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + bool OnAfterCreated(CefRefPtr<CefBrowser> browser) override { V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, NULL, false, std::string())); @@ -1578,8 +1578,8 @@ class FrameNavExpectationsBrowserTestMultiNav : V_RETURN(); } - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { V_DECLARE(); std::string expected_url; if (nav() > 0) @@ -1590,8 +1590,8 @@ class FrameNavExpectationsBrowserTestMultiNav : V_RETURN(); } - virtual bool GetResourceHandler(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool GetResourceHandler(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { V_DECLARE(); std::string expected_url; if (nav() > 0) @@ -1602,9 +1602,9 @@ class FrameNavExpectationsBrowserTestMultiNav : V_RETURN(); } - virtual bool OnRendererComplete(CefRefPtr<CefBrowser> browser, - int renderer_nav, - bool renderer_result) OVERRIDE { + bool OnRendererComplete(CefRefPtr<CefBrowser> browser, + int renderer_nav, + bool renderer_result) override { got_renderer_complete_.yes(); V_DECLARE(); V_EXPECT_TRUE(nav() == renderer_nav); @@ -1613,7 +1613,7 @@ class FrameNavExpectationsBrowserTestMultiNav : V_RETURN(); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_TRUE(got_load_state_change_done_); V_EXPECT_TRUE(got_load_end_); @@ -1643,12 +1643,12 @@ class FrameNavExpectationsRendererTestMultiNav : : parent(nav) { } - virtual bool IsNavigationDone() const OVERRIDE { + bool IsNavigationDone() const override { return got_load_state_change_done_ && got_load_end_; } - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { if (!isLoading) got_load_state_change_done_.yes(); V_DECLARE(); @@ -1667,8 +1667,8 @@ class FrameNavExpectationsRendererTestMultiNav : V_RETURN(); } - virtual bool OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, frame, true, GetMainURL())); @@ -1676,8 +1676,8 @@ class FrameNavExpectationsRendererTestMultiNav : V_RETURN(); } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { got_load_end_.yes(); V_DECLARE(); V_EXPECT_TRUE(VerifySingleBrowserFrames(browser, frame, true, @@ -1686,7 +1686,7 @@ class FrameNavExpectationsRendererTestMultiNav : V_RETURN(); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_TRUE(got_load_state_change_done_); V_EXPECT_TRUE(got_load_end_); @@ -1714,22 +1714,22 @@ class FrameNavExpectationsFactoryBrowserTestMultiNav : FrameNavExpectationsFactoryBrowserTestMultiNav() : nav_count_(0) {} - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_MULTI_NAV; } - virtual bool HasMoreNavigations() const OVERRIDE { + bool HasMoreNavigations() const override { return (nav_count_ < kMaxMultiNavNavigations); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_TRUE(nav_count_ == kMaxMultiNavNavigations); V_RETURN(); } protected: - virtual scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) override { nav_count_++; return make_scoped_ptr<FrameNavExpectationsBrowser>( new FrameNavExpectationsBrowserTestMultiNav(nav)); @@ -1744,12 +1744,12 @@ class FrameNavExpectationsFactoryRendererTestMultiNav : public: FrameNavExpectationsFactoryRendererTestMultiNav() {} - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_MULTI_NAV; } protected: - virtual scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) override { return make_scoped_ptr<FrameNavExpectationsRenderer>( new FrameNavExpectationsRendererTestMultiNav(nav)); } @@ -1885,12 +1885,12 @@ class FrameNavExpectationsBrowserTestNestedIframes : } } - virtual std::string GetMainURL() OVERRIDE { + std::string GetMainURL() override { // Load the first (main) frame. return GetMultiNavURL(origin_, 0); } - virtual std::string GetContentForURL(const std::string& url) OVERRIDE { + std::string GetContentForURL(const std::string& url) override { const int frame_number = GetNavFromMultiNavURL(url); switch (frame_number) { case 0: @@ -1912,13 +1912,13 @@ class FrameNavExpectationsBrowserTestNestedIframes : } } - virtual bool IsNavigationDone() const OVERRIDE { + bool IsNavigationDone() const override { return got_load_state_change_done_ && got_renderer_complete_ && got_load_end_[0] && got_load_end_[1] && got_load_end_[2]; } - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { V_DECLARE(); V_EXPECT_FALSE(got_load_state_change_done_); @@ -1930,8 +1930,8 @@ class FrameNavExpectationsBrowserTestNestedIframes : V_RETURN(); } - virtual bool OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { const int frame_number = GetNavFromMultiNavURL(frame->GetURL()); V_DECLARE(); @@ -1956,8 +1956,8 @@ class FrameNavExpectationsBrowserTestNestedIframes : V_RETURN(); } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { const int frame_number = GetNavFromMultiNavURL(frame->GetURL()); V_DECLARE(); @@ -1985,9 +1985,9 @@ class FrameNavExpectationsBrowserTestNestedIframes : V_RETURN(); } - virtual bool OnRendererComplete(CefRefPtr<CefBrowser> browser, - int renderer_nav, - bool renderer_result) OVERRIDE { + bool OnRendererComplete(CefRefPtr<CefBrowser> browser, + int renderer_nav, + bool renderer_result) override { V_DECLARE(); V_EXPECT_FALSE(got_renderer_complete_); if (same_origin_) { @@ -2004,7 +2004,7 @@ class FrameNavExpectationsBrowserTestNestedIframes : V_RETURN(); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_TRUE(got_load_state_change_done_); V_EXPECT_TRUE(got_load_start_[0]); @@ -2039,13 +2039,13 @@ class FrameNavExpectationsRendererTestNestedIframes : origin_ = kFrameNavOrigin0; } - virtual bool IsNavigationDone() const OVERRIDE { + bool IsNavigationDone() const override { return got_load_state_change_done_ && got_load_end_[0] && got_load_end_[1] && got_load_end_[2]; } - virtual bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading) OVERRIDE { + bool OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading) override { V_DECLARE(); V_EXPECT_FALSE(got_load_state_change_done_); @@ -2057,8 +2057,8 @@ class FrameNavExpectationsRendererTestNestedIframes : V_RETURN(); } - virtual bool OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { if (origin_.empty()) { // When navigating different origins we can't rely on the nav() value // because each navigation creates a new renderer process. Get the origin @@ -2090,8 +2090,8 @@ class FrameNavExpectationsRendererTestNestedIframes : V_RETURN(); } - virtual bool OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + bool OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { const int frame_number = GetNavFromMultiNavURL(frame->GetURL()); V_DECLARE(); @@ -2119,7 +2119,7 @@ class FrameNavExpectationsRendererTestNestedIframes : V_RETURN(); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_TRUE(got_load_state_change_done_); V_EXPECT_TRUE(got_load_start_[0]); @@ -2146,22 +2146,22 @@ class FrameNavExpectationsFactoryBrowserTestNestedIframesSameOrigin : FrameNavExpectationsFactoryBrowserTestNestedIframesSameOrigin() : create_count_(0) {} - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_NESTED_IFRAMES_SAME_ORIGIN; } - virtual bool HasMoreNavigations() const OVERRIDE { + bool HasMoreNavigations() const override { return (create_count_ < kMaxMultiNavNavigations); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_TRUE(create_count_ == kMaxMultiNavNavigations); V_RETURN(); } protected: - virtual scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) override { create_count_++; return make_scoped_ptr<FrameNavExpectationsBrowser>( new FrameNavExpectationsBrowserTestNestedIframes(nav, true)); @@ -2176,12 +2176,12 @@ class FrameNavExpectationsFactoryRendererTestNestedIframesSameOrigin : public: FrameNavExpectationsFactoryRendererTestNestedIframesSameOrigin() {} - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_NESTED_IFRAMES_SAME_ORIGIN; } protected: - virtual scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) override { return make_scoped_ptr<FrameNavExpectationsRenderer>( new FrameNavExpectationsRendererTestNestedIframes(nav, true)); } @@ -2201,22 +2201,22 @@ class FrameNavExpectationsFactoryBrowserTestNestedIframesDiffOrigin : FrameNavExpectationsFactoryBrowserTestNestedIframesDiffOrigin() : create_count_(0) {} - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_NESTED_IFRAMES_DIFF_ORIGIN; } - virtual bool HasMoreNavigations() const OVERRIDE { + bool HasMoreNavigations() const override { return (create_count_ < kMaxMultiNavNavigations); } - virtual bool Finalize() OVERRIDE { + bool Finalize() override { V_DECLARE(); V_EXPECT_TRUE(create_count_ == kMaxMultiNavNavigations); V_RETURN(); } protected: - virtual scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsBrowser> Create(int nav) override { create_count_++; return make_scoped_ptr<FrameNavExpectationsBrowser>( new FrameNavExpectationsBrowserTestNestedIframes(nav, false)); @@ -2231,12 +2231,12 @@ class FrameNavExpectationsFactoryRendererTestNestedIframesDiffOrigin : public: FrameNavExpectationsFactoryRendererTestNestedIframesDiffOrigin() {} - virtual FrameNavFactoryId GetID() const OVERRIDE { + FrameNavFactoryId GetID() const override { return FNF_ID_NESTED_IFRAMES_DIFF_ORIGIN; } protected: - virtual scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) OVERRIDE { + scoped_ptr<FrameNavExpectationsRenderer> Create(int nav) override { return make_scoped_ptr<FrameNavExpectationsRenderer>( new FrameNavExpectationsRendererTestNestedIframes(nav, false)); } diff --git a/tests/unittests/geolocation_unittest.cc b/tests/unittests/geolocation_unittest.cc index 59fedee08..9380a9677 100644 --- a/tests/unittests/geolocation_unittest.cc +++ b/tests/unittests/geolocation_unittest.cc @@ -36,7 +36,7 @@ class GeolocationTestHandler : public TestHandler { request_id_(-1) { } - virtual void RunTest() OVERRIDE { + void RunTest() override { std::string html = "<html><head><script>" "navigator.geolocation.getCurrentPosition(" @@ -60,9 +60,9 @@ class GeolocationTestHandler : public TestHandler { CreateBrowser(kTestUrl); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { std::string url = frame->GetURL(); if (url != kTestUrl) { if (url == kTestAllowUrl) @@ -83,11 +83,11 @@ class GeolocationTestHandler : public TestHandler { callback->Continue(false); } - virtual bool OnRequestGeolocationPermission( + bool OnRequestGeolocationPermission( CefRefPtr<CefBrowser> browser, const CefString& requesting_url, int request_id, - CefRefPtr<CefGeolocationCallback> callback) OVERRIDE { + CefRefPtr<CefGeolocationCallback> callback) override { got_requestgeolocationpermission_.yes(); EXPECT_TRUE(CefCurrentlyOn(TID_UI)); @@ -105,10 +105,10 @@ class GeolocationTestHandler : public TestHandler { return true; } - virtual void OnCancelGeolocationPermission( + void OnCancelGeolocationPermission( CefRefPtr<CefBrowser> browser, const CefString& requesting_url, - int request_id) OVERRIDE { + int request_id) override { got_cancelgeolocationpermission_.yes(); EXPECT_TRUE(CefCurrentlyOn(TID_UI)); @@ -117,7 +117,7 @@ class GeolocationTestHandler : public TestHandler { EXPECT_EQ(request_id, request_id_); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { EXPECT_TRUE(got_requestgeolocationpermission_); if (mode_ == TEST_CANCEL) EXPECT_TRUE(got_cancelgeolocationpermission_); @@ -185,7 +185,7 @@ class TestGetGeolocationCallback : public CefGetGeolocationCallback { : event_(event) { } - virtual void OnLocationUpdate(const CefGeoposition& position) OVERRIDE { + void OnLocationUpdate(const CefGeoposition& position) override { EXPECT_TRUE(CefCurrentlyOn(TID_UI)); EXPECT_EQ(position.error_code, GEOPOSITON_ERROR_NONE); EXPECT_NE(position.latitude, 0.0); diff --git a/tests/unittests/jsdialog_unittest.cc b/tests/unittests/jsdialog_unittest.cc index b0a0389e7..fc39eb461 100644 --- a/tests/unittests/jsdialog_unittest.cc +++ b/tests/unittests/jsdialog_unittest.cc @@ -41,7 +41,7 @@ class JSDialogTestHandler : public TestHandler { result_(result) { } - virtual void RunTest() OVERRIDE { + void RunTest() override { std::string content = "<html><head><body>START<script>"; if (type_ == TYPE_ALERT) { content += "alert('My alert message'); " @@ -65,9 +65,9 @@ class JSDialogTestHandler : public TestHandler { CreateBrowser(kStartUrl); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { if (!frame->IsMain()) return; @@ -85,18 +85,18 @@ class JSDialogTestHandler : public TestHandler { } } - virtual void Continue(CefRefPtr<CefJSDialogCallback> callback) { + void Continue(CefRefPtr<CefJSDialogCallback> callback) { callback->Continue(success_, user_input_); } - virtual bool OnJSDialog(CefRefPtr<CefBrowser> browser, - const CefString& origin_url, - const CefString& accept_lang, - JSDialogType dialog_type, - const CefString& message_text, - const CefString& default_prompt_text, - CefRefPtr<CefJSDialogCallback> callback, - bool& suppress_message) OVERRIDE { + bool OnJSDialog(CefRefPtr<CefBrowser> browser, + const CefString& origin_url, + const CefString& accept_lang, + JSDialogType dialog_type, + const CefString& message_text, + const CefString& default_prompt_text, + CefRefPtr<CefJSDialogCallback> callback, + bool& suppress_message) override { got_onjsdialog_.yes(); EXPECT_STREQ("http://tests/", origin_url.ToString().c_str()); @@ -134,11 +134,11 @@ class JSDialogTestHandler : public TestHandler { return true; } - virtual bool OnBeforeUnloadDialog(CefRefPtr<CefBrowser> browser, - const CefString& message_text, - bool is_reload, - CefRefPtr<CefJSDialogCallback> callback) - OVERRIDE { + bool OnBeforeUnloadDialog(CefRefPtr<CefBrowser> browser, + const CefString& message_text, + bool is_reload, + CefRefPtr<CefJSDialogCallback> callback) + override { got_onbeforeunloaddialog_.yes(); if (type_ == TYPE_ONBEFOREUNLOAD) { @@ -158,7 +158,7 @@ class JSDialogTestHandler : public TestHandler { return true; } - virtual void OnResetDialogState(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnResetDialogState(CefRefPtr<CefBrowser> browser) override { got_onresetdialogstate_.yes(); } diff --git a/tests/unittests/life_span_unittest.cc b/tests/unittests/life_span_unittest.cc index 0f79b074f..9544ce4b0 100644 --- a/tests/unittests/life_span_unittest.cc +++ b/tests/unittests/life_span_unittest.cc @@ -36,7 +36,7 @@ class LifeSpanTestHandler : public RoutingTestHandler { : settings_(settings), executing_delay_close_(false) {} - virtual void RunTest() OVERRIDE { + void RunTest() override { // Add the resources that we will navigate to/from. std::string page = "<html><script>"; @@ -55,12 +55,12 @@ class LifeSpanTestHandler : public RoutingTestHandler { CreateBrowser(kLifeSpanUrl); } - virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnAfterCreated(CefRefPtr<CefBrowser> browser) override { got_after_created_.yes(); RoutingTestHandler::OnAfterCreated(browser); } - virtual bool DoClose(CefRefPtr<CefBrowser> browser) OVERRIDE { + bool DoClose(CefRefPtr<CefBrowser> browser) override { if (executing_delay_close_) return false; @@ -76,7 +76,7 @@ class LifeSpanTestHandler : public RoutingTestHandler { return !settings_.allow_do_close; } - virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnBeforeClose(CefRefPtr<CefBrowser> browser) override { if (!executing_delay_close_) { got_before_close_.yes(); EXPECT_TRUE(browser->IsSame(GetBrowser())); @@ -85,11 +85,11 @@ class LifeSpanTestHandler : public RoutingTestHandler { RoutingTestHandler::OnBeforeClose(browser); } - virtual bool OnBeforeUnloadDialog( + bool OnBeforeUnloadDialog( CefRefPtr<CefBrowser> browser, const CefString& message_text, bool is_reload, - CefRefPtr<CefJSDialogCallback> callback) OVERRIDE { + CefRefPtr<CefJSDialogCallback> callback) override { if (executing_delay_close_) { callback->Continue(true, CefString()); return true; @@ -110,9 +110,9 @@ class LifeSpanTestHandler : public RoutingTestHandler { return true; } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { got_load_end_.yes(); EXPECT_TRUE(browser->IsSame(GetBrowser())); @@ -120,12 +120,12 @@ class LifeSpanTestHandler : public RoutingTestHandler { browser->GetHost()->CloseBrowser(settings_.force_close); } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { if (request.ToString() == kUnloadMsg) { if (!executing_delay_close_) got_unload_message_.yes(); diff --git a/tests/unittests/message_router_unittest.cc b/tests/unittests/message_router_unittest.cc index 34c039c73..7abf28c79 100644 --- a/tests/unittests/message_router_unittest.cc +++ b/tests/unittests/message_router_unittest.cc @@ -50,11 +50,11 @@ class MRRenderDelegate : public ClientApp::RenderDelegate { : delegate_(delegate) { } - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { const std::string& message_name = name; if (message_name == kJSNotifyFunc) { EXPECT_EQ(1U, arguments.size()); @@ -115,17 +115,17 @@ class MRRenderDelegate : public ClientApp::RenderDelegate { MRRenderDelegate() {} - virtual void OnWebKitInitialized(CefRefPtr<ClientApp> app) OVERRIDE { + void OnWebKitInitialized(CefRefPtr<ClientApp> app) override { // Create the renderer-side router for query handling. CefMessageRouterConfig config; SetRouterConfig(config); message_router_ = CefMessageRouterRendererSide::Create(config); } - virtual void OnContextCreated(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefV8Context> context) OVERRIDE { + void OnContextCreated(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefV8Context> context) override { const std::string& url = frame->GetURL(); if (url.find(kTestDomainRoot) != 0) return; @@ -159,10 +159,10 @@ class MRRenderDelegate : public ClientApp::RenderDelegate { window->SetValue(kJSAssertContextCountFunc, context_count_func, attributes); } - virtual void OnContextReleased(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefV8Context> context) OVERRIDE { + void OnContextReleased(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefV8Context> context) override { const std::string& url = frame->GetURL(); if (url.find(kTestDomainRoot) != 0) return; @@ -170,11 +170,11 @@ class MRRenderDelegate : public ClientApp::RenderDelegate { message_router_->OnContextReleased(browser, frame, context); } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<ClientApp> app, CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { const std::string& url = browser->GetMainFrame()->GetURL(); if (url.find(kTestDomainRoot) != 0) return false; @@ -206,7 +206,7 @@ class MRTestHandler : public TestHandler { MRTestHandler() { } - virtual void RunTest() OVERRIDE { + void RunTest() override { RunMRTest(); #if defined(TIMEOUT_ENABLED) @@ -217,7 +217,7 @@ class MRTestHandler : public TestHandler { #endif } - virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnAfterCreated(CefRefPtr<CefBrowser> browser) override { if (!message_router_.get()) { // Create the browser-side router for query handling. CefMessageRouterConfig config; @@ -228,31 +228,31 @@ class MRTestHandler : public TestHandler { TestHandler::OnAfterCreated(browser); } - virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE{ + void OnBeforeClose(CefRefPtr<CefBrowser> browser) override{ message_router_->OnBeforeClose(browser); TestHandler::OnBeforeClose(browser); } - virtual void OnRenderProcessTerminated( + void OnRenderProcessTerminated( CefRefPtr<CefBrowser> browser, - TerminationStatus status) OVERRIDE{ + TerminationStatus status) override{ message_router_->OnRenderProcessTerminated(browser); } // Only call this method if the navigation isn't canceled. - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - bool is_redirect) OVERRIDE{ + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool is_redirect) override{ message_router_->OnBeforeBrowse(browser, frame); return false; } // Returns true if the router handled the navigation. - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE{ + CefRefPtr<CefProcessMessage> message) override{ const std::string& message_name = message->GetName(); if (message_name == kDoneMessageName) { CefRefPtr<CefListValue> args = message->GetArgumentList(); @@ -316,15 +316,15 @@ class SingleLoadTestHandler : const std::string& GetMainURL() { return main_url_; } protected: - virtual void RunMRTest() OVERRIDE { + void RunMRTest() override { AddOtherResources(); AddResource(main_url_, GetMainHTML(), "text/html"); CreateBrowser(main_url_, NULL); } - virtual void AddHandlers( - CefRefPtr<CefMessageRouterBrowserSide> message_router) OVERRIDE { + void AddHandlers( + CefRefPtr<CefMessageRouterBrowserSide> message_router) override { message_router->AddHandler(this, false); } @@ -349,7 +349,7 @@ class HarnessTestHandler : public SingleLoadTestHandler { HarnessTestHandler(bool test_success) : test_success_(test_success) {} - virtual std::string GetMainHTML() OVERRIDE { + std::string GetMainHTML() override { std::string html; if (test_success_) { // All assertions should pass. @@ -375,9 +375,9 @@ class HarnessTestHandler : public SingleLoadTestHandler { return html; } - virtual void OnNotify(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const std::string& message) OVERRIDE { + void OnNotify(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const std::string& message) override { AssertMainBrowser(browser); AssertMainFrame(frame); @@ -386,7 +386,7 @@ class HarnessTestHandler : public SingleLoadTestHandler { DestroyTest(); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { EXPECT_TRUE(got_done_); TestHandler::DestroyTest(); } @@ -432,7 +432,7 @@ class SingleQueryTestHandler : public SingleLoadTestHandler { sync_callback_(sync_callback), query_id_(0) {} - virtual std::string GetMainHTML() OVERRIDE { + std::string GetMainHTML() override { std::string html; const std::string& errorCodeStr = @@ -488,9 +488,9 @@ class SingleQueryTestHandler : public SingleLoadTestHandler { return html; } - virtual void OnNotify(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const std::string& message) OVERRIDE { + void OnNotify(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const std::string& message) override { AssertMainBrowser(browser); AssertMainFrame(frame); @@ -521,12 +521,12 @@ class SingleQueryTestHandler : public SingleLoadTestHandler { callback_ = NULL; } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { AssertMainBrowser(browser); AssertMainFrame(frame); EXPECT_NE(0, query_id); @@ -550,9 +550,9 @@ class SingleQueryTestHandler : public SingleLoadTestHandler { return true; } - virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id) OVERRIDE { + void OnQueryCanceled(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id) override { AssertMainBrowser(browser); AssertMainFrame(frame); EXPECT_EQ(test_type_, CANCEL); @@ -576,7 +576,7 @@ class SingleQueryTestHandler : public SingleLoadTestHandler { DestroyTest(); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { EXPECT_TRUE(got_notify_); EXPECT_TRUE(got_on_query_); EXPECT_FALSE(callback_.get()); @@ -656,7 +656,7 @@ class SinglePersistentQueryTestHandler : public SingleLoadTestHandler { sync_callback_(sync_callback), query_id_(0) {} - virtual std::string GetMainHTML() OVERRIDE { + std::string GetMainHTML() override { std::string html; const std::string& responseCountStr = @@ -716,9 +716,9 @@ class SinglePersistentQueryTestHandler : public SingleLoadTestHandler { return html; } - virtual void OnNotify(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const std::string& message) OVERRIDE { + void OnNotify(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const std::string& message) override { AssertMainBrowser(browser); AssertMainFrame(frame); @@ -742,12 +742,12 @@ class SinglePersistentQueryTestHandler : public SingleLoadTestHandler { } } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { AssertMainBrowser(browser); AssertMainFrame(frame); EXPECT_NE(0, query_id); @@ -775,9 +775,9 @@ class SinglePersistentQueryTestHandler : public SingleLoadTestHandler { return true; } - virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id) OVERRIDE { + void OnQueryCanceled(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id) override { AssertMainBrowser(browser); AssertMainFrame(frame); EXPECT_EQ(query_id_, query_id); @@ -803,7 +803,7 @@ class SinglePersistentQueryTestHandler : public SingleLoadTestHandler { DestroyTest(); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { EXPECT_TRUE(got_notify_); EXPECT_TRUE(got_on_query_); EXPECT_FALSE(callback_.get()); @@ -870,7 +870,7 @@ class SingleUnhandledQueryTestHandler : public SingleLoadTestHandler { public: SingleUnhandledQueryTestHandler() {} - virtual std::string GetMainHTML() OVERRIDE { + std::string GetMainHTML() override { std::string html; html = "<html><body><script>\n" @@ -909,9 +909,9 @@ class SingleUnhandledQueryTestHandler : public SingleLoadTestHandler { return html; } - virtual void OnNotify(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const std::string& message) OVERRIDE { + void OnNotify(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const std::string& message) override { AssertMainBrowser(browser); AssertMainFrame(frame); EXPECT_STREQ("failure", message.c_str()); @@ -921,12 +921,12 @@ class SingleUnhandledQueryTestHandler : public SingleLoadTestHandler { DestroyTest(); } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { AssertMainBrowser(browser); AssertMainFrame(frame); EXPECT_NE(0, query_id); @@ -938,13 +938,13 @@ class SingleUnhandledQueryTestHandler : public SingleLoadTestHandler { return false; } - virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id) OVERRIDE { + void OnQueryCanceled(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id) override { EXPECT_FALSE(true); // Not reached. } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { EXPECT_TRUE(got_on_query_); EXPECT_TRUE(got_notify_); @@ -1219,12 +1219,12 @@ class MultiQueryManager : public CefMessageRouterBrowserSide::Handler { } } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { EXPECT_TRUE(finalized_); EXPECT_UI_THREAD(); @@ -1289,9 +1289,9 @@ class MultiQueryManager : public CefMessageRouterBrowserSide::Handler { return true; } - virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id) OVERRIDE { + void OnQueryCanceled(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id) override { EXPECT_TRUE(finalized_); EXPECT_UI_THREAD(); @@ -1430,7 +1430,7 @@ class MultiQueryManager : public CefMessageRouterBrowserSide::Handler { : weak_ptr_(weak_ptr), notify_all_(notify_all) {} - virtual void Execute() OVERRIDE { + void Execute() override { if (weak_ptr_) { if (notify_all_) weak_ptr_->NotifyAllQueriesCompleted(); @@ -1784,25 +1784,25 @@ class MultiQuerySingleFrameTestHandler : manager_.AddObserver(this); } - virtual std::string GetMainHTML() OVERRIDE { + std::string GetMainHTML() override { return manager_.GetHTML(true, true); } - virtual void OnNotify(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const std::string& message) OVERRIDE { + void OnNotify(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const std::string& message) override { AssertMainBrowser(browser); AssertMainFrame(frame); manager_.OnNotify(browser, frame, message); } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { AssertMainBrowser(browser); AssertMainFrame(frame); @@ -1810,16 +1810,16 @@ class MultiQuerySingleFrameTestHandler : callback); } - virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id) OVERRIDE { + void OnQueryCanceled(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id) override { AssertMainBrowser(browser); AssertMainFrame(frame); manager_.OnQueryCanceled(browser, frame, query_id); } - virtual void OnManualQueriesCompleted(MultiQueryManager* manager) OVERRIDE { + void OnManualQueriesCompleted(MultiQueryManager* manager) override { EXPECT_EQ(manager, &manager_); if (manager_.HasAutoQueries()) { if (cancel_type_ == CANCEL_BY_NAVIGATION) { @@ -1840,7 +1840,7 @@ class MultiQuerySingleFrameTestHandler : } } - virtual void OnAllQueriesCompleted(MultiQueryManager* manager) OVERRIDE { + void OnAllQueriesCompleted(MultiQueryManager* manager) override { EXPECT_EQ(manager, &manager_); // All queries should be canceled. @@ -1855,7 +1855,7 @@ class MultiQuerySingleFrameTestHandler : } } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { manager_.AssertAllComplete(); TestHandler::DestroyTest(); } @@ -1974,12 +1974,12 @@ class MultiQueryMultiHandlerTestHandler : query_id_(0) { } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { // Each handler only handles a single request. const std::string& handled_request = base::StringPrintf("%s:%d", kMultiQueryRequest, index_); @@ -2012,9 +2012,9 @@ class MultiQueryMultiHandlerTestHandler : persistent, callback); } - virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id) OVERRIDE { + void OnQueryCanceled(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id) override { // Verify that the correct handler is called for cancellation. EXPECT_EQ(query_id_, query_id); @@ -2054,25 +2054,25 @@ class MultiQueryMultiHandlerTestHandler : manager_.Finalize(); } - virtual std::string GetMainHTML() OVERRIDE { + std::string GetMainHTML() override { return manager_.GetHTML(true, true); } - virtual void OnNotify(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const std::string& message) OVERRIDE { + void OnNotify(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const std::string& message) override { AssertMainBrowser(browser); AssertMainFrame(frame); manager_.OnNotify(browser, frame, message); } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { AssertMainBrowser(browser); AssertMainFrame(frame); @@ -2080,16 +2080,16 @@ class MultiQueryMultiHandlerTestHandler : callback); } - virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id) OVERRIDE { + void OnQueryCanceled(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id) override { AssertMainBrowser(browser); AssertMainFrame(frame); manager_.OnQueryCanceled(browser, frame, query_id); } - virtual void OnManualQueriesCompleted(MultiQueryManager* manager) OVERRIDE { + void OnManualQueriesCompleted(MultiQueryManager* manager) override { EXPECT_EQ(manager, &manager_); EXPECT_TRUE(got_query0_); @@ -2126,7 +2126,7 @@ class MultiQueryMultiHandlerTestHandler : } } - virtual void OnAllQueriesCompleted(MultiQueryManager* manager) OVERRIDE { + void OnAllQueriesCompleted(MultiQueryManager* manager) override { EXPECT_EQ(manager, &manager_); // All queries should be canceled. @@ -2135,7 +2135,7 @@ class MultiQueryMultiHandlerTestHandler : DestroyTest(); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { EXPECT_TRUE(got_query0_); EXPECT_TRUE(got_query1_); EXPECT_TRUE(got_query2_); @@ -2148,8 +2148,8 @@ class MultiQueryMultiHandlerTestHandler : } protected: - virtual void AddHandlers( - CefRefPtr<CefMessageRouterBrowserSide> message_router) OVERRIDE { + void AddHandlers( + CefRefPtr<CefMessageRouterBrowserSide> message_router) override { // OnQuery call order will verify that the first/last ordering works as // expected. EXPECT_TRUE(message_router->AddHandler(&handler1_, true)); @@ -2283,12 +2283,12 @@ class MultiQueryManagerMap : manager->OnNotify(browser, frame, message); } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { EXPECT_TRUE(finalized_); if (!running_) running_ = true; @@ -2298,9 +2298,9 @@ class MultiQueryManagerMap : callback); } - virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id) OVERRIDE { + void OnQueryCanceled(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id) override { EXPECT_TRUE(finalized_); if (!running_) running_ = true; @@ -2309,7 +2309,7 @@ class MultiQueryManagerMap : manager->OnQueryCanceled(browser, frame, query_id); } - virtual void OnManualQueriesCompleted(MultiQueryManager* manager) OVERRIDE { + void OnManualQueriesCompleted(MultiQueryManager* manager) override { const int size = static_cast<int>(manager_map_.size()); EXPECT_LT(manual_complete_count_, size); if (++manual_complete_count_ == size) { @@ -2329,7 +2329,7 @@ class MultiQueryManagerMap : } } - virtual void OnAllQueriesCompleted(MultiQueryManager* manager) OVERRIDE { + void OnAllQueriesCompleted(MultiQueryManager* manager) override { const int size = static_cast<int>(manager_map_.size()); EXPECT_LT(total_complete_count_, size); if (++total_complete_count_ == size) { @@ -2448,7 +2448,7 @@ class MultiQueryMultiFrameTestHandler : manager_map_.AddObserver(this); } - virtual void AddOtherResources() OVERRIDE { + void AddOtherResources() override { AddSubFrameResource("sub1"); AddSubFrameResource("sub2"); AddSubFrameResource("sub3"); @@ -2460,25 +2460,25 @@ class MultiQueryMultiFrameTestHandler : } } - virtual std::string GetMainHTML() OVERRIDE { + std::string GetMainHTML() override { return manager_map_.GetMainHTML(); } - virtual void OnNotify(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const std::string& message) OVERRIDE { + void OnNotify(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const std::string& message) override { AssertMainBrowser(browser); EXPECT_FALSE(frame->IsMain()); manager_map_.OnNotify(browser, frame, message); } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { AssertMainBrowser(browser); EXPECT_FALSE(frame->IsMain()); @@ -2486,16 +2486,16 @@ class MultiQueryMultiFrameTestHandler : callback); } - virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id) OVERRIDE { + void OnQueryCanceled(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id) override { AssertMainBrowser(browser); EXPECT_FALSE(frame->IsMain()); manager_map_.OnQueryCanceled(browser, frame, query_id); } - virtual void OnMapManualQueriesCompleted(MultiQueryManagerMap* map) OVERRIDE { + void OnMapManualQueriesCompleted(MultiQueryManagerMap* map) override { EXPECT_EQ(map, &manager_map_); if (manager_map_.HasAutoQueries()) { CefRefPtr<CefFrame> frame = GetBrowser()->GetMainFrame(); @@ -2516,12 +2516,12 @@ class MultiQueryMultiFrameTestHandler : } } - virtual void OnMapAllQueriesCompleted(MultiQueryManagerMap* map) OVERRIDE { + void OnMapAllQueriesCompleted(MultiQueryManagerMap* map) override { EXPECT_EQ(map, &manager_map_); DestroyTest(); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { manager_map_.AssertAllComplete(); TestHandler::DestroyTest(); } @@ -2596,29 +2596,29 @@ class MultiQueryMultiLoadTestHandler : manager_map_.AddObserver(this); } - virtual void OnNotify(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const std::string& message) OVERRIDE { + void OnNotify(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const std::string& message) override { manager_map_.OnNotify(browser, frame, message); } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { return manager_map_.OnQuery(browser, frame, query_id, request, persistent, callback); } - virtual void OnQueryCanceled(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id) OVERRIDE { + void OnQueryCanceled(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id) override { manager_map_.OnQueryCanceled(browser, frame, query_id); } - virtual void OnMapManualQueriesCompleted(MultiQueryManagerMap* map) OVERRIDE { + void OnMapManualQueriesCompleted(MultiQueryManagerMap* map) override { EXPECT_EQ(map, &manager_map_); if (manager_map_.HasAutoQueries()) { // Navigate all browsers somewhere else to terminate the auto queries. @@ -2632,19 +2632,19 @@ class MultiQueryMultiLoadTestHandler : } } - virtual void OnMapAllQueriesCompleted(MultiQueryManagerMap* map) OVERRIDE { + void OnMapAllQueriesCompleted(MultiQueryManagerMap* map) override { EXPECT_EQ(map, &manager_map_); DestroyTest(); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { manager_map_.AssertAllComplete(); TestHandler::DestroyTest(); } protected: - virtual void AddHandlers( - CefRefPtr<CefMessageRouterBrowserSide> message_router) OVERRIDE { + void AddHandlers( + CefRefPtr<CefMessageRouterBrowserSide> message_router) override { message_router->AddHandler(this, false); } @@ -2686,7 +2686,7 @@ class MultiQueryMultiBrowserTestHandler : public MultiQueryMultiLoadTestHandler } protected: - virtual void RunMRTest() { + void RunMRTest() override { const std::string& url1 = std::string(kTestDomain1) + "browser1.html"; const std::string& url2 = std::string(same_origin_ ? kTestDomain1 : kTestDomain2) + @@ -2751,7 +2751,7 @@ class MultiQueryMultiNavigateTestHandler : public MultiQueryMultiLoadTestHandler same_origin_(same_origin) { } - virtual void OnManualQueriesCompleted(MultiQueryManager* manager) OVERRIDE { + void OnManualQueriesCompleted(MultiQueryManager* manager) override { const std::string& url = manager_map_.GetURLForManager(manager); if (url == url1_) // 2. Load the 2nd url. GetBrowser()->GetMainFrame()->LoadURL(url2_); @@ -2760,7 +2760,7 @@ class MultiQueryMultiNavigateTestHandler : public MultiQueryMultiLoadTestHandler } protected: - virtual void RunMRTest() { + void RunMRTest() override { url1_ = std::string(kTestDomain1) + "browser1.html"; url2_ = std::string(same_origin_ ? kTestDomain1 : kTestDomain2) + "browser2.html"; diff --git a/tests/unittests/navigation_unittest.cc b/tests/unittests/navigation_unittest.cc index 62e071be1..2e5d9a25e 100644 --- a/tests/unittests/navigation_unittest.cc +++ b/tests/unittests/navigation_unittest.cc @@ -60,9 +60,9 @@ class HistoryNavBrowserTest : public ClientApp::BrowserDelegate { public: HistoryNavBrowserTest() {} - virtual void OnBeforeChildProcessLaunch( + void OnBeforeChildProcessLaunch( CefRefPtr<ClientApp> app, - CefRefPtr<CefCommandLine> command_line) OVERRIDE { + CefRefPtr<CefCommandLine> command_line) override { if (!g_history_nav_test) return; @@ -82,9 +82,9 @@ class HistoryNavRendererTest : public ClientApp::RenderDelegate, : run_test_(false), nav_(0) {} - virtual void OnRenderThreadCreated( + void OnRenderThreadCreated( CefRefPtr<ClientApp> app, - CefRefPtr<CefListValue> extra_info) OVERRIDE { + CefRefPtr<CefListValue> extra_info) override { if (!g_history_nav_test) { // Check that the test should be run. CefRefPtr<CefCommandLine> command_line = @@ -97,18 +97,18 @@ class HistoryNavRendererTest : public ClientApp::RenderDelegate, run_test_ = true; } - virtual CefRefPtr<CefLoadHandler> GetLoadHandler( - CefRefPtr<ClientApp> app) OVERRIDE { + CefRefPtr<CefLoadHandler> GetLoadHandler( + CefRefPtr<ClientApp> app) override { if (!run_test_) return NULL; return this; } - virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading, - bool canGoBack, - bool canGoForward) OVERRIDE { + void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading, + bool canGoBack, + bool canGoForward) override { const NavListItem& item = kHNavList[nav_]; const std::string& url = browser->GetMainFrame()->GetURL(); @@ -143,8 +143,8 @@ class HistoryNavRendererTest : public ClientApp::RenderDelegate, } } - virtual void OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + void OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { const NavListItem& item = kHNavList[nav_]; got_load_start_.yes(); @@ -156,9 +156,9 @@ class HistoryNavRendererTest : public ClientApp::RenderDelegate, EXPECT_EQ(item.can_go_forward, browser->CanGoForward()); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { const NavListItem& item = kHNavList[nav_]; got_load_end_.yes(); @@ -172,12 +172,12 @@ class HistoryNavRendererTest : public ClientApp::RenderDelegate, SendTestResultsIfDone(browser); } - virtual bool OnBeforeNavigation(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - cef_navigation_type_t navigation_type, - bool is_redirect) OVERRIDE { + bool OnBeforeNavigation(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + cef_navigation_type_t navigation_type, + bool is_redirect) override { if (!run_test_) return false; @@ -259,7 +259,7 @@ class HistoryNavTestHandler : public TestHandler { load_end_confirmation_(false), renderer_confirmation_(false) {} - virtual void RunTest() OVERRIDE { + void RunTest() override { // Add the resources that we will navigate to/from. AddResource(kHNav1, "<html>Nav1</html>", "text/html"); AddResource(kHNav2, "<html>Nav2</html>", "text/html"); @@ -310,16 +310,16 @@ class HistoryNavTestHandler : public TestHandler { } } - virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnAfterCreated(CefRefPtr<CefBrowser> browser) override { TestHandler::OnAfterCreated(browser); RunNav(browser); } - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - bool is_redirect) OVERRIDE { + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool is_redirect) override { const NavListItem& item = kHNavList[nav_]; got_before_browse_[nav_].yes(); @@ -345,9 +345,9 @@ class HistoryNavTestHandler : public TestHandler { return false; } - virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request) override { const NavListItem& item = kHNavList[nav_]; EXPECT_EQ(RT_MAIN_FRAME, request->GetResourceType()); @@ -365,10 +365,10 @@ class HistoryNavTestHandler : public TestHandler { return false; } - virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading, - bool canGoBack, - bool canGoForward) OVERRIDE { + void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading, + bool canGoBack, + bool canGoForward) override { const NavListItem& item = kHNavList[nav_]; got_loading_state_change_[nav_].yes(); @@ -379,8 +379,8 @@ class HistoryNavTestHandler : public TestHandler { got_correct_can_go_forward_[nav_].yes(); } - virtual void OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + void OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { if(browser->IsPopup() || !frame->IsMain()) return; @@ -394,9 +394,9 @@ class HistoryNavTestHandler : public TestHandler { got_correct_load_start_url_[nav_].yes(); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { if (browser->IsPopup() || !frame->IsMain()) return; @@ -418,10 +418,10 @@ class HistoryNavTestHandler : public TestHandler { RunNextNavIfReady(browser); } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { if (message->GetName().ToString() == kHistoryNavMsg) { got_before_navigation_[nav_].yes(); @@ -509,8 +509,8 @@ class RedirectSchemeHandler : public CefResourceHandler { public: RedirectSchemeHandler() : offset_(0), status_(0) {} - virtual bool ProcessRequest(CefRefPtr<CefRequest> request, - CefRefPtr<CefCallback> callback) OVERRIDE { + bool ProcessRequest(CefRefPtr<CefRequest> request, + CefRefPtr<CefCallback> callback) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); std::string url = request->GetURL(); @@ -541,9 +541,9 @@ class RedirectSchemeHandler : public CefResourceHandler { } } - virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, - int64& response_length, - CefString& redirectUrl) OVERRIDE { + void GetResponseHeaders(CefRefPtr<CefResponse> response, + int64& response_length, + CefString& redirectUrl) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); EXPECT_NE(status_, 0); @@ -567,14 +567,14 @@ class RedirectSchemeHandler : public CefResourceHandler { } } - virtual void Cancel() OVERRIDE { + void Cancel() override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); } - virtual bool ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr<CefCallback> callback) OVERRIDE { + bool ReadResponse(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr<CefCallback> callback) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); size_t size = content_.size(); @@ -604,11 +604,11 @@ class RedirectSchemeHandlerFactory : public CefSchemeHandlerFactory { public: RedirectSchemeHandlerFactory() {} - virtual CefRefPtr<CefResourceHandler> Create( + CefRefPtr<CefResourceHandler> Create( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& scheme_name, - CefRefPtr<CefRequest> request) OVERRIDE { + CefRefPtr<CefRequest> request) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); return new RedirectSchemeHandler(); } @@ -620,14 +620,14 @@ class RedirectTestHandler : public TestHandler { public: RedirectTestHandler() {} - virtual void RunTest() OVERRIDE { + void RunTest() override { // Create the browser. CreateBrowser(kRNav1); } - virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request) override { // Should be called for all but the second URL. std::string url = request->GetURL(); @@ -647,10 +647,10 @@ class RedirectTestHandler : public TestHandler { return false; } - virtual void OnResourceRedirect(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const CefString& old_url, - CefString& new_url) OVERRIDE { + void OnResourceRedirect(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const CefString& old_url, + CefString& new_url) override { // Should be called for each redirected URL. if (old_url == kRNav1 && new_url == kRNav2) { @@ -670,8 +670,8 @@ class RedirectTestHandler : public TestHandler { } } - virtual void OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + void OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { // Should only be called for the final loaded URL. std::string url = frame->GetURL(); @@ -682,9 +682,9 @@ class RedirectTestHandler : public TestHandler { } } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { // Should only be called for the final loaded URL. std::string url = frame->GetURL(); @@ -769,9 +769,9 @@ class OrderNavBrowserTest : public ClientApp::BrowserDelegate { public: OrderNavBrowserTest() {} - virtual void OnBeforeChildProcessLaunch( + void OnBeforeChildProcessLaunch( CefRefPtr<ClientApp> app, - CefRefPtr<CefCommandLine> command_line) OVERRIDE { + CefRefPtr<CefCommandLine> command_line) override { if (!g_order_nav_test) return; @@ -779,9 +779,9 @@ class OrderNavBrowserTest : public ClientApp::BrowserDelegate { command_line->AppendSwitchWithValue("test", kOrderNavMsg); } - virtual void OnRenderProcessThreadCreated( + void OnRenderProcessThreadCreated( CefRefPtr<ClientApp> app, - CefRefPtr<CefListValue> extra_info) OVERRIDE { + CefRefPtr<CefListValue> extra_info) override { if (!g_order_nav_test) return; @@ -887,9 +887,9 @@ class OrderNavRendererTest : public ClientApp::RenderDelegate, state_main_(false, false), state_popup_(true, false) {} - virtual void OnRenderThreadCreated( + void OnRenderThreadCreated( CefRefPtr<ClientApp> app, - CefRefPtr<CefListValue> extra_info) OVERRIDE { + CefRefPtr<CefListValue> extra_info) override { if (!g_order_nav_test) { // Check that the test should be run. CefRefPtr<CefCommandLine> command_line = @@ -911,7 +911,7 @@ class OrderNavRendererTest : public ClientApp::RenderDelegate, TestListEqual(expected, extra_info); } - virtual void OnWebKitInitialized(CefRefPtr<ClientApp> app) OVERRIDE { + void OnWebKitInitialized(CefRefPtr<ClientApp> app) override { if (!run_test_) return; @@ -920,8 +920,8 @@ class OrderNavRendererTest : public ClientApp::RenderDelegate, got_webkit_initialized_.yes(); } - virtual void OnBrowserCreated(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnBrowserCreated(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser) override { if (!run_test_) return; @@ -949,8 +949,8 @@ class OrderNavRendererTest : public ClientApp::RenderDelegate, } } - virtual void OnBrowserDestroyed(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnBrowserDestroyed(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser) override { if (!run_test_) return; @@ -981,18 +981,18 @@ class OrderNavRendererTest : public ClientApp::RenderDelegate, } } - virtual CefRefPtr<CefLoadHandler> GetLoadHandler( - CefRefPtr<ClientApp> app) OVERRIDE { + CefRefPtr<CefLoadHandler> GetLoadHandler( + CefRefPtr<ClientApp> app) override { if (!run_test_) return NULL; return this; } - virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading, - bool canGoBack, - bool canGoForward) OVERRIDE { + void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading, + bool canGoBack, + bool canGoForward) override { EXPECT_TRUE(got_render_thread_created_); EXPECT_TRUE(got_webkit_initialized_); @@ -1014,8 +1014,8 @@ class OrderNavRendererTest : public ClientApp::RenderDelegate, SendTestResultsIfDone(browser); } - virtual void OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + void OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_TRUE(got_render_thread_created_); EXPECT_TRUE(got_webkit_initialized_); @@ -1032,9 +1032,9 @@ class OrderNavRendererTest : public ClientApp::RenderDelegate, } } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { EXPECT_TRUE(got_render_thread_created_); EXPECT_TRUE(got_webkit_initialized_); @@ -1111,7 +1111,7 @@ class OrderNavTestHandler : public TestHandler { state_popup_(true, true), got_message_(false) {} - virtual void RunTest() OVERRIDE { + void RunTest() override { // Add the resources that we will navigate to/from. AddResource(KONav1, "<html>Nav1</html>", "text/html"); AddResource(KONav2, "<html>Nav2</html>", "text/html"); @@ -1144,7 +1144,7 @@ class OrderNavTestHandler : public TestHandler { } } - virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnAfterCreated(CefRefPtr<CefBrowser> browser) override { TestHandler::OnAfterCreated(browser); if (browser->IsPopup()) { @@ -1157,10 +1157,10 @@ class OrderNavTestHandler : public TestHandler { } } - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - bool is_redirect) OVERRIDE { + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool is_redirect) override { EXPECT_EQ(RT_MAIN_FRAME, request->GetResourceType()); if (browser->IsPopup()) { @@ -1186,9 +1186,9 @@ class OrderNavTestHandler : public TestHandler { return false; } - virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request) override { EXPECT_EQ(RT_MAIN_FRAME, request->GetResourceType()); if (browser->IsPopup()) { @@ -1204,10 +1204,10 @@ class OrderNavTestHandler : public TestHandler { return false; } - virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading, - bool canGoBack, - bool canGoForward) OVERRIDE { + void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading, + bool canGoBack, + bool canGoForward) override { if (browser->IsPopup()) { state_popup_.OnLoadingStateChange(browser, isLoading, canGoBack, canGoForward); @@ -1220,8 +1220,8 @@ class OrderNavTestHandler : public TestHandler { ContinueIfReady(browser); } - virtual void OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + void OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { if (browser->IsPopup()) { state_popup_.OnLoadStart(browser, frame); } else { @@ -1229,9 +1229,9 @@ class OrderNavTestHandler : public TestHandler { } } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { if (browser->IsPopup()) { state_popup_.OnLoadEnd(browser, frame, httpStatusCode); } else { @@ -1241,10 +1241,10 @@ class OrderNavTestHandler : public TestHandler { ContinueIfReady(browser); } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { if (browser->IsPopup()) { EXPECT_GT(browser->GetIdentifier(), 0); EXPECT_EQ(browser_id_popup_, browser->GetIdentifier()); @@ -1284,7 +1284,7 @@ class OrderNavTestHandler : public TestHandler { } protected: - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { // Verify test expectations. EXPECT_TRUE(got_before_browse_main_); EXPECT_TRUE(got_before_browse_popup_); @@ -1330,9 +1330,9 @@ class CrossOriginNavBrowserTest : public ClientApp::BrowserDelegate { public: CrossOriginNavBrowserTest() {} - virtual void OnBeforeChildProcessLaunch( + void OnBeforeChildProcessLaunch( CefRefPtr<ClientApp> app, - CefRefPtr<CefCommandLine> command_line) OVERRIDE { + CefRefPtr<CefCommandLine> command_line) override { if (!g_cross_origin_nav_test) return; @@ -1350,13 +1350,13 @@ class CrossOriginNavRendererTest : public ClientApp::RenderDelegate, public: CrossOriginNavRendererTest() : run_test_(false) {} - virtual ~CrossOriginNavRendererTest() { + ~CrossOriginNavRendererTest() override { EXPECT_TRUE(status_list_.empty()); } - virtual void OnRenderThreadCreated( + void OnRenderThreadCreated( CefRefPtr<ClientApp> app, - CefRefPtr<CefListValue> extra_info) OVERRIDE { + CefRefPtr<CefListValue> extra_info) override { if (!g_cross_origin_nav_test) { // Check that the test should be run. CefRefPtr<CefCommandLine> command_line = @@ -1373,7 +1373,7 @@ class CrossOriginNavRendererTest : public ClientApp::RenderDelegate, got_render_thread_created_.yes(); } - virtual void OnWebKitInitialized(CefRefPtr<ClientApp> app) OVERRIDE { + void OnWebKitInitialized(CefRefPtr<ClientApp> app) override { if (!run_test_) return; @@ -1382,8 +1382,8 @@ class CrossOriginNavRendererTest : public ClientApp::RenderDelegate, got_webkit_initialized_.yes(); } - virtual void OnBrowserCreated(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnBrowserCreated(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser) override { if (!run_test_) return; @@ -1395,8 +1395,8 @@ class CrossOriginNavRendererTest : public ClientApp::RenderDelegate, status->got_browser_created.yes(); } - virtual void OnBrowserDestroyed(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnBrowserDestroyed(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser) override { if (!run_test_) return; @@ -1414,18 +1414,18 @@ class CrossOriginNavRendererTest : public ClientApp::RenderDelegate, EXPECT_TRUE(RemoveStatus(browser)); } - virtual CefRefPtr<CefLoadHandler> GetLoadHandler( - CefRefPtr<ClientApp> app) OVERRIDE { + CefRefPtr<CefLoadHandler> GetLoadHandler( + CefRefPtr<ClientApp> app) override { if (!run_test_) return NULL; return this; } - virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading, - bool canGoBack, - bool canGoForward) OVERRIDE { + void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading, + bool canGoBack, + bool canGoForward) override { if (!isLoading) { EXPECT_TRUE(got_render_thread_created_); EXPECT_TRUE(got_webkit_initialized_); @@ -1520,7 +1520,7 @@ class CrossOriginNavTestHandler : public TestHandler { got_message_(false), got_load_end_(false) {} - virtual void RunTest() OVERRIDE { + void RunTest() override { // Add the resources that we will navigate to/from. AddResource(kCrossOriginNav1, "<html>Nav1</html>", "text/html"); AddResource(kCrossOriginNav2, "<html>Nav2</html>", "text/html"); @@ -1546,7 +1546,7 @@ class CrossOriginNavTestHandler : public TestHandler { } } - virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnAfterCreated(CefRefPtr<CefBrowser> browser) override { TestHandler::OnAfterCreated(browser); EXPECT_EQ(browser_id_current_, 0); @@ -1554,10 +1554,10 @@ class CrossOriginNavTestHandler : public TestHandler { EXPECT_GT(browser_id_current_, 0); } - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - bool is_redirect) OVERRIDE { + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool is_redirect) override { EXPECT_EQ(RT_MAIN_FRAME, request->GetResourceType()); EXPECT_EQ(TT_EXPLICIT, request->GetTransitionType()); @@ -1567,9 +1567,9 @@ class CrossOriginNavTestHandler : public TestHandler { return false; } - virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request) override { EXPECT_EQ(RT_MAIN_FRAME, request->GetResourceType()); EXPECT_EQ(TT_EXPLICIT, request->GetTransitionType()); @@ -1579,15 +1579,15 @@ class CrossOriginNavTestHandler : public TestHandler { return false; } - virtual void OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + void OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { EXPECT_GT(browser_id_current_, 0); EXPECT_EQ(browser_id_current_, browser->GetIdentifier()); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { EXPECT_GT(browser_id_current_, 0); EXPECT_EQ(browser_id_current_, browser->GetIdentifier()); @@ -1595,10 +1595,10 @@ class CrossOriginNavTestHandler : public TestHandler { ContinueIfReady(browser); } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { EXPECT_GT(browser_id_current_, 0); EXPECT_EQ(browser_id_current_, browser->GetIdentifier()); @@ -1653,7 +1653,7 @@ class PopupNavTestHandler : public TestHandler { explicit PopupNavTestHandler(bool allow) : allow_(allow) {} - virtual void RunTest() OVERRIDE { + void RunTest() override { // Add the resources that we will navigate to/from. std::string page = "<html><script>function doPopup() { window.open('" + std::string(kPopupNavPopupUrl) + "', '" + @@ -1666,15 +1666,15 @@ class PopupNavTestHandler : public TestHandler { CreateBrowser(kPopupNavPageUrl); } - virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const CefString& target_url, - const CefString& target_frame_name, - const CefPopupFeatures& popupFeatures, - CefWindowInfo& windowInfo, - CefRefPtr<CefClient>& client, - CefBrowserSettings& settings, - bool* no_javascript_access) OVERRIDE { + bool OnBeforePopup(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const CefString& target_url, + const CefString& target_frame_name, + const CefPopupFeatures& popupFeatures, + CefWindowInfo& windowInfo, + CefRefPtr<CefClient>& client, + CefBrowserSettings& settings, + bool* no_javascript_access) override { got_on_before_popup_.yes(); EXPECT_TRUE(CefCurrentlyOn(TID_IO)); @@ -1687,9 +1687,9 @@ class PopupNavTestHandler : public TestHandler { return !allow_; } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { std::string url = frame->GetURL(); if (url == kPopupNavPageUrl) { frame->ExecuteJavaScript("doPopup()", kPopupNavPageUrl, 0); @@ -1713,7 +1713,7 @@ class PopupNavTestHandler : public TestHandler { } private: - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { EXPECT_TRUE(got_on_before_popup_); if (allow_) EXPECT_TRUE(got_popup_load_end_); @@ -1755,7 +1755,7 @@ class BrowseNavTestHandler : public TestHandler { : allow_(allow), destroyed_(false) {} - virtual void RunTest() OVERRIDE { + void RunTest() override { AddResource(kBrowseNavPageUrl, "<html>Test</html>", "text/html"); // Create the browser. @@ -1767,10 +1767,10 @@ class BrowseNavTestHandler : public TestHandler { 2000); } - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - bool is_redirect) OVERRIDE { + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool is_redirect) override { const std::string& url = request->GetURL(); EXPECT_STREQ(kBrowseNavPageUrl, url.c_str()); EXPECT_EQ(GetBrowserId(), browser->GetIdentifier()); @@ -1781,8 +1781,8 @@ class BrowseNavTestHandler : public TestHandler { return !allow_; } - virtual void OnLoadStart(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame) OVERRIDE { + void OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame) override { const std::string& url = frame->GetURL(); EXPECT_STREQ(kBrowseNavPageUrl, url.c_str()); EXPECT_EQ(GetBrowserId(), browser->GetIdentifier()); @@ -1791,9 +1791,9 @@ class BrowseNavTestHandler : public TestHandler { got_load_start_.yes(); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { const std::string& url = frame->GetURL(); EXPECT_STREQ(kBrowseNavPageUrl, url.c_str()); EXPECT_EQ(GetBrowserId(), browser->GetIdentifier()); @@ -1803,11 +1803,11 @@ class BrowseNavTestHandler : public TestHandler { DestroyTestIfDone(); } - virtual void OnLoadError(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - ErrorCode errorCode, - const CefString& errorText, - const CefString& failedUrl) OVERRIDE { + void OnLoadError(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + ErrorCode errorCode, + const CefString& errorText, + const CefString& failedUrl) override { const std::string& url = frame->GetURL(); EXPECT_STREQ("", url.c_str()); EXPECT_EQ(GetBrowserId(), browser->GetIdentifier()); @@ -1820,10 +1820,10 @@ class BrowseNavTestHandler : public TestHandler { DestroyTestIfDone(); } - virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading, - bool canGoBack, - bool canGoForward) OVERRIDE { + void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading, + bool canGoBack, + bool canGoForward) override { const std::string& url = browser->GetMainFrame()->GetURL(); EXPECT_EQ(GetBrowserId(), browser->GetIdentifier()); @@ -1857,7 +1857,7 @@ class BrowseNavTestHandler : public TestHandler { } } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { if (destroyed_) return; destroyed_ = true; diff --git a/tests/unittests/os_rendering_unittest.cc b/tests/unittests/os_rendering_unittest.cc index ab5577baa..7ae50b08f 100644 --- a/tests/unittests/os_rendering_unittest.cc +++ b/tests/unittests/os_rendering_unittest.cc @@ -215,10 +215,8 @@ class OSRTestHandler : public RoutingTestHandler, started_(false) { } - virtual ~OSRTestHandler() {} - // TestHandler methods - virtual void RunTest() OVERRIDE { + void RunTest() override { CreateOSRBrowser(kTestUrl); #if !defined(DEBUGGER_ATTACHED) // Each test has a 5 second timeout. After this timeout it will be destroyed @@ -229,7 +227,7 @@ class OSRTestHandler : public RoutingTestHandler, #endif // DEBUGGER_ATTACHED } - virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnAfterCreated(CefRefPtr<CefBrowser> browser) override { if (test_type_ == OSR_TEST_IS_WINDOWLESS) { EXPECT_TRUE(browser->GetHost()->IsWindowRenderingDisabled()); DestroySucceededTestSoon(); @@ -237,9 +235,9 @@ class OSRTestHandler : public RoutingTestHandler, RoutingTestHandler::OnAfterCreated(browser); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, + void OnLoadEnd(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + int httpStatusCode) override { if (!started()) return; @@ -257,12 +255,12 @@ class OSRTestHandler : public RoutingTestHandler, } } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { EXPECT_TRUE(browser.get()); if (!started()) @@ -300,22 +298,22 @@ class OSRTestHandler : public RoutingTestHandler, } // CefClient methods, providing handlers - virtual CefRefPtr<CefRenderHandler> GetRenderHandler() OVERRIDE { + CefRefPtr<CefRenderHandler> GetRenderHandler() override { return this; } - virtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() OVERRIDE { + CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() override { return this; } - virtual CefRefPtr<CefRequestHandler> GetRequestHandler() OVERRIDE { + CefRefPtr<CefRequestHandler> GetRequestHandler() override { return this; } - virtual CefRefPtr<CefResourceHandler> GetResourceHandler( + CefRefPtr<CefResourceHandler> GetResourceHandler( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + CefRefPtr<CefRequest> request) override { std::string url = request->GetURL(); if (url.find(kTestUrl) == 0) { @@ -329,8 +327,8 @@ class OSRTestHandler : public RoutingTestHandler, } // CefRenderHandler methods - virtual bool GetViewRect(CefRefPtr<CefBrowser> browser, - CefRect& rect) OVERRIDE { + bool GetViewRect(CefRefPtr<CefBrowser> browser, + CefRect& rect) override { if (test_type_ == OSR_TEST_RESIZE && started()) { rect = CefRect(0, 0, kOsrWidth * 2, kOsrHeight * 2); return true; @@ -339,11 +337,11 @@ class OSRTestHandler : public RoutingTestHandler, return true; } - virtual bool GetScreenPoint(CefRefPtr<CefBrowser> browser, - int viewX, - int viewY, - int& screenX, - int& screenY) OVERRIDE { + bool GetScreenPoint(CefRefPtr<CefBrowser> browser, + int viewX, + int viewY, + int& screenX, + int& screenY) override { if (test_type_ == OSR_TEST_SCREEN_POINT && started()) { EXPECT_EQ(viewX, MiddleX(ExpectedRect(4))); EXPECT_EQ(viewY, MiddleY(ExpectedRect(4))); @@ -357,8 +355,8 @@ class OSRTestHandler : public RoutingTestHandler, return false; } - virtual bool GetScreenInfo(CefRefPtr<CefBrowser> browser, - CefScreenInfo& screen_info) { + bool GetScreenInfo(CefRefPtr<CefBrowser> browser, + CefScreenInfo& screen_info) override { screen_info.device_scale_factor = 1; // The screen info rectangles are used by the renderer to create and @@ -371,8 +369,8 @@ class OSRTestHandler : public RoutingTestHandler, return true; } - virtual void OnPopupShow(CefRefPtr<CefBrowser> browser, - bool show) OVERRIDE { + void OnPopupShow(CefRefPtr<CefBrowser> browser, + bool show) override { if (show && started()) { switch (test_type_) { case OSR_TEST_POPUP_SHOW: @@ -399,8 +397,8 @@ class OSRTestHandler : public RoutingTestHandler, } } - virtual void OnPopupSize(CefRefPtr<CefBrowser> browser, - const CefRect& rect) OVERRIDE { + void OnPopupSize(CefRefPtr<CefBrowser> browser, + const CefRect& rect) override { if (started()) { switch (test_type_) { case OSR_TEST_POPUP_SIZE: @@ -413,11 +411,11 @@ class OSRTestHandler : public RoutingTestHandler, } } - virtual void OnPaint(CefRefPtr<CefBrowser> browser, - PaintElementType type, - const RectList& dirtyRects, - const void* buffer, - int width, int height) OVERRIDE { + void OnPaint(CefRefPtr<CefBrowser> browser, + PaintElementType type, + const RectList& dirtyRects, + const void* buffer, + int width, int height) override { // bitmap must as big as GetViewRect said if (test_type_ != OSR_TEST_RESIZE && type == PET_VIEW) { EXPECT_EQ(kOsrWidth, width); @@ -784,17 +782,17 @@ class OSRTestHandler : public RoutingTestHandler, } } - virtual void OnCursorChange(CefRefPtr<CefBrowser> browser, - CefCursorHandle cursor) OVERRIDE { + void OnCursorChange(CefRefPtr<CefBrowser> browser, + CefCursorHandle cursor) override { if (test_type_ == OSR_TEST_CURSOR && started()) { DestroySucceededTestSoon(); } } - virtual bool StartDragging(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefDragData> drag_data, - DragOperationsMask allowed_ops, - int x, int y) { + bool StartDragging(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefDragData> drag_data, + DragOperationsMask allowed_ops, + int x, int y) override { if (test_type_ == OSR_TEST_DRAG_DROP_START_DRAGGING && started()) { DestroySucceededTestSoon(); return false; @@ -823,8 +821,8 @@ class OSRTestHandler : public RoutingTestHandler, return false; } - virtual void UpdateDragCursor(CefRefPtr<CefBrowser> browser, - DragOperation operation) { + void UpdateDragCursor(CefRefPtr<CefBrowser> browser, + DragOperation operation) override { if (test_type_ == OSR_TEST_DRAG_DROP_UPDATE_CURSOR && started()) { if (operation != DRAG_OPERATION_NONE) { browser->GetHost()->DragSourceEndedAt(MiddleX(kDropDivRect), @@ -850,8 +848,8 @@ class OSRTestHandler : public RoutingTestHandler, } } - virtual bool OnTooltip(CefRefPtr<CefBrowser> browser, - CefString& text) OVERRIDE { + bool OnTooltip(CefRefPtr<CefBrowser> browser, + CefString& text) override { if (test_type_ == OSR_TEST_TOOLTIP && started()) { EXPECT_STREQ("EXPECTED_TOOLTIP", text.ToString().c_str()); DestroySucceededTestSoon(); @@ -859,10 +857,10 @@ class OSRTestHandler : public RoutingTestHandler, return false; } - virtual void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefContextMenuParams> params, - CefRefPtr<CefMenuModel> model) OVERRIDE { + void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefContextMenuParams> params, + CefRefPtr<CefMenuModel> model) override { if (!started()) return; if (test_type_ == OSR_TEST_CLICK_RIGHT) { diff --git a/tests/unittests/process_message_unittest.cc b/tests/unittests/process_message_unittest.cc index 50adb351d..c2874cee0 100644 --- a/tests/unittests/process_message_unittest.cc +++ b/tests/unittests/process_message_unittest.cc @@ -44,11 +44,11 @@ class SendRecvRendererTest : public ClientApp::RenderDelegate { public: SendRecvRendererTest() {} - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<ClientApp> app, CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { if (message->GetName() == kSendRecvMsg) { EXPECT_TRUE(browser.get()); EXPECT_EQ(PID_BROWSER, source_process); @@ -75,24 +75,24 @@ class SendRecvTestHandler : public TestHandler { SendRecvTestHandler() { } - virtual void RunTest() OVERRIDE { + void RunTest() override { message_ = CreateTestMessage(); AddResource(kSendRecvUrl, "<html><body>TEST</body></html>", "text/html"); CreateBrowser(kSendRecvUrl); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { // Send the message to the renderer process. EXPECT_TRUE(browser->SendProcessMessage(PID_RENDERER, message_)); } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { EXPECT_TRUE(browser.get()); EXPECT_EQ(PID_RENDERER, source_process); EXPECT_TRUE(message.get()); diff --git a/tests/unittests/request_context_unittest.cc b/tests/unittests/request_context_unittest.cc index d6abdbd3e..5eebf827d 100644 --- a/tests/unittests/request_context_unittest.cc +++ b/tests/unittests/request_context_unittest.cc @@ -33,7 +33,7 @@ TEST(RequestContextTest, CreateContext) { class Handler : public CefRequestContextHandler { public: Handler() {} - virtual CefRefPtr<CefCookieManager> GetCookieManager() { return NULL; } + CefRefPtr<CefCookieManager> GetCookieManager() override { return NULL; } private: IMPLEMENT_REFCOUNTING(Handler); }; @@ -102,7 +102,7 @@ class CookieTestHandler : public TestHandler { explicit RequestContextHandler(CookieTestHandler* handler) : handler_(handler) {} - virtual CefRefPtr<CefCookieManager> GetCookieManager() OVERRIDE { + CefRefPtr<CefCookieManager> GetCookieManager() override { EXPECT_TRUE(handler_); handler_->got_get_cookie_manager_.yes(); return handler_->cookie_manager_; @@ -121,7 +121,7 @@ class CookieTestHandler : public TestHandler { CookieTestHandler(const std::string& url) : url_(url) {} - virtual void RunTest() OVERRIDE { + void RunTest() override { AddResource(url_, "<html>" "<head><script>document.cookie='name1=value1';</script></head>" @@ -136,9 +136,9 @@ class CookieTestHandler : public TestHandler { CreateBrowser(url_, context_); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { CefRefPtr<CefRequestContext> context = browser->GetHost()->GetRequestContext(); EXPECT_TRUE(context.get()); EXPECT_TRUE(context->IsSame(context_)); @@ -156,14 +156,14 @@ class CookieTestHandler : public TestHandler { explicit TestVisitor(CookieTestHandler* handler) : handler_(handler) { } - virtual ~TestVisitor() { + ~TestVisitor() override { // Destroy the test. CefPostTask(TID_UI, base::Bind(&CookieTestHandler::DestroyTest, handler_)); } - virtual bool Visit(const CefCookie& cookie, int count, int total, - bool& deleteCookie) { + bool Visit(const CefCookie& cookie, int count, int total, + bool& deleteCookie) override { const std::string& name = CefString(&cookie.name); const std::string& value = CefString(&cookie.value); if (name == "name1" && value == "value1") @@ -179,7 +179,7 @@ class CookieTestHandler : public TestHandler { cookie_manager_->VisitAllCookies(new TestVisitor(this)); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { // Verify test expectations. EXPECT_TRUE(got_get_cookie_manager_); EXPECT_TRUE(got_cookie_); @@ -219,7 +219,7 @@ class PopupTestHandler : public TestHandler { explicit RequestContextHandler(PopupTestHandler* handler) : handler_(handler) {} - virtual CefRefPtr<CefCookieManager> GetCookieManager() OVERRIDE { + CefRefPtr<CefCookieManager> GetCookieManager() override { EXPECT_TRUE(handler_); if (url_ == handler_->url_) handler_->got_get_cookie_manager1_.yes(); @@ -259,7 +259,7 @@ class PopupTestHandler : public TestHandler { popup_url_ = "http://tests-simple-rch2.com/pop1.html"; } - virtual void RunTest() OVERRIDE { + void RunTest() override { std::string link; if (mode_ == MODE_TARGETED_LINK) { link = "<a href=\"" + std::string(popup_url_) + @@ -292,9 +292,9 @@ class PopupTestHandler : public TestHandler { CreateBrowser(url_, context_); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { CefRefPtr<CefRequestContext> context = browser->GetHost()->GetRequestContext(); EXPECT_TRUE(context.get()); EXPECT_TRUE(context->IsSame(context_)); @@ -315,15 +315,15 @@ class PopupTestHandler : public TestHandler { } } - virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - const CefString& target_url, - const CefString& target_frame_name, - const CefPopupFeatures& popupFeatures, - CefWindowInfo& windowInfo, - CefRefPtr<CefClient>& client, - CefBrowserSettings& settings, - bool* no_javascript_access) OVERRIDE { + bool OnBeforePopup(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const CefString& target_url, + const CefString& target_frame_name, + const CefPopupFeatures& popupFeatures, + CefWindowInfo& windowInfo, + CefRefPtr<CefClient>& client, + CefBrowserSettings& settings, + bool* no_javascript_access) override { got_on_before_popup_.yes(); const std::string& url = target_url; @@ -331,7 +331,7 @@ class PopupTestHandler : public TestHandler { return false; } - virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) { + void OnBeforeClose(CefRefPtr<CefBrowser> browser) override { TestHandler::OnBeforeClose(browser); if (browser->IsPopup()) @@ -364,14 +364,14 @@ class PopupTestHandler : public TestHandler { explicit TestVisitor(PopupTestHandler* handler) : handler_(handler) { } - virtual ~TestVisitor() { + ~TestVisitor() override { // Destroy the test. CefPostTask(TID_UI, base::Bind(&PopupTestHandler::DestroyTest, handler_)); } - virtual bool Visit(const CefCookie& cookie, int count, int total, - bool& deleteCookie) { + bool Visit(const CefCookie& cookie, int count, int total, + bool& deleteCookie) override { const std::string& name = CefString(&cookie.name); const std::string& value = CefString(&cookie.value); if (name == "name1" && value == "value1") @@ -389,7 +389,7 @@ class PopupTestHandler : public TestHandler { cookie_manager_->VisitAllCookies(new TestVisitor(this)); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { // Verify test expectations. EXPECT_TRUE(got_get_cookie_manager1_); EXPECT_TRUE(got_load_end1_); diff --git a/tests/unittests/request_handler_unittest.cc b/tests/unittests/request_handler_unittest.cc index 8f8eab020..1b84dcc03 100644 --- a/tests/unittests/request_handler_unittest.cc +++ b/tests/unittests/request_handler_unittest.cc @@ -34,9 +34,9 @@ class NetNotifyBrowserTest : public ClientApp::BrowserDelegate { public: NetNotifyBrowserTest() {} - virtual void OnBeforeChildProcessLaunch( + void OnBeforeChildProcessLaunch( CefRefPtr<ClientApp> app, - CefRefPtr<CefCommandLine> command_line) OVERRIDE { + CefRefPtr<CefCommandLine> command_line) override { if (!g_net_notify_test) return; @@ -56,7 +56,7 @@ class NetNotifyTestHandler : public TestHandler { explicit RequestContextHandler(NetNotifyTestHandler* handler) : handler_(handler) {} - virtual CefRefPtr<CefCookieManager> GetCookieManager() OVERRIDE { + CefRefPtr<CefCookieManager> GetCookieManager() override { EXPECT_TRUE(handler_); EXPECT_TRUE(CefCurrentlyOn(TID_IO)); @@ -92,7 +92,7 @@ class NetNotifyTestHandler : public TestHandler { test_type_(test_type), same_origin_(same_origin) {} - virtual void SetupTest() OVERRIDE { + void SetupTest() override { url1_ = base::StringPrintf("%snav1.html?t=%d", kNetNotifyOrigin1, test_type_); url2_ = base::StringPrintf("%snav2.html?t=%d", @@ -119,15 +119,15 @@ class NetNotifyTestHandler : public TestHandler { CefRequestContext::CreateContext(context_handler_.get())); } - virtual void RunTest() OVERRIDE { + void RunTest() override { // Navigate to the 2nd URL. context_handler_->SetURL(url2_); GetBrowser()->GetMainFrame()->LoadURL(url2_); } - virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); const std::string& url = request->GetURL(); @@ -141,10 +141,10 @@ class NetNotifyTestHandler : public TestHandler { return false; } - virtual CefRefPtr<CefResourceHandler> GetResourceHandler( + CefRefPtr<CefResourceHandler> GetResourceHandler( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + CefRefPtr<CefRequest> request) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); const std::string& url = request->GetURL(); @@ -158,10 +158,10 @@ class NetNotifyTestHandler : public TestHandler { return TestHandler::GetResourceHandler(browser, frame, request); } - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - bool is_redirect) OVERRIDE { + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool is_redirect) override { std::string url = request->GetURL(); // Check if the load has already been delayed. @@ -208,9 +208,9 @@ class NetNotifyTestHandler : public TestHandler { return false; } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { const std::string& url = frame->GetURL(); if (url.find(url1_) == 0) { got_load_end1_.yes(); @@ -223,10 +223,10 @@ class NetNotifyTestHandler : public TestHandler { } } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { if (message->GetName().ToString() == kNetNotifyMsg) { CefRefPtr<CefListValue> args = message->GetArgumentList(); EXPECT_TRUE(args.get()); @@ -267,14 +267,14 @@ class NetNotifyTestHandler : public TestHandler { explicit TestVisitor(NetNotifyTestHandler* handler) : handler_(handler) { } - virtual ~TestVisitor() { + ~TestVisitor() override { // Destroy the test. CefPostTask(TID_UI, base::Bind(&NetNotifyTestHandler::DestroyTest, handler_)); } - virtual bool Visit(const CefCookie& cookie, int count, int total, - bool& deleteCookie) { + bool Visit(const CefCookie& cookie, int count, int total, + bool& deleteCookie) override { const std::string& name = CefString(&cookie.name); const std::string& value = CefString(&cookie.value); if (name == "name1" && value == "value1") @@ -292,7 +292,7 @@ class NetNotifyTestHandler : public TestHandler { cookie_manager_->VisitAllCookies(new TestVisitor(this)); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { int browser_id = GetBrowser()->GetIdentifier(); // Verify test expectations. @@ -361,9 +361,9 @@ class NetNotifyRendererTest : public ClientApp::RenderDelegate, NetNotifyRendererTest() : run_test_(false) {} - virtual void OnRenderThreadCreated( + void OnRenderThreadCreated( CefRefPtr<ClientApp> app, - CefRefPtr<CefListValue> extra_info) OVERRIDE { + CefRefPtr<CefListValue> extra_info) override { if (!g_net_notify_test) { // Check that the test should be run. CefRefPtr<CefCommandLine> command_line = @@ -376,16 +376,16 @@ class NetNotifyRendererTest : public ClientApp::RenderDelegate, run_test_ = true; } - virtual CefRefPtr<CefLoadHandler> GetLoadHandler( - CefRefPtr<ClientApp> app) OVERRIDE { + CefRefPtr<CefLoadHandler> GetLoadHandler( + CefRefPtr<ClientApp> app) override { if (run_test_) return this; return NULL; } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { if (!run_test_) return; @@ -399,11 +399,11 @@ class NetNotifyRendererTest : public ClientApp::RenderDelegate, EXPECT_TRUE(browser->SendProcessMessage(PID_BROWSER, message)); } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<ClientApp> app, CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { if (message->GetName().ToString() == kNetNotifyMsg) { CefRefPtr<CefListValue> args = message->GetArgumentList(); EXPECT_TRUE(args.get()); diff --git a/tests/unittests/request_unittest.cc b/tests/unittests/request_unittest.cc index 8a34d457e..3886c11bb 100644 --- a/tests/unittests/request_unittest.cc +++ b/tests/unittests/request_unittest.cc @@ -143,7 +143,7 @@ class RequestSendRecvTestHandler : public TestHandler { public: RequestSendRecvTestHandler() {} - virtual void RunTest() OVERRIDE { + void RunTest() override { // Create the test request CreateRequest(request_); @@ -151,16 +151,16 @@ class RequestSendRecvTestHandler : public TestHandler { CreateBrowser("about:blank"); } - virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnAfterCreated(CefRefPtr<CefBrowser> browser) override { TestHandler::OnAfterCreated(browser); // Load the test request browser->GetMainFrame()->LoadRequest(request_); } - virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request) override { // Verify that the request is the same TestRequestEqual(request_, request, true); EXPECT_EQ(RT_MAIN_FRAME, request->GetResourceType()); @@ -171,10 +171,10 @@ class RequestSendRecvTestHandler : public TestHandler { return false; } - virtual CefRefPtr<CefResourceHandler> GetResourceHandler( + CefRefPtr<CefResourceHandler> GetResourceHandler( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + CefRefPtr<CefRequest> request) override { // Verify that the request is the same TestRequestEqual(request_, request, true); EXPECT_EQ(RT_MAIN_FRAME, request->GetResourceType()); @@ -353,12 +353,12 @@ class TypeRendererTest : public ClientApp::RenderDelegate { TypeRendererTest() : expectations_(false, true) {} - virtual bool OnBeforeNavigation(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - cef_navigation_type_t navigation_type, - bool is_redirect) OVERRIDE { + bool OnBeforeNavigation(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + cef_navigation_type_t navigation_type, + bool is_redirect) override { if (expectations_.GotRequest(request) && expectations_.IsDone(false)) SendTestResults(browser); return false; @@ -395,7 +395,7 @@ class TypeTestHandler : public TestHandler { completed_render_side_(false), destroyed_(false) {} - virtual void RunTest() OVERRIDE { + void RunTest() override { AddResource(std::string(kTypeTestOrigin) + "main.html", "<html>" "<head>" @@ -444,27 +444,27 @@ class TypeTestHandler : public TestHandler { #endif } - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - bool is_redirect) OVERRIDE { + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool is_redirect) override { browse_expectations_.GotRequest(request); return false; } - virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request) override { load_expectations_.GotRequest(request); return false; } - virtual CefRefPtr<CefResourceHandler> GetResourceHandler( + CefRefPtr<CefResourceHandler> GetResourceHandler( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + CefRefPtr<CefRequest> request) override { if (get_expectations_.GotRequest(request) && get_expectations_.IsDone(false)) { completed_browser_side_ = true; @@ -476,10 +476,10 @@ class TypeTestHandler : public TestHandler { return TestHandler::GetResourceHandler(browser, frame, request); } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { const std::string& msg_name = message->GetName(); if (msg_name == kTypeTestCompleteMsg) { // Test that the renderer side succeeded. @@ -505,7 +505,7 @@ class TypeTestHandler : public TestHandler { DestroyTest(); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { if (destroyed_) return; destroyed_ = true; diff --git a/tests/unittests/routing_test_handler.cc b/tests/unittests/routing_test_handler.cc index 554d1b5db..b5563768b 100644 --- a/tests/unittests/routing_test_handler.cc +++ b/tests/unittests/routing_test_handler.cc @@ -20,32 +20,32 @@ class RoutingRenderDelegate : public ClientApp::RenderDelegate { public: RoutingRenderDelegate() {} - virtual void OnWebKitInitialized(CefRefPtr<ClientApp> app) OVERRIDE { + void OnWebKitInitialized(CefRefPtr<ClientApp> app) override { // Create the renderer-side router for query handling. CefMessageRouterConfig config; SetRouterConfig(config); message_router_ = CefMessageRouterRendererSide::Create(config); } - virtual void OnContextCreated(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefV8Context> context) OVERRIDE { + void OnContextCreated(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefV8Context> context) override { message_router_->OnContextCreated(browser, frame, context); } - virtual void OnContextReleased(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefV8Context> context) OVERRIDE { + void OnContextReleased(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefV8Context> context) override { message_router_->OnContextReleased(browser, frame, context); } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<ClientApp> app, CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { return message_router_->OnProcessMessageReceived( browser, source_process, message); } diff --git a/tests/unittests/routing_test_handler.h b/tests/unittests/routing_test_handler.h index 67dd9906e..d8b411a52 100644 --- a/tests/unittests/routing_test_handler.h +++ b/tests/unittests/routing_test_handler.h @@ -18,23 +18,23 @@ class RoutingTestHandler : public: RoutingTestHandler(); - virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE; - virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE; - virtual void OnRenderProcessTerminated( + void OnAfterCreated(CefRefPtr<CefBrowser> browser) override; + void OnBeforeClose(CefRefPtr<CefBrowser> browser) override; + void OnRenderProcessTerminated( CefRefPtr<CefBrowser> browser, - TerminationStatus status) OVERRIDE; + TerminationStatus status) override; // Only call this method if the navigation isn't canceled. - virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request, - bool is_redirect) OVERRIDE; + bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool is_redirect) override; // Returns true if the router handled the navigation. - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE; + CefRefPtr<CefProcessMessage> message) override; private: CefRefPtr<CefMessageRouterBrowserSide> message_router_; diff --git a/tests/unittests/scheme_handler_unittest.cc b/tests/unittests/scheme_handler_unittest.cc index 7cec49ec5..5a1527b3a 100644 --- a/tests/unittests/scheme_handler_unittest.cc +++ b/tests/unittests/scheme_handler_unittest.cc @@ -87,7 +87,7 @@ class TestSchemeHandler : public TestHandler { g_current_handler = this; } - virtual void RunTest() OVERRIDE { + void RunTest() override { CreateBrowser(test_results_->url); } @@ -97,9 +97,9 @@ class TestSchemeHandler : public TestHandler { TestHandler::DestroyTest(); } - virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request) override { std::string newUrl = request->GetURL(); if (!test_results_->exit_url.empty() && newUrl.find(test_results_->exit_url) != std::string::npos) { @@ -130,9 +130,9 @@ class TestSchemeHandler : public TestHandler { return false; } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { std::string url = frame->GetURL(); if (url == test_results_->url || test_results_->status_code != 200) { test_results_->got_output.yes(); @@ -145,11 +145,11 @@ class TestSchemeHandler : public TestHandler { } } - virtual void OnLoadError(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - ErrorCode errorCode, - const CefString& errorText, - const CefString& failedUrl) OVERRIDE { + void OnLoadError(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + ErrorCode errorCode, + const CefString& errorText, + const CefString& failedUrl) override { test_results_->got_error.yes(); DestroyTest(); } @@ -167,8 +167,8 @@ class ClientSchemeHandler : public CefResourceHandler { has_delayed_(false) { } - virtual bool ProcessRequest(CefRefPtr<CefRequest> request, - CefRefPtr<CefCallback> callback) OVERRIDE { + bool ProcessRequest(CefRefPtr<CefRequest> request, + CefRefPtr<CefCallback> callback) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); bool handled = false; @@ -210,9 +210,9 @@ class ClientSchemeHandler : public CefResourceHandler { return false; } - virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, - int64& response_length, - CefString& redirectUrl) OVERRIDE { + void GetResponseHeaders(CefRefPtr<CefResponse> response, + int64& response_length, + CefString& redirectUrl) override { if (is_sub_) { response->SetStatus(test_results_->sub_status_code); @@ -241,14 +241,14 @@ class ClientSchemeHandler : public CefResourceHandler { } } - virtual void Cancel() OVERRIDE { + void Cancel() override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); } - virtual bool ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr<CefCallback> callback) OVERRIDE { + bool ReadResponse(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr<CefCallback> callback) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); if (test_results_->delay > 0) { @@ -312,12 +312,11 @@ class ClientSchemeHandlerFactory : public CefSchemeHandlerFactory { : test_results_(tr) { } - virtual CefRefPtr<CefResourceHandler> Create( + CefRefPtr<CefResourceHandler> Create( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& scheme_name, - CefRefPtr<CefRequest> request) - OVERRIDE { + CefRefPtr<CefRequest> request) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); return new ClientSchemeHandler(test_results_); } diff --git a/tests/unittests/stream_resource_handler_unittest.cc b/tests/unittests/stream_resource_handler_unittest.cc index 057f18a96..bb8182a78 100644 --- a/tests/unittests/stream_resource_handler_unittest.cc +++ b/tests/unittests/stream_resource_handler_unittest.cc @@ -54,7 +54,7 @@ class ReadHandler : public CefReadHandler { return expected_result_; } - virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE { + size_t Read(void* ptr, size_t size, size_t n) override { EXPECT_EQ(1U, size); // Read the minimum of requested size, remaining size or kReadBlockSize. @@ -68,22 +68,22 @@ class ReadHandler : public CefReadHandler { return read_bytes; } - virtual int Seek(int64 offset, int whence) OVERRIDE { + int Seek(int64 offset, int whence) override { EXPECT_TRUE(false); // Not reached. return 0; } - virtual int64 Tell() OVERRIDE { + int64 Tell() override { EXPECT_TRUE(false); // Not reached. return 0; } - virtual int Eof() OVERRIDE { + int Eof() override { EXPECT_TRUE(false); // Not reached. return 0; } - virtual bool MayBlock() OVERRIDE { + bool MayBlock() override { return may_block_; } @@ -102,7 +102,7 @@ class ReadTestHandler : public RoutingTestHandler { : may_block_(may_block), expected_result_(0) {} - virtual void RunTest() OVERRIDE { + void RunTest() override { // Create the browser. CreateBrowser(kTestUrl); @@ -113,10 +113,10 @@ class ReadTestHandler : public RoutingTestHandler { #endif } - virtual CefRefPtr<CefResourceHandler> GetResourceHandler( + CefRefPtr<CefResourceHandler> GetResourceHandler( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE { + CefRefPtr<CefRequest> request) override { got_resource_handler_.yes(); const std::string& url = request->GetURL(); @@ -131,12 +131,12 @@ class ReadTestHandler : public RoutingTestHandler { return new CefStreamResourceHandler("text/html", stream); } - virtual bool OnQuery(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int64 query_id, - const CefString& request, - bool persistent, - CefRefPtr<Callback> callback) OVERRIDE { + bool OnQuery(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int64 query_id, + const CefString& request, + bool persistent, + CefRefPtr<Callback> callback) override { got_on_query_.yes(); const int actual_result = atoi(request.ToString().c_str()); @@ -147,10 +147,10 @@ class ReadTestHandler : public RoutingTestHandler { return true; } - virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, - bool isLoading, - bool canGoBack, - bool canGoForward) OVERRIDE { + void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading, + bool canGoBack, + bool canGoForward) override { if (!isLoading) { got_on_loading_state_change_done_.yes(); DestroyTestIfDone(); @@ -163,7 +163,7 @@ class ReadTestHandler : public RoutingTestHandler { DestroyTest(); } - virtual void DestroyTest() OVERRIDE { + void DestroyTest() override { EXPECT_TRUE(got_resource_handler_); EXPECT_TRUE(got_on_query_); EXPECT_TRUE(got_on_loading_state_change_done_); diff --git a/tests/unittests/stream_unittest.cc b/tests/unittests/stream_unittest.cc index 15062404d..589dbcfa1 100644 --- a/tests/unittests/stream_unittest.cc +++ b/tests/unittests/stream_unittest.cc @@ -176,11 +176,11 @@ class ReadHandlerTester : public CefReadHandler { tell_called_(false), eof_called_(false) { } - virtual ~ReadHandlerTester() { + ~ReadHandlerTester() override { g_ReadHandlerTesterDeleted = true; } - virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE { + size_t Read(void* ptr, size_t size, size_t n) override { read_called_ = true; read_ptr_ = ptr; read_size_ = size; @@ -188,24 +188,24 @@ class ReadHandlerTester : public CefReadHandler { return 10; } - virtual int Seek(int64 offset, int whence) OVERRIDE { + int Seek(int64 offset, int whence) override { seek_called_ = true; seek_offset_ = offset; seek_whence_ = whence; return 10; } - virtual int64 Tell() OVERRIDE { + int64 Tell() override { tell_called_ = true; return 10; } - virtual int Eof() OVERRIDE { + int Eof() override { eof_called_ = true; return 10; } - virtual bool MayBlock() OVERRIDE { + bool MayBlock() override { return false; } @@ -286,11 +286,11 @@ class WriteHandlerTester : public CefWriteHandler { tell_called_(false), flush_called_(false) { } - virtual ~WriteHandlerTester() { + ~WriteHandlerTester() override { g_WriteHandlerTesterDeleted = true; } - virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE { + size_t Write(const void* ptr, size_t size, size_t n) override { write_called_ = true; write_ptr_ = ptr; write_size_ = size; @@ -298,24 +298,24 @@ class WriteHandlerTester : public CefWriteHandler { return 10; } - virtual int Seek(int64 offset, int whence) OVERRIDE { + int Seek(int64 offset, int whence) override { seek_called_ = true; seek_offset_ = offset; seek_whence_ = whence; return 10; } - virtual int64 Tell() OVERRIDE { + int64 Tell() override { tell_called_ = true; return 10; } - virtual int Flush() OVERRIDE { + int Flush() override { flush_called_ = true; return 10; } - virtual bool MayBlock() OVERRIDE { + bool MayBlock() override { return false; } diff --git a/tests/unittests/test_handler.h b/tests/unittests/test_handler.h index cf5ed63bd..7e5f80cd4 100644 --- a/tests/unittests/test_handler.h +++ b/tests/unittests/test_handler.h @@ -99,7 +99,7 @@ class TestHandler : public CefClient, // The |completion_state| object if specified must outlive this class. explicit TestHandler(CompletionState* completion_state = NULL); - virtual ~TestHandler(); + ~TestHandler() override; // Implement this method to set up the test. Only used in combination with a // Collection. Call SetupComplete() once the setup is complete. @@ -110,47 +110,47 @@ class TestHandler : public CefClient, virtual void RunTest() =0; // CefClient methods. Add new methods as needed by test cases. - virtual CefRefPtr<CefDialogHandler> GetDialogHandler() OVERRIDE { + CefRefPtr<CefDialogHandler> GetDialogHandler() override { return this; } - virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() OVERRIDE { + CefRefPtr<CefDisplayHandler> GetDisplayHandler() override { return this; } - virtual CefRefPtr<CefDownloadHandler> GetDownloadHandler() OVERRIDE { + CefRefPtr<CefDownloadHandler> GetDownloadHandler() override { return this; } - virtual CefRefPtr<CefGeolocationHandler> GetGeolocationHandler() OVERRIDE { + CefRefPtr<CefGeolocationHandler> GetGeolocationHandler() override { return this; } - virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() OVERRIDE { + CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() override { return this; } - virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() OVERRIDE { + CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() override { return this; } - virtual CefRefPtr<CefLoadHandler> GetLoadHandler() OVERRIDE { + CefRefPtr<CefLoadHandler> GetLoadHandler() override { return this; } - virtual CefRefPtr<CefRequestHandler> GetRequestHandler() OVERRIDE { + CefRefPtr<CefRequestHandler> GetRequestHandler() override { return this; } // CefDownloadHandler methods - virtual void OnBeforeDownload( + void OnBeforeDownload( CefRefPtr<CefBrowser> browser, CefRefPtr<CefDownloadItem> download_item, const CefString& suggested_name, - CefRefPtr<CefBeforeDownloadCallback> callback) OVERRIDE {} + CefRefPtr<CefBeforeDownloadCallback> callback) override {} // CefLifeSpanHandler methods - virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE; - virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE; + void OnAfterCreated(CefRefPtr<CefBrowser> browser) override; + void OnBeforeClose(CefRefPtr<CefBrowser> browser) override; // CefRequestHandler methods - virtual CefRefPtr<CefResourceHandler> GetResourceHandler( + CefRefPtr<CefResourceHandler> GetResourceHandler( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, - CefRefPtr<CefRequest> request) OVERRIDE; + CefRefPtr<CefRequest> request) override; // These methods should only be used if at most one non-popup browser exists. CefRefPtr<CefBrowser> GetBrowser(); diff --git a/tests/unittests/tracing_unittest.cc b/tests/unittests/tracing_unittest.cc index 94826492c..1de07b323 100644 --- a/tests/unittests/tracing_unittest.cc +++ b/tests/unittests/tracing_unittest.cc @@ -5,7 +5,7 @@ // Include this first to avoid type conflicts with CEF headers. #include "tests/unittests/chromium_includes.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/synchronization/waitable_event.h" #include "include/base/cef_bind.h" @@ -89,7 +89,7 @@ class TracingTestHandler : public CefEndTracingCallback, } // CefEndTracingCallback method: - virtual void OnEndTracingComplete(const CefString& tracing_file) OVERRIDE { + void OnEndTracingComplete(const CefString& tracing_file) override { EXPECT_UI_THREAD(); base::FilePath file_path(tracing_file); @@ -104,7 +104,7 @@ class TracingTestHandler : public CefEndTracingCallback, CefBeginTracing(kTraceTestCategory, this); } - virtual void OnComplete() OVERRIDE { + void OnComplete() override { EXPECT_UI_THREAD(); switch (type_) { @@ -336,7 +336,7 @@ class TracingTestHandler : public CefEndTracingCallback, } private: - virtual ~TracingTestHandler() {} + ~TracingTestHandler() override {} // Handle used to notify when the test is complete. base::WaitableEvent completion_event_; diff --git a/tests/unittests/urlrequest_unittest.cc b/tests/unittests/urlrequest_unittest.cc index 435a23082..1880a6df7 100644 --- a/tests/unittests/urlrequest_unittest.cc +++ b/tests/unittests/urlrequest_unittest.cc @@ -8,7 +8,7 @@ // Include this first to avoid type conflicts with CEF headers. #include "tests/unittests/chromium_includes.h" -#include "base/file_util.h" +#include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/strings/stringprintf.h" #include "base/synchronization/waitable_event.h" @@ -146,12 +146,12 @@ void TestSaveCookie(base::WaitableEvent* event, bool* cookie_exists) { : event_(event), cookie_exists_(cookie_exists) { } - virtual ~Visitor() { + ~Visitor() override { event_->Signal(); } - virtual bool Visit(const CefCookie& cookie, int count, int total, - bool& deleteCookie) OVERRIDE { + bool Visit(const CefCookie& cookie, int count, int total, + bool& deleteCookie) override { std::string cookie_name = CefString(&cookie.name); if (cookie_name == kRequestSaveCookieName) { *cookie_exists_ = true; @@ -185,8 +185,8 @@ class RequestSchemeHandler : public CefResourceHandler { offset_(0) { } - virtual bool ProcessRequest(CefRefPtr<CefRequest> request, - CefRefPtr<CefCallback> callback) OVERRIDE { + bool ProcessRequest(CefRefPtr<CefRequest> request, + CefRefPtr<CefCallback> callback) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); // Shouldn't get here if we're not following redirects. @@ -229,9 +229,9 @@ class RequestSchemeHandler : public CefResourceHandler { return true; } - virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, - int64& response_length, - CefString& redirectUrl) OVERRIDE { + void GetResponseHeaders(CefRefPtr<CefResponse> response, + int64& response_length, + CefString& redirectUrl) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); response->SetStatus(settings_.response->GetStatus()); @@ -252,10 +252,10 @@ class RequestSchemeHandler : public CefResourceHandler { response_length = settings_.response_data.length(); } - virtual bool ReadResponse(void* response_data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr<CefCallback> callback) OVERRIDE { + bool ReadResponse(void* response_data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr<CefCallback> callback) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); bool has_data = false; @@ -277,7 +277,7 @@ class RequestSchemeHandler : public CefResourceHandler { return has_data; } - virtual void Cancel() OVERRIDE { + void Cancel() override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); } @@ -297,8 +297,8 @@ class RequestRedirectSchemeHandler : public CefResourceHandler { response_(response) { } - virtual bool ProcessRequest(CefRefPtr<CefRequest> request, - CefRefPtr<CefCallback> callback) OVERRIDE { + bool ProcessRequest(CefRefPtr<CefRequest> request, + CefRefPtr<CefCallback> callback) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); // Verify that the request was sent correctly. @@ -309,9 +309,9 @@ class RequestRedirectSchemeHandler : public CefResourceHandler { return true; } - virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, - int64& response_length, - CefString& redirectUrl) OVERRIDE { + void GetResponseHeaders(CefRefPtr<CefResponse> response, + int64& response_length, + CefString& redirectUrl) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); response->SetStatus(response_->GetStatus()); @@ -325,16 +325,16 @@ class RequestRedirectSchemeHandler : public CefResourceHandler { response_length = 0; } - virtual bool ReadResponse(void* response_data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr<CefCallback> callback) OVERRIDE { + bool ReadResponse(void* response_data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr<CefCallback> callback) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); NOTREACHED(); return false; } - virtual void Cancel() OVERRIDE { + void Cancel() override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); } @@ -351,12 +351,11 @@ class RequestSchemeHandlerFactory : public CefSchemeHandlerFactory { RequestSchemeHandlerFactory() { } - virtual CefRefPtr<CefResourceHandler> Create( + CefRefPtr<CefResourceHandler> Create( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& scheme_name, - CefRefPtr<CefRequest> request) - OVERRIDE { + CefRefPtr<CefRequest> request) override { EXPECT_TRUE(CefCurrentlyOn(TID_IO)); std::string url = request->GetURL(); @@ -431,7 +430,7 @@ class RequestClient : public CefURLRequestClient { return client; } - virtual void OnRequestComplete(CefRefPtr<CefURLRequest> request) OVERRIDE { + void OnRequestComplete(CefRefPtr<CefURLRequest> request) override { request_complete_ct_++; request_ = request->GetRequest(); @@ -445,16 +444,16 @@ class RequestClient : public CefURLRequestClient { delegate_->OnRequestComplete(this); } - virtual void OnUploadProgress(CefRefPtr<CefURLRequest> request, - uint64 current, - uint64 total) OVERRIDE { + void OnUploadProgress(CefRefPtr<CefURLRequest> request, + uint64 current, + uint64 total) override { upload_progress_ct_++; upload_total_ = total; } - virtual void OnDownloadProgress(CefRefPtr<CefURLRequest> request, - uint64 current, - uint64 total) OVERRIDE { + void OnDownloadProgress(CefRefPtr<CefURLRequest> request, + uint64 current, + uint64 total) override { response_ = request->GetResponse(); EXPECT_TRUE(response_.get()); EXPECT_TRUE(response_->IsReadOnly()); @@ -462,9 +461,9 @@ class RequestClient : public CefURLRequestClient { download_total_ = total; } - virtual void OnDownloadData(CefRefPtr<CefURLRequest> request, - const void* data, - size_t data_length) OVERRIDE { + void OnDownloadData(CefRefPtr<CefURLRequest> request, + const void* data, + size_t data_length) override { response_ = request->GetResponse(); EXPECT_TRUE(response_.get()); EXPECT_TRUE(response_->IsReadOnly()); @@ -472,12 +471,12 @@ class RequestClient : public CefURLRequestClient { download_data_ += std::string(static_cast<const char*>(data), data_length); } - virtual bool GetAuthCredentials(bool isProxy, - const CefString& host, - int port, - const CefString& realm, - const CefString& scheme, - CefRefPtr<CefAuthCallback> callback) OVERRIDE { + bool GetAuthCredentials(bool isProxy, + const CefString& host, + int port, + const CefString& realm, + const CefString& scheme, + CefRefPtr<CefAuthCallback> callback) override { return false; } @@ -699,7 +698,7 @@ class RequestTestRunner { settings_(settings) { } - virtual void OnRequestComplete(CefRefPtr<RequestClient> client) OVERRIDE { + void OnRequestComplete(CefRefPtr<RequestClient> client) override { CefRefPtr<CefRequest> expected_request; CefRefPtr<CefResponse> expected_response; @@ -850,11 +849,11 @@ class RequestRendererTest : public ClientApp::RenderDelegate, : test_runner_(this, false) { } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<ClientApp> app, CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { if (message->GetName() == kRequestTestMsg) { app_ = app; browser_ = browser; @@ -877,7 +876,7 @@ class RequestRendererTest : public ClientApp::RenderDelegate, protected: // Return from the test. - virtual void DestroyTest(const RequestRunSettings& settings) OVERRIDE { + void DestroyTest(const RequestRunSettings& settings) override { // Check if the test has failed. bool result = !TestFailed(); @@ -915,7 +914,7 @@ class RequestTestHandler : public TestHandler, test_runner_(this, true) { } - virtual void RunTest() OVERRIDE { + void RunTest() override { EXPECT_TRUE(test_url_ != NULL); AddResource(test_url_, "<html><body>TEST</body></html>", "text/html"); @@ -937,9 +936,9 @@ class RequestTestHandler : public TestHandler, return msg; } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { if (frame->IsMain()) { if (test_in_browser_) { // Run the test in the browser process. @@ -952,10 +951,10 @@ class RequestTestHandler : public TestHandler, } } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { EXPECT_TRUE(browser.get()); EXPECT_EQ(PID_RENDERER, source_process); EXPECT_TRUE(message.get()); @@ -972,7 +971,7 @@ class RequestTestHandler : public TestHandler, return true; } - virtual void DestroyTest(const RequestRunSettings& settings) OVERRIDE { + void DestroyTest(const RequestRunSettings& settings) override { base::WaitableEvent event(false, false); bool has_save_cookie = false; @@ -1108,7 +1107,7 @@ class InvalidURLTestClient : public CefURLRequestClient { event_.Wait(); } - virtual void OnRequestComplete(CefRefPtr<CefURLRequest> client) OVERRIDE { + void OnRequestComplete(CefRefPtr<CefURLRequest> client) override { EXPECT_EQ(UR_FAILED, client->GetRequestStatus()); // Let the call stack unwind before signaling completion. @@ -1116,31 +1115,31 @@ class InvalidURLTestClient : public CefURLRequestClient { base::Bind(&InvalidURLTestClient::CompleteOnUIThread, this)); } - virtual void OnUploadProgress(CefRefPtr<CefURLRequest> request, - uint64 current, - uint64 total) OVERRIDE { + void OnUploadProgress(CefRefPtr<CefURLRequest> request, + uint64 current, + uint64 total) override { EXPECT_TRUE(false); // Not reached. } - virtual void OnDownloadProgress(CefRefPtr<CefURLRequest> request, - uint64 current, - uint64 total) OVERRIDE { + void OnDownloadProgress(CefRefPtr<CefURLRequest> request, + uint64 current, + uint64 total) override { EXPECT_TRUE(false); // Not reached. } - virtual void OnDownloadData(CefRefPtr<CefURLRequest> request, - const void* data, - size_t data_length) OVERRIDE { + void OnDownloadData(CefRefPtr<CefURLRequest> request, + const void* data, + size_t data_length) override { EXPECT_TRUE(false); // Not reached. } - virtual bool GetAuthCredentials( + bool GetAuthCredentials( bool isProxy, const CefString& host, int port, const CefString& realm, const CefString& scheme, - CefRefPtr<CefAuthCallback> callback) OVERRIDE { + CefRefPtr<CefAuthCallback> callback) override { EXPECT_TRUE(false); // Not reached. return false; } diff --git a/tests/unittests/v8_unittest.cc b/tests/unittests/v8_unittest.cc index 4c0524834..bd7aece33 100644 --- a/tests/unittests/v8_unittest.cc +++ b/tests/unittests/v8_unittest.cc @@ -88,9 +88,9 @@ class V8BrowserTest : public ClientApp::BrowserDelegate { public: V8BrowserTest() {} - virtual void OnBeforeChildProcessLaunch( + void OnBeforeChildProcessLaunch( CefRefPtr<ClientApp> app, - CefRefPtr<CefCommandLine> command_line) OVERRIDE { + CefRefPtr<CefCommandLine> command_line) override { CefString process_type = command_line->GetSwitchValue("type"); if (process_type == "renderer") { // Add the current test mode to the render process command line arguments. @@ -577,10 +577,10 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Accessor : public CefV8Accessor { public: Accessor() : value_(0) {} - virtual bool Get(const CefString& name, - const CefRefPtr<CefV8Value> object, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Get(const CefString& name, + const CefRefPtr<CefV8Value> object, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { EXPECT_STREQ(kName, name.ToString().c_str()); EXPECT_TRUE(object.get()); @@ -595,10 +595,10 @@ class V8RendererTest : public ClientApp::RenderDelegate, return true; } - virtual bool Set(const CefString& name, - const CefRefPtr<CefV8Value> object, - const CefRefPtr<CefV8Value> value, - CefString& exception) OVERRIDE { + bool Set(const CefString& name, + const CefRefPtr<CefV8Value> object, + const CefRefPtr<CefV8Value> value, + CefString& exception) override { EXPECT_STREQ(kName, name.ToString().c_str()); EXPECT_TRUE(object.get()); @@ -671,19 +671,19 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Accessor : public CefV8Accessor { public: Accessor() {} - virtual bool Get(const CefString& name, - const CefRefPtr<CefV8Value> object, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Get(const CefString& name, + const CefRefPtr<CefV8Value> object, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { got_get_.yes(); exception = kGetException; return true; } - virtual bool Set(const CefString& name, - const CefRefPtr<CefV8Value> object, - const CefRefPtr<CefV8Value> value, - CefString& exception) OVERRIDE { + bool Set(const CefString& name, + const CefRefPtr<CefV8Value> object, + const CefRefPtr<CefV8Value> value, + CefString& exception) override { got_set_.yes(); exception = kSetException; return true; @@ -745,18 +745,18 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Accessor : public CefV8Accessor { public: Accessor() {} - virtual bool Get(const CefString& name, - const CefRefPtr<CefV8Value> object, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Get(const CefString& name, + const CefRefPtr<CefV8Value> object, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { got_get_.yes(); return false; } - virtual bool Set(const CefString& name, - const CefRefPtr<CefV8Value> object, - const CefRefPtr<CefV8Value> value, - CefString& exception) OVERRIDE { + bool Set(const CefString& name, + const CefRefPtr<CefV8Value> object, + const CefRefPtr<CefV8Value> value, + CefString& exception) override { got_set_.yes(); return false; } @@ -809,18 +809,18 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Accessor : public CefV8Accessor { public: Accessor() {} - virtual bool Get(const CefString& name, - const CefRefPtr<CefV8Value> object, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Get(const CefString& name, + const CefRefPtr<CefV8Value> object, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { got_get_.yes(); return true; } - virtual bool Set(const CefString& name, - const CefRefPtr<CefV8Value> object, - const CefRefPtr<CefV8Value> value, - CefString& exception) OVERRIDE { + bool Set(const CefString& name, + const CefRefPtr<CefV8Value> object, + const CefRefPtr<CefV8Value> value, + CefString& exception) override { got_set_.yes(); return true; } @@ -1145,11 +1145,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Handler : public CefV8Handler { public: Handler() {} - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { return false; } + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { return false; } IMPLEMENT_REFCOUNTING(Handler); }; @@ -1189,11 +1189,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Handler : public CefV8Handler { public: Handler() {} - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { EXPECT_STREQ(kFuncName, name.ToString().c_str()); EXPECT_TRUE(object->IsSame(object_)); @@ -1261,11 +1261,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Handler : public CefV8Handler { public: Handler() {} - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { exception = kException; got_execute_.yes(); return true; @@ -1308,11 +1308,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Handler : public CefV8Handler { public: Handler() {} - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { got_execute_.yes(); return false; } @@ -1352,11 +1352,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Handler : public CefV8Handler { public: Handler() {} - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { EXPECT_TRUE(object.get()); CefRefPtr<CefV8Context> context = CefV8Context::GetCurrentContext(); EXPECT_TRUE(context.get()); @@ -1402,11 +1402,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Handler : public CefV8Handler { public: Handler() {} - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { CefRefPtr<CefV8Context> context = CefV8Context::GetCurrentContext(); EXPECT_TRUE(context.get()); EXPECT_TRUE(context->IsSame(context_)); @@ -1453,11 +1453,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Handler : public CefV8Handler { public: Handler() {} - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { EXPECT_TRUE(object.get()); CefRefPtr<CefV8Context> context = CefV8Context::GetCurrentContext(); EXPECT_TRUE(context.get()); @@ -1584,11 +1584,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Handler : public CefV8Handler { public: Handler() {} - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { EXPECT_STREQ(kFuncName, name.ToString().c_str()); stack_trace_ = CefV8StackTrace::GetCurrent(10); @@ -1678,11 +1678,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, : callback_(callback) { } - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { EXPECT_STREQ("v8_extension_test", name.ToString().c_str()); callback_->yes(); return true; @@ -1697,8 +1697,8 @@ class V8RendererTest : public ClientApp::RenderDelegate, new Handler(&startup_test_success_)); } - virtual void OnBrowserCreated(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser) { + void OnBrowserCreated(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser) override { test_mode_ = g_current_test_mode; if (test_mode_ == V8TEST_NONE) { // Retrieve the test mode from the command line. @@ -1712,27 +1712,26 @@ class V8RendererTest : public ClientApp::RenderDelegate, RunStartupTest(); } - virtual CefRefPtr<CefLoadHandler> GetLoadHandler( - CefRefPtr<ClientApp> app) OVERRIDE { + CefRefPtr<CefLoadHandler> GetLoadHandler(CefRefPtr<ClientApp> app) override { if (test_mode_ == V8TEST_NONE) return NULL; return this; } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { if (test_mode_ == V8TEST_ON_UNCAUGHT_EXCEPTION_DEV_TOOLS && browser->IsPopup()) { DevToolsLoadHook(browser); } } - virtual void OnContextCreated(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefV8Context> context) OVERRIDE { + void OnContextCreated(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefV8Context> context) override { if (test_mode_ == V8TEST_NONE) return; @@ -1754,11 +1753,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Handler : public CefV8Handler { public: Handler() {} - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { // context for the sub-frame CefRefPtr<CefV8Context> context = CefV8Context::GetCurrentContext(); EXPECT_TRUE(context.get()); @@ -1805,10 +1804,10 @@ class V8RendererTest : public ClientApp::RenderDelegate, } } - virtual void OnContextReleased(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - CefRefPtr<CefV8Context> context) OVERRIDE { + void OnContextReleased(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefV8Context> context) override { if (test_mode_ == V8TEST_NONE) return; @@ -1826,7 +1825,7 @@ class V8RendererTest : public ClientApp::RenderDelegate, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context, CefRefPtr<CefV8Exception> exception, - CefRefPtr<CefV8StackTrace> stackTrace) OVERRIDE { + CefRefPtr<CefV8StackTrace> stackTrace) override { if (test_mode_ == V8TEST_NONE) return; @@ -1850,11 +1849,10 @@ class V8RendererTest : public ClientApp::RenderDelegate, } } - virtual bool OnProcessMessageReceived(CefRefPtr<ClientApp> app, - CefRefPtr<CefBrowser> browser, - CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) - OVERRIDE { + bool OnProcessMessageReceived(CefRefPtr<ClientApp> app, + CefRefPtr<CefBrowser> browser, + CefProcessId source_process, + CefRefPtr<CefProcessMessage> message) override { if (test_mode_ == V8TEST_NONE) return false; @@ -1875,11 +1873,11 @@ class V8RendererTest : public ClientApp::RenderDelegate, class Handler : public CefV8Handler { public: Handler() {} - virtual bool Execute(const CefString& name, - CefRefPtr<CefV8Value> object, - const CefV8ValueList& arguments, - CefRefPtr<CefV8Value>& retval, - CefString& exception) OVERRIDE { + bool Execute(const CefString& name, + CefRefPtr<CefV8Value> object, + const CefV8ValueList& arguments, + CefRefPtr<CefV8Value>& retval, + CefString& exception) override { EXPECT_STREQ(kFuncName, name.ToString().c_str()); if (name == kFuncName) { EXPECT_TRUE(exception.empty()); @@ -1907,14 +1905,20 @@ class V8RendererTest : public ClientApp::RenderDelegate, kFuncName, func, V8_PROPERTY_ATTRIBUTE_NONE)); EXPECT_TRUE(context->Exit()); - // Call DevToolsLoaded() when DevTools window completed loading. - std::string jsCode = "(function(){" - " var oldLoadCompleted = InspectorFrontendAPI.loadCompleted;" - " if (InspectorFrontendAPI._isLoaded) {" - " window.DevToolsLoaded();" + // Call DevToolsLoaded() when the DevTools window has completed loading. + // If the loading is already complete call DevToolsLoaded() immediately. + // There is no good indicator that |InspectorFrontendHost.loadCompleted| has + // already been called so we depend on potentially fragile loading behavior: + // WebInspector.Main._createAppUI calls InspectorFrontendHost.loadCompleted + // and then (indirectly) calls InspectorBackend.setConnection which sets + // InspectorBackend._connection. + std::string jsCode = "(function() {" + " if (InspectorBackend._connection) {" + " window.DevToolsLoaded();" " } else {" - " InspectorFrontendAPI.loadCompleted = function(){" - " oldLoadCompleted.call(InspectorFrontendAPI);" + " var oldLoadCompleted = InspectorFrontendHost.loadCompleted;" + " InspectorFrontendHost.loadCompleted = function() {" + " oldLoadCompleted.call(InspectorFrontendHost);" " window.DevToolsLoaded();" " };" " }" @@ -1996,7 +2000,7 @@ class V8TestHandler : public TestHandler { test_url_(test_url) { } - virtual void RunTest() OVERRIDE { + void RunTest() override { // Nested script tag forces creation of the V8 context. if (test_mode_ == V8TEST_CONTEXT_ENTERED) { AddResource(kV8ContextParentTestUrl, "<html><body>" @@ -2026,7 +2030,7 @@ class V8TestHandler : public TestHandler { } } - virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE { + void OnBeforeClose(CefRefPtr<CefBrowser> browser) override { if (test_mode_ == V8TEST_ON_UNCAUGHT_EXCEPTION_DEV_TOOLS && browser->IsPopup()) { // Generate the uncaught exception in the main browser. @@ -2038,9 +2042,9 @@ class V8TestHandler : public TestHandler { TestHandler::OnBeforeClose(browser); } - virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, - CefRefPtr<CefFrame> frame, - int httpStatusCode) OVERRIDE { + void OnLoadEnd(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + int httpStatusCode) override { if (test_mode_ == V8TEST_ON_UNCAUGHT_EXCEPTION_DEV_TOOLS) { if (!browser->IsPopup()) { // Create the DevTools window. @@ -2067,10 +2071,10 @@ class V8TestHandler : public TestHandler { } } - virtual bool OnProcessMessageReceived( + bool OnProcessMessageReceived( CefRefPtr<CefBrowser> browser, CefProcessId source_process, - CefRefPtr<CefProcessMessage> message) OVERRIDE { + CefRefPtr<CefProcessMessage> message) override { EXPECT_TRUE(browser.get()); EXPECT_EQ(PID_RENDERER, source_process); EXPECT_TRUE(message.get()); diff --git a/tests/unittests/values_unittest.cc b/tests/unittests/values_unittest.cc index 4ddd99119..c295182f3 100644 --- a/tests/unittests/values_unittest.cc +++ b/tests/unittests/values_unittest.cc @@ -90,7 +90,7 @@ class BinaryTask : public CefTask { data_(data), data_size_(data_size) {} - virtual void Execute() OVERRIDE { + void Execute() override { TestBinary(value_, data_, data_size_); } @@ -297,7 +297,7 @@ class DictionaryTask : public CefTask { binary_data_(binary_data), binary_data_size_(binary_data_size) {} - virtual void Execute() OVERRIDE { + void Execute() override { TestDictionary(value_, binary_data_, binary_data_size_); } @@ -556,7 +556,7 @@ class ListTask : public CefTask { binary_data_(binary_data), binary_data_size_(binary_data_size) {} - virtual void Execute() OVERRIDE { + void Execute() override { TestList(value_, binary_data_, binary_data_size_); } diff --git a/tools/make_cpptoc_header.py b/tools/make_cpptoc_header.py index 4f930e224..2bf5a5f6d 100644 --- a/tools/make_cpptoc_header.py +++ b/tools/make_cpptoc_header.py @@ -58,7 +58,6 @@ def make_cpptoc_header(header, clsname): ' : public CefCppToC<'+clsname+'CppToC, '+clsname+', '+capiname+'> {\n'+ \ ' public:\n'+ \ ' explicit '+clsname+'CppToC('+clsname+'* cls);\n'+ \ - ' virtual ~'+clsname+'CppToC() {}\n'+ \ '};\n\n' if dllside: diff --git a/tools/make_ctocpp_header.py b/tools/make_ctocpp_header.py index 027ac8a14..ac352b7a6 100644 --- a/tools/make_ctocpp_header.py +++ b/tools/make_ctocpp_header.py @@ -36,8 +36,11 @@ def make_ctocpp_header(header, clsname): func_body = '' funcs = cls.get_virtual_funcs() for func in funcs: - func_body += ' virtual '+func.get_cpp_proto()+' OVERRIDE;\n' - + if clientside: + func_body += ' '+func.get_cpp_proto()+' override;\n' + else: + func_body += ' virtual '+func.get_cpp_proto()+' OVERRIDE;\n' + # include standard headers if func_body.find('std::map') > 0 or func_body.find('std::multimap') > 0: result += '\n#include <map>' @@ -70,8 +73,7 @@ def make_ctocpp_header(header, clsname): ' : public CefCToCpp<'+clsname+'CToCpp, '+clsname+', '+capiname+'> {\n'+ \ ' public:\n'+ \ ' explicit '+clsname+'CToCpp('+capiname+'* str)\n'+ \ - ' : CefCToCpp<'+clsname+'CToCpp, '+clsname+', '+capiname+'>(str) {}\n'+ \ - ' virtual ~'+clsname+'CToCpp() {}\n\n'+ \ + ' : CefCToCpp<'+clsname+'CToCpp, '+clsname+', '+capiname+'>(str) {}\n\n'+ \ ' // '+clsname+' methods\n'; result += func_body