Update to Chromium revision 40af916d (#303546).

- Standardize usage of virtual/override specifiers in CEF internals (see http://crbug.com/417463).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1903 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-11-12 19:25:15 +00:00
parent 470518a52e
commit eef89ccdd3
329 changed files with 3160 additions and 3731 deletions

View File

@ -7,5 +7,5 @@
# https://code.google.com/p/chromiumembedded/wiki/BranchesAndBuilding # https://code.google.com/p/chromiumembedded/wiki/BranchesAndBuilding
{ {
'chromium_checkout': '267aeeb8d85c8503a7fd12bd14654b8ea78d3974', 'chromium_checkout': '40af916dfb14ca12890e3a7cf8b50d8e62c69695',
} }

View File

@ -1101,10 +1101,10 @@
'<(DEPTH)/chrome/browser/prefs/proxy_prefs.h', '<(DEPTH)/chrome/browser/prefs/proxy_prefs.h',
'<(DEPTH)/chrome/common/pref_names.cc', '<(DEPTH)/chrome/common/pref_names.cc',
'<(DEPTH)/chrome/common/pref_names.h', '<(DEPTH)/chrome/common/pref_names.h',
'<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_switches.cc', '<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc',
'<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_switches.h', '<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h',
'<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_pref_names.cc', '<(DEPTH)/components/data_reduction_proxy/core/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_pref_names.h',
# Include sources for the loadtimes V8 extension. # Include sources for the loadtimes V8 extension.
'<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.h', '<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.h',
'<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.cc', '<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.cc',

View File

@ -6,8 +6,9 @@
'variables': { 'variables': {
# Don't use the chrome style plugin with CEF. # Don't use the chrome style plugin with CEF.
'clang_use_chrome_plugins': 0, 'clang_use_chrome_plugins': 0,
# Set ENABLE_PRINTING=1. # Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1.
'enable_printing': 2, 'enable_basic_printing': 1,
'enable_print_preview': 0,
'conditions': [ 'conditions': [
# Directory for CEF source files. # Directory for CEF source files.
[ 'OS=="win"', { [ 'OS=="win"', {

View File

@ -26,14 +26,13 @@ using content::BrowserThread;
class CefBrowserContextImpl::CefResourceContext : public content::ResourceContext { class CefBrowserContextImpl::CefResourceContext : public content::ResourceContext {
public: public:
CefResourceContext() : getter_(NULL) {} CefResourceContext() : getter_(NULL) {}
virtual ~CefResourceContext() {}
// ResourceContext implementation: // ResourceContext implementation:
virtual net::HostResolver* GetHostResolver() OVERRIDE { net::HostResolver* GetHostResolver() override {
CHECK(getter_); CHECK(getter_);
return getter_->host_resolver(); return getter_->host_resolver();
} }
virtual net::URLRequestContext* GetRequestContext() OVERRIDE { net::URLRequestContext* GetRequestContext() override {
CHECK(getter_); CHECK(getter_);
return getter_->GetURLRequestContext(); return getter_->GetURLRequestContext();
} }

View File

@ -23,39 +23,39 @@ class CefURLRequestContextGetter;
class CefBrowserContextImpl : public CefBrowserContext { class CefBrowserContextImpl : public CefBrowserContext {
public: public:
CefBrowserContextImpl(); CefBrowserContextImpl();
virtual ~CefBrowserContextImpl(); ~CefBrowserContextImpl() override;
// BrowserContext methods. // BrowserContext methods.
virtual base::FilePath GetPath() const OVERRIDE; base::FilePath GetPath() const override;
virtual bool IsOffTheRecord() const OVERRIDE; bool IsOffTheRecord() const override;
virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE; content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; net::URLRequestContextGetter* GetRequestContext() override;
virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( net::URLRequestContextGetter* GetRequestContextForRenderProcess(
int renderer_child_id) OVERRIDE; int renderer_child_id) override;
virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; net::URLRequestContextGetter* GetMediaRequestContext() override;
virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
int renderer_child_id) OVERRIDE; int renderer_child_id) override;
virtual net::URLRequestContextGetter* net::URLRequestContextGetter*
GetMediaRequestContextForStoragePartition( GetMediaRequestContextForStoragePartition(
const base::FilePath& partition_path, const base::FilePath& partition_path,
bool in_memory) OVERRIDE; bool in_memory) override;
virtual content::ResourceContext* GetResourceContext() OVERRIDE; content::ResourceContext* GetResourceContext() override;
virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE; content::BrowserPluginGuestManager* GetGuestManager() override;
virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE; content::PushMessagingService* GetPushMessagingService() override;
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
// CefBrowserContext methods. // CefBrowserContext methods.
virtual net::URLRequestContextGetter* CreateRequestContext( net::URLRequestContextGetter* CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) content::URLRequestInterceptorScopedVector request_interceptors)
OVERRIDE; override;
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path, const base::FilePath& partition_path,
bool in_memory, bool in_memory,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) content::URLRequestInterceptorScopedVector request_interceptors)
OVERRIDE; override;
private: private:
class CefResourceContext; class CefResourceContext;

View File

@ -24,14 +24,13 @@ class CefBrowserContextProxy::CefResourceContext :
public content::ResourceContext { public content::ResourceContext {
public: public:
CefResourceContext() : getter_(NULL) {} CefResourceContext() : getter_(NULL) {}
virtual ~CefResourceContext() {}
// ResourceContext implementation: // ResourceContext implementation:
virtual net::HostResolver* GetHostResolver() OVERRIDE { net::HostResolver* GetHostResolver() override {
CHECK(getter_); CHECK(getter_);
return getter_->GetHostResolver(); return getter_->GetHostResolver();
} }
virtual net::URLRequestContext* GetRequestContext() OVERRIDE { net::URLRequestContext* GetRequestContext() override {
CHECK(getter_); CHECK(getter_);
return getter_->GetURLRequestContext(); return getter_->GetURLRequestContext();
} }

View File

@ -26,7 +26,7 @@ class CefBrowserContextProxy : public CefBrowserContext {
public: public:
CefBrowserContextProxy(CefRefPtr<CefRequestContextHandler> handler, CefBrowserContextProxy(CefRefPtr<CefRequestContextHandler> handler,
CefBrowserContext* parent); CefBrowserContext* parent);
virtual ~CefBrowserContextProxy(); ~CefBrowserContextProxy() override;
// Reference counting and object life span is managed by // Reference counting and object life span is managed by
// CefContentBrowserClient. // CefContentBrowserClient.
@ -34,36 +34,36 @@ class CefBrowserContextProxy : public CefBrowserContext {
bool Release() { return (--refct_ == 0); } bool Release() { return (--refct_ == 0); }
// BrowserContext methods. // BrowserContext methods.
virtual base::FilePath GetPath() const OVERRIDE; base::FilePath GetPath() const override;
virtual bool IsOffTheRecord() const OVERRIDE; bool IsOffTheRecord() const override;
virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE; content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; net::URLRequestContextGetter* GetRequestContext() override;
virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( net::URLRequestContextGetter* GetRequestContextForRenderProcess(
int renderer_child_id) OVERRIDE; int renderer_child_id) override;
virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; net::URLRequestContextGetter* GetMediaRequestContext() override;
virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
int renderer_child_id) OVERRIDE; int renderer_child_id) override;
virtual net::URLRequestContextGetter* net::URLRequestContextGetter*
GetMediaRequestContextForStoragePartition( GetMediaRequestContextForStoragePartition(
const base::FilePath& partition_path, const base::FilePath& partition_path,
bool in_memory) OVERRIDE; bool in_memory) override;
virtual content::ResourceContext* GetResourceContext() OVERRIDE; content::ResourceContext* GetResourceContext() override;
virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE; content::BrowserPluginGuestManager* GetGuestManager() override;
virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE; content::PushMessagingService* GetPushMessagingService() override;
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
// CefBrowserContext methods. // CefBrowserContext methods.
virtual net::URLRequestContextGetter* CreateRequestContext( net::URLRequestContextGetter* CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) content::URLRequestInterceptorScopedVector request_interceptors)
OVERRIDE; override;
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path, const base::FilePath& partition_path,
bool in_memory, bool in_memory,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) content::URLRequestInterceptorScopedVector request_interceptors)
OVERRIDE; override;
CefRefPtr<CefRequestContextHandler> handler() const { return handler_; } CefRefPtr<CefRequestContextHandler> handler() const { return handler_; }

View File

@ -187,7 +187,7 @@ class CefFileDialogCallbackImpl : public CefFileDialogCallback {
const CefBrowserHostImpl::RunFileChooserCallback& callback) const CefBrowserHostImpl::RunFileChooserCallback& callback)
: callback_(callback) { : callback_(callback) {
} }
~CefFileDialogCallbackImpl() { ~CefFileDialogCallbackImpl() override {
if (!callback_.is_null()) { if (!callback_.is_null()) {
// The callback is still pending. Cancel it now. // The callback is still pending. Cancel it now.
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
@ -199,7 +199,7 @@ class CefFileDialogCallbackImpl : public CefFileDialogCallback {
} }
} }
virtual void Continue(const std::vector<CefString>& file_paths) OVERRIDE { void Continue(const std::vector<CefString>& file_paths) override {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (!callback_.is_null()) { if (!callback_.is_null()) {
std::vector<base::FilePath> vec; std::vector<base::FilePath> vec;
@ -217,7 +217,7 @@ class CefFileDialogCallbackImpl : public CefFileDialogCallback {
} }
} }
virtual void Cancel() OVERRIDE { void Cancel() override {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (!callback_.is_null()) { if (!callback_.is_null()) {
CancelNow(callback_); CancelNow(callback_);
@ -269,6 +269,10 @@ class CefRunFileDialogCallbackWrapper
} }
private: private:
friend class base::RefCountedThreadSafe<CefRunFileDialogCallbackWrapper>;
~CefRunFileDialogCallbackWrapper() {}
CefRefPtr<CefBrowserHost> host_; CefRefPtr<CefBrowserHost> host_;
CefRefPtr<CefRunFileDialogCallback> callback_; CefRefPtr<CefRunFileDialogCallback> callback_;
}; };
@ -591,7 +595,7 @@ class CefBrowserHostImpl::DevToolsWebContentsObserver :
} }
// WebContentsObserver methods: // WebContentsObserver methods:
virtual void WebContentsDestroyed() OVERRIDE { void WebContentsDestroyed() override {
browser_->OnDevToolsWebContentsDestroyed(); browser_->OnDevToolsWebContentsDestroyed();
} }
@ -602,8 +606,6 @@ class CefBrowserHostImpl::DevToolsWebContentsObserver :
}; };
CefBrowserHostImpl::~CefBrowserHostImpl() { CefBrowserHostImpl::~CefBrowserHostImpl() {
// All weak pointer references should be removed in DestroyBrowser().
DCHECK(!weak_ptr_factory_.HasWeakPtrs());
} }
CefRefPtr<CefBrowser> CefBrowserHostImpl::GetBrowser() { CefRefPtr<CefBrowser> CefBrowserHostImpl::GetBrowser() {
@ -1415,8 +1417,6 @@ void CefBrowserHostImpl::DestroyBrowser() {
CefContentBrowserClient::Get()->RemoveBrowserInfo(browser_info_); CefContentBrowserClient::Get()->RemoveBrowserInfo(browser_info_);
browser_info_->set_browser(NULL); browser_info_->set_browser(NULL);
weak_ptr_factory_.InvalidateWeakPtrs();
} }
gfx::NativeView CefBrowserHostImpl::GetContentView() const { gfx::NativeView CefBrowserHostImpl::GetContentView() const {
@ -2244,11 +2244,6 @@ bool CefBrowserHostImpl::SetPendingPopupInfo(
return true; return true;
} }
base::WeakPtr<CefBrowserHostImpl> CefBrowserHostImpl::GetWeakPtr() {
CEF_REQUIRE_UIT();
return weak_ptr_factory_.GetWeakPtr();
}
void CefBrowserHostImpl::UpdatePreferredSize(content::WebContents* source, void CefBrowserHostImpl::UpdatePreferredSize(content::WebContents* source,
const gfx::Size& pref_size) { const gfx::Size& pref_size) {
PlatformSizeTo(pref_size.width(), pref_size.height()); PlatformSizeTo(pref_size.width(), pref_size.height());
@ -2671,8 +2666,7 @@ CefBrowserHostImpl::CefBrowserHostImpl(
focus_on_editable_field_(false), focus_on_editable_field_(false),
mouse_cursor_change_disabled_(false), mouse_cursor_change_disabled_(false),
devtools_frontend_(NULL), devtools_frontend_(NULL),
file_chooser_pending_(false), file_chooser_pending_(false) {
weak_ptr_factory_(this) {
#if defined(USE_AURA) #if defined(USE_AURA)
window_widget_ = NULL; window_widget_ = NULL;
#endif #endif
@ -2960,10 +2954,11 @@ void CefBrowserHostImpl::OnRunFileChooserDelegateCallback(
return; return;
// Convert FilePath list to SelectedFileInfo list. // Convert FilePath list to SelectedFileInfo list.
std::vector<ui::SelectedFileInfo> selected_files; std::vector<content::FileChooserFileInfo> selected_files;
for (size_t i = 0; i < file_paths.size(); ++i) { for (size_t i = 0; i < file_paths.size(); ++i) {
selected_files.push_back( content::FileChooserFileInfo info;
ui::SelectedFileInfo(file_paths[i], base::FilePath())); info.file_path = file_paths[i];
selected_files.push_back(info);
} }
// Notify our RenderViewHost in all cases. // Notify our RenderViewHost in all cases.

View File

@ -21,7 +21,6 @@
#include "libcef/common/response_manager.h" #include "libcef/common/response_manager.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "content/public/browser/notification_observer.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 void OnResponse(const std::string& response) =0;
}; };
virtual ~CefBrowserHostImpl(); ~CefBrowserHostImpl() override;
// Create a new CefBrowserHostImpl instance. // Create a new CefBrowserHostImpl instance.
static CefRefPtr<CefBrowserHostImpl> Create( static CefRefPtr<CefBrowserHostImpl> Create(
@ -130,91 +129,89 @@ class CefBrowserHostImpl : public CefBrowserHost,
int render_process_id, int render_routing_id); int render_process_id, int render_routing_id);
// CefBrowserHost methods. // CefBrowserHost methods.
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE; CefRefPtr<CefBrowser> GetBrowser() override;
virtual void CloseBrowser(bool force_close) OVERRIDE; void CloseBrowser(bool force_close) override;
virtual void SetFocus(bool focus) OVERRIDE; void SetFocus(bool focus) override;
virtual void SetWindowVisibility(bool visible) OVERRIDE; void SetWindowVisibility(bool visible) override;
virtual CefWindowHandle GetWindowHandle() OVERRIDE; CefWindowHandle GetWindowHandle() override;
virtual CefWindowHandle GetOpenerWindowHandle() OVERRIDE; CefWindowHandle GetOpenerWindowHandle() override;
virtual CefRefPtr<CefClient> GetClient() OVERRIDE; CefRefPtr<CefClient> GetClient() override;
virtual CefRefPtr<CefRequestContext> GetRequestContext() OVERRIDE; CefRefPtr<CefRequestContext> GetRequestContext() override;
virtual double GetZoomLevel() OVERRIDE; double GetZoomLevel() override;
virtual void SetZoomLevel(double zoomLevel) OVERRIDE; void SetZoomLevel(double zoomLevel) override;
virtual void RunFileDialog( void RunFileDialog(
FileDialogMode mode, FileDialogMode mode,
const CefString& title, const CefString& title,
const CefString& default_file_name, const CefString& default_file_name,
const std::vector<CefString>& accept_types, const std::vector<CefString>& accept_types,
CefRefPtr<CefRunFileDialogCallback> callback) OVERRIDE; CefRefPtr<CefRunFileDialogCallback> callback) override;
virtual void StartDownload(const CefString& url) OVERRIDE; void StartDownload(const CefString& url) override;
virtual void Print() OVERRIDE; void Print() override;
virtual void Find(int identifier, const CefString& searchText, void Find(int identifier, const CefString& searchText,
bool forward, bool matchCase, bool findNext) OVERRIDE; bool forward, bool matchCase, bool findNext) override;
virtual void StopFinding(bool clearSelection) OVERRIDE; void StopFinding(bool clearSelection) override;
virtual void ShowDevTools(const CefWindowInfo& windowInfo, void ShowDevTools(const CefWindowInfo& windowInfo,
CefRefPtr<CefClient> client, CefRefPtr<CefClient> client,
const CefBrowserSettings& settings, const CefBrowserSettings& settings,
const CefPoint& inspect_element_at) OVERRIDE; const CefPoint& inspect_element_at) override;
virtual void CloseDevTools() OVERRIDE; void CloseDevTools() override;
virtual void SetMouseCursorChangeDisabled(bool disabled) OVERRIDE; void SetMouseCursorChangeDisabled(bool disabled) override;
virtual bool IsMouseCursorChangeDisabled() OVERRIDE; bool IsMouseCursorChangeDisabled() override;
virtual bool IsWindowRenderingDisabled() OVERRIDE; bool IsWindowRenderingDisabled() override;
virtual void ReplaceMisspelling(const CefString& word) OVERRIDE; void ReplaceMisspelling(const CefString& word) override;
virtual void AddWordToDictionary(const CefString& word) OVERRIDE; void AddWordToDictionary(const CefString& word) override;
virtual void WasResized() OVERRIDE; void WasResized() override;
virtual void WasHidden(bool hidden) OVERRIDE; void WasHidden(bool hidden) override;
virtual void NotifyScreenInfoChanged() OVERRIDE; void NotifyScreenInfoChanged() override;
virtual void Invalidate(PaintElementType type) OVERRIDE; void Invalidate(PaintElementType type) override;
virtual void SendKeyEvent(const CefKeyEvent& event) OVERRIDE; void SendKeyEvent(const CefKeyEvent& event) override;
virtual void SendMouseClickEvent(const CefMouseEvent& event, void SendMouseClickEvent(const CefMouseEvent& event,
MouseButtonType type, MouseButtonType type,
bool mouseUp, int clickCount) OVERRIDE; bool mouseUp, int clickCount) override;
virtual void SendMouseMoveEvent(const CefMouseEvent& event, void SendMouseMoveEvent(const CefMouseEvent& event,
bool mouseLeave) OVERRIDE; bool mouseLeave) override;
virtual void SendMouseWheelEvent(const CefMouseEvent& event, void SendMouseWheelEvent(const CefMouseEvent& event,
int deltaX, int deltaY) OVERRIDE; int deltaX, int deltaY) override;
virtual void SendFocusEvent(bool setFocus) OVERRIDE; void SendFocusEvent(bool setFocus) override;
virtual void SendCaptureLostEvent() OVERRIDE; void SendCaptureLostEvent() override;
virtual void NotifyMoveOrResizeStarted() OVERRIDE; void NotifyMoveOrResizeStarted() override;
virtual CefTextInputContext GetNSTextInputContext() OVERRIDE; CefTextInputContext GetNSTextInputContext() override;
virtual void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent) void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent) override;
OVERRIDE; void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent) override;
virtual void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent) void DragTargetDragEnter(CefRefPtr<CefDragData> drag_data,
OVERRIDE; const CefMouseEvent& event,
virtual void DragTargetDragEnter(CefRefPtr<CefDragData> drag_data, DragOperationsMask allowed_ops) override;
const CefMouseEvent& event, void DragTargetDragOver(const CefMouseEvent& event,
DragOperationsMask allowed_ops); DragOperationsMask allowed_ops) override;
virtual void DragTargetDragOver(const CefMouseEvent& event, void DragTargetDragLeave() override;
DragOperationsMask allowed_ops); void DragTargetDrop(const CefMouseEvent& event) override;
virtual void DragTargetDragLeave(); void DragSourceSystemDragEnded() override;
virtual void DragTargetDrop(const CefMouseEvent& event); void DragSourceEndedAt(int x, int y, DragOperationsMask op) override;
virtual void DragSourceSystemDragEnded();
virtual void DragSourceEndedAt(int x, int y, DragOperationsMask op);
// CefBrowser methods. // CefBrowser methods.
virtual CefRefPtr<CefBrowserHost> GetHost() OVERRIDE; CefRefPtr<CefBrowserHost> GetHost() override;
virtual bool CanGoBack() OVERRIDE; bool CanGoBack() override;
virtual void GoBack() OVERRIDE; void GoBack() override;
virtual bool CanGoForward() OVERRIDE; bool CanGoForward() override;
virtual void GoForward() OVERRIDE; void GoForward() override;
virtual bool IsLoading() OVERRIDE; bool IsLoading() override;
virtual void Reload() OVERRIDE; void Reload() override;
virtual void ReloadIgnoreCache() OVERRIDE; void ReloadIgnoreCache() override;
virtual void StopLoad() OVERRIDE; void StopLoad() override;
virtual int GetIdentifier() OVERRIDE; int GetIdentifier() override;
virtual bool IsSame(CefRefPtr<CefBrowser> that) OVERRIDE; bool IsSame(CefRefPtr<CefBrowser> that) override;
virtual bool IsPopup() OVERRIDE; bool IsPopup() override;
virtual bool HasDocument() OVERRIDE; bool HasDocument() override;
virtual CefRefPtr<CefFrame> GetMainFrame() OVERRIDE; CefRefPtr<CefFrame> GetMainFrame() override;
virtual CefRefPtr<CefFrame> GetFocusedFrame() OVERRIDE; CefRefPtr<CefFrame> GetFocusedFrame() override;
virtual CefRefPtr<CefFrame> GetFrame(int64 identifier) OVERRIDE; CefRefPtr<CefFrame> GetFrame(int64 identifier) override;
virtual CefRefPtr<CefFrame> GetFrame(const CefString& name) OVERRIDE; CefRefPtr<CefFrame> GetFrame(const CefString& name) override;
virtual size_t GetFrameCount() OVERRIDE; size_t GetFrameCount() override;
virtual void GetFrameIdentifiers(std::vector<int64>& identifiers) OVERRIDE; void GetFrameIdentifiers(std::vector<int64>& identifiers) override;
virtual void GetFrameNames(std::vector<CefString>& names) OVERRIDE; void GetFrameNames(std::vector<CefString>& names) override;
virtual bool SendProcessMessage( bool SendProcessMessage(
CefProcessId target_process, CefProcessId target_process,
CefRefPtr<CefProcessMessage> message) OVERRIDE; CefRefPtr<CefProcessMessage> message) override;
// Returns true if windowless rendering is enabled. // Returns true if windowless rendering is enabled.
bool IsWindowless() const; bool IsWindowless() const;
@ -333,45 +330,40 @@ class CefBrowserHostImpl : public CefBrowserHost,
}; };
DestructionState destruction_state() const { return destruction_state_; } 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<CefBrowserHostImpl> GetWeakPtr();
// content::WebContentsDelegate methods. // content::WebContentsDelegate methods.
virtual content::WebContents* OpenURLFromTab( content::WebContents* OpenURLFromTab(
content::WebContents* source, content::WebContents* source,
const content::OpenURLParams& params) OVERRIDE; const content::OpenURLParams& params) override;
virtual void LoadingStateChanged(content::WebContents* source, void LoadingStateChanged(content::WebContents* source,
bool to_different_document) OVERRIDE; bool to_different_document) override;
virtual void CloseContents(content::WebContents* source) OVERRIDE; void CloseContents(content::WebContents* source) override;
virtual void UpdateTargetURL(content::WebContents* source, void UpdateTargetURL(content::WebContents* source,
const GURL& url) OVERRIDE; const GURL& url) override;
virtual bool AddMessageToConsole(content::WebContents* source, bool AddMessageToConsole(content::WebContents* source,
int32 level, int32 level,
const base::string16& message, const base::string16& message,
int32 line_no, int32 line_no,
const base::string16& source_id) OVERRIDE; const base::string16& source_id) override;
virtual void BeforeUnloadFired(content::WebContents* source, void BeforeUnloadFired(content::WebContents* source,
bool proceed, bool proceed,
bool* proceed_to_fire_unload) OVERRIDE; bool* proceed_to_fire_unload) override;
virtual bool TakeFocus(content::WebContents* source, bool TakeFocus(content::WebContents* source,
bool reverse) OVERRIDE; bool reverse) override;
virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; void WebContentsFocused(content::WebContents* contents) override;
virtual bool HandleContextMenu( bool HandleContextMenu(
const content::ContextMenuParams& params) OVERRIDE; const content::ContextMenuParams& params) override;
virtual bool PreHandleKeyboardEvent( bool PreHandleKeyboardEvent(
content::WebContents* source, content::WebContents* source,
const content::NativeWebKeyboardEvent& event, const content::NativeWebKeyboardEvent& event,
bool* is_keyboard_shortcut) OVERRIDE; bool* is_keyboard_shortcut) override;
virtual void HandleKeyboardEvent( void HandleKeyboardEvent(
content::WebContents* source, content::WebContents* source,
const content::NativeWebKeyboardEvent& event) OVERRIDE; const content::NativeWebKeyboardEvent& event) override;
virtual bool CanDragEnter( bool CanDragEnter(
content::WebContents* source, content::WebContents* source,
const content::DropData& data, const content::DropData& data,
blink::WebDragOperationsMask operations_allowed) OVERRIDE; blink::WebDragOperationsMask operations_allowed) override;
virtual bool ShouldCreateWebContents( bool ShouldCreateWebContents(
content::WebContents* web_contents, content::WebContents* web_contents,
int route_id, int route_id,
WindowContainerType window_container_type, WindowContainerType window_container_type,
@ -380,60 +372,59 @@ class CefBrowserHostImpl : public CefBrowserHost,
const std::string& partition_id, const std::string& partition_id,
content::SessionStorageNamespace* session_storage_namespace, content::SessionStorageNamespace* session_storage_namespace,
content::WebContentsView** view, content::WebContentsView** view,
content::RenderViewHostDelegateView** delegate_view) OVERRIDE; content::RenderViewHostDelegateView** delegate_view) override;
virtual void WebContentsCreated(content::WebContents* source_contents, void WebContentsCreated(content::WebContents* source_contents,
int opener_render_frame_id, int opener_render_frame_id,
const base::string16& frame_name, const base::string16& frame_name,
const GURL& target_url, const GURL& target_url,
content::WebContents* new_contents) OVERRIDE; content::WebContents* new_contents) override;
virtual void DidNavigateMainFramePostCommit( void DidNavigateMainFramePostCommit(
content::WebContents* tab) OVERRIDE; content::WebContents* tab) override;
virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() content::JavaScriptDialogManager* GetJavaScriptDialogManager() override;
OVERRIDE; void RunFileChooser(
virtual void RunFileChooser(
content::WebContents* tab, content::WebContents* tab,
const content::FileChooserParams& params) OVERRIDE; const content::FileChooserParams& params) override;
virtual void UpdatePreferredSize(content::WebContents* source, void UpdatePreferredSize(content::WebContents* source,
const gfx::Size& pref_size) OVERRIDE; const gfx::Size& pref_size) override;
virtual void RequestMediaAccessPermission( void RequestMediaAccessPermission(
content::WebContents* web_contents, content::WebContents* web_contents,
const content::MediaStreamRequest& request, const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback) OVERRIDE; const content::MediaResponseCallback& callback) override;
// content::WebContentsObserver methods. // content::WebContentsObserver methods.
using content::WebContentsObserver::BeforeUnloadFired; using content::WebContentsObserver::BeforeUnloadFired;
using content::WebContentsObserver::WasHidden; using content::WebContentsObserver::WasHidden;
virtual void RenderFrameCreated( void RenderFrameCreated(
content::RenderFrameHost* render_frame_host) OVERRIDE; content::RenderFrameHost* render_frame_host) override;
virtual void RenderFrameDeleted( void RenderFrameDeleted(
content::RenderFrameHost* render_frame_host) OVERRIDE; content::RenderFrameHost* render_frame_host) override;
virtual void RenderViewCreated( void RenderViewCreated(
content::RenderViewHost* render_view_host) OVERRIDE; content::RenderViewHost* render_view_host) override;
virtual void RenderViewDeleted( void RenderViewDeleted(
content::RenderViewHost* render_view_host) OVERRIDE; content::RenderViewHost* render_view_host) override;
virtual void RenderViewReady() OVERRIDE; void RenderViewReady() override;
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; void RenderProcessGone(base::TerminationStatus status) override;
virtual void DidCommitProvisionalLoadForFrame( void DidCommitProvisionalLoadForFrame(
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
const GURL& url, const GURL& url,
ui::PageTransition transition_type) OVERRIDE; ui::PageTransition transition_type) override;
virtual void DidFailProvisionalLoad( void DidFailProvisionalLoad(
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
const GURL& validated_url, const GURL& validated_url,
int error_code, int error_code,
const base::string16& error_description) OVERRIDE; const base::string16& error_description) override;
virtual void DocumentAvailableInMainFrame() OVERRIDE; void DocumentAvailableInMainFrame() override;
virtual void DidFailLoad(content::RenderFrameHost* render_frame_host, void DidFailLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url, const GURL& validated_url,
int error_code, int error_code,
const base::string16& error_description) OVERRIDE; const base::string16& error_description) override;
virtual void FrameDetached( void FrameDetached(
content::RenderFrameHost* render_frame_host) OVERRIDE; content::RenderFrameHost* render_frame_host) override;
virtual void PluginCrashed(const base::FilePath& plugin_path, void PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) OVERRIDE; base::ProcessId plugin_pid) override;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; bool OnMessageReceived(const IPC::Message& message) override;
// Override to provide a thread safe implementation. // Override to provide a thread safe implementation.
virtual bool Send(IPC::Message* message) OVERRIDE; bool Send(IPC::Message* message) override;
private: private:
class DevToolsWebContentsObserver; class DevToolsWebContentsObserver;
@ -472,9 +463,9 @@ class CefBrowserHostImpl : public CefBrowserHost,
const base::string16& actual_value); const base::string16& actual_value);
// content::NotificationObserver methods. // content::NotificationObserver methods.
virtual void Observe(int type, void Observe(int type,
const content::NotificationSource& source, const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE; const content::NotificationDetails& details) override;
CefBrowserHostImpl(const CefWindowInfo& window_info, CefBrowserHostImpl(const CefWindowInfo& window_info,
const CefBrowserSettings& settings, const CefBrowserSettings& settings,
@ -666,10 +657,6 @@ class CefBrowserHostImpl : public CefBrowserHost,
scoped_ptr<ui::XScopedCursor> invisible_cursor_; scoped_ptr<ui::XScopedCursor> invisible_cursor_;
#endif // defined(USE_X11) #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<CefBrowserHostImpl> weak_ptr_factory_;
IMPLEMENT_REFCOUNTING(CefBrowserHostImpl); IMPLEMENT_REFCOUNTING(CefBrowserHostImpl);
DISALLOW_EVIL_CONSTRUCTORS(CefBrowserHostImpl); DISALLOW_EVIL_CONSTRUCTORS(CefBrowserHostImpl);
}; };

View File

@ -12,7 +12,7 @@
#include "libcef/browser/text_input_client_osr_mac.h" #include "libcef/browser/text_input_client_osr_mac.h"
#include "libcef/browser/thread_util.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/mac_util.h"
#include "base/mac/scoped_nsautorelease_pool.h" #include "base/mac/scoped_nsautorelease_pool.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"

View File

@ -16,7 +16,7 @@
#include "libcef/browser/thread_util.h" #include "libcef/browser/thread_util.h"
#include "libcef/browser/window_delegate_view.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/i18n/case_conversion.h"
#include "base/memory/ref_counted_memory.h" #include "base/memory/ref_counted_memory.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"

View File

@ -20,7 +20,6 @@
class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> { class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
public: public:
CefBrowserInfo(int browser_id, bool is_popup); CefBrowserInfo(int browser_id, bool is_popup);
virtual ~CefBrowserInfo();
int browser_id() const { return browser_id_; }; int browser_id() const { return browser_id_; };
bool is_popup() const { return is_popup_; } bool is_popup() const { return is_popup_; }
@ -44,6 +43,10 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
void set_browser(CefRefPtr<CefBrowserHostImpl> browser); void set_browser(CefRefPtr<CefBrowserHostImpl> browser);
private: private:
friend class base::RefCountedThreadSafe<CefBrowserInfo>;
~CefBrowserInfo();
typedef std::set<std::pair<int, int> > RenderIdSet; typedef std::set<std::pair<int, int> > RenderIdSet;
void add_render_id(RenderIdSet* id_set, void add_render_id(RenderIdSet* id_set,

View File

@ -33,16 +33,16 @@ class CefDevToolsDelegate;
class CefBrowserMainParts : public content::BrowserMainParts { class CefBrowserMainParts : public content::BrowserMainParts {
public: public:
explicit CefBrowserMainParts(const content::MainFunctionParams& parameters); explicit CefBrowserMainParts(const content::MainFunctionParams& parameters);
virtual ~CefBrowserMainParts(); ~CefBrowserMainParts() override;
virtual void PreMainMessageLoopStart() OVERRIDE; void PreMainMessageLoopStart() override;
virtual void PostMainMessageLoopStart() OVERRIDE; void PostMainMessageLoopStart() override;
virtual void PreEarlyInitialization() OVERRIDE; void PreEarlyInitialization() override;
virtual void ToolkitInitialized() OVERRIDE; void ToolkitInitialized() override;
virtual int PreCreateThreads() OVERRIDE; int PreCreateThreads() override;
virtual void PreMainMessageLoopRun() OVERRIDE; void PreMainMessageLoopRun() override;
virtual void PostMainMessageLoopRun() OVERRIDE; void PostMainMessageLoopRun() override;
virtual void PostDestroyThreads() OVERRIDE; void PostDestroyThreads() override;
CefBrowserContext* browser_context() const { CefBrowserContext* browser_context() const {
return global_browser_context_.get(); return global_browser_context_.get();

View File

@ -22,12 +22,12 @@ struct ViewHostMsg_CreateWindow_Params;
class CefBrowserMessageFilter : public IPC::MessageFilter { class CefBrowserMessageFilter : public IPC::MessageFilter {
public: public:
explicit CefBrowserMessageFilter(content::RenderProcessHost* host); explicit CefBrowserMessageFilter(content::RenderProcessHost* host);
virtual ~CefBrowserMessageFilter(); ~CefBrowserMessageFilter() override;
// IPC::ChannelProxy::MessageFilter implementation. // IPC::ChannelProxy::MessageFilter implementation.
virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE; void OnFilterAdded(IPC::Sender* sender) override;
virtual void OnFilterRemoved() OVERRIDE; void OnFilterRemoved() override;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; bool OnMessageReceived(const IPC::Message& message) override;
bool Send(IPC::Message* message); bool Send(IPC::Message* message);

View File

@ -15,7 +15,7 @@ class CefBrowserMessageLoop : public base::MessageLoopForUI {
public: public:
CefBrowserMessageLoop(); CefBrowserMessageLoop();
virtual ~CefBrowserMessageLoop(); ~CefBrowserMessageLoop() override;
// Returns the MessageLoopForUI of the current thread. // Returns the MessageLoopForUI of the current thread.
static CefBrowserMessageLoop* current(); static CefBrowserMessageLoop* current();

View File

@ -17,7 +17,7 @@ class CefBrowserPrefStore : public TestingPrefStore {
scoped_ptr<PrefService> CreateService(); scoped_ptr<PrefService> CreateService();
protected: protected:
virtual ~CefBrowserPrefStore(); ~CefBrowserPrefStore() override;
DISALLOW_COPY_AND_ASSIGN(CefBrowserPrefStore); DISALLOW_COPY_AND_ASSIGN(CefBrowserPrefStore);
}; };

View File

@ -35,14 +35,14 @@ class CefURLFetcherDelegate : public net::URLFetcherDelegate {
public: public:
CefURLFetcherDelegate(CefBrowserURLRequest::Context* context, CefURLFetcherDelegate(CefBrowserURLRequest::Context* context,
int request_flags); int request_flags);
virtual ~CefURLFetcherDelegate(); ~CefURLFetcherDelegate() override;
// net::URLFetcherDelegate methods. // net::URLFetcherDelegate methods.
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; void OnURLFetchComplete(const net::URLFetcher* source) override;
virtual void OnURLFetchDownloadProgress(const net::URLFetcher* source, void OnURLFetchDownloadProgress(const net::URLFetcher* source,
int64 current, int64 total) OVERRIDE; int64 current, int64 total) override;
virtual void OnURLFetchUploadProgress(const net::URLFetcher* source, void OnURLFetchUploadProgress(const net::URLFetcher* source,
int64 current, int64 total) OVERRIDE; int64 current, int64 total) override;
private: private:
// The context_ pointer will outlive this object. // The context_ pointer will outlive this object.
@ -59,17 +59,15 @@ class NET_EXPORT CefURLFetcherResponseWriter :
: url_request_(url_request), : url_request_(url_request),
message_loop_proxy_(message_loop_proxy) { message_loop_proxy_(message_loop_proxy) {
} }
virtual ~CefURLFetcherResponseWriter() {
}
// net::URLFetcherResponseWriter methods. // net::URLFetcherResponseWriter methods.
virtual int Initialize(const net::CompletionCallback& callback) OVERRIDE { int Initialize(const net::CompletionCallback& callback) override {
return net::OK; return net::OK;
} }
virtual int Write(net::IOBuffer* buffer, int Write(net::IOBuffer* buffer,
int num_bytes, int num_bytes,
const net::CompletionCallback& callback) OVERRIDE { const net::CompletionCallback& callback) override {
if (url_request_.get()) { if (url_request_.get()) {
message_loop_proxy_->PostTask(FROM_HERE, message_loop_proxy_->PostTask(FROM_HERE,
base::Bind(&CefURLFetcherResponseWriter::WriteOnClientThread, base::Bind(&CefURLFetcherResponseWriter::WriteOnClientThread,
@ -81,7 +79,7 @@ class NET_EXPORT CefURLFetcherResponseWriter :
return num_bytes; return num_bytes;
} }
virtual int Finish(const net::CompletionCallback& callback) OVERRIDE { int Finish(const net::CompletionCallback& callback) override {
if (url_request_.get()) if (url_request_.get())
url_request_ = NULL; url_request_ = NULL;
return net::OK; return net::OK;
@ -143,13 +141,6 @@ class CefBrowserURLRequest::Context
static_cast<CefRequestImpl*>(request_.get())->SetReadOnly(true); static_cast<CefRequestImpl*>(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() { inline bool CalledOnValidThread() {
return message_loop_proxy_->BelongsToCurrentThread(); return message_loop_proxy_->BelongsToCurrentThread();
} }
@ -273,7 +264,6 @@ class CefBrowserURLRequest::Context
} }
if (cef_flags & UR_FLAG_REPORT_UPLOAD_PROGRESS) { if (cef_flags & UR_FLAG_REPORT_UPLOAD_PROGRESS) {
load_flags |= net::LOAD_ENABLE_UPLOAD_PROGRESS;
upload_data_size_ = upload_data_size; upload_data_size_ = upload_data_size;
} }
@ -396,6 +386,15 @@ class CefBrowserURLRequest::Context
CefRefPtr<CefResponse> response() { return response_; } CefRefPtr<CefResponse> response() { return response_; }
private: private:
friend class base::RefCountedThreadSafe<CefBrowserURLRequest::Context>;
~Context() {
if (fetcher_.get()) {
// Delete the fetcher object on the thread that created it.
message_loop_proxy_->DeleteSoon(FROM_HERE, fetcher_.release());
}
}
void NotifyUploadProgressIfNecessary() { void NotifyUploadProgressIfNecessary() {
if (!got_upload_progress_complete_ && upload_data_size_ > 0) { if (!got_upload_progress_complete_ && upload_data_size_ > 0) {
// URLFetcher sends upload notifications using a timer and will not send // URLFetcher sends upload notifications using a timer and will not send

View File

@ -14,17 +14,17 @@ class CefBrowserURLRequest : public CefURLRequest {
CefBrowserURLRequest(CefRefPtr<CefRequest> request, CefBrowserURLRequest(CefRefPtr<CefRequest> request,
CefRefPtr<CefURLRequestClient> client); CefRefPtr<CefURLRequestClient> client);
virtual ~CefBrowserURLRequest(); ~CefBrowserURLRequest() override;
bool Start(); bool Start();
// CefURLRequest methods. // CefURLRequest methods.
virtual CefRefPtr<CefRequest> GetRequest() OVERRIDE; CefRefPtr<CefRequest> GetRequest() override;
virtual CefRefPtr<CefURLRequestClient> GetClient() OVERRIDE; CefRefPtr<CefURLRequestClient> GetClient() override;
virtual Status GetRequestStatus() OVERRIDE; Status GetRequestStatus() override;
virtual ErrorCode GetRequestError() OVERRIDE; ErrorCode GetRequestError() override;
virtual CefRefPtr<CefResponse> GetResponse() OVERRIDE; CefRefPtr<CefResponse> GetResponse() override;
virtual void Cancel() OVERRIDE; void Cancel() override;
private: private:
bool VerifyContext(); bool VerifyContext();

View File

@ -26,74 +26,74 @@ class BackgroundModeManager {
class ChromeBrowserProcessStub : public BrowserProcess { class ChromeBrowserProcessStub : public BrowserProcess {
public: public:
ChromeBrowserProcessStub(); ChromeBrowserProcessStub();
virtual ~ChromeBrowserProcessStub(); ~ChromeBrowserProcessStub() override;
// BrowserProcess implementation. // BrowserProcess implementation.
virtual void ResourceDispatcherHostCreated() OVERRIDE; void ResourceDispatcherHostCreated() override;
virtual void EndSession() OVERRIDE; void EndSession() override;
virtual MetricsServicesManager* GetMetricsServicesManager() OVERRIDE; MetricsServicesManager* GetMetricsServicesManager() override;
virtual metrics::MetricsService* metrics_service() OVERRIDE; metrics::MetricsService* metrics_service() override;
virtual rappor::RapporService* rappor_service() OVERRIDE; rappor::RapporService* rappor_service() override;
virtual IOThread* io_thread() OVERRIDE; IOThread* io_thread() override;
virtual WatchDogThread* watchdog_thread() OVERRIDE; WatchDogThread* watchdog_thread() override;
virtual ProfileManager* profile_manager() OVERRIDE; ProfileManager* profile_manager() override;
virtual PrefService* local_state() OVERRIDE; PrefService* local_state() override;
virtual net::URLRequestContextGetter* system_request_context() OVERRIDE; net::URLRequestContextGetter* system_request_context() override;
virtual chrome_variations::VariationsService* variations_service() OVERRIDE; chrome_variations::VariationsService* variations_service() override;
virtual BrowserProcessPlatformPart* platform_part() OVERRIDE; BrowserProcessPlatformPart* platform_part() override;
virtual extensions::EventRouterForwarder* extensions::EventRouterForwarder*
extension_event_router_forwarder() OVERRIDE; extension_event_router_forwarder() override;
virtual NotificationUIManager* notification_ui_manager() OVERRIDE; NotificationUIManager* notification_ui_manager() override;
virtual message_center::MessageCenter* message_center() OVERRIDE; message_center::MessageCenter* message_center() override;
virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE; policy::BrowserPolicyConnector* browser_policy_connector() override;
virtual policy::PolicyService* policy_service() OVERRIDE; policy::PolicyService* policy_service() override;
virtual IconManager* icon_manager() OVERRIDE; IconManager* icon_manager() override;
virtual GLStringManager* gl_string_manager() OVERRIDE; GLStringManager* gl_string_manager() override;
virtual GpuModeManager* gpu_mode_manager() OVERRIDE; GpuModeManager* gpu_mode_manager() override;
virtual void CreateDevToolsHttpProtocolHandler( void CreateDevToolsHttpProtocolHandler(
chrome::HostDesktopType host_desktop_type, chrome::HostDesktopType host_desktop_type,
const std::string& ip, const std::string& ip,
int port) OVERRIDE; int port) override;
virtual unsigned int AddRefModule() OVERRIDE; unsigned int AddRefModule() override;
virtual unsigned int ReleaseModule() OVERRIDE; unsigned int ReleaseModule() override;
virtual bool IsShuttingDown() OVERRIDE; bool IsShuttingDown() override;
virtual printing::PrintJobManager* print_job_manager() OVERRIDE; printing::PrintJobManager* print_job_manager() override;
virtual printing::PrintPreviewDialogController* printing::PrintPreviewDialogController*
print_preview_dialog_controller() OVERRIDE; print_preview_dialog_controller() override;
virtual printing::BackgroundPrintingManager* printing::BackgroundPrintingManager*
background_printing_manager() OVERRIDE; background_printing_manager() override;
virtual IntranetRedirectDetector* intranet_redirect_detector() OVERRIDE; IntranetRedirectDetector* intranet_redirect_detector() override;
virtual const std::string& GetApplicationLocale() OVERRIDE; const std::string& GetApplicationLocale() override;
virtual void SetApplicationLocale(const std::string& locale) OVERRIDE; void SetApplicationLocale(const std::string& locale) override;
virtual DownloadStatusUpdater* download_status_updater() OVERRIDE; DownloadStatusUpdater* download_status_updater() override;
virtual DownloadRequestLimiter* download_request_limiter() OVERRIDE; DownloadRequestLimiter* download_request_limiter() override;
virtual BackgroundModeManager* background_mode_manager() OVERRIDE; BackgroundModeManager* background_mode_manager() override;
virtual void set_background_mode_manager_for_test( void set_background_mode_manager_for_test(
scoped_ptr<BackgroundModeManager> manager) OVERRIDE; scoped_ptr<BackgroundModeManager> manager) override;
virtual StatusTray* status_tray() OVERRIDE; StatusTray* status_tray() override;
virtual SafeBrowsingService* safe_browsing_service() OVERRIDE; SafeBrowsingService* safe_browsing_service() override;
virtual safe_browsing::ClientSideDetectionService* safe_browsing::ClientSideDetectionService*
safe_browsing_detection_service() OVERRIDE; safe_browsing_detection_service() override;
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
virtual void StartAutoupdateTimer() OVERRIDE; void StartAutoupdateTimer() override;
#endif #endif
virtual ChromeNetLog* net_log() OVERRIDE; ChromeNetLog* net_log() override;
virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; prerender::PrerenderTracker* prerender_tracker() override;
virtual component_updater::ComponentUpdateService* component_updater::ComponentUpdateService*
component_updater() OVERRIDE; component_updater() override;
virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; CRLSetFetcher* crl_set_fetcher() override;
virtual component_updater::PnaclComponentInstaller* component_updater::PnaclComponentInstaller*
pnacl_component_installer() OVERRIDE; pnacl_component_installer() override;
virtual MediaFileSystemRegistry* MediaFileSystemRegistry*
media_file_system_registry() OVERRIDE; media_file_system_registry() override;
virtual bool created_local_state() const OVERRIDE; bool created_local_state() const override;
#if defined(ENABLE_WEBRTC) #if defined(ENABLE_WEBRTC)
virtual WebRtcLogUploader* webrtc_log_uploader() OVERRIDE; WebRtcLogUploader* webrtc_log_uploader() override;
#endif #endif
virtual network_time::NetworkTimeTracker* network_time_tracker() OVERRIDE; network_time::NetworkTimeTracker* network_time_tracker() override;
virtual gcm::GCMDriver* gcm_driver() OVERRIDE; gcm::GCMDriver* gcm_driver() override;
private: private:
std::string locale_; std::string locale_;

View File

@ -18,7 +18,7 @@
#include "libcef/common/content_client.h" #include "libcef/common/content_client.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/file_util.h" #include "base/files/file_util.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
@ -182,8 +182,8 @@ class Delegate : public InternalHandlerDelegate {
public: public:
Delegate() {} Delegate() {}
virtual bool OnRequest(CefRefPtr<CefRequest> request, bool OnRequest(CefRefPtr<CefRequest> request,
Action* action) OVERRIDE { Action* action) override {
GURL url = GURL(request->GetURL().ToString()); GURL url = GURL(request->GetURL().ToString());
std::string path = url.path(); std::string path = url.path();
if (path.length() > 0) if (path.length() > 0)
@ -298,8 +298,8 @@ void DidFinishChromeVersionLoad(CefRefPtr<CefFrame> frame) {
: frame_(frame) { : frame_(frame) {
} }
virtual bool Visit(CefRefPtr<CefWebPluginInfo> info, bool Visit(CefRefPtr<CefWebPluginInfo> info,
int count, int total) OVERRIDE { int count, int total) override {
std::string name = info->GetName(); std::string name = info->GetName();
if (name == "Shockwave Flash") { if (name == "Shockwave Flash") {
if (frame_->IsValid()) { if (frame_->IsValid()) {
@ -333,9 +333,9 @@ class ChromeProtocolHandlerWrapper :
: chrome_protocol_handler_(chrome_protocol_handler.Pass()) { : chrome_protocol_handler_(chrome_protocol_handler.Pass()) {
} }
virtual net::URLRequestJob* MaybeCreateJob( net::URLRequestJob* MaybeCreateJob(
net::URLRequest* request, net::URLRequest* request,
net::NetworkDelegate* network_delegate) const OVERRIDE { net::NetworkDelegate* network_delegate) const override {
// Keep synchronized with the checks in ChromeProtocolHandler::MaybeCreateJob. // Keep synchronized with the checks in ChromeProtocolHandler::MaybeCreateJob.
if (content::ViewHttpCacheJobFactory::IsSupportedURL(request->url()) || if (content::ViewHttpCacheJobFactory::IsSupportedURL(request->url()) ||
(request->url().SchemeIs(content::kChromeUIScheme) && (request->url().SchemeIs(content::kChromeUIScheme) &&

View File

@ -66,14 +66,14 @@ class CefAccessTokenStore : public content::AccessTokenStore {
public: public:
CefAccessTokenStore() {} CefAccessTokenStore() {}
virtual void LoadAccessTokens( void LoadAccessTokens(
const LoadAccessTokensCallbackType& callback) OVERRIDE { const LoadAccessTokensCallbackType& callback) override {
callback.Run(access_token_set_, callback.Run(access_token_set_,
CefContentBrowserClient::Get()->request_context().get()); CefContentBrowserClient::Get()->request_context().get());
} }
virtual void SaveAccessToken( void SaveAccessToken(
const GURL& server_url, const base::string16& access_token) OVERRIDE { const GURL& server_url, const base::string16& access_token) override {
access_token_set_[server_url] = access_token; 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 (CEF_CURRENTLY_ON_IOT()) {
if (!callback_.is_null()) { if (!callback_.is_null()) {
callback_.Run(allow ? callback_.Run(allow ?
@ -116,7 +116,7 @@ class CefQuotaCallbackImpl : public CefQuotaCallback {
} }
} }
virtual void Cancel() OVERRIDE { void Cancel() override {
if (CEF_CURRENTLY_ON_IOT()) { if (CEF_CURRENTLY_ON_IOT()) {
if (!callback_.is_null()) { if (!callback_.is_null()) {
CancelNow(callback_); CancelNow(callback_);
@ -155,7 +155,7 @@ class CefAllowCertificateErrorCallbackImpl
: callback_(callback) { : callback_(callback) {
} }
virtual void Continue(bool allow) OVERRIDE { void Continue(bool allow) override {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (!callback_.is_null()) { if (!callback_.is_null()) {
callback_.Run(allow); callback_.Run(allow);
@ -187,7 +187,7 @@ class CefGeolocationCallbackImpl : public CefGeolocationCallback {
explicit CefGeolocationCallbackImpl(const CallbackType& callback) explicit CefGeolocationCallbackImpl(const CallbackType& callback)
: callback_(callback) {} : callback_(callback) {}
virtual void Continue(bool allow) OVERRIDE { void Continue(bool allow) override {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (!callback_.is_null()) { if (!callback_.is_null()) {
callback_.Run(allow); callback_.Run(allow);
@ -215,33 +215,16 @@ class CefGeolocationCallbackImpl : public CefGeolocationCallback {
DISALLOW_COPY_AND_ASSIGN(CefGeolocationCallbackImpl); DISALLOW_COPY_AND_ASSIGN(CefGeolocationCallbackImpl);
}; };
void CancelGeolocationPermission(base::WeakPtr<CefBrowserHostImpl> browser,
const GURL& requesting_frame,
int bridge_id) {
if (browser.get()) {
CefRefPtr<CefClient> client = browser->GetClient();
if (client.get()) {
CefRefPtr<CefGeolocationHandler> handler =
client->GetGeolocationHandler();
if (handler.get()) {
handler->OnCancelGeolocationPermission(browser.get(),
requesting_frame.spec(),
bridge_id);
}
}
}
}
class CefQuotaPermissionContext : public content::QuotaPermissionContext { class CefQuotaPermissionContext : public content::QuotaPermissionContext {
public: public:
CefQuotaPermissionContext() { CefQuotaPermissionContext() {
} }
// The callback will be dispatched on the IO thread. // The callback will be dispatched on the IO thread.
virtual void RequestQuotaPermission( void RequestQuotaPermission(
const content::StorageQuotaParams& params, const content::StorageQuotaParams& params,
int render_process_id, int render_process_id,
const PermissionCallback& callback) OVERRIDE { const PermissionCallback& callback) override {
if (params.storage_type != storage::kStorageTypePersistent) { if (params.storage_type != storage::kStorageTypePersistent) {
// To match Chrome behavior we only support requesting quota with this // To match Chrome behavior we only support requesting quota with this
// interface for Persistent storage type. // interface for Persistent storage type.
@ -278,8 +261,7 @@ class CefQuotaPermissionContext : public content::QuotaPermissionContext {
} }
private: private:
virtual ~CefQuotaPermissionContext() { ~CefQuotaPermissionContext() override {}
}
DISALLOW_COPY_AND_ASSIGN(CefQuotaPermissionContext); DISALLOW_COPY_AND_ASSIGN(CefQuotaPermissionContext);
}; };
@ -287,14 +269,13 @@ class CefQuotaPermissionContext : public content::QuotaPermissionContext {
class CefPluginServiceFilter : public content::PluginServiceFilter { class CefPluginServiceFilter : public content::PluginServiceFilter {
public: public:
CefPluginServiceFilter() {} CefPluginServiceFilter() {}
virtual ~CefPluginServiceFilter() {}
virtual bool IsPluginAvailable(int render_process_id, bool IsPluginAvailable(int render_process_id,
int render_frame_id, int render_frame_id,
const void* context, const void* context,
const GURL& url, const GURL& url,
const GURL& policy_url, const GURL& policy_url,
content::WebPluginInfo* plugin) OVERRIDE { content::WebPluginInfo* plugin) override {
bool allowed = true; bool allowed = true;
CefRefPtr<CefBrowserHostImpl> browser = CefRefPtr<CefBrowserHostImpl> browser =
@ -319,8 +300,8 @@ class CefPluginServiceFilter : public content::PluginServiceFilter {
return allowed; return allowed;
} }
virtual bool CanLoadPlugin(int render_process_id, bool CanLoadPlugin(int render_process_id,
const base::FilePath& path) OVERRIDE { const base::FilePath& path) override {
return true; return true;
} }
@ -702,7 +683,6 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
static const char* const kSwitchNames[] = { static const char* const kSwitchNames[] = {
switches::kContextSafetyImplementation, switches::kContextSafetyImplementation,
switches::kDisableSpellChecking, switches::kDisableSpellChecking,
switches::kEnableMediaStream,
switches::kEnableSpeechInput, switches::kEnableSpeechInput,
switches::kEnableSpellingAutoCorrect, switches::kEnableSpellingAutoCorrect,
switches::kUncaughtExceptionStackSize, switches::kUncaughtExceptionStackSize,
@ -806,14 +786,20 @@ content::AccessTokenStore* CefContentBrowserClient::CreateAccessTokenStore() {
return new CefAccessTokenStore; return new CefAccessTokenStore;
} }
void CefContentBrowserClient::RequestGeolocationPermission( void CefContentBrowserClient::RequestPermission(
content::PermissionType permission,
content::WebContents* web_contents, content::WebContents* web_contents,
int bridge_id, int bridge_id,
const GURL& requesting_frame, const GURL& requesting_frame,
bool user_gesture, bool user_gesture,
base::Callback<void(bool)> result_callback, const base::Callback<void(bool)>& result_callback) {
base::Closure* cancel_callback) {
CEF_REQUIRE_UIT(); CEF_REQUIRE_UIT();
if (permission != content::PermissionType::PERMISSION_GEOLOCATION) {
result_callback.Run(false);
return;
}
bool proceed = false; bool proceed = false;
CefRefPtr<CefBrowserHostImpl> browser = CefRefPtr<CefBrowserHostImpl> browser =
@ -831,15 +817,8 @@ void CefContentBrowserClient::RequestGeolocationPermission(
proceed = handler->OnRequestGeolocationPermission( proceed = handler->OnRequestGeolocationPermission(
browser.get(), requesting_frame.spec(), bridge_id, browser.get(), requesting_frame.spec(), bridge_id,
callbackImpl.get()); callbackImpl.get());
if (proceed) { 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 {
callbackImpl->Disconnect(); 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<CefBrowserHostImpl> browser =
CefBrowserHostImpl::GetBrowserForContents(web_contents);
if (browser.get()) {
CefRefPtr<CefClient> client = browser->GetClient();
if (client.get()) {
CefRefPtr<CefGeolocationHandler> handler =
client->GetGeolocationHandler();
if (handler.get()) {
handler->OnCancelGeolocationPermission(browser.get(),
requesting_frame.spec(),
bridge_id);
}
}
}
}
bool CefContentBrowserClient::CanCreateWindow( bool CefContentBrowserClient::CanCreateWindow(
const GURL& opener_url, const GURL& opener_url,
const GURL& opener_top_level_frame_url, const GURL& opener_top_level_frame_url,
@ -1017,11 +1022,10 @@ content::DevToolsManagerDelegate*
void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess( void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line, const base::CommandLine& command_line,
int child_process_id, int child_process_id,
std::vector<content::FileDescriptorInfo>* mappings) { content::FileDescriptorInfo* mappings) {
int crash_signal_fd = GetCrashSignalFD(command_line); int crash_signal_fd = GetCrashSignalFD(command_line);
if (crash_signal_fd >= 0) { if (crash_signal_fd >= 0) {
mappings->push_back(content::FileDescriptorInfo( mappings->Share(kCrashDumpSignal, crash_signal_fd);
kCrashDumpSignal, base::FileDescriptor(crash_signal_fd, false)));
} }
} }
#endif // defined(OS_POSIX) && !defined(OS_MACOSX) #endif // defined(OS_POSIX) && !defined(OS_MACOSX)

View File

@ -38,7 +38,7 @@ class SiteInstance;
class CefContentBrowserClient : public content::ContentBrowserClient { class CefContentBrowserClient : public content::ContentBrowserClient {
public: public:
CefContentBrowserClient(); CefContentBrowserClient();
virtual ~CefContentBrowserClient(); ~CefContentBrowserClient() override;
// Returns the singleton CefContentBrowserClient instance. // Returns the singleton CefContentBrowserClient instance.
static CefContentBrowserClient* Get(); static CefContentBrowserClient* Get();
@ -79,31 +79,31 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
void RemoveBrowserContextReference(CefBrowserContext* context); void RemoveBrowserContextReference(CefBrowserContext* context);
// ContentBrowserClient implementation. // ContentBrowserClient implementation.
virtual content::BrowserMainParts* CreateBrowserMainParts( content::BrowserMainParts* CreateBrowserMainParts(
const content::MainFunctionParams& parameters) OVERRIDE; const content::MainFunctionParams& parameters) override;
virtual void RenderProcessWillLaunch( void RenderProcessWillLaunch(
content::RenderProcessHost* host) OVERRIDE; content::RenderProcessHost* host) override;
virtual net::URLRequestContextGetter* CreateRequestContext( net::URLRequestContextGetter* CreateRequestContext(
content::BrowserContext* browser_context, content::BrowserContext* browser_context,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) content::URLRequestInterceptorScopedVector request_interceptors)
OVERRIDE; override;
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
content::BrowserContext* browser_context, content::BrowserContext* browser_context,
const base::FilePath& partition_path, const base::FilePath& partition_path,
bool in_memory, bool in_memory,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) content::URLRequestInterceptorScopedVector request_interceptors)
OVERRIDE; override;
virtual bool IsHandledURL(const GURL& url) OVERRIDE; bool IsHandledURL(const GURL& url) override;
virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
int child_process_id) OVERRIDE; int child_process_id) override;
virtual content::QuotaPermissionContext* content::QuotaPermissionContext*
CreateQuotaPermissionContext() OVERRIDE; CreateQuotaPermissionContext() override;
virtual content::MediaObserver* GetMediaObserver() OVERRIDE; content::MediaObserver* GetMediaObserver() override;
virtual content::SpeechRecognitionManagerDelegate* content::SpeechRecognitionManagerDelegate*
GetSpeechRecognitionManagerDelegate() OVERRIDE; GetSpeechRecognitionManagerDelegate() override;
virtual void AllowCertificateError( void AllowCertificateError(
int render_process_id, int render_process_id,
int render_frame_id, int render_frame_id,
int cert_error, int cert_error,
@ -114,49 +114,53 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
bool strict_enforcement, bool strict_enforcement,
bool expired_previous_decision, bool expired_previous_decision,
const base::Callback<void(bool)>& callback, const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* result) OVERRIDE; content::CertificateRequestResultType* result) override;
virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; content::AccessTokenStore* CreateAccessTokenStore() override;
virtual void RequestGeolocationPermission( void RequestPermission(
content::PermissionType permission,
content::WebContents* web_contents, content::WebContents* web_contents,
int bridge_id, int bridge_id,
const GURL& requesting_frame, const GURL& requesting_frame,
bool user_gesture, bool user_gesture,
base::Callback<void(bool)> result_callback, const base::Callback<void(bool)>& result_callback) override;
base::Closure* cancel_callback) OVERRIDE; void CancelPermissionRequest(content::PermissionType permission,
virtual bool CanCreateWindow(const GURL& opener_url, content::WebContents* web_contents,
const GURL& opener_top_level_frame_url, int bridge_id,
const GURL& source_origin, const GURL& requesting_frame) override;
WindowContainerType container_type, bool CanCreateWindow(const GURL& opener_url,
const GURL& target_url, const GURL& opener_top_level_frame_url,
const content::Referrer& referrer, const GURL& source_origin,
WindowOpenDisposition disposition, WindowContainerType container_type,
const blink::WebWindowFeatures& features, const GURL& target_url,
bool user_gesture, const content::Referrer& referrer,
bool opener_suppressed, WindowOpenDisposition disposition,
content::ResourceContext* context, const blink::WebWindowFeatures& features,
int render_process_id, bool user_gesture,
int opener_id, bool opener_suppressed,
bool* no_javascript_access) OVERRIDE; content::ResourceContext* context,
virtual void ResourceDispatcherHostCreated() OVERRIDE; int render_process_id,
virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, int opener_id,
const GURL& url, bool* no_javascript_access) override;
content::WebPreferences* prefs) OVERRIDE; void ResourceDispatcherHostCreated() override;
virtual SkColor GetBaseBackgroundColor(content::RenderViewHost* rvh) OVERRIDE; void OverrideWebkitPrefs(content::RenderViewHost* rvh,
virtual void BrowserURLHandlerCreated( const GURL& url,
content::BrowserURLHandler* handler) OVERRIDE; content::WebPreferences* prefs) override;
virtual std::string GetDefaultDownloadName() OVERRIDE; SkColor GetBaseBackgroundColor(content::RenderViewHost* rvh) override;
virtual content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() void BrowserURLHandlerCreated(
OVERRIDE; content::BrowserURLHandler* handler) override;
std::string GetDefaultDownloadName() override;
content::DevToolsManagerDelegate* GetDevToolsManagerDelegate()
override;
#if defined(OS_POSIX) && !defined(OS_MACOSX) #if defined(OS_POSIX) && !defined(OS_MACOSX)
virtual void GetAdditionalMappedFilesForChildProcess( void GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line, const base::CommandLine& command_line,
int child_process_id, int child_process_id,
std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE; content::FileDescriptorInfo* mappings) override;
#endif #endif
#if defined(OS_WIN) #if defined(OS_WIN)
const wchar_t* GetResourceDllName() OVERRIDE; const wchar_t* GetResourceDllName() override;
#endif #endif
// Perform browser process registration for the custom scheme. // Perform browser process registration for the custom scheme.

View File

@ -20,7 +20,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/debug/debugger.h" #include "base/debug/debugger.h"
#include "base/file_util.h" #include "base/files/file_util.h"
#include "base/synchronization/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "chrome/browser/printing/print_job_manager.h" #include "chrome/browser/printing/print_job_manager.h"
#include "content/public/app/content_main.h" #include "content/public/app/content_main.h"

View File

@ -40,7 +40,7 @@ class CefContext : public content::NotificationObserver {
typedef std::list<CefRefPtr<CefBrowserHostImpl> > BrowserList; typedef std::list<CefRefPtr<CefBrowserHostImpl> > BrowserList;
CefContext(); CefContext();
~CefContext(); ~CefContext() override;
// Returns the singleton CefContext instance. // Returns the singleton CefContext instance.
static CefContext* Get(); static CefContext* Get();
@ -83,9 +83,9 @@ class CefContext : public content::NotificationObserver {
void FinalizeShutdown(); void FinalizeShutdown();
// NotificationObserver implementation. // NotificationObserver implementation.
virtual void Observe(int type, void Observe(int type,
const content::NotificationSource& source, const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE; const content::NotificationDetails& details) override;
// Track context state. // Track context state.
bool initialized_; bool initialized_;

View File

@ -18,26 +18,26 @@ class CefContextMenuParamsImpl
explicit CefContextMenuParamsImpl(content::ContextMenuParams* value); explicit CefContextMenuParamsImpl(content::ContextMenuParams* value);
// CefContextMenuParams methods. // CefContextMenuParams methods.
virtual int GetXCoord() OVERRIDE; int GetXCoord() override;
virtual int GetYCoord() OVERRIDE; int GetYCoord() override;
virtual TypeFlags GetTypeFlags() OVERRIDE; TypeFlags GetTypeFlags() override;
virtual CefString GetLinkUrl() OVERRIDE; CefString GetLinkUrl() override;
virtual CefString GetUnfilteredLinkUrl() OVERRIDE; CefString GetUnfilteredLinkUrl() override;
virtual CefString GetSourceUrl() OVERRIDE; CefString GetSourceUrl() override;
virtual bool HasImageContents() OVERRIDE; bool HasImageContents() override;
virtual CefString GetPageUrl() OVERRIDE; CefString GetPageUrl() override;
virtual CefString GetFrameUrl() OVERRIDE; CefString GetFrameUrl() override;
virtual CefString GetFrameCharset() OVERRIDE; CefString GetFrameCharset() override;
virtual MediaType GetMediaType() OVERRIDE; MediaType GetMediaType() override;
virtual MediaStateFlags GetMediaStateFlags() OVERRIDE; MediaStateFlags GetMediaStateFlags() override;
virtual CefString GetSelectionText() OVERRIDE; CefString GetSelectionText() override;
virtual CefString GetMisspelledWord() OVERRIDE; CefString GetMisspelledWord() override;
virtual int GetMisspellingHash() OVERRIDE; int GetMisspellingHash() override;
virtual bool GetDictionarySuggestions( bool GetDictionarySuggestions(
std::vector<CefString>& suggestions) OVERRIDE; std::vector<CefString>& suggestions) override;
virtual bool IsEditable() OVERRIDE; bool IsEditable() override;
virtual bool IsSpellCheckEnabled() OVERRIDE; bool IsSpellCheckEnabled() override;
virtual EditStateFlags GetEditStateFlags() OVERRIDE; EditStateFlags GetEditStateFlags() override;
DISALLOW_COPY_AND_ASSIGN(CefContextMenuParamsImpl); DISALLOW_COPY_AND_ASSIGN(CefContextMenuParamsImpl);
}; };

View File

@ -16,7 +16,7 @@
#include "libcef/common/time_util.h" #include "libcef/common/time_util.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/file_util.h" #include "base/files/file_util.h"
#include "base/format_macros.h" #include "base/format_macros.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"
@ -63,6 +63,10 @@ class VisitCookiesCallback : public base::RefCounted<VisitCookiesCallback> {
} }
private: private:
friend class base::RefCounted<VisitCookiesCallback>;
~VisitCookiesCallback() {}
scoped_refptr<net::CookieMonster> cookie_monster_; scoped_refptr<net::CookieMonster> cookie_monster_;
CefRefPtr<CefCookieVisitor> visitor_; CefRefPtr<CefCookieVisitor> visitor_;
}; };

View File

@ -13,25 +13,24 @@
class CefCookieManagerImpl : public CefCookieManager { class CefCookieManagerImpl : public CefCookieManager {
public: public:
CefCookieManagerImpl(bool is_global); CefCookieManagerImpl(bool is_global);
~CefCookieManagerImpl(); ~CefCookieManagerImpl() override;
// Initialize the cookie manager. // Initialize the cookie manager.
void Initialize(const CefString& path, void Initialize(const CefString& path,
bool persist_session_cookies); bool persist_session_cookies);
// CefCookieManager methods. // CefCookieManager methods.
virtual void SetSupportedSchemes(const std::vector<CefString>& schemes) void SetSupportedSchemes(const std::vector<CefString>& schemes) override;
OVERRIDE; bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) override;
virtual bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) OVERRIDE; bool VisitUrlCookies(const CefString& url, bool includeHttpOnly,
virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly, CefRefPtr<CefCookieVisitor> visitor) override;
CefRefPtr<CefCookieVisitor> visitor) OVERRIDE; bool SetCookie(const CefString& url,
virtual bool SetCookie(const CefString& url, const CefCookie& cookie) override;
const CefCookie& cookie) OVERRIDE; bool DeleteCookies(const CefString& url,
virtual bool DeleteCookies(const CefString& url, const CefString& cookie_name) override;
const CefString& cookie_name) OVERRIDE; bool SetStoragePath(const CefString& path,
virtual bool SetStoragePath(const CefString& path, bool persist_session_cookies) override;
bool persist_session_cookies) OVERRIDE; bool FlushStore(CefRefPtr<CefCompletionCallback> callback) override;
virtual bool FlushStore(CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
net::CookieMonster* cookie_monster() { return cookie_monster_.get(); } net::CookieMonster* cookie_monster() { return cookie_monster_.get(); }

View File

@ -47,7 +47,7 @@ class TCPServerSocketFactory
private: private:
// content::DevToolsHttpHandler::ServerSocketFactory. // content::DevToolsHttpHandler::ServerSocketFactory.
virtual scoped_ptr<net::ServerSocket> Create() const OVERRIDE { scoped_ptr<net::ServerSocket> Create() const override {
return scoped_ptr<net::ServerSocket>( return scoped_ptr<net::ServerSocket>(
new net::TCPServerSocket(NULL, net::NetLog::Source())); new net::TCPServerSocket(NULL, net::NetLog::Source()));
} }
@ -65,9 +65,9 @@ class Target : public content::DevToolsTarget {
public: public:
explicit Target(scoped_refptr<content::DevToolsAgentHost> agent_host); explicit Target(scoped_refptr<content::DevToolsAgentHost> agent_host);
virtual std::string GetId() const OVERRIDE { return agent_host_->GetId(); } std::string GetId() const override { return agent_host_->GetId(); }
virtual std::string GetParentId() const OVERRIDE { return std::string(); } std::string GetParentId() const override { return std::string(); }
virtual std::string GetType() const OVERRIDE { std::string GetType() const override {
switch (agent_host_->GetType()) { switch (agent_host_->GetType()) {
case content::DevToolsAgentHost::TYPE_WEB_CONTENTS: case content::DevToolsAgentHost::TYPE_WEB_CONTENTS:
return kTargetTypePage; return kTargetTypePage;
@ -78,24 +78,24 @@ class Target : public content::DevToolsTarget {
} }
return kTargetTypeOther; return kTargetTypeOther;
} }
virtual std::string GetTitle() const OVERRIDE { std::string GetTitle() const override {
return agent_host_->GetTitle(); return agent_host_->GetTitle();
} }
virtual std::string GetDescription() const OVERRIDE { return std::string(); } std::string GetDescription() const override { return std::string(); }
virtual GURL GetURL() const OVERRIDE { return agent_host_->GetURL(); } GURL GetURL() const override { return agent_host_->GetURL(); }
virtual GURL GetFaviconURL() const OVERRIDE { return favicon_url_; } GURL GetFaviconURL() const override { return favicon_url_; }
virtual base::TimeTicks GetLastActivityTime() const OVERRIDE { base::TimeTicks GetLastActivityTime() const override {
return last_activity_time_; return last_activity_time_;
} }
virtual bool IsAttached() const OVERRIDE { bool IsAttached() const override {
return agent_host_->IsAttached(); return agent_host_->IsAttached();
} }
virtual scoped_refptr<content::DevToolsAgentHost> GetAgentHost() const scoped_refptr<content::DevToolsAgentHost> GetAgentHost() const
OVERRIDE { override {
return agent_host_; return agent_host_;
} }
virtual bool Activate() const OVERRIDE; bool Activate() const override;
virtual bool Close() const OVERRIDE; bool Close() const override;
private: private:
scoped_refptr<content::DevToolsAgentHost> agent_host_; scoped_refptr<content::DevToolsAgentHost> agent_host_;

View File

@ -24,18 +24,18 @@ class RenderViewHost;
class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate { class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
public: public:
explicit CefDevToolsDelegate(int port); explicit CefDevToolsDelegate(int port);
virtual ~CefDevToolsDelegate(); ~CefDevToolsDelegate() override;
// Stops http server. // Stops http server.
void Stop(); void Stop();
// DevToolsHttpHandlerDelegate overrides. // DevToolsHttpHandlerDelegate overrides.
virtual std::string GetDiscoveryPageHTML() OVERRIDE; std::string GetDiscoveryPageHTML() override;
virtual bool BundlesFrontendResources() OVERRIDE; bool BundlesFrontendResources() override;
virtual base::FilePath GetDebugFrontendDir() OVERRIDE; base::FilePath GetDebugFrontendDir() override;
virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(
net::StreamListenSocket::Delegate* delegate, net::StreamListenSocket::Delegate* delegate,
std::string* name) OVERRIDE; std::string* name) override;
// Returns the chrome-devtools URL. // Returns the chrome-devtools URL.
std::string GetChromeDevToolsURL(); std::string GetChromeDevToolsURL();
@ -50,20 +50,20 @@ class CefDevToolsManagerDelegate : public content::DevToolsManagerDelegate {
public: public:
explicit CefDevToolsManagerDelegate( explicit CefDevToolsManagerDelegate(
content::BrowserContext* browser_context); content::BrowserContext* browser_context);
virtual ~CefDevToolsManagerDelegate(); ~CefDevToolsManagerDelegate() override;
// DevToolsManagerDelegate implementation. // DevToolsManagerDelegate implementation.
virtual void Inspect(content::BrowserContext* browser_context, void Inspect(content::BrowserContext* browser_context,
content::DevToolsAgentHost* agent_host) OVERRIDE {} content::DevToolsAgentHost* agent_host) override {}
virtual void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host, void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host,
bool attached) OVERRIDE {} bool attached) override {}
virtual base::DictionaryValue* HandleCommand( base::DictionaryValue* HandleCommand(
content::DevToolsAgentHost* agent_host, content::DevToolsAgentHost* agent_host,
base::DictionaryValue* command) OVERRIDE; base::DictionaryValue* command) override;
virtual scoped_ptr<content::DevToolsTarget> CreateNewTarget( scoped_ptr<content::DevToolsTarget> CreateNewTarget(
const GURL& url) OVERRIDE; const GURL& url) override;
virtual void EnumerateTargets(TargetCallback callback) OVERRIDE; void EnumerateTargets(TargetCallback callback) override;
virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE; std::string GetPageThumbnailData(const GURL& url) override;
private: private:
content::BrowserContext* browser_context_; content::BrowserContext* browser_context_;

View File

@ -42,27 +42,27 @@ class CefDevToolsFrontend : public content::WebContentsObserver,
private: private:
CefDevToolsFrontend(CefRefPtr<CefBrowserHostImpl> frontend_browser, CefDevToolsFrontend(CefRefPtr<CefBrowserHostImpl> frontend_browser,
content::DevToolsAgentHost* agent_host); content::DevToolsAgentHost* agent_host);
virtual ~CefDevToolsFrontend(); ~CefDevToolsFrontend() override;
// WebContentsObserver overrides. // WebContentsObserver overrides.
virtual void RenderViewCreated( void RenderViewCreated(
content::RenderViewHost* render_view_host) OVERRIDE; content::RenderViewHost* render_view_host) override;
virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE; void DocumentOnLoadCompletedInMainFrame() override;
virtual void WebContentsDestroyed() OVERRIDE; void WebContentsDestroyed() override;
// content::DevToolsFrontendHost::Delegate implementation. // content::DevToolsFrontendHost::Delegate implementation.
virtual void HandleMessageFromDevToolsFrontend( void HandleMessageFromDevToolsFrontend(
const std::string& message) OVERRIDE; const std::string& message) override;
virtual void HandleMessageFromDevToolsFrontendToBackend( void HandleMessageFromDevToolsFrontendToBackend(
const std::string& message) OVERRIDE; const std::string& message) override;
// content::DevToolsAgentHostClient implementation. // content::DevToolsAgentHostClient implementation.
virtual void DispatchProtocolMessage( void DispatchProtocolMessage(
content::DevToolsAgentHost* agent_host, content::DevToolsAgentHost* agent_host,
const std::string& message) OVERRIDE; const std::string& message) override;
virtual void AgentHostClosed( void AgentHostClosed(
content::DevToolsAgentHost* agent_host, content::DevToolsAgentHost* agent_host,
bool replaced) OVERRIDE; bool replaced) override;
CefRefPtr<CefBrowserHostImpl> frontend_browser_; CefRefPtr<CefBrowserHostImpl> frontend_browser_;
scoped_refptr<content::DevToolsAgentHost> agent_host_; scoped_refptr<content::DevToolsAgentHost> agent_host_;

View File

@ -22,8 +22,8 @@ class Delegate : public InternalHandlerDelegate {
public: public:
Delegate() {} Delegate() {}
virtual bool OnRequest(CefRefPtr<CefRequest> request, bool OnRequest(CefRefPtr<CefRequest> request,
Action* action) OVERRIDE { Action* action) override {
GURL url = GURL(request->GetURL().ToString()); GURL url = GURL(request->GetURL().ToString());
std::string path = url.path(); std::string path = url.path();
if (path.length() > 0) if (path.length() > 0)

View File

@ -20,22 +20,22 @@ class CefDownloadItemImpl
explicit CefDownloadItemImpl(content::DownloadItem* value); explicit CefDownloadItemImpl(content::DownloadItem* value);
// CefDownloadItem methods. // CefDownloadItem methods.
virtual bool IsValid() OVERRIDE; bool IsValid() override;
virtual bool IsInProgress() OVERRIDE; bool IsInProgress() override;
virtual bool IsComplete() OVERRIDE; bool IsComplete() override;
virtual bool IsCanceled() OVERRIDE; bool IsCanceled() override;
virtual int64 GetCurrentSpeed() OVERRIDE; int64 GetCurrentSpeed() override;
virtual int GetPercentComplete() OVERRIDE; int GetPercentComplete() override;
virtual int64 GetTotalBytes() OVERRIDE; int64 GetTotalBytes() override;
virtual int64 GetReceivedBytes() OVERRIDE; int64 GetReceivedBytes() override;
virtual CefTime GetStartTime() OVERRIDE; CefTime GetStartTime() override;
virtual CefTime GetEndTime() OVERRIDE; CefTime GetEndTime() override;
virtual CefString GetFullPath() OVERRIDE; CefString GetFullPath() override;
virtual uint32 GetId() OVERRIDE; uint32 GetId() override;
virtual CefString GetURL() OVERRIDE; CefString GetURL() override;
virtual CefString GetSuggestedFileName() OVERRIDE; CefString GetSuggestedFileName() override;
virtual CefString GetContentDisposition() OVERRIDE; CefString GetContentDisposition() override;
virtual CefString GetMimeType() OVERRIDE; CefString GetMimeType() override;
private: private:
DISALLOW_COPY_AND_ASSIGN(CefDownloadItemImpl); DISALLOW_COPY_AND_ASSIGN(CefDownloadItemImpl);

View File

@ -12,7 +12,7 @@
#include "libcef/browser/thread_util.h" #include "libcef/browser/thread_util.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/file_util.h" #include "base/files/file_util.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
@ -62,8 +62,8 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
callback_(callback) { callback_(callback) {
} }
virtual void Continue(const CefString& download_path, void Continue(const CefString& download_path,
bool show_dialog) OVERRIDE { bool show_dialog) override {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (download_id_ <= 0) if (download_id_ <= 0)
return; return;
@ -203,7 +203,7 @@ class CefDownloadItemCallbackImpl : public CefDownloadItemCallback {
download_id_(download_id) { download_id_(download_id) {
} }
virtual void Cancel() OVERRIDE { void Cancel() override {
CEF_POST_TASK(CEF_UIT, CEF_POST_TASK(CEF_UIT,
base::Bind(&CefDownloadItemCallbackImpl::DoCancel, this)); base::Bind(&CefDownloadItemCallbackImpl::DoCancel, this));
} }

View File

@ -20,23 +20,23 @@ class CefDownloadManagerDelegate
public content::DownloadManagerDelegate { public content::DownloadManagerDelegate {
public: public:
explicit CefDownloadManagerDelegate(content::DownloadManager* manager); explicit CefDownloadManagerDelegate(content::DownloadManager* manager);
~CefDownloadManagerDelegate(); ~CefDownloadManagerDelegate() override;
private: private:
// DownloadItem::Observer methods. // DownloadItem::Observer methods.
virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; void OnDownloadUpdated(content::DownloadItem* download) override;
virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE; void OnDownloadDestroyed(content::DownloadItem* download) override;
// DownloadManager::Observer methods. // DownloadManager::Observer methods.
virtual void OnDownloadCreated(content::DownloadManager* manager, void OnDownloadCreated(content::DownloadManager* manager,
content::DownloadItem* item) OVERRIDE; content::DownloadItem* item) override;
virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE; void ManagerGoingDown(content::DownloadManager* manager) override;
// DownloadManagerDelegate methods. // DownloadManagerDelegate methods.
virtual bool DetermineDownloadTarget( bool DetermineDownloadTarget(
content::DownloadItem* item, content::DownloadItem* item,
const content::DownloadTargetCallback& callback) OVERRIDE; const content::DownloadTargetCallback& callback) override;
virtual void GetNextId(const content::DownloadIdCallback& callback) OVERRIDE; void GetNextId(const content::DownloadIdCallback& callback) override;
content::DownloadManager* manager_; content::DownloadManager* manager_;
base::WeakPtrFactory<content::DownloadManager> manager_ptr_factory_; base::WeakPtrFactory<content::DownloadManager> manager_ptr_factory_;

View File

@ -17,7 +17,7 @@ class StringVisitHandler : public CefResponseManager::Handler {
explicit StringVisitHandler(CefRefPtr<CefStringVisitor> visitor) explicit StringVisitHandler(CefRefPtr<CefStringVisitor> visitor)
: visitor_(visitor) { : visitor_(visitor) {
} }
virtual void OnResponse(const Cef_Response_Params& params) OVERRIDE { void OnResponse(const Cef_Response_Params& params) override {
visitor_->Visit(params.response); visitor_->Visit(params.response);
} }
private: private:
@ -32,7 +32,7 @@ class ViewTextHandler : public CefResponseManager::Handler {
explicit ViewTextHandler(CefRefPtr<CefFrameHostImpl> frame) explicit ViewTextHandler(CefRefPtr<CefFrameHostImpl> frame)
: frame_(frame) { : frame_(frame) {
} }
virtual void OnResponse(const Cef_Response_Params& params) OVERRIDE { void OnResponse(const Cef_Response_Params& params) override {
CefRefPtr<CefBrowser> browser = frame_->GetBrowser(); CefRefPtr<CefBrowser> browser = frame_->GetBrowser();
if (browser.get()) { if (browser.get()) {
static_cast<CefBrowserHostImpl*>(browser.get())->ViewText( static_cast<CefBrowserHostImpl*>(browser.get())->ViewText(

View File

@ -24,36 +24,36 @@ class CefFrameHostImpl : public CefFrame {
const CefString& url, const CefString& url,
const CefString& name, const CefString& name,
int64 parent_frame_id); int64 parent_frame_id);
virtual ~CefFrameHostImpl(); ~CefFrameHostImpl() override;
// CefFrame methods // CefFrame methods
virtual bool IsValid() OVERRIDE; bool IsValid() override;
virtual void Undo() OVERRIDE; void Undo() override;
virtual void Redo() OVERRIDE; void Redo() override;
virtual void Cut() OVERRIDE; void Cut() override;
virtual void Copy() OVERRIDE; void Copy() override;
virtual void Paste() OVERRIDE; void Paste() override;
virtual void Delete() OVERRIDE; void Delete() override;
virtual void SelectAll() OVERRIDE; void SelectAll() override;
virtual void ViewSource() OVERRIDE; void ViewSource() override;
virtual void GetSource(CefRefPtr<CefStringVisitor> visitor) OVERRIDE; void GetSource(CefRefPtr<CefStringVisitor> visitor) override;
virtual void GetText(CefRefPtr<CefStringVisitor> visitor) OVERRIDE; void GetText(CefRefPtr<CefStringVisitor> visitor) override;
virtual void LoadRequest(CefRefPtr<CefRequest> request) OVERRIDE; void LoadRequest(CefRefPtr<CefRequest> request) override;
virtual void LoadURL(const CefString& url) OVERRIDE; void LoadURL(const CefString& url) override;
virtual void LoadString(const CefString& string, void LoadString(const CefString& string,
const CefString& url) OVERRIDE; const CefString& url) override;
virtual void ExecuteJavaScript(const CefString& jsCode, void ExecuteJavaScript(const CefString& jsCode,
const CefString& scriptUrl, const CefString& scriptUrl,
int startLine) OVERRIDE; int startLine) override;
virtual bool IsMain() OVERRIDE; bool IsMain() override;
virtual bool IsFocused() OVERRIDE; bool IsFocused() override;
virtual CefString GetName() OVERRIDE; CefString GetName() override;
virtual int64 GetIdentifier() OVERRIDE; int64 GetIdentifier() override;
virtual CefRefPtr<CefFrame> GetParent() OVERRIDE; CefRefPtr<CefFrame> GetParent() override;
virtual CefString GetURL() OVERRIDE; CefString GetURL() override;
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE; CefRefPtr<CefBrowser> GetBrowser() override;
virtual CefRefPtr<CefV8Context> GetV8Context() OVERRIDE; CefRefPtr<CefV8Context> GetV8Context() override;
virtual void VisitDOM(CefRefPtr<CefDOMVisitor> visitor) OVERRIDE; void VisitDOM(CefRefPtr<CefDOMVisitor> visitor) override;
void SetFocused(bool focused); void SetFocused(bool focused);
void SetAttributes(const CefString& url, void SetAttributes(const CefString& url,

View File

@ -26,6 +26,10 @@ class CefLocationRequest :
} }
private: private:
friend class base::RefCountedThreadSafe<CefLocationRequest>;
~CefLocationRequest() {}
void OnLocationUpdate(const content::Geoposition& position) { void OnLocationUpdate(const content::Geoposition& position) {
CEF_REQUIRE_UIT(); CEF_REQUIRE_UIT();
if (callback_.get()) { if (callback_.get()) {

View File

@ -37,27 +37,27 @@ class RedirectHandler : public CefResourceHandler {
: url_(url) { : url_(url) {
} }
virtual bool ProcessRequest(CefRefPtr<CefRequest> request, bool ProcessRequest(CefRefPtr<CefRequest> request,
CefRefPtr<CefCallback> callback) OVERRIDE { CefRefPtr<CefCallback> callback) override {
callback->Continue(); callback->Continue();
return true; return true;
} }
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, void GetResponseHeaders(CefRefPtr<CefResponse> response,
int64& response_length, int64& response_length,
CefString& redirectUrl) OVERRIDE { CefString& redirectUrl) override {
response_length = 0; response_length = 0;
redirectUrl = url_.spec(); redirectUrl = url_.spec();
} }
virtual bool ReadResponse(void* data_out, bool ReadResponse(void* data_out,
int bytes_to_read, int bytes_to_read,
int& bytes_read, int& bytes_read,
CefRefPtr<CefCallback> callback) OVERRIDE { CefRefPtr<CefCallback> callback) override {
return false; return false;
} }
virtual void Cancel() OVERRIDE { void Cancel() override {
} }
private: private:
@ -76,30 +76,30 @@ class InternalHandler : public CefResourceHandler {
size_(size) { size_(size) {
} }
virtual bool ProcessRequest(CefRefPtr<CefRequest> request, bool ProcessRequest(CefRefPtr<CefRequest> request,
CefRefPtr<CefCallback> callback) OVERRIDE { CefRefPtr<CefCallback> callback) override {
callback->Continue(); callback->Continue();
return true; return true;
} }
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response, void GetResponseHeaders(CefRefPtr<CefResponse> response,
int64& response_length, int64& response_length,
CefString& redirectUrl) OVERRIDE { CefString& redirectUrl) override {
response_length = size_; response_length = size_;
response->SetMimeType(mime_type_); response->SetMimeType(mime_type_);
response->SetStatus(200); response->SetStatus(200);
} }
virtual bool ReadResponse(void* data_out, bool ReadResponse(void* data_out,
int bytes_to_read, int bytes_to_read,
int& bytes_read, int& bytes_read,
CefRefPtr<CefCallback> callback) OVERRIDE { CefRefPtr<CefCallback> callback) override {
bytes_read = reader_->Read(data_out, 1, bytes_to_read); bytes_read = reader_->Read(data_out, 1, bytes_to_read);
return (bytes_read > 0); return (bytes_read > 0);
} }
virtual void Cancel() OVERRIDE { void Cancel() override {
} }
private: private:
@ -117,11 +117,11 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory {
: delegate_(delegate.Pass()) { : delegate_(delegate.Pass()) {
} }
virtual CefRefPtr<CefResourceHandler> Create( CefRefPtr<CefResourceHandler> Create(
CefRefPtr<CefBrowser> browser, CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame, CefRefPtr<CefFrame> frame,
const CefString& scheme_name, const CefString& scheme_name,
CefRefPtr<CefRequest> request) OVERRIDE { CefRefPtr<CefRequest> request) override {
GURL url = GURL(request->GetURL().ToString()); GURL url = GURL(request->GetURL().ToString());
InternalHandlerDelegate::Action action; InternalHandlerDelegate::Action action;

View File

@ -21,7 +21,7 @@ class CefJSDialogCallbackImpl : public CefJSDialogCallback {
const content::JavaScriptDialogManager::DialogClosedCallback& callback) const content::JavaScriptDialogManager::DialogClosedCallback& callback)
: callback_(callback) { : callback_(callback) {
} }
~CefJSDialogCallbackImpl() { ~CefJSDialogCallbackImpl() override {
if (!callback_.is_null()) { if (!callback_.is_null()) {
// The callback is still pending. Cancel it now. // The callback is still pending. Cancel it now.
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
@ -33,8 +33,8 @@ class CefJSDialogCallbackImpl : public CefJSDialogCallback {
} }
} }
virtual void Continue(bool success, void Continue(bool success,
const CefString& user_input) OVERRIDE { const CefString& user_input) override {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (!callback_.is_null()) { if (!callback_.is_null()) {
callback_.Run(success, user_input); callback_.Run(success, user_input);

View File

@ -19,10 +19,10 @@ class CefJavaScriptDialog;
class CefJavaScriptDialogManager : public content::JavaScriptDialogManager { class CefJavaScriptDialogManager : public content::JavaScriptDialogManager {
public: public:
explicit CefJavaScriptDialogManager(CefBrowserHostImpl* browser); explicit CefJavaScriptDialogManager(CefBrowserHostImpl* browser);
virtual ~CefJavaScriptDialogManager(); ~CefJavaScriptDialogManager() override;
// JavaScriptDialogManager methods. // JavaScriptDialogManager methods.
virtual void RunJavaScriptDialog( void RunJavaScriptDialog(
content::WebContents* web_contents, content::WebContents* web_contents,
const GURL& origin_url, const GURL& origin_url,
const std::string& accept_lang, const std::string& accept_lang,
@ -30,19 +30,19 @@ class CefJavaScriptDialogManager : public content::JavaScriptDialogManager {
const base::string16& message_text, const base::string16& message_text,
const base::string16& default_prompt_text, const base::string16& default_prompt_text,
const DialogClosedCallback& callback, const DialogClosedCallback& callback,
bool* did_suppress_message) OVERRIDE; bool* did_suppress_message) override;
virtual void RunBeforeUnloadDialog( void RunBeforeUnloadDialog(
content::WebContents* web_contents, content::WebContents* web_contents,
const base::string16& message_text, const base::string16& message_text,
bool is_reload, bool is_reload,
const DialogClosedCallback& callback) OVERRIDE; const DialogClosedCallback& callback) override;
virtual void CancelActiveAndPendingDialogs( void CancelActiveAndPendingDialogs(
content::WebContents* web_contents) OVERRIDE; content::WebContents* web_contents) override;
virtual void WebContentsDestroyed( void WebContentsDestroyed(
content::WebContents* web_contents) OVERRIDE; content::WebContents* web_contents) override;
// Called by the CefJavaScriptDialog when it closes. // Called by the CefJavaScriptDialog when it closes.
void DialogClosed(CefJavaScriptDialog* dialog); void DialogClosed(CefJavaScriptDialog* dialog);

View File

@ -42,23 +42,23 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
content::MediaStreamDevices* devices); content::MediaStreamDevices* devices);
// Overridden from content::MediaObserver: // Overridden from content::MediaObserver:
virtual void OnAudioCaptureDevicesChanged() OVERRIDE; void OnAudioCaptureDevicesChanged() override;
virtual void OnVideoCaptureDevicesChanged() OVERRIDE; void OnVideoCaptureDevicesChanged() override;
virtual void OnMediaRequestStateChanged( void OnMediaRequestStateChanged(
int render_process_id, int render_process_id,
int render_frame_id, int render_frame_id,
int page_request_id, int page_request_id,
const GURL& security_origin, const GURL& security_origin,
content::MediaStreamType stream_type, content::MediaStreamType stream_type,
content::MediaRequestState state) OVERRIDE; content::MediaRequestState state) override;
virtual void OnCreatingAudioStream(int render_process_id, void OnCreatingAudioStream(int render_process_id,
int render_view_id) OVERRIDE; int render_view_id) override;
private: private:
friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>; friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>;
CefMediaCaptureDevicesDispatcher(); CefMediaCaptureDevicesDispatcher();
virtual ~CefMediaCaptureDevicesDispatcher(); ~CefMediaCaptureDevicesDispatcher() override;
const content::MediaStreamDevices& GetAudioCaptureDevices(); const content::MediaStreamDevices& GetAudioCaptureDevices();
const content::MediaStreamDevices& GetVideoCaptureDevices(); const content::MediaStreamDevices& GetVideoCaptureDevices();

View File

@ -29,7 +29,7 @@ class CefMenuCreator : public CefMenuModelImpl::Delegate {
}; };
explicit CefMenuCreator(CefBrowserHostImpl* browser); explicit CefMenuCreator(CefBrowserHostImpl* browser);
virtual ~CefMenuCreator(); ~CefMenuCreator() override;
// Returns true if the context menu is currently showing. // Returns true if the context menu is currently showing.
bool IsShowingContextMenu(); bool IsShowingContextMenu();
@ -47,12 +47,12 @@ class CefMenuCreator : public CefMenuModelImpl::Delegate {
bool CreateRunner(); bool CreateRunner();
// CefMenuModelImpl::Delegate methods. // CefMenuModelImpl::Delegate methods.
virtual void ExecuteCommand(CefRefPtr<CefMenuModelImpl> source, void ExecuteCommand(CefRefPtr<CefMenuModelImpl> source,
int command_id, int command_id,
cef_event_flags_t event_flags) OVERRIDE; cef_event_flags_t event_flags) override;
virtual void MenuWillShow(CefRefPtr<CefMenuModelImpl> source) OVERRIDE; void MenuWillShow(CefRefPtr<CefMenuModelImpl> source) override;
virtual void MenuClosed(CefRefPtr<CefMenuModelImpl> source) OVERRIDE; void MenuClosed(CefRefPtr<CefMenuModelImpl> source) override;
virtual bool FormatLabel(base::string16& label) OVERRIDE; bool FormatLabel(base::string16& label) override;
// Create the default menu model. // Create the default menu model.
void CreateDefaultModel(); void CreateDefaultModel();

View File

@ -14,12 +14,12 @@
class CefMenuCreatorRunnerLinux: public CefMenuCreator::Runner { class CefMenuCreatorRunnerLinux: public CefMenuCreator::Runner {
public: public:
CefMenuCreatorRunnerLinux(); CefMenuCreatorRunnerLinux();
virtual ~CefMenuCreatorRunnerLinux(); ~CefMenuCreatorRunnerLinux() override;
// CefMemoryManager::Runner methods. // CefMemoryManager::Runner methods.
virtual bool RunContextMenu(CefMenuCreator* manager) OVERRIDE; bool RunContextMenu(CefMenuCreator* manager) override;
virtual void CancelContextMenu() OVERRIDE; void CancelContextMenu() override;
virtual bool FormatLabel(base::string16& label) OVERRIDE; bool FormatLabel(base::string16& label) override;
private: private:
scoped_ptr<views::MenuRunner> menu_; scoped_ptr<views::MenuRunner> menu_;

View File

@ -17,10 +17,10 @@ class MenuController;
class CefMenuCreatorRunnerMac : public CefMenuCreator::Runner { class CefMenuCreatorRunnerMac : public CefMenuCreator::Runner {
public: public:
CefMenuCreatorRunnerMac(); CefMenuCreatorRunnerMac();
virtual ~CefMenuCreatorRunnerMac(); ~CefMenuCreatorRunnerMac() override;
// CefMemoryManager::Runner methods. // CefMemoryManager::Runner methods.
virtual bool RunContextMenu(CefMenuCreator* manager) OVERRIDE; bool RunContextMenu(CefMenuCreator* manager) override;
private: private:
MenuController* menu_controller_; MenuController* menu_controller_;

View File

@ -16,7 +16,7 @@ class CefMenuCreatorRunnerWin : public CefMenuCreator::Runner {
CefMenuCreatorRunnerWin(); CefMenuCreatorRunnerWin();
// CefMemoryManager::Runner methods. // CefMemoryManager::Runner methods.
virtual bool RunContextMenu(CefMenuCreator* manager) OVERRIDE; bool RunContextMenu(CefMenuCreator* manager) override;
private: private:
scoped_ptr<views::NativeMenuWin> menu_; scoped_ptr<views::NativeMenuWin> menu_;

View File

@ -26,19 +26,16 @@ class CefSimpleMenuModel : public ui::MenuModel {
menu_model_delegate_(NULL) { menu_model_delegate_(NULL) {
} }
virtual ~CefSimpleMenuModel() {
}
// MenuModel methods. // MenuModel methods.
virtual bool HasIcons() const OVERRIDE { bool HasIcons() const override {
return false; return false;
} }
virtual int GetItemCount() const OVERRIDE { int GetItemCount() const override {
return impl_->GetCount(); return impl_->GetCount();
} }
virtual ItemType GetTypeAt(int index) const OVERRIDE { ItemType GetTypeAt(int index) const override {
switch (impl_->GetTypeAt(index)) { switch (impl_->GetTypeAt(index)) {
case MENUITEMTYPE_COMMAND: case MENUITEMTYPE_COMMAND:
return TYPE_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; return ui::NORMAL_SEPARATOR;
} }
virtual int GetCommandIdAt(int index) const OVERRIDE { int GetCommandIdAt(int index) const override {
return impl_->GetCommandIdAt(index); return impl_->GetCommandIdAt(index);
} }
virtual base::string16 GetLabelAt(int index) const OVERRIDE { base::string16 GetLabelAt(int index) const override {
return impl_->GetFormattedLabelAt(index); return impl_->GetFormattedLabelAt(index);
} }
virtual bool IsItemDynamicAt(int index) const OVERRIDE { bool IsItemDynamicAt(int index) const override {
return false; return false;
} }
virtual bool GetAcceleratorAt(int index, bool GetAcceleratorAt(int index,
ui::Accelerator* accelerator) const OVERRIDE { ui::Accelerator* accelerator) const override {
int key_code = 0; int key_code = 0;
bool shift_pressed = false; bool shift_pressed = false;
bool ctrl_pressed = false; bool ctrl_pressed = false;
@ -95,63 +92,63 @@ class CefSimpleMenuModel : public ui::MenuModel {
return false; return false;
} }
virtual bool IsItemCheckedAt(int index) const OVERRIDE { bool IsItemCheckedAt(int index) const override {
return impl_->IsCheckedAt(index); return impl_->IsCheckedAt(index);
} }
virtual int GetGroupIdAt(int index) const OVERRIDE { int GetGroupIdAt(int index) const override {
return impl_->GetGroupIdAt(index); return impl_->GetGroupIdAt(index);
} }
virtual bool GetIconAt(int index, gfx::Image* icon) OVERRIDE { bool GetIconAt(int index, gfx::Image* icon) override {
return false; return false;
} }
virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt( ui::ButtonMenuItemModel* GetButtonMenuItemAt(
int index) const OVERRIDE { int index) const override {
return NULL; return NULL;
} }
virtual bool IsEnabledAt(int index) const OVERRIDE { bool IsEnabledAt(int index) const override {
return impl_->IsEnabledAt(index); return impl_->IsEnabledAt(index);
} }
virtual bool IsVisibleAt(int index) const OVERRIDE { bool IsVisibleAt(int index) const override {
return impl_->IsVisibleAt(index); 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); 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<cef_event_flags_t>(event_flags)); impl_->ActivatedAt(index, static_cast<cef_event_flags_t>(event_flags));
} }
virtual MenuModel* GetSubmenuModelAt(int index) const OVERRIDE { MenuModel* GetSubmenuModelAt(int index) const override {
CefRefPtr<CefMenuModel> submenu = impl_->GetSubMenuAt(index); CefRefPtr<CefMenuModel> submenu = impl_->GetSubMenuAt(index);
if (submenu.get()) if (submenu.get())
return static_cast<CefMenuModelImpl*>(submenu.get())->model(); return static_cast<CefMenuModelImpl*>(submenu.get())->model();
return NULL; return NULL;
} }
virtual void MenuWillShow() OVERRIDE { void MenuWillShow() override {
impl_->MenuWillShow(); impl_->MenuWillShow();
} }
virtual void MenuClosed() OVERRIDE { void MenuClosed() override {
impl_->MenuClosed(); impl_->MenuClosed();
} }
virtual void SetMenuModelDelegate( void SetMenuModelDelegate(
ui::MenuModelDelegate* menu_model_delegate) OVERRIDE { ui::MenuModelDelegate* menu_model_delegate) override {
menu_model_delegate_ = menu_model_delegate; menu_model_delegate_ = menu_model_delegate;
} }
virtual ui::MenuModelDelegate* GetMenuModelDelegate() const OVERRIDE { ui::MenuModelDelegate* GetMenuModelDelegate() const override {
return menu_model_delegate_; return menu_model_delegate_;
} }

View File

@ -40,68 +40,68 @@ class CefMenuModelImpl : public CefMenuModel {
// The delegate must outlive this class. // The delegate must outlive this class.
explicit CefMenuModelImpl(Delegate* delegate); explicit CefMenuModelImpl(Delegate* delegate);
virtual ~CefMenuModelImpl(); ~CefMenuModelImpl() override;
// CefMenuModel methods. // CefMenuModel methods.
virtual bool Clear() OVERRIDE; bool Clear() override;
virtual int GetCount() OVERRIDE; int GetCount() override;
virtual bool AddSeparator() OVERRIDE; bool AddSeparator() override;
virtual bool AddItem(int command_id, const CefString& label) OVERRIDE; bool AddItem(int command_id, const CefString& label) override;
virtual bool AddCheckItem(int command_id, const CefString& label) OVERRIDE; bool AddCheckItem(int command_id, const CefString& label) override;
virtual bool AddRadioItem(int command_id, const CefString& label, bool AddRadioItem(int command_id, const CefString& label,
int group_id) OVERRIDE; int group_id) override;
virtual CefRefPtr<CefMenuModel> AddSubMenu(int command_id, CefRefPtr<CefMenuModel> AddSubMenu(int command_id,
const CefString& label) OVERRIDE; const CefString& label) override;
virtual bool InsertSeparatorAt(int index) OVERRIDE; bool InsertSeparatorAt(int index) override;
virtual bool InsertItemAt(int index, int command_id, bool InsertItemAt(int index, int command_id,
const CefString& label) OVERRIDE; const CefString& label) override;
virtual bool InsertCheckItemAt(int index, int command_id, bool InsertCheckItemAt(int index, int command_id,
const CefString& label) OVERRIDE; const CefString& label) override;
virtual bool InsertRadioItemAt(int index, int command_id, bool InsertRadioItemAt(int index, int command_id,
const CefString& label, int group_id) OVERRIDE; const CefString& label, int group_id) override;
virtual CefRefPtr<CefMenuModel> InsertSubMenuAt(int index, int command_id, CefRefPtr<CefMenuModel> InsertSubMenuAt(int index, int command_id,
const CefString& label) OVERRIDE; const CefString& label) override;
virtual bool Remove(int command_id) OVERRIDE; bool Remove(int command_id) override;
virtual bool RemoveAt(int index) OVERRIDE; bool RemoveAt(int index) override;
virtual int GetIndexOf(int command_id) OVERRIDE; int GetIndexOf(int command_id) override;
virtual int GetCommandIdAt(int index) OVERRIDE; int GetCommandIdAt(int index) override;
virtual bool SetCommandIdAt(int index, int command_id) OVERRIDE; bool SetCommandIdAt(int index, int command_id) override;
virtual CefString GetLabel(int command_id) OVERRIDE; CefString GetLabel(int command_id) override;
virtual CefString GetLabelAt(int index) OVERRIDE; CefString GetLabelAt(int index) override;
virtual bool SetLabel(int command_id, const CefString& label) OVERRIDE; bool SetLabel(int command_id, const CefString& label) override;
virtual bool SetLabelAt(int index, const CefString& label) OVERRIDE; bool SetLabelAt(int index, const CefString& label) override;
virtual MenuItemType GetType(int command_id) OVERRIDE; MenuItemType GetType(int command_id) override;
virtual MenuItemType GetTypeAt(int index) OVERRIDE; MenuItemType GetTypeAt(int index) override;
virtual int GetGroupId(int command_id) OVERRIDE; int GetGroupId(int command_id) override;
virtual int GetGroupIdAt(int index) OVERRIDE; int GetGroupIdAt(int index) override;
virtual bool SetGroupId(int command_id, int group_id) OVERRIDE; bool SetGroupId(int command_id, int group_id) override;
virtual bool SetGroupIdAt(int index, int group_id) OVERRIDE; bool SetGroupIdAt(int index, int group_id) override;
virtual CefRefPtr<CefMenuModel> GetSubMenu(int command_id) OVERRIDE; CefRefPtr<CefMenuModel> GetSubMenu(int command_id) override;
virtual CefRefPtr<CefMenuModel> GetSubMenuAt(int index) OVERRIDE; CefRefPtr<CefMenuModel> GetSubMenuAt(int index) override;
virtual bool IsVisible(int command_id) OVERRIDE; bool IsVisible(int command_id) override;
virtual bool IsVisibleAt(int index) OVERRIDE; bool IsVisibleAt(int index) override;
virtual bool SetVisible(int command_id, bool visible) OVERRIDE; bool SetVisible(int command_id, bool visible) override;
virtual bool SetVisibleAt(int index, bool visible) OVERRIDE; bool SetVisibleAt(int index, bool visible) override;
virtual bool IsEnabled(int command_id) OVERRIDE; bool IsEnabled(int command_id) override;
virtual bool IsEnabledAt(int index) OVERRIDE; bool IsEnabledAt(int index) override;
virtual bool SetEnabled(int command_id, bool enabled) OVERRIDE; bool SetEnabled(int command_id, bool enabled) override;
virtual bool SetEnabledAt(int index, bool enabled) OVERRIDE; bool SetEnabledAt(int index, bool enabled) override;
virtual bool IsChecked(int command_id) OVERRIDE; bool IsChecked(int command_id) override;
virtual bool IsCheckedAt(int index) OVERRIDE; bool IsCheckedAt(int index) override;
virtual bool SetChecked(int command_id, bool checked) OVERRIDE; bool SetChecked(int command_id, bool checked) override;
virtual bool SetCheckedAt(int index, bool checked) OVERRIDE; bool SetCheckedAt(int index, bool checked) override;
virtual bool HasAccelerator(int command_id) OVERRIDE; bool HasAccelerator(int command_id) override;
virtual bool HasAcceleratorAt(int index) OVERRIDE; bool HasAcceleratorAt(int index) override;
virtual bool SetAccelerator(int command_id, int key_code, bool shift_pressed, bool SetAccelerator(int command_id, int key_code, bool shift_pressed,
bool ctrl_pressed, bool alt_pressed) OVERRIDE; bool ctrl_pressed, bool alt_pressed) override;
virtual bool SetAcceleratorAt(int index, int key_code, bool shift_pressed, bool SetAcceleratorAt(int index, int key_code, bool shift_pressed,
bool ctrl_pressed, bool alt_pressed) OVERRIDE; bool ctrl_pressed, bool alt_pressed) override;
virtual bool RemoveAccelerator(int command_id) OVERRIDE; bool RemoveAccelerator(int command_id) override;
virtual bool RemoveAcceleratorAt(int index) OVERRIDE; bool RemoveAcceleratorAt(int index) override;
virtual bool GetAccelerator(int command_id, int& key_code, bool GetAccelerator(int command_id, int& key_code,
bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) OVERRIDE; bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) override;
virtual bool GetAcceleratorAt(int index, int& key_code, bool& shift_pressed, bool GetAcceleratorAt(int index, int& key_code, bool& shift_pressed,
bool& ctrl_pressed, bool& alt_pressed) OVERRIDE; bool& ctrl_pressed, bool& alt_pressed) override;
// Callbacks from the ui::MenuModel implementation. // Callbacks from the ui::MenuModel implementation.
void ActivatedAt(int index, cef_event_flags_t event_flags); void ActivatedAt(int index, cef_event_flags_t event_flags);

View File

@ -20,32 +20,32 @@ class CefPrintSettingsImpl
bool read_only); bool read_only);
// CefPrintSettings methods. // CefPrintSettings methods.
virtual bool IsValid() OVERRIDE; bool IsValid() override;
virtual bool IsReadOnly() OVERRIDE; bool IsReadOnly() override;
virtual CefRefPtr<CefPrintSettings> Copy() OVERRIDE; CefRefPtr<CefPrintSettings> Copy() override;
virtual void SetOrientation(bool landscape) OVERRIDE; void SetOrientation(bool landscape) override;
virtual bool IsLandscape() OVERRIDE; bool IsLandscape() override;
virtual void SetPrinterPrintableArea( void SetPrinterPrintableArea(
const CefSize& physical_size_device_units, const CefSize& physical_size_device_units,
const CefRect& printable_area_device_units, const CefRect& printable_area_device_units,
bool landscape_needs_flip) OVERRIDE; bool landscape_needs_flip) override;
virtual void SetDeviceName(const CefString& name) OVERRIDE; void SetDeviceName(const CefString& name) override;
virtual CefString GetDeviceName() OVERRIDE; CefString GetDeviceName() override;
virtual void SetDPI(int dpi) OVERRIDE; void SetDPI(int dpi) override;
virtual int GetDPI() OVERRIDE; int GetDPI() override;
virtual void SetPageRanges(const PageRangeList& ranges) OVERRIDE; void SetPageRanges(const PageRangeList& ranges) override;
virtual size_t GetPageRangesCount() OVERRIDE; size_t GetPageRangesCount() override;
virtual void GetPageRanges(PageRangeList& ranges) OVERRIDE; void GetPageRanges(PageRangeList& ranges) override;
virtual void SetSelectionOnly(bool selection_only) OVERRIDE; void SetSelectionOnly(bool selection_only) override;
virtual bool IsSelectionOnly() OVERRIDE; bool IsSelectionOnly() override;
virtual void SetCollate(bool collate) OVERRIDE; void SetCollate(bool collate) override;
virtual bool WillCollate() OVERRIDE; bool WillCollate() override;
virtual void SetColorModel(ColorModel model) OVERRIDE; void SetColorModel(ColorModel model) override;
virtual ColorModel GetColorModel() OVERRIDE; ColorModel GetColorModel() override;
virtual void SetCopies(int copies) OVERRIDE; void SetCopies(int copies) override;
virtual int GetCopies() OVERRIDE; int GetCopies() override;
virtual void SetDuplexMode(DuplexMode mode) OVERRIDE; void SetDuplexMode(DuplexMode mode) override;
virtual DuplexMode GetDuplexMode() OVERRIDE; DuplexMode GetDuplexMode() override;
// Must hold the controller lock while using this value. // Must hold the controller lock while using this value.
const printing::PrintSettings& print_settings() { return const_value(); } const printing::PrintSettings& print_settings() { return const_value(); }

View File

@ -13,7 +13,7 @@
#include "libcef/common/content_client.h" #include "libcef/common/content_client.h"
#include "base/bind.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/files/file_util_proxy.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/logging.h" #include "base/logging.h"
@ -34,7 +34,7 @@ class CefPrintDialogCallbackImpl : public CefPrintDialogCallback {
: dialog_(dialog) { : dialog_(dialog) {
} }
virtual void Continue(CefRefPtr<CefPrintSettings> settings) OVERRIDE { void Continue(CefRefPtr<CefPrintSettings> settings) override {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (dialog_.get()) { if (dialog_.get()) {
dialog_->OnPrintContinue(settings); dialog_->OnPrintContinue(settings);
@ -46,7 +46,7 @@ class CefPrintDialogCallbackImpl : public CefPrintDialogCallback {
} }
} }
virtual void Cancel() OVERRIDE { void Cancel() override {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (dialog_.get()) { if (dialog_.get()) {
dialog_->OnPrintCancel(); dialog_->OnPrintCancel();
@ -75,7 +75,7 @@ class CefPrintJobCallbackImpl : public CefPrintJobCallback {
: dialog_(dialog) { : dialog_(dialog) {
} }
virtual void Continue() OVERRIDE { void Continue() override {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (dialog_.get()) { if (dialog_.get()) {
dialog_->OnJobCompleted(); dialog_->OnJobCompleted();

View File

@ -34,26 +34,28 @@ class CefPrintDialogLinux
PrintingContextLinux* context); PrintingContextLinux* context);
// printing::CefPrintDialogLinuxInterface implementation. // printing::CefPrintDialogLinuxInterface implementation.
virtual void UseDefaultSettings() OVERRIDE; void UseDefaultSettings() override;
virtual bool UpdateSettings(printing::PrintSettings* settings) OVERRIDE; bool UpdateSettings(printing::PrintSettings* settings) override;
virtual void ShowDialog( void ShowDialog(
gfx::NativeView parent_view, gfx::NativeView parent_view,
bool has_selection, bool has_selection,
const PrintingContextLinux::PrintSettingsCallback& callback) OVERRIDE; const PrintingContextLinux::PrintSettingsCallback& callback) override;
virtual void PrintDocument(const printing::MetafilePlayer& metafile, void PrintDocument(const printing::MetafilePlayer& metafile,
const base::string16& document_name) OVERRIDE; const base::string16& document_name) override;
virtual void AddRefToDialog() OVERRIDE; void AddRefToDialog() override;
virtual void ReleaseDialog() OVERRIDE; void ReleaseDialog() override;
private: private:
friend class base::DeleteHelper<CefPrintDialogLinux>;
friend class base::RefCountedThreadSafe<
CefPrintDialogLinux, content::BrowserThread::DeleteOnUIThread>;
friend struct content::BrowserThread::DeleteOnThread< friend struct content::BrowserThread::DeleteOnThread<
content::BrowserThread::UI>; content::BrowserThread::UI>;
friend class base::DeleteHelper<CefPrintDialogLinux>;
friend class CefPrintDialogCallbackImpl; friend class CefPrintDialogCallbackImpl;
friend class CefPrintJobCallbackImpl; friend class CefPrintJobCallbackImpl;
explicit CefPrintDialogLinux(PrintingContextLinux* context); explicit CefPrintDialogLinux(PrintingContextLinux* context);
virtual ~CefPrintDialogLinux(); ~CefPrintDialogLinux() override;
void SetHandler(); void SetHandler();
void ReleaseHandler(); void ReleaseHandler();

View File

@ -29,11 +29,11 @@ PrintViewManager::PrintViewManager(content::WebContents* web_contents)
PrintViewManager::~PrintViewManager() { PrintViewManager::~PrintViewManager() {
} }
#if !defined(DISABLE_BASIC_PRINTING) #if defined(ENABLE_BASIC_PRINTING)
bool PrintViewManager::PrintForSystemDialogNow() { bool PrintViewManager::PrintForSystemDialogNow() {
return PrintNowInternal(new PrintMsg_PrintForSystemDialog(routing_id())); return PrintNowInternal(new PrintMsg_PrintForSystemDialog(routing_id()));
} }
#endif // !DISABLE_BASIC_PRINTING #endif // ENABLE_BASIC_PRINTING
void PrintViewManager::RenderProcessGone(base::TerminationStatus status) { void PrintViewManager::RenderProcessGone(base::TerminationStatus status) {
PrintViewManagerBase::RenderProcessGone(status); PrintViewManagerBase::RenderProcessGone(status);

View File

@ -18,20 +18,20 @@ namespace printing {
class PrintViewManager : public PrintViewManagerBase, class PrintViewManager : public PrintViewManagerBase,
public content::WebContentsUserData<PrintViewManager> { public content::WebContentsUserData<PrintViewManager> {
public: 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 // Same as PrintNow(), but for the case where a user prints with the system
// dialog from print preview. // dialog from print preview.
bool PrintForSystemDialogNow(); bool PrintForSystemDialogNow();
#endif // !DISABLE_BASIC_PRINTING #endif // ENABLE_BASIC_PRINTING
// content::WebContentsObserver implementation. // content::WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; bool OnMessageReceived(const IPC::Message& message) override;
// content::WebContentsObserver implementation. // content::WebContentsObserver implementation.
// Terminates or cancels the print job if one was pending. // Terminates or cancels the print job if one was pending.
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; void RenderProcessGone(base::TerminationStatus status) override;
private: private:
explicit PrintViewManager(content::WebContents* web_contents); explicit PrintViewManager(content::WebContents* web_contents);

View File

@ -61,11 +61,11 @@ PrintViewManagerBase::~PrintViewManagerBase() {
DisconnectFromCurrentPrintJob(); DisconnectFromCurrentPrintJob();
} }
#if !defined(DISABLE_BASIC_PRINTING) #if defined(ENABLE_BASIC_PRINTING)
bool PrintViewManagerBase::PrintNow() { bool PrintViewManagerBase::PrintNow() {
return PrintNowInternal(new PrintMsg_PrintPages(routing_id())); return PrintNowInternal(new PrintMsg_PrintPages(routing_id()));
} }
#endif // !DISABLE_BASIC_PRINTING #endif // ENABLE_BASIC_PRINTING
void PrintViewManagerBase::UpdateScriptedPrintingBlocked() { void PrintViewManagerBase::UpdateScriptedPrintingBlocked() {
Send(new PrintMsg_SetScriptedPrintingBlocked( Send(new PrintMsg_SetScriptedPrintingBlocked(
@ -152,7 +152,7 @@ void PrintViewManagerBase::OnDidPrintPage(
#if !defined(OS_WIN) #if !defined(OS_WIN)
// Update the rendered document. It will send notifications to the listener. // Update the rendered document. It will send notifications to the listener.
document->SetPage(params.page_number, document->SetPage(params.page_number,
metafile.PassAs<MetafilePlayer>(), metafile.Pass(),
params.page_size, params.page_size,
params.content_area); params.content_area);

View File

@ -33,20 +33,20 @@ class PrintViewManagerBase : public content::NotificationObserver,
public PrintedPagesSource, public PrintedPagesSource,
public content::WebContentsObserver { public content::WebContentsObserver {
public: public:
virtual ~PrintViewManagerBase(); ~PrintViewManagerBase() override;
#if !defined(DISABLE_BASIC_PRINTING) #if defined(ENABLE_BASIC_PRINTING)
// Prints the current document immediately. Since the rendering is // Prints the current document immediately. Since the rendering is
// asynchronous, the actual printing will not be completed on the return of // asynchronous, the actual printing will not be completed on the return of
// this function. Returns false if printing is impossible at the moment. // this function. Returns false if printing is impossible at the moment.
virtual bool PrintNow(); virtual bool PrintNow();
#endif // !DISABLE_BASIC_PRINTING #endif // ENABLE_BASIC_PRINTING
// Whether to block scripted printing for our tab or not. // Whether to block scripted printing for our tab or not.
void UpdateScriptedPrintingBlocked(); void UpdateScriptedPrintingBlocked();
// PrintedPagesSource implementation. // PrintedPagesSource implementation.
virtual base::string16 RenderSourceName() OVERRIDE; base::string16 RenderSourceName() override;
protected: protected:
explicit PrintViewManagerBase(content::WebContents* web_contents); explicit PrintViewManagerBase(content::WebContents* web_contents);
@ -55,26 +55,26 @@ class PrintViewManagerBase : public content::NotificationObserver,
bool PrintNowInternal(IPC::Message* message); bool PrintNowInternal(IPC::Message* message);
// Terminates or cancels the print job if one was pending. // 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. // content::WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; bool OnMessageReceived(const IPC::Message& message) override;
// IPC Message handlers. // IPC Message handlers.
virtual void OnPrintingFailed(int cookie); virtual void OnPrintingFailed(int cookie);
private: private:
// content::NotificationObserver implementation. // content::NotificationObserver implementation.
virtual void Observe(int type, void Observe(int type,
const content::NotificationSource& source, const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE; const content::NotificationDetails& details) override;
// content::WebContentsObserver implementation. // content::WebContentsObserver implementation.
virtual void DidStartLoading( void DidStartLoading(
content::RenderViewHost* render_view_host) OVERRIDE; content::RenderViewHost* render_view_host) override;
// Cancels the print job. // Cancels the print job.
virtual void NavigationStopped() OVERRIDE; void NavigationStopped() override;
// IPC Message handlers. // IPC Message handlers.
void OnDidGetPrintedPagesCount(int cookie, int number_pages); void OnDidGetPrintedPagesCount(int cookie, int number_pages);

View File

@ -38,13 +38,13 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
explicit PrintingMessageFilter(int render_process_id); explicit PrintingMessageFilter(int render_process_id);
// content::BrowserMessageFilter methods. // content::BrowserMessageFilter methods.
virtual void OverrideThreadForMessage( void OverrideThreadForMessage(
const IPC::Message& message, const IPC::Message& message,
content::BrowserThread::ID* thread) OVERRIDE; content::BrowserThread::ID* thread) override;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; bool OnMessageReceived(const IPC::Message& message) override;
private: private:
virtual ~PrintingMessageFilter(); ~PrintingMessageFilter() override;
#if defined(OS_WIN) #if defined(OS_WIN)
// Used to pass resulting EMF from renderer to browser in printing. // Used to pass resulting EMF from renderer to browser in printing.

View File

@ -54,35 +54,6 @@ static blink::WebScreenInfo webScreenInfoFrom(const CefScreenInfo& src) {
return webScreenInfo; 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. // Used to prevent further resizes while a resize is pending.
class CefResizeLock : public content::ResizeLock { class CefResizeLock : public content::ResizeLock {
public: public:
@ -104,21 +75,21 @@ class CefResizeLock : public content::ResizeLock {
timeout); timeout);
} }
virtual ~CefResizeLock() { ~CefResizeLock() override {
CancelLock(); CancelLock();
} }
virtual bool GrabDeferredLock() OVERRIDE { bool GrabDeferredLock() override {
return ResizeLock::GrabDeferredLock(); return ResizeLock::GrabDeferredLock();
} }
virtual void UnlockCompositor() OVERRIDE { void UnlockCompositor() override {
ResizeLock::UnlockCompositor(); ResizeLock::UnlockCompositor();
compositor_lock_ = NULL; compositor_lock_ = NULL;
} }
protected: protected:
virtual void LockCompositor() OVERRIDE { void LockCompositor() override {
ResizeLock::LockCompositor(); ResizeLock::LockCompositor();
compositor_lock_ = host_->compositor()->GetCompositorLock(); compositor_lock_ = host_->compositor()->GetCompositorLock();
} }
@ -171,7 +142,7 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
content::RenderViewHost::From(render_widget_host_)); content::RenderViewHost::From(render_widget_host_));
} }
root_layer_.reset(new CefRootLayer); root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
PlatformCreateCompositorWidget(); PlatformCreateCompositorWidget();
#if !defined(OS_MACOSX) #if !defined(OS_MACOSX)
@ -276,8 +247,9 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetViewBounds() const {
return gfx::Rect(rc.x, rc.y, rc.width, rc.height); return gfx::Rect(rc.x, rc.y, rc.width, rc.height);
} }
void CefRenderWidgetHostViewOSR::SetBackgroundOpaque(bool opaque) { void CefRenderWidgetHostViewOSR::SetBackgroundColor(SkColor color) {
content::RenderWidgetHostViewBase::SetBackgroundOpaque(opaque); content::RenderWidgetHostViewBase::SetBackgroundColor(color);
bool opaque = GetBackgroundOpaque();
if (render_widget_host_) if (render_widget_host_)
render_widget_host_->SetBackgroundOpaque(opaque); render_widget_host_->SetBackgroundOpaque(opaque);
} }
@ -435,8 +407,10 @@ void CefRenderWidgetHostViewOSR::SetIsLoading(bool is_loading) {
} }
#if !defined(OS_MACOSX) #if !defined(OS_MACOSX)
void CefRenderWidgetHostViewOSR::TextInputStateChanged( void CefRenderWidgetHostViewOSR::TextInputTypeChanged(ui::TextInputType type,
const ViewHostMsg_TextInputState_Params& params) { ui::TextInputMode mode,
bool can_compose_inline,
int flags) {
} }
void CefRenderWidgetHostViewOSR::ImeCancelComposition() { void CefRenderWidgetHostViewOSR::ImeCancelComposition() {
@ -537,28 +511,9 @@ void CefRenderWidgetHostViewOSR::EndFrameSubscription() {
} }
void CefRenderWidgetHostViewOSR::AcceleratedSurfaceInitialized( void CefRenderWidgetHostViewOSR::AcceleratedSurfaceInitialized(
int host_id,
int route_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( bool CefRenderWidgetHostViewOSR::HasAcceleratedSurface(
const gfx::Size& desired_size) { const gfx::Size& desired_size) {
// CEF doesn't use GetBackingStore for accelerated pages, so it doesn't // CEF doesn't use GetBackingStore for accelerated pages, so it doesn't
@ -695,7 +650,7 @@ content::DelegatedFrameHost*
bool CefRenderWidgetHostViewOSR::InstallTransparency() { bool CefRenderWidgetHostViewOSR::InstallTransparency() {
if (browser_impl_.get() && browser_impl_->IsTransparent()) { if (browser_impl_.get() && browser_impl_->IsTransparent()) {
SetBackgroundOpaque(false); SetBackgroundColor(SkColorSetARGB(SK_AlphaTRANSPARENT, 0, 0, 0));
return true; return true;
} }
return false; return false;

View File

@ -74,145 +74,135 @@ class CefRenderWidgetHostViewOSR
public content::DelegatedFrameHostClient { public content::DelegatedFrameHostClient {
public: public:
explicit CefRenderWidgetHostViewOSR(content::RenderWidgetHost* widget); explicit CefRenderWidgetHostViewOSR(content::RenderWidgetHost* widget);
virtual ~CefRenderWidgetHostViewOSR(); ~CefRenderWidgetHostViewOSR() override;
// RenderWidgetHostView implementation. // RenderWidgetHostView implementation.
virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE; void InitAsChild(gfx::NativeView parent_view) override;
virtual content::RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; content::RenderWidgetHost* GetRenderWidgetHost() const override;
virtual void SetSize(const gfx::Size& size) OVERRIDE; void SetSize(const gfx::Size& size) override;
virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; void SetBounds(const gfx::Rect& rect) override;
virtual gfx::Vector2dF GetLastScrollOffset() const OVERRIDE; gfx::Vector2dF GetLastScrollOffset() const override;
virtual gfx::NativeView GetNativeView() const OVERRIDE; gfx::NativeView GetNativeView() const override;
virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE; gfx::NativeViewId GetNativeViewId() const override;
virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; gfx::NativeViewAccessible GetNativeViewAccessible() override;
virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; ui::TextInputClient* GetTextInputClient() override;
virtual void Focus() OVERRIDE; void Focus() override;
virtual bool HasFocus() const OVERRIDE; bool HasFocus() const override;
virtual bool IsSurfaceAvailableForCopy() const OVERRIDE; bool IsSurfaceAvailableForCopy() const override;
virtual void Show() OVERRIDE; void Show() override;
virtual void Hide() OVERRIDE; void Hide() override;
virtual bool IsShowing() OVERRIDE; bool IsShowing() override;
virtual gfx::Rect GetViewBounds() const OVERRIDE; gfx::Rect GetViewBounds() const override;
virtual void SetBackgroundOpaque(bool opaque) OVERRIDE; void SetBackgroundColor(SkColor color) override;
virtual bool LockMouse() OVERRIDE; bool LockMouse() override;
virtual void UnlockMouse() OVERRIDE; void UnlockMouse() override;
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
virtual void SetActive(bool active) OVERRIDE; void SetActive(bool active) override;
virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE; void SetWindowVisibility(bool visible) override;
virtual void SetWindowVisibility(bool visible) OVERRIDE; void WindowFrameChanged() override;
virtual void WindowFrameChanged() OVERRIDE; void ShowDefinitionForSelection() override;
virtual void ShowDefinitionForSelection() OVERRIDE; bool SupportsSpeech() const override;
virtual bool SupportsSpeech() const OVERRIDE; void SpeakSelection() override;
virtual void SpeakSelection() OVERRIDE; bool IsSpeaking() const override;
virtual bool IsSpeaking() const OVERRIDE; void StopSpeaking() override;
virtual void StopSpeaking() OVERRIDE;
#endif // defined(OS_MACOSX) #endif // defined(OS_MACOSX)
// RenderWidgetHostViewBase implementation. // RenderWidgetHostViewBase implementation.
virtual void OnSwapCompositorFrame( void OnSwapCompositorFrame(
uint32 output_surface_id, uint32 output_surface_id,
scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; scoped_ptr<cc::CompositorFrame> frame) override;
virtual void InitAsPopup(content::RenderWidgetHostView* parent_host_view, void InitAsPopup(content::RenderWidgetHostView* parent_host_view,
const gfx::Rect& pos) OVERRIDE; const gfx::Rect& pos) override;
virtual void InitAsFullscreen( void InitAsFullscreen(
content::RenderWidgetHostView* reference_host_view) OVERRIDE; content::RenderWidgetHostView* reference_host_view) override;
virtual void WasShown() OVERRIDE; void WasShown() override;
virtual void WasHidden() OVERRIDE; void WasHidden() override;
virtual void MovePluginWindows( void MovePluginWindows(
const std::vector<content::WebPluginGeometry>& moves) OVERRIDE; const std::vector<content::WebPluginGeometry>& moves) override;
virtual void Blur() OVERRIDE; void Blur() override;
virtual void UpdateCursor(const content::WebCursor& cursor) OVERRIDE; void UpdateCursor(const content::WebCursor& cursor) override;
virtual void SetIsLoading(bool is_loading) OVERRIDE; void SetIsLoading(bool is_loading) override;
virtual void TextInputStateChanged( void TextInputTypeChanged(ui::TextInputType type,
const ViewHostMsg_TextInputState_Params& params) OVERRIDE; ui::TextInputMode mode,
virtual void ImeCancelComposition() OVERRIDE; bool can_compose_inline,
virtual void RenderProcessGone(base::TerminationStatus status, int flags) override;
int error_code) OVERRIDE; void ImeCancelComposition() override;
virtual void Destroy() OVERRIDE; void RenderProcessGone(base::TerminationStatus status,
virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE; int error_code) override;
virtual void SelectionChanged(const base::string16& text, void Destroy() override;
size_t offset, void SetTooltipText(const base::string16& tooltip_text) override;
const gfx::Range& range) OVERRIDE; void SelectionChanged(const base::string16& text,
virtual gfx::Size GetRequestedRendererSize() const OVERRIDE; size_t offset,
virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE; const gfx::Range& range) override;
virtual void SelectionBoundsChanged( gfx::Size GetRequestedRendererSize() const override;
const ViewHostMsg_SelectionBounds_Params& params) OVERRIDE; gfx::Size GetPhysicalBackingSize() const override;
virtual void CopyFromCompositingSurface( void SelectionBoundsChanged(
const ViewHostMsg_SelectionBounds_Params& params) override;
void CopyFromCompositingSurface(
const gfx::Rect& src_subrect, const gfx::Rect& src_subrect,
const gfx::Size& dst_size, const gfx::Size& dst_size,
const base::Callback<void(bool, const SkBitmap&)>& callback, const base::Callback<void(bool, const SkBitmap&)>& callback,
const SkColorType color_type) OVERRIDE; const SkColorType color_type) override;
virtual void CopyFromCompositingSurfaceToVideoFrame( void CopyFromCompositingSurfaceToVideoFrame(
const gfx::Rect& src_subrect, const gfx::Rect& src_subrect,
const scoped_refptr<media::VideoFrame>& target, const scoped_refptr<media::VideoFrame>& target,
const base::Callback<void(bool)>& callback) OVERRIDE; const base::Callback<void(bool)>& callback) override;
virtual bool CanCopyToVideoFrame() const OVERRIDE; bool CanCopyToVideoFrame() const override;
virtual bool CanSubscribeFrame() const OVERRIDE; bool CanSubscribeFrame() const override;
virtual void BeginFrameSubscription( void BeginFrameSubscription(
scoped_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber) scoped_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber)
OVERRIDE; override;
virtual void EndFrameSubscription() OVERRIDE; void EndFrameSubscription() override;
virtual void AcceleratedSurfaceInitialized(int host_id, void AcceleratedSurfaceInitialized(int route_id) override;
int route_id) OVERRIDE; bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
virtual void AcceleratedSurfaceBuffersSwapped( void GetScreenInfo(blink::WebScreenInfo* results) override;
const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, gfx::Rect GetBoundsInRootWindow() override;
int gpu_host_id) OVERRIDE; gfx::GLSurfaceHandle GetCompositingSurface() override;
virtual void AcceleratedSurfacePostSubBuffer( content::BrowserAccessibilityManager*
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*
CreateBrowserAccessibilityManager( CreateBrowserAccessibilityManager(
content::BrowserAccessibilityDelegate* delegate) OVERRIDE; content::BrowserAccessibilityDelegate* delegate) override;
#if defined(TOOLKIT_VIEWS) || defined(USE_AURA) #if defined(TOOLKIT_VIEWS) || defined(USE_AURA)
virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels, void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
const SkBitmap& zoomed_bitmap) OVERRIDE; const SkBitmap& zoomed_bitmap) override;
#endif #endif
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
virtual bool PostProcessEventForPluginIme( bool PostProcessEventForPluginIme(
const content::NativeWebKeyboardEvent& event) OVERRIDE; const content::NativeWebKeyboardEvent& event) override;
#endif #endif
#if defined(OS_MACOSX) || defined(USE_AURA) #if defined(OS_MACOSX) || defined(USE_AURA)
virtual void ImeCompositionRangeChanged( void ImeCompositionRangeChanged(
const gfx::Range& range, const gfx::Range& range,
const std::vector<gfx::Rect>& character_bounds) OVERRIDE; const std::vector<gfx::Rect>& character_bounds) override;
#endif #endif
#if defined(OS_WIN) #if defined(OS_WIN)
virtual void SetParentNativeViewAccessible( void SetParentNativeViewAccessible(
gfx::NativeViewAccessible accessible_parent) OVERRIDE; gfx::NativeViewAccessible accessible_parent) override;
virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE; gfx::NativeViewId GetParentForWindowlessPlugin() const override;
#endif #endif
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
// BrowserCompositorViewMacClient implementation. // BrowserCompositorViewMacClient implementation.
virtual bool BrowserCompositorViewShouldAckImmediately() const OVERRIDE; bool BrowserCompositorViewShouldAckImmediately() const override;
virtual void BrowserCompositorViewFrameSwapped( void BrowserCompositorViewFrameSwapped(
const std::vector<ui::LatencyInfo>& latency_info) OVERRIDE; const std::vector<ui::LatencyInfo>& latency_info) override;
virtual NSView* BrowserCompositorSuperview() OVERRIDE;
virtual ui::Layer* BrowserCompositorRootLayer() OVERRIDE;
#endif // defined(OS_MACOSX) #endif // defined(OS_MACOSX)
// DelegatedFrameHostClient implementation. // DelegatedFrameHostClient implementation.
virtual ui::Compositor* GetCompositor() const OVERRIDE; ui::Compositor* GetCompositor() const override;
virtual ui::Layer* GetLayer() OVERRIDE; ui::Layer* GetLayer() override;
virtual content::RenderWidgetHostImpl* GetHost() OVERRIDE; content::RenderWidgetHostImpl* GetHost() override;
virtual bool IsVisible() OVERRIDE; bool IsVisible() override;
virtual scoped_ptr<content::ResizeLock> CreateResizeLock( scoped_ptr<content::ResizeLock> CreateResizeLock(
bool defer_compositor_lock) OVERRIDE; bool defer_compositor_lock) override;
virtual gfx::Size DesiredFrameSize() OVERRIDE; gfx::Size DesiredFrameSize() override;
virtual float CurrentDeviceScaleFactor() OVERRIDE; float CurrentDeviceScaleFactor() override;
virtual gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) OVERRIDE; gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) override;
virtual content::DelegatedFrameHost* GetDelegatedFrameHost() const OVERRIDE; content::DelegatedFrameHost* GetDelegatedFrameHost() const override;
bool InstallTransparency(); bool InstallTransparency();

View File

@ -31,9 +31,6 @@ CefTextInputClientOSRMac* GetInputClientFromContext(
void CefRenderWidgetHostViewOSR::SetActive(bool active) { void CefRenderWidgetHostViewOSR::SetActive(bool active) {
} }
void CefRenderWidgetHostViewOSR::SetTakesFocusOnlyOnMouseDown(bool flag) {
}
void CefRenderWidgetHostViewOSR::SetWindowVisibility(bool visible) { void CefRenderWidgetHostViewOSR::SetWindowVisibility(bool visible) {
if (visible) if (visible)
WasShown(); WasShown();
@ -61,8 +58,10 @@ bool CefRenderWidgetHostViewOSR::IsSpeaking() const {
void CefRenderWidgetHostViewOSR::StopSpeaking() { void CefRenderWidgetHostViewOSR::StopSpeaking() {
} }
void CefRenderWidgetHostViewOSR::TextInputStateChanged( void CefRenderWidgetHostViewOSR::TextInputTypeChanged(ui::TextInputType type,
const ViewHostMsg_TextInputState_Params& params) { ui::TextInputMode mode,
bool can_compose_inline,
int flags) {
[NSApp updateWindows]; [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() { CefTextInputContext CefRenderWidgetHostViewOSR::GetNSTextInputContext() {
if (!text_input_context_osr_mac_) { if (!text_input_context_osr_mac_) {
CefTextInputClientOSRMac* text_input_client_osr_mac = CefTextInputClientOSRMac* text_input_client_osr_mac =
@ -297,7 +288,9 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
[content_view setLayer:background_layer_]; [content_view setLayer:background_layer_];
[content_view setWantsLayer:YES]; [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()); compositor_.reset(compositor_view_->GetCompositor());
DCHECK(compositor_); DCHECK(compositor_);
} }

View File

@ -16,7 +16,7 @@ class CefCompositorHostWin : public gfx::WindowImpl {
Init(NULL, gfx::Rect(0, 0, 1, 1)); Init(NULL, gfx::Rect(0, 0, 1, 1));
} }
virtual ~CefCompositorHostWin() { ~CefCompositorHostWin() override {
DestroyWindow(hwnd()); DestroyWindow(hwnd());
} }

View File

@ -14,13 +14,13 @@ class CefRequestContextImpl : public CefRequestContext {
public: public:
explicit CefRequestContextImpl(CefBrowserContext* browser_context); explicit CefRequestContextImpl(CefBrowserContext* browser_context);
explicit CefRequestContextImpl(CefRefPtr<CefRequestContextHandler> handler); explicit CefRequestContextImpl(CefRefPtr<CefRequestContextHandler> handler);
virtual ~CefRequestContextImpl(); ~CefRequestContextImpl() override;
CefBrowserContext* GetOrCreateBrowserContext(); CefBrowserContext* GetOrCreateBrowserContext();
virtual bool IsSame(CefRefPtr<CefRequestContext> other) OVERRIDE; bool IsSame(CefRefPtr<CefRequestContext> other) override;
virtual bool IsGlobal() OVERRIDE; bool IsGlobal() override;
virtual CefRefPtr<CefRequestContextHandler> GetHandler() OVERRIDE; CefRefPtr<CefRequestContextHandler> GetHandler() override;
protected: protected:
CefBrowserContext* browser_context_; CefBrowserContext* browser_context_;

View File

@ -14,23 +14,23 @@ class CefResourceDispatcherHostDelegate
: public content::ResourceDispatcherHostDelegate { : public content::ResourceDispatcherHostDelegate {
public: public:
CefResourceDispatcherHostDelegate(); CefResourceDispatcherHostDelegate();
virtual ~CefResourceDispatcherHostDelegate(); ~CefResourceDispatcherHostDelegate() override;
// ResourceDispatcherHostDelegate methods. // ResourceDispatcherHostDelegate methods.
virtual void RequestBeginning( void RequestBeginning(
net::URLRequest* request, net::URLRequest* request,
content::ResourceContext* resource_context, content::ResourceContext* resource_context,
content::AppCacheService* appcache_service, content::AppCacheService* appcache_service,
content::ResourceType resource_type, content::ResourceType resource_type,
ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE; ScopedVector<content::ResourceThrottle>* throttles) override;
virtual bool HandleExternalProtocol(const GURL& url, bool HandleExternalProtocol(const GURL& url,
int child_id, int child_id,
int route_id) OVERRIDE; int route_id) override;
virtual void OnRequestRedirected( void OnRequestRedirected(
const GURL& redirect_url, const GURL& redirect_url,
net::URLRequest* request, net::URLRequest* request,
content::ResourceContext* resource_context, content::ResourceContext* resource_context,
content::ResourceResponse* response) OVERRIDE; content::ResourceResponse* response) override;
private: private:
DISALLOW_COPY_AND_ASSIGN(CefResourceDispatcherHostDelegate); DISALLOW_COPY_AND_ASSIGN(CefResourceDispatcherHostDelegate);

View File

@ -57,13 +57,13 @@ class CefResourceRequestJobCallback : public CefCallback {
dest_(NULL), dest_(NULL),
dest_size_(0) {} dest_size_(0) {}
virtual void Continue() OVERRIDE { void Continue() override {
// Continue asynchronously. // Continue asynchronously.
CEF_POST_TASK(CEF_IOT, CEF_POST_TASK(CEF_IOT,
base::Bind(&CefResourceRequestJobCallback::ContinueOnIOThread, this)); base::Bind(&CefResourceRequestJobCallback::ContinueOnIOThread, this));
} }
virtual void Cancel() OVERRIDE { void Cancel() override {
// Cancel asynchronously. // Cancel asynchronously.
CEF_POST_TASK(CEF_IOT, CEF_POST_TASK(CEF_IOT,
base::Bind(&CefResourceRequestJobCallback::CancelOnIOThread, this)); base::Bind(&CefResourceRequestJobCallback::CancelOnIOThread, this));

View File

@ -27,21 +27,20 @@ class CefResourceRequestJob : public net::URLRequestJob {
CefResourceRequestJob(net::URLRequest* request, CefResourceRequestJob(net::URLRequest* request,
net::NetworkDelegate* network_delegate, net::NetworkDelegate* network_delegate,
CefRefPtr<CefResourceHandler> handler); CefRefPtr<CefResourceHandler> handler);
virtual ~CefResourceRequestJob(); ~CefResourceRequestJob() override;
private: private:
// net::URLRequestJob methods. // net::URLRequestJob methods.
virtual void Start() OVERRIDE; void Start() override;
virtual void Kill() OVERRIDE; void Kill() override;
virtual bool ReadRawData(net::IOBuffer* dest, int dest_size, int* bytes_read) bool ReadRawData(net::IOBuffer* dest, int dest_size, int* bytes_read) override;
OVERRIDE; void GetResponseInfo(net::HttpResponseInfo* info) override;
virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE; void GetLoadTimingInfo(
virtual void GetLoadTimingInfo( net::LoadTimingInfo* load_timing_info) const override;
net::LoadTimingInfo* load_timing_info) const OVERRIDE; bool GetResponseCookies(std::vector<std::string>* cookies) override;
virtual bool GetResponseCookies(std::vector<std::string>* cookies) OVERRIDE; bool IsRedirectResponse(GURL* location, int* http_status_code)
virtual bool IsRedirectResponse(GURL* location, int* http_status_code) override;
OVERRIDE; bool GetMimeType(std::string* mime_type) const override;
virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;
void SendHeaders(); void SendHeaders();

View File

@ -100,9 +100,9 @@ class CefUrlRequestManager {
: scheme_(scheme) {} : scheme_(scheme) {}
// From net::URLRequestJobFactory::ProtocolHandler // From net::URLRequestJobFactory::ProtocolHandler
virtual net::URLRequestJob* MaybeCreateJob( net::URLRequestJob* MaybeCreateJob(
net::URLRequest* request, net::URLRequest* request,
net::NetworkDelegate* network_delegate) const OVERRIDE { net::NetworkDelegate* network_delegate) const override {
CEF_REQUIRE_IOT(); CEF_REQUIRE_IOT();
return CefUrlRequestManager::GetInstance()->GetRequestJob( return CefUrlRequestManager::GetInstance()->GetRequestJob(
request, network_delegate, scheme_); request, network_delegate, scheme_);

View File

@ -80,9 +80,9 @@ class CefSpeechRecognitionManagerDelegate::WebContentsWatcher
} }
// content::NotificationObserver implementation. // content::NotificationObserver implementation.
virtual void Observe(int type, void Observe(int type,
const content::NotificationSource& source, const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE { const content::NotificationDetails& details) override {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type); DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type);
@ -102,7 +102,7 @@ class CefSpeechRecognitionManagerDelegate::WebContentsWatcher
private: private:
friend class base::RefCountedThreadSafe<WebContentsWatcher>; friend class base::RefCountedThreadSafe<WebContentsWatcher>;
virtual ~WebContentsWatcher() { ~WebContentsWatcher() override {
// Must be destroyed on the UI thread due to |registrar_| non thread-safety. // Must be destroyed on the UI thread due to |registrar_| non thread-safety.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
} }

View File

@ -20,32 +20,32 @@ class CefSpeechRecognitionManagerDelegate
public content::SpeechRecognitionEventListener { public content::SpeechRecognitionEventListener {
public: public:
CefSpeechRecognitionManagerDelegate(); CefSpeechRecognitionManagerDelegate();
virtual ~CefSpeechRecognitionManagerDelegate(); ~CefSpeechRecognitionManagerDelegate() override;
protected: protected:
// SpeechRecognitionEventListener methods. // SpeechRecognitionEventListener methods.
virtual void OnRecognitionStart(int session_id) OVERRIDE; void OnRecognitionStart(int session_id) override;
virtual void OnAudioStart(int session_id) OVERRIDE; void OnAudioStart(int session_id) override;
virtual void OnEnvironmentEstimationComplete(int session_id) OVERRIDE; void OnEnvironmentEstimationComplete(int session_id) override;
virtual void OnSoundStart(int session_id) OVERRIDE; void OnSoundStart(int session_id) override;
virtual void OnSoundEnd(int session_id) OVERRIDE; void OnSoundEnd(int session_id) override;
virtual void OnAudioEnd(int session_id) OVERRIDE; void OnAudioEnd(int session_id) override;
virtual void OnRecognitionEnd(int session_id) OVERRIDE; void OnRecognitionEnd(int session_id) override;
virtual void OnRecognitionResults( void OnRecognitionResults(
int session_id, const content::SpeechRecognitionResults& result) OVERRIDE; int session_id, const content::SpeechRecognitionResults& result) override;
virtual void OnRecognitionError( void OnRecognitionError(
int session_id, const content::SpeechRecognitionError& error) OVERRIDE; int session_id, const content::SpeechRecognitionError& error) override;
virtual void OnAudioLevelsChange(int session_id, float volume, void OnAudioLevelsChange(int session_id, float volume,
float noise_volume) OVERRIDE; float noise_volume) override;
// SpeechRecognitionManagerDelegate methods. // SpeechRecognitionManagerDelegate methods.
virtual void GetDiagnosticInformation(bool* can_report_metrics, void GetDiagnosticInformation(bool* can_report_metrics,
std::string* hardware_info) OVERRIDE; std::string* hardware_info) override;
virtual void CheckRecognitionIsAllowed( void CheckRecognitionIsAllowed(
int session_id, int session_id,
base::Callback<void(bool ask_user, bool is_allowed)> callback) OVERRIDE; base::Callback<void(bool ask_user, bool is_allowed)> callback) override;
virtual content::SpeechRecognitionEventListener* GetEventListener() OVERRIDE; content::SpeechRecognitionEventListener* GetEventListener() override;
virtual bool FilterProfanities(int render_process_id) OVERRIDE; bool FilterProfanities(int render_process_id) override;
private: private:
class WebContentsWatcher; class WebContentsWatcher;

View File

@ -4,7 +4,7 @@
#include "libcef/browser/stream_impl.h" #include "libcef/browser/stream_impl.h"
#include <stdlib.h> #include <stdlib.h>
#include "base/file_util.h" #include "base/files/file_util.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"

View File

@ -17,13 +17,13 @@
class CefFileReader : public CefStreamReader { class CefFileReader : public CefStreamReader {
public: public:
CefFileReader(FILE* file, bool close); CefFileReader(FILE* file, bool close);
virtual ~CefFileReader(); ~CefFileReader() override;
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;
virtual int Seek(int64 offset, int whence) OVERRIDE; int Seek(int64 offset, int whence) override;
virtual int64 Tell() OVERRIDE; int64 Tell() override;
virtual int Eof() OVERRIDE; int Eof() override;
virtual bool MayBlock() OVERRIDE { return true; } bool MayBlock() override { return true; }
protected: protected:
bool close_; bool close_;
@ -38,13 +38,13 @@ class CefFileReader : public CefStreamReader {
class CefFileWriter : public CefStreamWriter { class CefFileWriter : public CefStreamWriter {
public: public:
CefFileWriter(FILE* file, bool close); CefFileWriter(FILE* file, bool close);
virtual ~CefFileWriter(); ~CefFileWriter() override;
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;
virtual int Seek(int64 offset, int whence) OVERRIDE; int Seek(int64 offset, int whence) override;
virtual int64 Tell() OVERRIDE; int64 Tell() override;
virtual int Flush() OVERRIDE; int Flush() override;
virtual bool MayBlock() OVERRIDE { return true; } bool MayBlock() override { return true; }
protected: protected:
FILE* file_; FILE* file_;
@ -59,13 +59,13 @@ class CefFileWriter : public CefStreamWriter {
class CefBytesReader : public CefStreamReader { class CefBytesReader : public CefStreamReader {
public: public:
CefBytesReader(void* data, int64 datasize, bool copy); CefBytesReader(void* data, int64 datasize, bool copy);
virtual ~CefBytesReader(); ~CefBytesReader() override;
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;
virtual int Seek(int64 offset, int whence) OVERRIDE; int Seek(int64 offset, int whence) override;
virtual int64 Tell() OVERRIDE; int64 Tell() override;
virtual int Eof() OVERRIDE; int Eof() override;
virtual bool MayBlock() OVERRIDE { return false; } bool MayBlock() override { return false; }
void SetData(void* data, int64 datasize, bool copy); void SetData(void* data, int64 datasize, bool copy);
@ -87,13 +87,13 @@ class CefBytesReader : public CefStreamReader {
class CefBytesWriter : public CefStreamWriter { class CefBytesWriter : public CefStreamWriter {
public: public:
explicit CefBytesWriter(size_t grow); explicit CefBytesWriter(size_t grow);
virtual ~CefBytesWriter(); ~CefBytesWriter() override;
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;
virtual int Seek(int64 offset, int whence) OVERRIDE; int Seek(int64 offset, int whence) override;
virtual int64 Tell() OVERRIDE; int64 Tell() override;
virtual int Flush() OVERRIDE; int Flush() override;
virtual bool MayBlock() OVERRIDE { return false; } bool MayBlock() override { return false; }
void* GetData() { return data_; } void* GetData() { return data_; }
int64 GetDataSize() { return offset_; } int64 GetDataSize() { return offset_; }
@ -118,19 +118,19 @@ class CefHandlerReader : public CefStreamReader {
explicit CefHandlerReader(CefRefPtr<CefReadHandler> handler) explicit CefHandlerReader(CefRefPtr<CefReadHandler> handler)
: handler_(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); 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); return handler_->Seek(offset, whence);
} }
virtual int64 Tell() OVERRIDE { int64 Tell() override {
return handler_->Tell(); return handler_->Tell();
} }
virtual int Eof() OVERRIDE { int Eof() override {
return handler_->Eof(); return handler_->Eof();
} }
virtual bool MayBlock() OVERRIDE { bool MayBlock() override {
return handler_->MayBlock(); return handler_->MayBlock();
} }
@ -146,19 +146,19 @@ class CefHandlerWriter : public CefStreamWriter {
explicit CefHandlerWriter(CefRefPtr<CefWriteHandler> handler) explicit CefHandlerWriter(CefRefPtr<CefWriteHandler> handler)
: handler_(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); 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); return handler_->Seek(offset, whence);
} }
virtual int64 Tell() OVERRIDE { int64 Tell() override {
return handler_->Tell(); return handler_->Tell();
} }
virtual int Flush() OVERRIDE { int Flush() override {
return handler_->Flush(); return handler_->Flush();
} }
virtual bool MayBlock() OVERRIDE { bool MayBlock() override {
return handler_->MayBlock(); return handler_->MayBlock();
} }

View File

@ -24,7 +24,7 @@ class CefAuthCallbackImpl : public CefAuthCallback {
: callback_(callback), : callback_(callback),
credentials_(credentials) { credentials_(credentials) {
} }
~CefAuthCallbackImpl() { ~CefAuthCallbackImpl() override {
if (!callback_.is_null()) { if (!callback_.is_null()) {
// The auth callback is still pending. Cancel it now. // The auth callback is still pending. Cancel it now.
if (CEF_CURRENTLY_ON_IOT()) { if (CEF_CURRENTLY_ON_IOT()) {
@ -36,8 +36,8 @@ class CefAuthCallbackImpl : public CefAuthCallback {
} }
} }
virtual void Continue(const CefString& username, void Continue(const CefString& username,
const CefString& password) OVERRIDE { const CefString& password) override {
if (CEF_CURRENTLY_ON_IOT()) { if (CEF_CURRENTLY_ON_IOT()) {
if (!callback_.is_null()) { if (!callback_.is_null()) {
credentials_->Set(username, password); 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 (CEF_CURRENTLY_ON_IOT()) {
if (!callback_.is_null()) { if (!callback_.is_null()) {
CancelNow(callback_); CancelNow(callback_);

View File

@ -13,20 +13,20 @@
class CefNetworkDelegate : public net::NetworkDelegate { class CefNetworkDelegate : public net::NetworkDelegate {
public: public:
CefNetworkDelegate(); CefNetworkDelegate();
~CefNetworkDelegate(); ~CefNetworkDelegate() override;
private: private:
// net::NetworkDelegate methods. // net::NetworkDelegate methods.
virtual int OnBeforeURLRequest(net::URLRequest* request, int OnBeforeURLRequest(net::URLRequest* request,
const net::CompletionCallback& callback, const net::CompletionCallback& callback,
GURL* new_url) OVERRIDE; GURL* new_url) override;
virtual AuthRequiredResponse OnAuthRequired( AuthRequiredResponse OnAuthRequired(
net::URLRequest* request, net::URLRequest* request,
const net::AuthChallengeInfo& auth_info, const net::AuthChallengeInfo& auth_info,
const AuthCallback& callback, const AuthCallback& callback,
net::AuthCredentials* credentials) OVERRIDE; net::AuthCredentials* credentials) override;
virtual bool OnCanAccessFile(const net::URLRequest& request, bool OnCanAccessFile(const net::URLRequest& request,
const base::FilePath& path) const; const base::FilePath& path) const;
DISALLOW_COPY_AND_ASSIGN(CefNetworkDelegate); DISALLOW_COPY_AND_ASSIGN(CefNetworkDelegate);
}; };

View File

@ -21,7 +21,7 @@
#include "libcef/common/content_client.h" #include "libcef/common/content_client.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/file_util.h" #include "base/files/file_util.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
@ -75,17 +75,13 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings {
CEF_REQUIRE_IOT(); CEF_REQUIRE_IOT();
} }
virtual ~CefHttpUserAgentSettings() {
CEF_REQUIRE_IOT();
}
// net::HttpUserAgentSettings implementation // net::HttpUserAgentSettings implementation
virtual std::string GetAcceptLanguage() const OVERRIDE { std::string GetAcceptLanguage() const override {
CEF_REQUIRE_IOT(); CEF_REQUIRE_IOT();
return http_accept_language_; return http_accept_language_;
} }
virtual std::string GetUserAgent() const OVERRIDE { std::string GetUserAgent() const override {
CEF_REQUIRE_IOT(); CEF_REQUIRE_IOT();
return CefContentClient::Get()->GetUserAgent(); return CefContentClient::Get()->GetUserAgent();
} }
@ -237,7 +233,7 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
// Set up interceptors in the reverse order. // Set up interceptors in the reverse order.
scoped_ptr<net::URLRequestJobFactory> top_job_factory = scoped_ptr<net::URLRequestJobFactory> top_job_factory =
job_factory.PassAs<net::URLRequestJobFactory>(); job_factory.Pass();
for (content::URLRequestInterceptorScopedVector::reverse_iterator i = for (content::URLRequestInterceptorScopedVector::reverse_iterator i =
request_interceptors_.rbegin(); request_interceptors_.rbegin();
i != request_interceptors_.rend(); i != request_interceptors_.rend();

View File

@ -83,12 +83,12 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter {
base::MessageLoop* file_loop, base::MessageLoop* file_loop,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors); content::URLRequestInterceptorScopedVector request_interceptors);
virtual ~CefURLRequestContextGetter(); ~CefURLRequestContextGetter() override;
// net::URLRequestContextGetter implementation. // net::URLRequestContextGetter implementation.
virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; net::URLRequestContext* GetURLRequestContext() override;
virtual scoped_refptr<base::SingleThreadTaskRunner> scoped_refptr<base::SingleThreadTaskRunner>
GetNetworkTaskRunner() const OVERRIDE; GetNetworkTaskRunner() const override;
net::HostResolver* host_resolver(); net::HostResolver* host_resolver();
net::URLRequestJobFactoryImpl* job_factory_impl() const { net::URLRequestJobFactoryImpl* job_factory_impl() const {

View File

@ -22,12 +22,12 @@ class CefURLRequestContextGetterProxy : public net::URLRequestContextGetter {
public: public:
CefURLRequestContextGetterProxy(CefRefPtr<CefRequestContextHandler> handler, CefURLRequestContextGetterProxy(CefRefPtr<CefRequestContextHandler> handler,
CefURLRequestContextGetter* parent); CefURLRequestContextGetter* parent);
virtual ~CefURLRequestContextGetterProxy(); ~CefURLRequestContextGetterProxy() override;
// net::URLRequestContextGetter implementation. // net::URLRequestContextGetter implementation.
virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; net::URLRequestContext* GetURLRequestContext() override;
virtual scoped_refptr<base::SingleThreadTaskRunner> scoped_refptr<base::SingleThreadTaskRunner>
GetNetworkTaskRunner() const OVERRIDE; GetNetworkTaskRunner() const override;
net::HostResolver* GetHostResolver() const; net::HostResolver* GetHostResolver() const;

View File

@ -24,72 +24,78 @@ class CefCookieStoreProxy : public net::CookieStore {
: parent_(parent), : parent_(parent),
handler_(handler) { handler_(handler) {
} }
virtual ~CefCookieStoreProxy() { ~CefCookieStoreProxy() override {
CEF_REQUIRE_IOT(); CEF_REQUIRE_IOT();
} }
// net::CookieStore methods. // net::CookieStore methods.
virtual void SetCookieWithOptionsAsync( void SetCookieWithOptionsAsync(
const GURL& url, const GURL& url,
const std::string& cookie_line, const std::string& cookie_line,
const net::CookieOptions& options, const net::CookieOptions& options,
const SetCookiesCallback& callback) OVERRIDE { const SetCookiesCallback& callback) override {
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore(); scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
cookie_store->SetCookieWithOptionsAsync(url, cookie_line, options, cookie_store->SetCookieWithOptionsAsync(url, cookie_line, options,
callback); callback);
} }
virtual void GetCookiesWithOptionsAsync( void GetCookiesWithOptionsAsync(
const GURL& url, const net::CookieOptions& options, const GURL& url, const net::CookieOptions& options,
const GetCookiesCallback& callback) OVERRIDE { const GetCookiesCallback& callback) override {
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore(); scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
cookie_store->GetCookiesWithOptionsAsync(url, options, callback); cookie_store->GetCookiesWithOptionsAsync(url, options, callback);
} }
virtual void DeleteCookieAsync(const GURL& url, void DeleteCookieAsync(const GURL& url,
const std::string& cookie_name, const std::string& cookie_name,
const base::Closure& callback) OVERRIDE { const base::Closure& callback) override {
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore(); scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
cookie_store->DeleteCookieAsync(url, cookie_name, callback); cookie_store->DeleteCookieAsync(url, cookie_name, callback);
} }
virtual void GetAllCookiesForURLAsync( void GetAllCookiesForURLAsync(
const GURL& url, const GURL& url,
const GetCookieListCallback& callback) OVERRIDE { const GetCookieListCallback& callback) override {
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore(); scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
cookie_store->GetAllCookiesForURLAsync(url, callback); cookie_store->GetAllCookiesForURLAsync(url, callback);
} }
virtual void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
const base::Time& delete_end, const base::Time& delete_end,
const DeleteCallback& callback) const DeleteCallback& callback) override {
OVERRIDE {
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore(); scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
cookie_store->DeleteAllCreatedBetweenAsync(delete_begin, delete_end, cookie_store->DeleteAllCreatedBetweenAsync(delete_begin, delete_end,
callback); callback);
} }
virtual void DeleteAllCreatedBetweenForHostAsync( void DeleteAllCreatedBetweenForHostAsync(
const base::Time delete_begin, const base::Time delete_begin,
const base::Time delete_end, const base::Time delete_end,
const GURL& url, const GURL& url,
const DeleteCallback& callback) OVERRIDE { const DeleteCallback& callback) override {
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore(); scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
cookie_store->DeleteAllCreatedBetweenForHostAsync(delete_begin, delete_end, cookie_store->DeleteAllCreatedBetweenForHostAsync(delete_begin, delete_end,
url, callback); url, callback);
} }
virtual void DeleteSessionCookiesAsync(const DeleteCallback& callback) void DeleteSessionCookiesAsync(const DeleteCallback& callback) override {
OVERRIDE {
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore(); scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
cookie_store->DeleteSessionCookiesAsync(callback); cookie_store->DeleteSessionCookiesAsync(callback);
} }
virtual net::CookieMonster* GetCookieMonster() OVERRIDE { net::CookieMonster* GetCookieMonster() override {
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore(); scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
return cookie_store->GetCookieMonster(); return cookie_store->GetCookieMonster();
} }
scoped_ptr<CookieChangedSubscription> AddCallbackForCookie(
const GURL& url,
const std::string& name,
const CookieChangedCallback& callback) override {
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
return cookie_store->AddCallbackForCookie(url, name, callback);
}
private: private:
net::CookieStore* GetCookieStore() { net::CookieStore* GetCookieStore() {
CEF_REQUIRE_IOT(); CEF_REQUIRE_IOT();

View File

@ -21,7 +21,7 @@ class URLRequestContextGetter;
class CefURLRequestContextProxy : public net::URLRequestContext { class CefURLRequestContextProxy : public net::URLRequestContext {
public: public:
explicit CefURLRequestContextProxy(net::URLRequestContextGetter* parent); explicit CefURLRequestContextProxy(net::URLRequestContextGetter* parent);
virtual ~CefURLRequestContextProxy(); ~CefURLRequestContextProxy() override;
void Initialize(CefRefPtr<CefRequestContextHandler> handler); void Initialize(CefRefPtr<CefRequestContextHandler> handler);

View File

@ -13,19 +13,19 @@
class CefRequestInterceptor : public net::URLRequest::Interceptor { class CefRequestInterceptor : public net::URLRequest::Interceptor {
public: public:
CefRequestInterceptor(); CefRequestInterceptor();
~CefRequestInterceptor(); ~CefRequestInterceptor() override;
// net::URLRequest::Interceptor methods. // net::URLRequest::Interceptor methods.
virtual net::URLRequestJob* MaybeIntercept( net::URLRequestJob* MaybeIntercept(
net::URLRequest* request, net::URLRequest* request,
net::NetworkDelegate* network_delegate) OVERRIDE; net::NetworkDelegate* network_delegate) override;
virtual net::URLRequestJob* MaybeInterceptRedirect( net::URLRequestJob* MaybeInterceptRedirect(
net::URLRequest* request, net::URLRequest* request,
net::NetworkDelegate* network_delegate, net::NetworkDelegate* network_delegate,
const GURL& location) OVERRIDE; const GURL& location) override;
virtual net::URLRequestJob* MaybeInterceptResponse( net::URLRequestJob* MaybeInterceptResponse(
net::URLRequest* request, net::URLRequest* request,
net::NetworkDelegate* network_delegate) OVERRIDE; net::NetworkDelegate* network_delegate) override;
DISALLOW_COPY_AND_ASSIGN(CefRequestInterceptor); DISALLOW_COPY_AND_ASSIGN(CefRequestInterceptor);
}; };

View File

@ -15,7 +15,7 @@
class CefURLRequestUserData : public base::SupportsUserData::Data { class CefURLRequestUserData : public base::SupportsUserData::Data {
public: public:
CefURLRequestUserData(CefRefPtr<CefURLRequestClient> client); CefURLRequestUserData(CefRefPtr<CefURLRequestClient> client);
virtual ~CefURLRequestUserData(); ~CefURLRequestUserData() override;
CefRefPtr<CefURLRequestClient> GetClient(); CefRefPtr<CefURLRequestClient> GetClient();
static const void* kUserDataKey; static const void* kUserDataKey;

View File

@ -68,7 +68,8 @@ void CefWebContentsViewOSR::CreateView(const gfx::Size& initial_size,
} }
content::RenderWidgetHostViewBase* CefWebContentsViewOSR::CreateViewForWidget( content::RenderWidgetHostViewBase* CefWebContentsViewOSR::CreateViewForWidget(
content::RenderWidgetHost* render_widget_host) { content::RenderWidgetHost* render_widget_host,
bool is_guest_view_hack) {
if (render_widget_host->GetView()) { if (render_widget_host->GetView()) {
return static_cast<content::RenderWidgetHostViewBase*>( return static_cast<content::RenderWidgetHostViewBase*>(
render_widget_host->GetView()); render_widget_host->GetView());

View File

@ -21,48 +21,49 @@ class CefWebContentsViewOSR : public content::WebContentsView,
public content::RenderViewHostDelegateView { public content::RenderViewHostDelegateView {
public: public:
CefWebContentsViewOSR(); CefWebContentsViewOSR();
virtual ~CefWebContentsViewOSR(); ~CefWebContentsViewOSR() override;
void set_web_contents(content::WebContents* web_contents); void set_web_contents(content::WebContents* web_contents);
// WebContentsView methods. // WebContentsView methods.
virtual gfx::NativeView GetNativeView() const OVERRIDE; gfx::NativeView GetNativeView() const override;
virtual gfx::NativeView GetContentNativeView() const OVERRIDE; gfx::NativeView GetContentNativeView() const override;
virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; gfx::NativeWindow GetTopLevelNativeWindow() const override;
virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; void GetContainerBounds(gfx::Rect* out) const override;
virtual void SizeContents(const gfx::Size& size) OVERRIDE; void SizeContents(const gfx::Size& size) override;
virtual void Focus() OVERRIDE; void Focus() override;
virtual void SetInitialFocus() OVERRIDE; void SetInitialFocus() override;
virtual void StoreFocus() OVERRIDE; void StoreFocus() override;
virtual void RestoreFocus() OVERRIDE; void RestoreFocus() override;
virtual content::DropData* GetDropData() const OVERRIDE; content::DropData* GetDropData() const override;
virtual gfx::Rect GetViewBounds() const OVERRIDE; gfx::Rect GetViewBounds() const override;
virtual void CreateView(const gfx::Size& initial_size, void CreateView(const gfx::Size& initial_size,
gfx::NativeView context) OVERRIDE; gfx::NativeView context) override;
virtual content::RenderWidgetHostViewBase* CreateViewForWidget( content::RenderWidgetHostViewBase* CreateViewForWidget(
content::RenderWidgetHost* render_widget_host) OVERRIDE; content::RenderWidgetHost* render_widget_host,
virtual content::RenderWidgetHostViewBase* CreateViewForPopupWidget( bool is_guest_view_hack) override;
content::RenderWidgetHost* render_widget_host) OVERRIDE; content::RenderWidgetHostViewBase* CreateViewForPopupWidget(
virtual void SetPageTitle(const base::string16& title) OVERRIDE; content::RenderWidgetHost* render_widget_host) override;
virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; void SetPageTitle(const base::string16& title) override;
virtual void RenderViewSwappedIn(content::RenderViewHost* host) OVERRIDE; void RenderViewCreated(content::RenderViewHost* host) override;
virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE; void RenderViewSwappedIn(content::RenderViewHost* host) override;
void SetOverscrollControllerEnabled(bool enabled) override;
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
virtual void SetAllowOtherViews(bool allow) OVERRIDE; void SetAllowOtherViews(bool allow) override;
virtual bool GetAllowOtherViews() const OVERRIDE; bool GetAllowOtherViews() const override;
virtual bool IsEventTracking() const OVERRIDE; bool IsEventTracking() const override;
virtual void CloseTabAfterEventTracking() OVERRIDE; void CloseTabAfterEventTracking() override;
#endif #endif
// RenderViewHostDelegateView methods. // RenderViewHostDelegateView methods.
virtual void StartDragging( void StartDragging(
const content::DropData& drop_data, const content::DropData& drop_data,
blink::WebDragOperationsMask allowed_ops, blink::WebDragOperationsMask allowed_ops,
const gfx::ImageSkia& image, const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset, const gfx::Vector2d& image_offset,
const content::DragEventSourceInfo& event_info) OVERRIDE; const content::DragEventSourceInfo& event_info) override;
virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; void UpdateDragCursor(blink::WebDragOperation operation) override;
private: private:
content::WebContents* web_contents_; content::WebContents* web_contents_;

View File

@ -13,10 +13,10 @@ class CefWebPluginInfoImpl : public CefWebPluginInfo {
public: public:
explicit CefWebPluginInfoImpl(const content::WebPluginInfo& plugin_info); explicit CefWebPluginInfoImpl(const content::WebPluginInfo& plugin_info);
virtual CefString GetName() OVERRIDE; CefString GetName() override;
virtual CefString GetPath() OVERRIDE; CefString GetPath() override;
virtual CefString GetVersion() OVERRIDE; CefString GetVersion() override;
virtual CefString GetDescription() OVERRIDE; CefString GetDescription() override;
private: private:
content::WebPluginInfo plugin_info_; content::WebPluginInfo plugin_info_;

View File

@ -32,13 +32,13 @@ class CefWindowDelegateView : public views::WidgetDelegateView {
void InitContent(); void InitContent();
// WidgetDelegateView methods: // WidgetDelegateView methods:
virtual bool CanResize() const OVERRIDE { return true; } bool CanResize() const override { return true; }
virtual bool CanMaximize() const OVERRIDE { return true; } bool CanMaximize() const override { return true; }
virtual View* GetContentsView() OVERRIDE { return this; } View* GetContentsView() override { return this; }
// View methods: // View methods:
virtual void ViewHierarchyChanged( void ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) OVERRIDE; const ViewHierarchyChangedDetails& details) override;
private: private:
SkColor background_color_; SkColor background_color_;

View File

@ -27,7 +27,7 @@ class CefWindowX11 : public ui::PlatformEventDispatcher {
CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser, CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser,
::Window parent_xwindow, ::Window parent_xwindow,
const gfx::Rect& bounds); const gfx::Rect& bounds);
virtual ~CefWindowX11(); ~CefWindowX11() override;
void Close(); void Close();
@ -43,8 +43,8 @@ class CefWindowX11 : public ui::PlatformEventDispatcher {
views::DesktopWindowTreeHostX11* GetHost(); views::DesktopWindowTreeHostX11* GetHost();
// ui::PlatformEventDispatcher methods: // ui::PlatformEventDispatcher methods:
virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; bool CanDispatchEvent(const ui::PlatformEvent& event) override;
virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
::Window xwindow() const { return xwindow_; } ::Window xwindow() const { return xwindow_; }
gfx::Rect bounds() const { return bounds_; } gfx::Rect bounds() const { return bounds_; }

View File

@ -16,43 +16,43 @@
class CefXmlReaderImpl : public CefXmlReader { class CefXmlReaderImpl : public CefXmlReader {
public: public:
CefXmlReaderImpl(); CefXmlReaderImpl();
~CefXmlReaderImpl(); ~CefXmlReaderImpl() override;
// Initialize the reader context. // Initialize the reader context.
bool Initialize(CefRefPtr<CefStreamReader> stream, bool Initialize(CefRefPtr<CefStreamReader> stream,
EncodingType encodingType, const CefString& URI); EncodingType encodingType, const CefString& URI);
virtual bool MoveToNextNode() OVERRIDE; bool MoveToNextNode() override;
virtual bool Close() OVERRIDE; bool Close() override;
virtual bool HasError() OVERRIDE; bool HasError() override;
virtual CefString GetError() OVERRIDE; CefString GetError() override;
virtual NodeType GetType() OVERRIDE; NodeType GetType() override;
virtual int GetDepth() OVERRIDE; int GetDepth() override;
virtual CefString GetLocalName() OVERRIDE; CefString GetLocalName() override;
virtual CefString GetPrefix() OVERRIDE; CefString GetPrefix() override;
virtual CefString GetQualifiedName() OVERRIDE; CefString GetQualifiedName() override;
virtual CefString GetNamespaceURI() OVERRIDE; CefString GetNamespaceURI() override;
virtual CefString GetBaseURI() OVERRIDE; CefString GetBaseURI() override;
virtual CefString GetXmlLang() OVERRIDE; CefString GetXmlLang() override;
virtual bool IsEmptyElement() OVERRIDE; bool IsEmptyElement() override;
virtual bool HasValue() OVERRIDE; bool HasValue() override;
virtual CefString GetValue() OVERRIDE; CefString GetValue() override;
virtual bool HasAttributes() OVERRIDE; bool HasAttributes() override;
virtual size_t GetAttributeCount() OVERRIDE; size_t GetAttributeCount() override;
virtual CefString GetAttribute(int index) OVERRIDE; CefString GetAttribute(int index) override;
virtual CefString GetAttribute(const CefString& qualifiedName) OVERRIDE; CefString GetAttribute(const CefString& qualifiedName) override;
virtual CefString GetAttribute(const CefString& localName, CefString GetAttribute(const CefString& localName,
const CefString& namespaceURI) OVERRIDE; const CefString& namespaceURI) override;
virtual CefString GetInnerXml() OVERRIDE; CefString GetInnerXml() override;
virtual CefString GetOuterXml() OVERRIDE; CefString GetOuterXml() override;
virtual int GetLineNumber() OVERRIDE; int GetLineNumber() override;
virtual bool MoveToAttribute(int index) OVERRIDE; bool MoveToAttribute(int index) override;
virtual bool MoveToAttribute(const CefString& qualifiedName) OVERRIDE; bool MoveToAttribute(const CefString& qualifiedName) override;
virtual bool MoveToAttribute(const CefString& localName, bool MoveToAttribute(const CefString& localName,
const CefString& namespaceURI) OVERRIDE; const CefString& namespaceURI) override;
virtual bool MoveToFirstAttribute() OVERRIDE; bool MoveToFirstAttribute() override;
virtual bool MoveToNextAttribute() OVERRIDE; bool MoveToNextAttribute() override;
virtual bool MoveToCarryingElement() OVERRIDE; bool MoveToCarryingElement() override;
// Add another line to the error string. // Add another line to the error string.
void AppendError(const CefString& error_str); void AppendError(const CefString& error_str);

View File

@ -16,23 +16,23 @@
class CefZipReaderImpl : public CefZipReader { class CefZipReaderImpl : public CefZipReader {
public: public:
CefZipReaderImpl(); CefZipReaderImpl();
~CefZipReaderImpl(); ~CefZipReaderImpl() override;
// Initialize the reader context. // Initialize the reader context.
bool Initialize(CefRefPtr<CefStreamReader> stream); bool Initialize(CefRefPtr<CefStreamReader> stream);
virtual bool MoveToFirstFile(); bool MoveToFirstFile() override;
virtual bool MoveToNextFile(); bool MoveToNextFile() override;
virtual bool MoveToFile(const CefString& fileName, bool caseSensitive); bool MoveToFile(const CefString& fileName, bool caseSensitive) override;
virtual bool Close(); bool Close() override;
virtual CefString GetFileName(); CefString GetFileName() override;
virtual int64 GetFileSize(); int64 GetFileSize() override;
virtual time_t GetFileLastModified(); time_t GetFileLastModified() override;
virtual bool OpenFile(const CefString& password); bool OpenFile(const CefString& password) override;
virtual bool CloseFile(); bool CloseFile() override;
virtual int ReadFile(void* buffer, size_t bufferSize); int ReadFile(void* buffer, size_t bufferSize) override;
virtual int64 Tell(); int64 Tell() override;
virtual bool Eof(); bool Eof() override;
bool GetFileInfo(); bool GetFileInfo();

View File

@ -19,27 +19,27 @@ class CefCommandLineImpl : public CefValueBase<CefCommandLine, CommandLine> {
bool read_only); bool read_only);
// CefCommandLine methods. // CefCommandLine methods.
virtual bool IsValid() OVERRIDE; bool IsValid() override;
virtual bool IsReadOnly() OVERRIDE; bool IsReadOnly() override;
virtual CefRefPtr<CefCommandLine> Copy() OVERRIDE; CefRefPtr<CefCommandLine> Copy() override;
virtual void InitFromArgv(int argc, const char* const* argv) OVERRIDE; void InitFromArgv(int argc, const char* const* argv) override;
virtual void InitFromString(const CefString& command_line) OVERRIDE; void InitFromString(const CefString& command_line) override;
virtual void Reset() OVERRIDE; void Reset() override;
virtual void GetArgv(std::vector<CefString>& argv) OVERRIDE; void GetArgv(std::vector<CefString>& argv) override;
virtual CefString GetCommandLineString() OVERRIDE; CefString GetCommandLineString() override;
virtual CefString GetProgram() OVERRIDE; CefString GetProgram() override;
virtual void SetProgram(const CefString& program) OVERRIDE; void SetProgram(const CefString& program) override;
virtual bool HasSwitches() OVERRIDE; bool HasSwitches() override;
virtual bool HasSwitch(const CefString& name) OVERRIDE; bool HasSwitch(const CefString& name) override;
virtual CefString GetSwitchValue(const CefString& name) OVERRIDE; CefString GetSwitchValue(const CefString& name) override;
virtual void GetSwitches(SwitchMap& switches) OVERRIDE; void GetSwitches(SwitchMap& switches) override;
virtual void AppendSwitch(const CefString& name) OVERRIDE; void AppendSwitch(const CefString& name) override;
virtual void AppendSwitchWithValue(const CefString& name, void AppendSwitchWithValue(const CefString& name,
const CefString& value) OVERRIDE; const CefString& value) override;
virtual bool HasArguments() OVERRIDE; bool HasArguments() override;
virtual void GetArguments(ArgumentList& arguments) OVERRIDE; void GetArguments(ArgumentList& arguments) override;
virtual void AppendArgument(const CefString& argument) OVERRIDE; void AppendArgument(const CefString& argument) override;
virtual void PrependWrapper(const CefString& wrapper) OVERRIDE; void PrependWrapper(const CefString& wrapper) override;
// Must hold the controller lock while using this value. // Must hold the controller lock while using this value.
const CommandLine& command_line() { return const_value(); } const CommandLine& command_line() { return const_value(); }

View File

@ -10,7 +10,7 @@
#include "libcef/common/scheme_registration.h" #include "libcef/common/scheme_registration.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/file_util.h" #include "base/files/file_util.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/strings/string_piece.h" #include "base/strings/string_piece.h"

View File

@ -20,23 +20,23 @@ class CefContentClient : public content::ContentClient,
public ui::ResourceBundle::Delegate { public ui::ResourceBundle::Delegate {
public: public:
explicit CefContentClient(CefRefPtr<CefApp> application); explicit CefContentClient(CefRefPtr<CefApp> application);
virtual ~CefContentClient(); ~CefContentClient() override;
// Returns the singleton CefContentClient instance. // Returns the singleton CefContentClient instance.
static CefContentClient* Get(); static CefContentClient* Get();
// content::ContentClient methods. // content::ContentClient methods.
virtual void AddPepperPlugins( void AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) OVERRIDE; std::vector<content::PepperPluginInfo>* plugins) override;
virtual void AddAdditionalSchemes( void AddAdditionalSchemes(
std::vector<std::string>* standard_schemes, std::vector<std::string>* standard_schemes,
std::vector<std::string>* savable_schemes) OVERRIDE; std::vector<std::string>* savable_schemes) override;
virtual std::string GetUserAgent() const OVERRIDE; std::string GetUserAgent() const override;
virtual base::string16 GetLocalizedString(int message_id) const OVERRIDE; base::string16 GetLocalizedString(int message_id) const override;
virtual base::StringPiece GetDataResource( base::StringPiece GetDataResource(
int resource_id, int resource_id,
ui::ScaleFactor scale_factor) const OVERRIDE; ui::ScaleFactor scale_factor) const override;
virtual gfx::Image& GetNativeImageNamed(int resource_id) const OVERRIDE; gfx::Image& GetNativeImageNamed(int resource_id) const override;
struct SchemeInfo { struct SchemeInfo {
std::string scheme_name; std::string scheme_name;
@ -59,26 +59,26 @@ class CefContentClient : public content::ContentClient,
private: private:
// ui::ResourceBundle::Delegate methods. // ui::ResourceBundle::Delegate methods.
virtual base::FilePath GetPathForResourcePack( base::FilePath GetPathForResourcePack(
const base::FilePath& pack_path, const base::FilePath& pack_path,
ui::ScaleFactor scale_factor) OVERRIDE; ui::ScaleFactor scale_factor) override;
virtual base::FilePath GetPathForLocalePack( base::FilePath GetPathForLocalePack(
const base::FilePath& pack_path, const base::FilePath& pack_path,
const std::string& locale) OVERRIDE; const std::string& locale) override;
virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE; gfx::Image GetImageNamed(int resource_id) override;
virtual gfx::Image GetNativeImageNamed( gfx::Image GetNativeImageNamed(
int resource_id, int resource_id,
ui::ResourceBundle::ImageRTL rtl) OVERRIDE; ui::ResourceBundle::ImageRTL rtl) override;
virtual base::RefCountedStaticMemory* LoadDataResourceBytes( base::RefCountedStaticMemory* LoadDataResourceBytes(
int resource_id, int resource_id,
ui::ScaleFactor scale_factor) OVERRIDE; ui::ScaleFactor scale_factor) override;
virtual bool GetRawDataResource(int resource_id, bool GetRawDataResource(int resource_id,
ui::ScaleFactor scale_factor, ui::ScaleFactor scale_factor,
base::StringPiece* value) OVERRIDE; base::StringPiece* value) override;
virtual bool GetLocalizedString(int message_id, bool GetLocalizedString(int message_id,
base::string16* value) OVERRIDE; base::string16* value) override;
virtual scoped_ptr<gfx::Font> GetFont( scoped_ptr<gfx::Font> GetFont(
ui::ResourceBundle::FontStyle style) OVERRIDE; ui::ResourceBundle::FontStyle style) override;
CefRefPtr<CefApp> application_; CefRefPtr<CefApp> application_;
bool pack_loading_disabled_; bool pack_loading_disabled_;

View File

@ -32,11 +32,16 @@ void CefCrashReporterClient::GetProductNameAndVersion(
#endif #endif
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
void CefCrashReporterClient::GetProductNameAndVersion(std::string* product_name, #define PRODUCT_VERSION \
std::string* 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"; *product_name = "cef";
*version = base::StringPrintf( *version = PRODUCT_VERSION;
"%d.%d.%d", CEF_VERSION_MAJOR, CHROME_VERSION_BUILD, CEF_REVISION);
} }
base::FilePath CefCrashReporterClient::GetReporterLogFilename() { base::FilePath CefCrashReporterClient::GetReporterLogFilename() {

View File

@ -11,30 +11,30 @@
class CefCrashReporterClient : public crash_reporter::CrashReporterClient { class CefCrashReporterClient : public crash_reporter::CrashReporterClient {
public: public:
CefCrashReporterClient(); CefCrashReporterClient();
virtual ~CefCrashReporterClient(); ~CefCrashReporterClient() override;
#if defined(OS_WIN) #if defined(OS_WIN)
// Returns a textual description of the product type and version to include // Returns a textual description of the product type and version to include
// in the crash report. // in the crash report.
virtual void GetProductNameAndVersion(const base::FilePath& exe_path, void GetProductNameAndVersion(const base::FilePath& exe_path,
base::string16* product_name, base::string16* product_name,
base::string16* version, base::string16* version,
base::string16* special_build, base::string16* special_build,
base::string16* channel_name) OVERRIDE; base::string16* channel_name) override;
#endif #endif
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
// Returns a textual description of the product type and version to include // Returns a textual description of the product type and version to include
// in the crash report. // in the crash report.
virtual void GetProductNameAndVersion(std::string* product_name, void GetProductNameAndVersion(const char** product_name,
std::string* version) OVERRIDE; const char** version) override;
virtual base::FilePath GetReporterLogFilename() OVERRIDE; base::FilePath GetReporterLogFilename() override;
#endif #endif
// The location where minidump files should be written. Returns true if // The location where minidump files should be written. Returns true if
// |crash_dir| was set. // |crash_dir| was set.
virtual bool GetCrashDumpLocation(base::FilePath* crash_dir) OVERRIDE; bool GetCrashDumpLocation(base::FilePath* crash_dir) override;
private: private:
DISALLOW_COPY_AND_ASSIGN(CefCrashReporterClient); DISALLOW_COPY_AND_ASSIGN(CefCrashReporterClient);

View File

@ -18,30 +18,29 @@ class CefDragDataImpl : public CefDragData {
public: public:
CefDragDataImpl(); CefDragDataImpl();
explicit CefDragDataImpl(const content::DropData& data); explicit CefDragDataImpl(const content::DropData& data);
virtual CefRefPtr<CefDragData> Clone();
virtual bool IsReadOnly();
virtual bool IsLink(); CefRefPtr<CefDragData> Clone() override;
virtual bool IsFragment(); bool IsReadOnly() override;
virtual bool IsFile(); bool IsLink() override;
virtual CefString GetLinkURL(); bool IsFragment() override;
virtual CefString GetLinkTitle(); bool IsFile() override;
virtual CefString GetLinkMetadata(); CefString GetLinkURL() override;
virtual CefString GetFragmentText(); CefString GetLinkTitle() override;
virtual CefString GetFragmentHtml(); CefString GetLinkMetadata() override;
virtual CefString GetFragmentBaseURL(); CefString GetFragmentText() override;
virtual CefString GetFileName(); CefString GetFragmentHtml() override;
virtual size_t GetFileContents(CefRefPtr<CefStreamWriter> writer); CefString GetFragmentBaseURL() override;
virtual bool GetFileNames(std::vector<CefString>& names); CefString GetFileName() override;
size_t GetFileContents(CefRefPtr<CefStreamWriter> writer) override;
virtual void SetLinkURL(const CefString& url); bool GetFileNames(std::vector<CefString>& names) override;
virtual void SetLinkTitle(const CefString& title); void SetLinkURL(const CefString& url) override;
virtual void SetLinkMetadata(const CefString& data); void SetLinkTitle(const CefString& title) override;
virtual void SetFragmentText(const CefString& text); void SetLinkMetadata(const CefString& data) override;
virtual void SetFragmentHtml(const CefString& fragment); void SetFragmentText(const CefString& text) override;
virtual void SetFragmentBaseURL(const CefString& fragment); void SetFragmentHtml(const CefString& fragment) override;
virtual void ResetFileContents(); void SetFragmentBaseURL(const CefString& fragment) override;
virtual void AddFile(const CefString& path, const CefString& display_name); 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. // This method is not safe. Use Lock/Unlock to get mutually exclusive access.
const content::DropData& drop_data() { const content::DropData& drop_data() {

View File

@ -14,7 +14,7 @@
#include "base/base_switches.h" #include "base/base_switches.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/files/file_path.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/lazy_instance.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
@ -151,7 +151,7 @@ class CefUIThread : public base::Thread {
main_function_params_(main_function_params) { main_function_params_(main_function_params) {
} }
virtual void Init() OVERRIDE { void Init() override {
#if defined(OS_WIN) #if defined(OS_WIN)
// Initializes the COM library on the current thread. // Initializes the COM library on the current thread.
CoInitialize(NULL); CoInitialize(NULL);
@ -165,7 +165,7 @@ class CefUIThread : public base::Thread {
CHECK_EQ(exit_code, -1); CHECK_EQ(exit_code, -1);
} }
virtual void CleanUp() OVERRIDE { void CleanUp() override {
browser_runner_->Shutdown(); browser_runner_->Shutdown();
browser_runner_.reset(NULL); browser_runner_.reset(NULL);

View File

@ -30,21 +30,21 @@ class CefContentUtilityClient;
class CefMainDelegate : public content::ContentMainDelegate { class CefMainDelegate : public content::ContentMainDelegate {
public: public:
explicit CefMainDelegate(CefRefPtr<CefApp> application); explicit CefMainDelegate(CefRefPtr<CefApp> application);
virtual ~CefMainDelegate(); ~CefMainDelegate() override;
virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; bool BasicStartupComplete(int* exit_code) override;
virtual void PreSandboxStartup() OVERRIDE; void PreSandboxStartup() override;
virtual int RunProcess( int RunProcess(
const std::string& process_type, const std::string& process_type,
const content::MainFunctionParams& main_function_params) OVERRIDE; const content::MainFunctionParams& main_function_params) override;
virtual void ProcessExiting(const std::string& process_type) OVERRIDE; void ProcessExiting(const std::string& process_type) override;
#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
virtual void ZygoteForked() OVERRIDE; void ZygoteForked() override;
#endif #endif
virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE; content::ContentBrowserClient* CreateContentBrowserClient() override;
virtual content::ContentRendererClient* content::ContentRendererClient*
CreateContentRendererClient() OVERRIDE; CreateContentRendererClient() override;
virtual content::ContentUtilityClient* CreateContentUtilityClient() OVERRIDE; content::ContentUtilityClient* CreateContentUtilityClient() override;
// Shut down the browser runner. // Shut down the browser runner.
void ShutdownBrowser(); void ShutdownBrowser();

View File

@ -23,11 +23,11 @@ class CefProcessMessageImpl
bool CopyTo(Cef_Request_Params& target); bool CopyTo(Cef_Request_Params& target);
// CefProcessMessage methods. // CefProcessMessage methods.
virtual bool IsValid() OVERRIDE; bool IsValid() override;
virtual bool IsReadOnly() OVERRIDE; bool IsReadOnly() override;
virtual CefRefPtr<CefProcessMessage> Copy() OVERRIDE; CefRefPtr<CefProcessMessage> Copy() override;
virtual CefString GetName() OVERRIDE; CefString GetName() override;
virtual CefRefPtr<CefListValue> GetArgumentList() OVERRIDE; CefRefPtr<CefListValue> GetArgumentList() override;
DISALLOW_COPY_AND_ASSIGN(CefProcessMessageImpl); DISALLOW_COPY_AND_ASSIGN(CefProcessMessageImpl);
}; };

View File

@ -13,6 +13,7 @@
#include "base/logging.h" #include "base/logging.h"
#include "content/public/browser/resource_request_info.h" #include "content/public/browser/resource_request_info.h"
#include "content/public/common/resource_type.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_data_stream.h"
#include "net/base/upload_element_reader.h" #include "net/base/upload_element_reader.h"
#include "net/base/upload_bytes_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()); DCHECK_EQ(net::UploadElement::TYPE_BYTES, element_->type());
} }
virtual ~BytesElementReader() {}
private: private:
scoped_ptr<net::UploadElement> element_; scoped_ptr<net::UploadElement> element_;
@ -68,8 +67,6 @@ class FileElementReader : public net::UploadFileElementReader {
DCHECK_EQ(net::UploadElement::TYPE_FILE, element_->type()); DCHECK_EQ(net::UploadElement::TYPE_FILE, element_->type());
} }
virtual ~FileElementReader() {}
private: private:
scoped_ptr<net::UploadElement> element_; scoped_ptr<net::UploadElement> element_;
@ -385,8 +382,8 @@ void CefRequestImpl::GetHeaderMap(const blink::WebURLRequest& request,
public: public:
explicit HeaderVisitor(HeaderMap* map) : map_(map) {} explicit HeaderVisitor(HeaderMap* map) : map_(map) {}
virtual void visitHeader(const blink::WebString& name, void visitHeader(const blink::WebString& name,
const blink::WebString& value) { const blink::WebString& value) override {
map_->insert(std::make_pair(base::string16(name), map_->insert(std::make_pair(base::string16(name),
base::string16(value))); base::string16(value)));
} }
@ -505,13 +502,16 @@ void CefPostDataImpl::Set(const net::UploadDataStream& data_stream) {
CefRefPtr<CefPostDataElement> postelem; CefRefPtr<CefPostDataElement> postelem;
const ScopedVector<net::UploadElementReader>& elements = const ScopedVector<net::UploadElementReader>* elements =
data_stream.element_readers(); data_stream.GetElementReaders();
ScopedVector<net::UploadElementReader>::const_iterator it = elements.begin(); if (elements) {
for (; it != elements.end(); ++it) { ScopedVector<net::UploadElementReader>::const_iterator it =
postelem = CefPostDataElement::Create(); elements->begin();
static_cast<CefPostDataElementImpl*>(postelem.get())->Set(**it); for (; it != elements->end(); ++it) {
AddElement(postelem); postelem = CefPostDataElement::Create();
static_cast<CefPostDataElementImpl*>(postelem.get())->Set(**it);
AddElement(postelem);
}
} }
} }
@ -538,7 +538,7 @@ net::UploadDataStream* CefPostDataImpl::Get() {
static_cast<CefPostDataElementImpl*>(it->get())->Get()); static_cast<CefPostDataElementImpl*>(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) { void CefPostDataImpl::Set(const blink::WebHTTPBody& data) {

View File

@ -28,27 +28,26 @@ class WebURLRequest;
class CefRequestImpl : public CefRequest { class CefRequestImpl : public CefRequest {
public: public:
CefRequestImpl(); CefRequestImpl();
~CefRequestImpl() {}
virtual bool IsReadOnly() OVERRIDE; bool IsReadOnly() override;
virtual CefString GetURL() OVERRIDE; CefString GetURL() override;
virtual void SetURL(const CefString& url) OVERRIDE; void SetURL(const CefString& url) override;
virtual CefString GetMethod() OVERRIDE; CefString GetMethod() override;
virtual void SetMethod(const CefString& method) OVERRIDE; void SetMethod(const CefString& method) override;
virtual CefRefPtr<CefPostData> GetPostData() OVERRIDE; CefRefPtr<CefPostData> GetPostData() override;
virtual void SetPostData(CefRefPtr<CefPostData> postData) OVERRIDE; void SetPostData(CefRefPtr<CefPostData> postData) override;
virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; void GetHeaderMap(HeaderMap& headerMap) override;
virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; void SetHeaderMap(const HeaderMap& headerMap) override;
virtual void Set(const CefString& url, void Set(const CefString& url,
const CefString& method, const CefString& method,
CefRefPtr<CefPostData> postData, CefRefPtr<CefPostData> postData,
const HeaderMap& headerMap) OVERRIDE; const HeaderMap& headerMap) override;
virtual int GetFlags() OVERRIDE; int GetFlags() override;
virtual void SetFlags(int flags) OVERRIDE; void SetFlags(int flags) override;
virtual CefString GetFirstPartyForCookies() OVERRIDE; CefString GetFirstPartyForCookies() override;
virtual void SetFirstPartyForCookies(const CefString& url) OVERRIDE; void SetFirstPartyForCookies(const CefString& url) override;
virtual ResourceType GetResourceType() OVERRIDE; ResourceType GetResourceType() override;
virtual TransitionType GetTransitionType() OVERRIDE; TransitionType GetTransitionType() override;
// Populate this object from the URLRequest object. // Populate this object from the URLRequest object.
void Set(net::URLRequest* request); void Set(net::URLRequest* request);
@ -95,14 +94,13 @@ class CefRequestImpl : public CefRequest {
class CefPostDataImpl : public CefPostData { class CefPostDataImpl : public CefPostData {
public: public:
CefPostDataImpl(); CefPostDataImpl();
~CefPostDataImpl() {}
virtual bool IsReadOnly() OVERRIDE; bool IsReadOnly() override;
virtual size_t GetElementCount() OVERRIDE; size_t GetElementCount() override;
virtual void GetElements(ElementVector& elements) OVERRIDE; void GetElements(ElementVector& elements) override;
virtual bool RemoveElement(CefRefPtr<CefPostDataElement> element) OVERRIDE; bool RemoveElement(CefRefPtr<CefPostDataElement> element) override;
virtual bool AddElement(CefRefPtr<CefPostDataElement> element) OVERRIDE; bool AddElement(CefRefPtr<CefPostDataElement> element) override;
virtual void RemoveElements(); void RemoveElements() override;
void Set(const net::UploadData& data); void Set(const net::UploadData& data);
void Set(const net::UploadDataStream& data_stream); void Set(const net::UploadDataStream& data_stream);
@ -128,16 +126,16 @@ class CefPostDataImpl : public CefPostData {
class CefPostDataElementImpl : public CefPostDataElement { class CefPostDataElementImpl : public CefPostDataElement {
public: public:
CefPostDataElementImpl(); CefPostDataElementImpl();
~CefPostDataElementImpl(); ~CefPostDataElementImpl() override;
virtual bool IsReadOnly() OVERRIDE; bool IsReadOnly() override;
virtual void SetToEmpty() OVERRIDE; void SetToEmpty() override;
virtual void SetToFile(const CefString& fileName) OVERRIDE; void SetToFile(const CefString& fileName) override;
virtual void SetToBytes(size_t size, const void* bytes) OVERRIDE; void SetToBytes(size_t size, const void* bytes) override;
virtual Type GetType() OVERRIDE; Type GetType() override;
virtual CefString GetFile() OVERRIDE; CefString GetFile() override;
virtual size_t GetBytesCount() OVERRIDE; size_t GetBytesCount() override;
virtual size_t GetBytes(size_t size, void* bytes) OVERRIDE; size_t GetBytes(size_t size, void* bytes) override;
void* GetBytes() { return data_.bytes.bytes; } void* GetBytes() { return data_.bytes.bytes; }

View File

@ -185,8 +185,8 @@ void CefResponseImpl::Set(const blink::WebURLResponse& response) {
public: public:
explicit HeaderVisitor(HeaderMap* map) : map_(map) {} explicit HeaderVisitor(HeaderMap* map) : map_(map) {}
virtual void visitHeader(const blink::WebString& name, void visitHeader(const blink::WebString& name,
const blink::WebString& value) { const blink::WebString& value) override {
map_->insert(std::make_pair(base::string16(name), map_->insert(std::make_pair(base::string16(name),
base::string16(value))); base::string16(value)));
} }

View File

@ -22,19 +22,18 @@ class WebURLResponse;
class CefResponseImpl : public CefResponse { class CefResponseImpl : public CefResponse {
public: public:
CefResponseImpl(); CefResponseImpl();
~CefResponseImpl() {}
// CefResponse methods. // CefResponse methods.
virtual bool IsReadOnly() OVERRIDE; bool IsReadOnly() override;
virtual int GetStatus() OVERRIDE; int GetStatus() override;
virtual void SetStatus(int status) OVERRIDE; void SetStatus(int status) override;
virtual CefString GetStatusText() OVERRIDE; CefString GetStatusText() override;
virtual void SetStatusText(const CefString& statusText) OVERRIDE; void SetStatusText(const CefString& statusText) override;
virtual CefString GetMimeType() OVERRIDE; CefString GetMimeType() override;
virtual void SetMimeType(const CefString& mimeType) OVERRIDE; void SetMimeType(const CefString& mimeType) override;
virtual CefString GetHeader(const CefString& name) OVERRIDE; CefString GetHeader(const CefString& name) override;
virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; void GetHeaderMap(HeaderMap& headerMap) override;
virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; void SetHeaderMap(const HeaderMap& headerMap) override;
net::HttpResponseHeaders* GetResponseHeaders(); net::HttpResponseHeaders* GetResponseHeaders();
void SetResponseHeaders(const net::HttpResponseHeaders& headers); void SetResponseHeaders(const net::HttpResponseHeaders& headers);

View File

@ -18,10 +18,10 @@ class CefSchemeRegistrarImpl : public CefSchemeRegistrar {
CefSchemeRegistrarImpl(); CefSchemeRegistrarImpl();
// CefSchemeRegistrar methods. // CefSchemeRegistrar methods.
virtual bool AddCustomScheme(const CefString& scheme_name, bool AddCustomScheme(const CefString& scheme_name,
bool is_standard, bool is_standard,
bool is_local, bool is_local,
bool is_display_isolated) OVERRIDE; bool is_display_isolated) override;
void GetStandardSchemes(std::vector<std::string>* standard_schemes); void GetStandardSchemes(std::vector<std::string>* standard_schemes);

View File

@ -21,12 +21,12 @@ class CefTaskRunnerImpl : public CefTaskRunner {
static scoped_refptr<base::SequencedTaskRunner> GetCurrentTaskRunner(); static scoped_refptr<base::SequencedTaskRunner> GetCurrentTaskRunner();
// CefTaskRunner methods: // CefTaskRunner methods:
virtual bool IsSame(CefRefPtr<CefTaskRunner> that) OVERRIDE; bool IsSame(CefRefPtr<CefTaskRunner> that) override;
virtual bool BelongsToCurrentThread() OVERRIDE; bool BelongsToCurrentThread() override;
virtual bool BelongsToThread(CefThreadId threadId) OVERRIDE; bool BelongsToThread(CefThreadId threadId) override;
virtual bool PostTask(CefRefPtr<CefTask> task) OVERRIDE; bool PostTask(CefRefPtr<CefTask> task) override;
virtual bool PostDelayedTask(CefRefPtr<CefTask> task, bool PostDelayedTask(CefRefPtr<CefTask> task,
int64 delay_ms) OVERRIDE; int64 delay_ms) override;
private: private:
scoped_refptr<base::SequencedTaskRunner> task_runner_; scoped_refptr<base::SequencedTaskRunner> task_runner_;

View File

@ -51,7 +51,7 @@ class CefTrackNode {
class CefTrackManager : public CefBase { class CefTrackManager : public CefBase {
public: public:
CefTrackManager(); CefTrackManager();
virtual ~CefTrackManager(); ~CefTrackManager() override;
// Add an object to be tracked by this manager. // Add an object to be tracked by this manager.
void Add(CefTrackNode* object); void Add(CefTrackNode* object);

Some files were not shown because too many files have changed in this diff Show More