mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -7,5 +7,5 @@
|
||||
# https://code.google.com/p/chromiumembedded/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': '267aeeb8d85c8503a7fd12bd14654b8ea78d3974',
|
||||
'chromium_checkout': '40af916dfb14ca12890e3a7cf8b50d8e62c69695',
|
||||
}
|
||||
|
8
cef.gyp
8
cef.gyp
@ -1101,10 +1101,10 @@
|
||||
'<(DEPTH)/chrome/browser/prefs/proxy_prefs.h',
|
||||
'<(DEPTH)/chrome/common/pref_names.cc',
|
||||
'<(DEPTH)/chrome/common/pref_names.h',
|
||||
'<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_switches.cc',
|
||||
'<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_switches.h',
|
||||
'<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_pref_names.cc',
|
||||
'<(DEPTH)/components/data_reduction_proxy/common/data_reduction_proxy_pref_names.h',
|
||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc',
|
||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h',
|
||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.cc',
|
||||
'<(DEPTH)/components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h',
|
||||
# Include sources for the loadtimes V8 extension.
|
||||
'<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.h',
|
||||
'<(DEPTH)/chrome/renderer/loadtimes_extension_bindings.cc',
|
||||
|
5
cef.gypi
5
cef.gypi
@ -6,8 +6,9 @@
|
||||
'variables': {
|
||||
# Don't use the chrome style plugin with CEF.
|
||||
'clang_use_chrome_plugins': 0,
|
||||
# Set ENABLE_PRINTING=1.
|
||||
'enable_printing': 2,
|
||||
# Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1.
|
||||
'enable_basic_printing': 1,
|
||||
'enable_print_preview': 0,
|
||||
'conditions': [
|
||||
# Directory for CEF source files.
|
||||
[ 'OS=="win"', {
|
||||
|
@ -26,14 +26,13 @@ using content::BrowserThread;
|
||||
class CefBrowserContextImpl::CefResourceContext : public content::ResourceContext {
|
||||
public:
|
||||
CefResourceContext() : getter_(NULL) {}
|
||||
virtual ~CefResourceContext() {}
|
||||
|
||||
// ResourceContext implementation:
|
||||
virtual net::HostResolver* GetHostResolver() OVERRIDE {
|
||||
net::HostResolver* GetHostResolver() override {
|
||||
CHECK(getter_);
|
||||
return getter_->host_resolver();
|
||||
}
|
||||
virtual net::URLRequestContext* GetRequestContext() OVERRIDE {
|
||||
net::URLRequestContext* GetRequestContext() override {
|
||||
CHECK(getter_);
|
||||
return getter_->GetURLRequestContext();
|
||||
}
|
||||
|
@ -23,39 +23,39 @@ class CefURLRequestContextGetter;
|
||||
class CefBrowserContextImpl : public CefBrowserContext {
|
||||
public:
|
||||
CefBrowserContextImpl();
|
||||
virtual ~CefBrowserContextImpl();
|
||||
~CefBrowserContextImpl() override;
|
||||
|
||||
// BrowserContext methods.
|
||||
virtual base::FilePath GetPath() const OVERRIDE;
|
||||
virtual bool IsOffTheRecord() const OVERRIDE;
|
||||
virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
|
||||
int renderer_child_id) OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
|
||||
int renderer_child_id) OVERRIDE;
|
||||
virtual net::URLRequestContextGetter*
|
||||
base::FilePath GetPath() const override;
|
||||
bool IsOffTheRecord() const override;
|
||||
content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
|
||||
net::URLRequestContextGetter* GetRequestContext() override;
|
||||
net::URLRequestContextGetter* GetRequestContextForRenderProcess(
|
||||
int renderer_child_id) override;
|
||||
net::URLRequestContextGetter* GetMediaRequestContext() override;
|
||||
net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
|
||||
int renderer_child_id) override;
|
||||
net::URLRequestContextGetter*
|
||||
GetMediaRequestContextForStoragePartition(
|
||||
const base::FilePath& partition_path,
|
||||
bool in_memory) OVERRIDE;
|
||||
virtual content::ResourceContext* GetResourceContext() OVERRIDE;
|
||||
virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE;
|
||||
virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
|
||||
virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE;
|
||||
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE;
|
||||
bool in_memory) override;
|
||||
content::ResourceContext* GetResourceContext() override;
|
||||
content::BrowserPluginGuestManager* GetGuestManager() override;
|
||||
storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
|
||||
content::PushMessagingService* GetPushMessagingService() override;
|
||||
content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
|
||||
|
||||
// CefBrowserContext methods.
|
||||
virtual net::URLRequestContextGetter* CreateRequestContext(
|
||||
net::URLRequestContextGetter* CreateRequestContext(
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors)
|
||||
OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||
override;
|
||||
net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||
const base::FilePath& partition_path,
|
||||
bool in_memory,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors)
|
||||
OVERRIDE;
|
||||
override;
|
||||
|
||||
private:
|
||||
class CefResourceContext;
|
||||
|
@ -24,14 +24,13 @@ class CefBrowserContextProxy::CefResourceContext :
|
||||
public content::ResourceContext {
|
||||
public:
|
||||
CefResourceContext() : getter_(NULL) {}
|
||||
virtual ~CefResourceContext() {}
|
||||
|
||||
// ResourceContext implementation:
|
||||
virtual net::HostResolver* GetHostResolver() OVERRIDE {
|
||||
net::HostResolver* GetHostResolver() override {
|
||||
CHECK(getter_);
|
||||
return getter_->GetHostResolver();
|
||||
}
|
||||
virtual net::URLRequestContext* GetRequestContext() OVERRIDE {
|
||||
net::URLRequestContext* GetRequestContext() override {
|
||||
CHECK(getter_);
|
||||
return getter_->GetURLRequestContext();
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ class CefBrowserContextProxy : public CefBrowserContext {
|
||||
public:
|
||||
CefBrowserContextProxy(CefRefPtr<CefRequestContextHandler> handler,
|
||||
CefBrowserContext* parent);
|
||||
virtual ~CefBrowserContextProxy();
|
||||
~CefBrowserContextProxy() override;
|
||||
|
||||
// Reference counting and object life span is managed by
|
||||
// CefContentBrowserClient.
|
||||
@ -34,36 +34,36 @@ class CefBrowserContextProxy : public CefBrowserContext {
|
||||
bool Release() { return (--refct_ == 0); }
|
||||
|
||||
// BrowserContext methods.
|
||||
virtual base::FilePath GetPath() const OVERRIDE;
|
||||
virtual bool IsOffTheRecord() const OVERRIDE;
|
||||
virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
|
||||
int renderer_child_id) OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
|
||||
int renderer_child_id) OVERRIDE;
|
||||
virtual net::URLRequestContextGetter*
|
||||
base::FilePath GetPath() const override;
|
||||
bool IsOffTheRecord() const override;
|
||||
content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
|
||||
net::URLRequestContextGetter* GetRequestContext() override;
|
||||
net::URLRequestContextGetter* GetRequestContextForRenderProcess(
|
||||
int renderer_child_id) override;
|
||||
net::URLRequestContextGetter* GetMediaRequestContext() override;
|
||||
net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
|
||||
int renderer_child_id) override;
|
||||
net::URLRequestContextGetter*
|
||||
GetMediaRequestContextForStoragePartition(
|
||||
const base::FilePath& partition_path,
|
||||
bool in_memory) OVERRIDE;
|
||||
virtual content::ResourceContext* GetResourceContext() OVERRIDE;
|
||||
virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE;
|
||||
virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
|
||||
virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE;
|
||||
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE;
|
||||
bool in_memory) override;
|
||||
content::ResourceContext* GetResourceContext() override;
|
||||
content::BrowserPluginGuestManager* GetGuestManager() override;
|
||||
storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
|
||||
content::PushMessagingService* GetPushMessagingService() override;
|
||||
content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
|
||||
|
||||
// CefBrowserContext methods.
|
||||
virtual net::URLRequestContextGetter* CreateRequestContext(
|
||||
net::URLRequestContextGetter* CreateRequestContext(
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors)
|
||||
OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||
override;
|
||||
net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||
const base::FilePath& partition_path,
|
||||
bool in_memory,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors)
|
||||
OVERRIDE;
|
||||
override;
|
||||
|
||||
CefRefPtr<CefRequestContextHandler> handler() const { return handler_; }
|
||||
|
||||
|
@ -187,7 +187,7 @@ class CefFileDialogCallbackImpl : public CefFileDialogCallback {
|
||||
const CefBrowserHostImpl::RunFileChooserCallback& callback)
|
||||
: callback_(callback) {
|
||||
}
|
||||
~CefFileDialogCallbackImpl() {
|
||||
~CefFileDialogCallbackImpl() override {
|
||||
if (!callback_.is_null()) {
|
||||
// The callback is still pending. Cancel it now.
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
@ -199,7 +199,7 @@ class CefFileDialogCallbackImpl : public CefFileDialogCallback {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Continue(const std::vector<CefString>& file_paths) OVERRIDE {
|
||||
void Continue(const std::vector<CefString>& file_paths) override {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (!callback_.is_null()) {
|
||||
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 (!callback_.is_null()) {
|
||||
CancelNow(callback_);
|
||||
@ -269,6 +269,10 @@ class CefRunFileDialogCallbackWrapper
|
||||
}
|
||||
|
||||
private:
|
||||
friend class base::RefCountedThreadSafe<CefRunFileDialogCallbackWrapper>;
|
||||
|
||||
~CefRunFileDialogCallbackWrapper() {}
|
||||
|
||||
CefRefPtr<CefBrowserHost> host_;
|
||||
CefRefPtr<CefRunFileDialogCallback> callback_;
|
||||
};
|
||||
@ -591,7 +595,7 @@ class CefBrowserHostImpl::DevToolsWebContentsObserver :
|
||||
}
|
||||
|
||||
// WebContentsObserver methods:
|
||||
virtual void WebContentsDestroyed() OVERRIDE {
|
||||
void WebContentsDestroyed() override {
|
||||
browser_->OnDevToolsWebContentsDestroyed();
|
||||
}
|
||||
|
||||
@ -602,8 +606,6 @@ class CefBrowserHostImpl::DevToolsWebContentsObserver :
|
||||
};
|
||||
|
||||
CefBrowserHostImpl::~CefBrowserHostImpl() {
|
||||
// All weak pointer references should be removed in DestroyBrowser().
|
||||
DCHECK(!weak_ptr_factory_.HasWeakPtrs());
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowser> CefBrowserHostImpl::GetBrowser() {
|
||||
@ -1415,8 +1417,6 @@ void CefBrowserHostImpl::DestroyBrowser() {
|
||||
|
||||
CefContentBrowserClient::Get()->RemoveBrowserInfo(browser_info_);
|
||||
browser_info_->set_browser(NULL);
|
||||
|
||||
weak_ptr_factory_.InvalidateWeakPtrs();
|
||||
}
|
||||
|
||||
gfx::NativeView CefBrowserHostImpl::GetContentView() const {
|
||||
@ -2244,11 +2244,6 @@ bool CefBrowserHostImpl::SetPendingPopupInfo(
|
||||
return true;
|
||||
}
|
||||
|
||||
base::WeakPtr<CefBrowserHostImpl> CefBrowserHostImpl::GetWeakPtr() {
|
||||
CEF_REQUIRE_UIT();
|
||||
return weak_ptr_factory_.GetWeakPtr();
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::UpdatePreferredSize(content::WebContents* source,
|
||||
const gfx::Size& pref_size) {
|
||||
PlatformSizeTo(pref_size.width(), pref_size.height());
|
||||
@ -2671,8 +2666,7 @@ CefBrowserHostImpl::CefBrowserHostImpl(
|
||||
focus_on_editable_field_(false),
|
||||
mouse_cursor_change_disabled_(false),
|
||||
devtools_frontend_(NULL),
|
||||
file_chooser_pending_(false),
|
||||
weak_ptr_factory_(this) {
|
||||
file_chooser_pending_(false) {
|
||||
#if defined(USE_AURA)
|
||||
window_widget_ = NULL;
|
||||
#endif
|
||||
@ -2960,10 +2954,11 @@ void CefBrowserHostImpl::OnRunFileChooserDelegateCallback(
|
||||
return;
|
||||
|
||||
// Convert FilePath list to SelectedFileInfo list.
|
||||
std::vector<ui::SelectedFileInfo> selected_files;
|
||||
std::vector<content::FileChooserFileInfo> selected_files;
|
||||
for (size_t i = 0; i < file_paths.size(); ++i) {
|
||||
selected_files.push_back(
|
||||
ui::SelectedFileInfo(file_paths[i], base::FilePath()));
|
||||
content::FileChooserFileInfo info;
|
||||
info.file_path = file_paths[i];
|
||||
selected_files.push_back(info);
|
||||
}
|
||||
|
||||
// Notify our RenderViewHost in all cases.
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "libcef/common/response_manager.h"
|
||||
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "content/public/browser/notification_observer.h"
|
||||
@ -98,7 +97,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
virtual void OnResponse(const std::string& response) =0;
|
||||
};
|
||||
|
||||
virtual ~CefBrowserHostImpl();
|
||||
~CefBrowserHostImpl() override;
|
||||
|
||||
// Create a new CefBrowserHostImpl instance.
|
||||
static CefRefPtr<CefBrowserHostImpl> Create(
|
||||
@ -130,91 +129,89 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
int render_process_id, int render_routing_id);
|
||||
|
||||
// CefBrowserHost methods.
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
||||
virtual void CloseBrowser(bool force_close) OVERRIDE;
|
||||
virtual void SetFocus(bool focus) OVERRIDE;
|
||||
virtual void SetWindowVisibility(bool visible) OVERRIDE;
|
||||
virtual CefWindowHandle GetWindowHandle() OVERRIDE;
|
||||
virtual CefWindowHandle GetOpenerWindowHandle() OVERRIDE;
|
||||
virtual CefRefPtr<CefClient> GetClient() OVERRIDE;
|
||||
virtual CefRefPtr<CefRequestContext> GetRequestContext() OVERRIDE;
|
||||
virtual double GetZoomLevel() OVERRIDE;
|
||||
virtual void SetZoomLevel(double zoomLevel) OVERRIDE;
|
||||
virtual void RunFileDialog(
|
||||
CefRefPtr<CefBrowser> GetBrowser() override;
|
||||
void CloseBrowser(bool force_close) override;
|
||||
void SetFocus(bool focus) override;
|
||||
void SetWindowVisibility(bool visible) override;
|
||||
CefWindowHandle GetWindowHandle() override;
|
||||
CefWindowHandle GetOpenerWindowHandle() override;
|
||||
CefRefPtr<CefClient> GetClient() override;
|
||||
CefRefPtr<CefRequestContext> GetRequestContext() override;
|
||||
double GetZoomLevel() override;
|
||||
void SetZoomLevel(double zoomLevel) override;
|
||||
void RunFileDialog(
|
||||
FileDialogMode mode,
|
||||
const CefString& title,
|
||||
const CefString& default_file_name,
|
||||
const std::vector<CefString>& accept_types,
|
||||
CefRefPtr<CefRunFileDialogCallback> callback) OVERRIDE;
|
||||
virtual void StartDownload(const CefString& url) OVERRIDE;
|
||||
virtual void Print() OVERRIDE;
|
||||
virtual void Find(int identifier, const CefString& searchText,
|
||||
bool forward, bool matchCase, bool findNext) OVERRIDE;
|
||||
virtual void StopFinding(bool clearSelection) OVERRIDE;
|
||||
virtual void ShowDevTools(const CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client,
|
||||
const CefBrowserSettings& settings,
|
||||
const CefPoint& inspect_element_at) OVERRIDE;
|
||||
virtual void CloseDevTools() OVERRIDE;
|
||||
virtual void SetMouseCursorChangeDisabled(bool disabled) OVERRIDE;
|
||||
virtual bool IsMouseCursorChangeDisabled() OVERRIDE;
|
||||
virtual bool IsWindowRenderingDisabled() OVERRIDE;
|
||||
virtual void ReplaceMisspelling(const CefString& word) OVERRIDE;
|
||||
virtual void AddWordToDictionary(const CefString& word) OVERRIDE;
|
||||
virtual void WasResized() OVERRIDE;
|
||||
virtual void WasHidden(bool hidden) OVERRIDE;
|
||||
virtual void NotifyScreenInfoChanged() OVERRIDE;
|
||||
virtual void Invalidate(PaintElementType type) OVERRIDE;
|
||||
virtual void SendKeyEvent(const CefKeyEvent& event) OVERRIDE;
|
||||
virtual void SendMouseClickEvent(const CefMouseEvent& event,
|
||||
MouseButtonType type,
|
||||
bool mouseUp, int clickCount) OVERRIDE;
|
||||
virtual void SendMouseMoveEvent(const CefMouseEvent& event,
|
||||
bool mouseLeave) OVERRIDE;
|
||||
virtual void SendMouseWheelEvent(const CefMouseEvent& event,
|
||||
int deltaX, int deltaY) OVERRIDE;
|
||||
virtual void SendFocusEvent(bool setFocus) OVERRIDE;
|
||||
virtual void SendCaptureLostEvent() OVERRIDE;
|
||||
virtual void NotifyMoveOrResizeStarted() OVERRIDE;
|
||||
virtual CefTextInputContext GetNSTextInputContext() OVERRIDE;
|
||||
virtual void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent)
|
||||
OVERRIDE;
|
||||
virtual void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent)
|
||||
OVERRIDE;
|
||||
virtual void DragTargetDragEnter(CefRefPtr<CefDragData> drag_data,
|
||||
const CefMouseEvent& event,
|
||||
DragOperationsMask allowed_ops);
|
||||
virtual void DragTargetDragOver(const CefMouseEvent& event,
|
||||
DragOperationsMask allowed_ops);
|
||||
virtual void DragTargetDragLeave();
|
||||
virtual void DragTargetDrop(const CefMouseEvent& event);
|
||||
virtual void DragSourceSystemDragEnded();
|
||||
virtual void DragSourceEndedAt(int x, int y, DragOperationsMask op);
|
||||
CefRefPtr<CefRunFileDialogCallback> callback) override;
|
||||
void StartDownload(const CefString& url) override;
|
||||
void Print() override;
|
||||
void Find(int identifier, const CefString& searchText,
|
||||
bool forward, bool matchCase, bool findNext) override;
|
||||
void StopFinding(bool clearSelection) override;
|
||||
void ShowDevTools(const CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client,
|
||||
const CefBrowserSettings& settings,
|
||||
const CefPoint& inspect_element_at) override;
|
||||
void CloseDevTools() override;
|
||||
void SetMouseCursorChangeDisabled(bool disabled) override;
|
||||
bool IsMouseCursorChangeDisabled() override;
|
||||
bool IsWindowRenderingDisabled() override;
|
||||
void ReplaceMisspelling(const CefString& word) override;
|
||||
void AddWordToDictionary(const CefString& word) override;
|
||||
void WasResized() override;
|
||||
void WasHidden(bool hidden) override;
|
||||
void NotifyScreenInfoChanged() override;
|
||||
void Invalidate(PaintElementType type) override;
|
||||
void SendKeyEvent(const CefKeyEvent& event) override;
|
||||
void SendMouseClickEvent(const CefMouseEvent& event,
|
||||
MouseButtonType type,
|
||||
bool mouseUp, int clickCount) override;
|
||||
void SendMouseMoveEvent(const CefMouseEvent& event,
|
||||
bool mouseLeave) override;
|
||||
void SendMouseWheelEvent(const CefMouseEvent& event,
|
||||
int deltaX, int deltaY) override;
|
||||
void SendFocusEvent(bool setFocus) override;
|
||||
void SendCaptureLostEvent() override;
|
||||
void NotifyMoveOrResizeStarted() override;
|
||||
CefTextInputContext GetNSTextInputContext() override;
|
||||
void HandleKeyEventBeforeTextInputClient(CefEventHandle keyEvent) override;
|
||||
void HandleKeyEventAfterTextInputClient(CefEventHandle keyEvent) override;
|
||||
void DragTargetDragEnter(CefRefPtr<CefDragData> drag_data,
|
||||
const CefMouseEvent& event,
|
||||
DragOperationsMask allowed_ops) override;
|
||||
void DragTargetDragOver(const CefMouseEvent& event,
|
||||
DragOperationsMask allowed_ops) override;
|
||||
void DragTargetDragLeave() override;
|
||||
void DragTargetDrop(const CefMouseEvent& event) override;
|
||||
void DragSourceSystemDragEnded() override;
|
||||
void DragSourceEndedAt(int x, int y, DragOperationsMask op) override;
|
||||
|
||||
// CefBrowser methods.
|
||||
virtual CefRefPtr<CefBrowserHost> GetHost() OVERRIDE;
|
||||
virtual bool CanGoBack() OVERRIDE;
|
||||
virtual void GoBack() OVERRIDE;
|
||||
virtual bool CanGoForward() OVERRIDE;
|
||||
virtual void GoForward() OVERRIDE;
|
||||
virtual bool IsLoading() OVERRIDE;
|
||||
virtual void Reload() OVERRIDE;
|
||||
virtual void ReloadIgnoreCache() OVERRIDE;
|
||||
virtual void StopLoad() OVERRIDE;
|
||||
virtual int GetIdentifier() OVERRIDE;
|
||||
virtual bool IsSame(CefRefPtr<CefBrowser> that) OVERRIDE;
|
||||
virtual bool IsPopup() OVERRIDE;
|
||||
virtual bool HasDocument() OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetMainFrame() OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetFocusedFrame() OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetFrame(int64 identifier) OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetFrame(const CefString& name) OVERRIDE;
|
||||
virtual size_t GetFrameCount() OVERRIDE;
|
||||
virtual void GetFrameIdentifiers(std::vector<int64>& identifiers) OVERRIDE;
|
||||
virtual void GetFrameNames(std::vector<CefString>& names) OVERRIDE;
|
||||
virtual bool SendProcessMessage(
|
||||
CefRefPtr<CefBrowserHost> GetHost() override;
|
||||
bool CanGoBack() override;
|
||||
void GoBack() override;
|
||||
bool CanGoForward() override;
|
||||
void GoForward() override;
|
||||
bool IsLoading() override;
|
||||
void Reload() override;
|
||||
void ReloadIgnoreCache() override;
|
||||
void StopLoad() override;
|
||||
int GetIdentifier() override;
|
||||
bool IsSame(CefRefPtr<CefBrowser> that) override;
|
||||
bool IsPopup() override;
|
||||
bool HasDocument() override;
|
||||
CefRefPtr<CefFrame> GetMainFrame() override;
|
||||
CefRefPtr<CefFrame> GetFocusedFrame() override;
|
||||
CefRefPtr<CefFrame> GetFrame(int64 identifier) override;
|
||||
CefRefPtr<CefFrame> GetFrame(const CefString& name) override;
|
||||
size_t GetFrameCount() override;
|
||||
void GetFrameIdentifiers(std::vector<int64>& identifiers) override;
|
||||
void GetFrameNames(std::vector<CefString>& names) override;
|
||||
bool SendProcessMessage(
|
||||
CefProcessId target_process,
|
||||
CefRefPtr<CefProcessMessage> message) OVERRIDE;
|
||||
CefRefPtr<CefProcessMessage> message) override;
|
||||
|
||||
// Returns true if windowless rendering is enabled.
|
||||
bool IsWindowless() const;
|
||||
@ -333,45 +330,40 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
};
|
||||
DestructionState destruction_state() const { return destruction_state_; }
|
||||
|
||||
// Used to retrieve a WeakPtr that will be invalidated when the browser is
|
||||
// destroyed. This method can only be called on, and the resulting WeakPtr
|
||||
// can only be dereferenced on, the UI thread.
|
||||
base::WeakPtr<CefBrowserHostImpl> GetWeakPtr();
|
||||
|
||||
// content::WebContentsDelegate methods.
|
||||
virtual content::WebContents* OpenURLFromTab(
|
||||
content::WebContents* OpenURLFromTab(
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params) OVERRIDE;
|
||||
virtual void LoadingStateChanged(content::WebContents* source,
|
||||
bool to_different_document) OVERRIDE;
|
||||
virtual void CloseContents(content::WebContents* source) OVERRIDE;
|
||||
virtual void UpdateTargetURL(content::WebContents* source,
|
||||
const GURL& url) OVERRIDE;
|
||||
virtual bool AddMessageToConsole(content::WebContents* source,
|
||||
int32 level,
|
||||
const base::string16& message,
|
||||
int32 line_no,
|
||||
const base::string16& source_id) OVERRIDE;
|
||||
virtual void BeforeUnloadFired(content::WebContents* source,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) OVERRIDE;
|
||||
virtual bool TakeFocus(content::WebContents* source,
|
||||
bool reverse) OVERRIDE;
|
||||
virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE;
|
||||
virtual bool HandleContextMenu(
|
||||
const content::ContextMenuParams& params) OVERRIDE;
|
||||
virtual bool PreHandleKeyboardEvent(
|
||||
const content::OpenURLParams& params) override;
|
||||
void LoadingStateChanged(content::WebContents* source,
|
||||
bool to_different_document) override;
|
||||
void CloseContents(content::WebContents* source) override;
|
||||
void UpdateTargetURL(content::WebContents* source,
|
||||
const GURL& url) override;
|
||||
bool AddMessageToConsole(content::WebContents* source,
|
||||
int32 level,
|
||||
const base::string16& message,
|
||||
int32 line_no,
|
||||
const base::string16& source_id) override;
|
||||
void BeforeUnloadFired(content::WebContents* source,
|
||||
bool proceed,
|
||||
bool* proceed_to_fire_unload) override;
|
||||
bool TakeFocus(content::WebContents* source,
|
||||
bool reverse) override;
|
||||
void WebContentsFocused(content::WebContents* contents) override;
|
||||
bool HandleContextMenu(
|
||||
const content::ContextMenuParams& params) override;
|
||||
bool PreHandleKeyboardEvent(
|
||||
content::WebContents* source,
|
||||
const content::NativeWebKeyboardEvent& event,
|
||||
bool* is_keyboard_shortcut) OVERRIDE;
|
||||
virtual void HandleKeyboardEvent(
|
||||
bool* is_keyboard_shortcut) override;
|
||||
void HandleKeyboardEvent(
|
||||
content::WebContents* source,
|
||||
const content::NativeWebKeyboardEvent& event) OVERRIDE;
|
||||
virtual bool CanDragEnter(
|
||||
const content::NativeWebKeyboardEvent& event) override;
|
||||
bool CanDragEnter(
|
||||
content::WebContents* source,
|
||||
const content::DropData& data,
|
||||
blink::WebDragOperationsMask operations_allowed) OVERRIDE;
|
||||
virtual bool ShouldCreateWebContents(
|
||||
blink::WebDragOperationsMask operations_allowed) override;
|
||||
bool ShouldCreateWebContents(
|
||||
content::WebContents* web_contents,
|
||||
int route_id,
|
||||
WindowContainerType window_container_type,
|
||||
@ -380,60 +372,59 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
const std::string& partition_id,
|
||||
content::SessionStorageNamespace* session_storage_namespace,
|
||||
content::WebContentsView** view,
|
||||
content::RenderViewHostDelegateView** delegate_view) OVERRIDE;
|
||||
virtual void WebContentsCreated(content::WebContents* source_contents,
|
||||
int opener_render_frame_id,
|
||||
const base::string16& frame_name,
|
||||
const GURL& target_url,
|
||||
content::WebContents* new_contents) OVERRIDE;
|
||||
virtual void DidNavigateMainFramePostCommit(
|
||||
content::WebContents* tab) OVERRIDE;
|
||||
virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager()
|
||||
OVERRIDE;
|
||||
virtual void RunFileChooser(
|
||||
content::RenderViewHostDelegateView** delegate_view) override;
|
||||
void WebContentsCreated(content::WebContents* source_contents,
|
||||
int opener_render_frame_id,
|
||||
const base::string16& frame_name,
|
||||
const GURL& target_url,
|
||||
content::WebContents* new_contents) override;
|
||||
void DidNavigateMainFramePostCommit(
|
||||
content::WebContents* tab) override;
|
||||
content::JavaScriptDialogManager* GetJavaScriptDialogManager() override;
|
||||
void RunFileChooser(
|
||||
content::WebContents* tab,
|
||||
const content::FileChooserParams& params) OVERRIDE;
|
||||
virtual void UpdatePreferredSize(content::WebContents* source,
|
||||
const gfx::Size& pref_size) OVERRIDE;
|
||||
virtual void RequestMediaAccessPermission(
|
||||
const content::FileChooserParams& params) override;
|
||||
void UpdatePreferredSize(content::WebContents* source,
|
||||
const gfx::Size& pref_size) override;
|
||||
void RequestMediaAccessPermission(
|
||||
content::WebContents* web_contents,
|
||||
const content::MediaStreamRequest& request,
|
||||
const content::MediaResponseCallback& callback) OVERRIDE;
|
||||
const content::MediaResponseCallback& callback) override;
|
||||
|
||||
// content::WebContentsObserver methods.
|
||||
using content::WebContentsObserver::BeforeUnloadFired;
|
||||
using content::WebContentsObserver::WasHidden;
|
||||
virtual void RenderFrameCreated(
|
||||
content::RenderFrameHost* render_frame_host) OVERRIDE;
|
||||
virtual void RenderFrameDeleted(
|
||||
content::RenderFrameHost* render_frame_host) OVERRIDE;
|
||||
virtual void RenderViewCreated(
|
||||
content::RenderViewHost* render_view_host) OVERRIDE;
|
||||
virtual void RenderViewDeleted(
|
||||
content::RenderViewHost* render_view_host) OVERRIDE;
|
||||
virtual void RenderViewReady() OVERRIDE;
|
||||
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
|
||||
virtual void DidCommitProvisionalLoadForFrame(
|
||||
void RenderFrameCreated(
|
||||
content::RenderFrameHost* render_frame_host) override;
|
||||
void RenderFrameDeleted(
|
||||
content::RenderFrameHost* render_frame_host) override;
|
||||
void RenderViewCreated(
|
||||
content::RenderViewHost* render_view_host) override;
|
||||
void RenderViewDeleted(
|
||||
content::RenderViewHost* render_view_host) override;
|
||||
void RenderViewReady() override;
|
||||
void RenderProcessGone(base::TerminationStatus status) override;
|
||||
void DidCommitProvisionalLoadForFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& url,
|
||||
ui::PageTransition transition_type) OVERRIDE;
|
||||
virtual void DidFailProvisionalLoad(
|
||||
ui::PageTransition transition_type) override;
|
||||
void DidFailProvisionalLoad(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& validated_url,
|
||||
int error_code,
|
||||
const base::string16& error_description) OVERRIDE;
|
||||
virtual void DocumentAvailableInMainFrame() OVERRIDE;
|
||||
virtual void DidFailLoad(content::RenderFrameHost* render_frame_host,
|
||||
const GURL& validated_url,
|
||||
int error_code,
|
||||
const base::string16& error_description) OVERRIDE;
|
||||
virtual void FrameDetached(
|
||||
content::RenderFrameHost* render_frame_host) OVERRIDE;
|
||||
virtual void PluginCrashed(const base::FilePath& plugin_path,
|
||||
base::ProcessId plugin_pid) OVERRIDE;
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
||||
const base::string16& error_description) override;
|
||||
void DocumentAvailableInMainFrame() override;
|
||||
void DidFailLoad(content::RenderFrameHost* render_frame_host,
|
||||
const GURL& validated_url,
|
||||
int error_code,
|
||||
const base::string16& error_description) override;
|
||||
void FrameDetached(
|
||||
content::RenderFrameHost* render_frame_host) override;
|
||||
void PluginCrashed(const base::FilePath& plugin_path,
|
||||
base::ProcessId plugin_pid) override;
|
||||
bool OnMessageReceived(const IPC::Message& message) override;
|
||||
// Override to provide a thread safe implementation.
|
||||
virtual bool Send(IPC::Message* message) OVERRIDE;
|
||||
bool Send(IPC::Message* message) override;
|
||||
|
||||
private:
|
||||
class DevToolsWebContentsObserver;
|
||||
@ -472,9 +463,9 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
const base::string16& actual_value);
|
||||
|
||||
// content::NotificationObserver methods.
|
||||
virtual void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) OVERRIDE;
|
||||
void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) override;
|
||||
|
||||
CefBrowserHostImpl(const CefWindowInfo& window_info,
|
||||
const CefBrowserSettings& settings,
|
||||
@ -666,10 +657,6 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
scoped_ptr<ui::XScopedCursor> invisible_cursor_;
|
||||
#endif // defined(USE_X11)
|
||||
|
||||
// Only used on the UI thread. All references will be invalidated when
|
||||
// DestroyBrowser() is called. Must be the last member.
|
||||
base::WeakPtrFactory<CefBrowserHostImpl> weak_ptr_factory_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefBrowserHostImpl);
|
||||
DISALLOW_EVIL_CONSTRUCTORS(CefBrowserHostImpl);
|
||||
};
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "libcef/browser/text_input_client_osr_mac.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/mac/mac_util.h"
|
||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
#include "base/strings/string_util.h"
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "libcef/browser/thread_util.h"
|
||||
#include "libcef/browser/window_delegate_view.h"
|
||||
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/i18n/case_conversion.h"
|
||||
#include "base/memory/ref_counted_memory.h"
|
||||
#include "base/strings/string_util.h"
|
||||
|
@ -20,7 +20,6 @@
|
||||
class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
|
||||
public:
|
||||
CefBrowserInfo(int browser_id, bool is_popup);
|
||||
virtual ~CefBrowserInfo();
|
||||
|
||||
int browser_id() const { return browser_id_; };
|
||||
bool is_popup() const { return is_popup_; }
|
||||
@ -44,6 +43,10 @@ class CefBrowserInfo : public base::RefCountedThreadSafe<CefBrowserInfo> {
|
||||
void set_browser(CefRefPtr<CefBrowserHostImpl> browser);
|
||||
|
||||
private:
|
||||
friend class base::RefCountedThreadSafe<CefBrowserInfo>;
|
||||
|
||||
~CefBrowserInfo();
|
||||
|
||||
typedef std::set<std::pair<int, int> > RenderIdSet;
|
||||
|
||||
void add_render_id(RenderIdSet* id_set,
|
||||
|
@ -33,16 +33,16 @@ class CefDevToolsDelegate;
|
||||
class CefBrowserMainParts : public content::BrowserMainParts {
|
||||
public:
|
||||
explicit CefBrowserMainParts(const content::MainFunctionParams& parameters);
|
||||
virtual ~CefBrowserMainParts();
|
||||
~CefBrowserMainParts() override;
|
||||
|
||||
virtual void PreMainMessageLoopStart() OVERRIDE;
|
||||
virtual void PostMainMessageLoopStart() OVERRIDE;
|
||||
virtual void PreEarlyInitialization() OVERRIDE;
|
||||
virtual void ToolkitInitialized() OVERRIDE;
|
||||
virtual int PreCreateThreads() OVERRIDE;
|
||||
virtual void PreMainMessageLoopRun() OVERRIDE;
|
||||
virtual void PostMainMessageLoopRun() OVERRIDE;
|
||||
virtual void PostDestroyThreads() OVERRIDE;
|
||||
void PreMainMessageLoopStart() override;
|
||||
void PostMainMessageLoopStart() override;
|
||||
void PreEarlyInitialization() override;
|
||||
void ToolkitInitialized() override;
|
||||
int PreCreateThreads() override;
|
||||
void PreMainMessageLoopRun() override;
|
||||
void PostMainMessageLoopRun() override;
|
||||
void PostDestroyThreads() override;
|
||||
|
||||
CefBrowserContext* browser_context() const {
|
||||
return global_browser_context_.get();
|
||||
|
@ -22,12 +22,12 @@ struct ViewHostMsg_CreateWindow_Params;
|
||||
class CefBrowserMessageFilter : public IPC::MessageFilter {
|
||||
public:
|
||||
explicit CefBrowserMessageFilter(content::RenderProcessHost* host);
|
||||
virtual ~CefBrowserMessageFilter();
|
||||
~CefBrowserMessageFilter() override;
|
||||
|
||||
// IPC::ChannelProxy::MessageFilter implementation.
|
||||
virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
|
||||
virtual void OnFilterRemoved() OVERRIDE;
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
||||
void OnFilterAdded(IPC::Sender* sender) override;
|
||||
void OnFilterRemoved() override;
|
||||
bool OnMessageReceived(const IPC::Message& message) override;
|
||||
|
||||
bool Send(IPC::Message* message);
|
||||
|
||||
|
@ -15,7 +15,7 @@ class CefBrowserMessageLoop : public base::MessageLoopForUI {
|
||||
|
||||
public:
|
||||
CefBrowserMessageLoop();
|
||||
virtual ~CefBrowserMessageLoop();
|
||||
~CefBrowserMessageLoop() override;
|
||||
|
||||
// Returns the MessageLoopForUI of the current thread.
|
||||
static CefBrowserMessageLoop* current();
|
||||
|
@ -17,7 +17,7 @@ class CefBrowserPrefStore : public TestingPrefStore {
|
||||
scoped_ptr<PrefService> CreateService();
|
||||
|
||||
protected:
|
||||
virtual ~CefBrowserPrefStore();
|
||||
~CefBrowserPrefStore() override;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefBrowserPrefStore);
|
||||
};
|
||||
|
@ -35,14 +35,14 @@ class CefURLFetcherDelegate : public net::URLFetcherDelegate {
|
||||
public:
|
||||
CefURLFetcherDelegate(CefBrowserURLRequest::Context* context,
|
||||
int request_flags);
|
||||
virtual ~CefURLFetcherDelegate();
|
||||
~CefURLFetcherDelegate() override;
|
||||
|
||||
// net::URLFetcherDelegate methods.
|
||||
virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
|
||||
virtual void OnURLFetchDownloadProgress(const net::URLFetcher* source,
|
||||
int64 current, int64 total) OVERRIDE;
|
||||
virtual void OnURLFetchUploadProgress(const net::URLFetcher* source,
|
||||
int64 current, int64 total) OVERRIDE;
|
||||
void OnURLFetchComplete(const net::URLFetcher* source) override;
|
||||
void OnURLFetchDownloadProgress(const net::URLFetcher* source,
|
||||
int64 current, int64 total) override;
|
||||
void OnURLFetchUploadProgress(const net::URLFetcher* source,
|
||||
int64 current, int64 total) override;
|
||||
|
||||
private:
|
||||
// The context_ pointer will outlive this object.
|
||||
@ -59,17 +59,15 @@ class NET_EXPORT CefURLFetcherResponseWriter :
|
||||
: url_request_(url_request),
|
||||
message_loop_proxy_(message_loop_proxy) {
|
||||
}
|
||||
virtual ~CefURLFetcherResponseWriter() {
|
||||
}
|
||||
|
||||
// net::URLFetcherResponseWriter methods.
|
||||
virtual int Initialize(const net::CompletionCallback& callback) OVERRIDE {
|
||||
int Initialize(const net::CompletionCallback& callback) override {
|
||||
return net::OK;
|
||||
}
|
||||
|
||||
virtual int Write(net::IOBuffer* buffer,
|
||||
int num_bytes,
|
||||
const net::CompletionCallback& callback) OVERRIDE {
|
||||
int Write(net::IOBuffer* buffer,
|
||||
int num_bytes,
|
||||
const net::CompletionCallback& callback) override {
|
||||
if (url_request_.get()) {
|
||||
message_loop_proxy_->PostTask(FROM_HERE,
|
||||
base::Bind(&CefURLFetcherResponseWriter::WriteOnClientThread,
|
||||
@ -81,7 +79,7 @@ class NET_EXPORT CefURLFetcherResponseWriter :
|
||||
return num_bytes;
|
||||
}
|
||||
|
||||
virtual int Finish(const net::CompletionCallback& callback) OVERRIDE {
|
||||
int Finish(const net::CompletionCallback& callback) override {
|
||||
if (url_request_.get())
|
||||
url_request_ = NULL;
|
||||
return net::OK;
|
||||
@ -143,13 +141,6 @@ class CefBrowserURLRequest::Context
|
||||
static_cast<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() {
|
||||
return message_loop_proxy_->BelongsToCurrentThread();
|
||||
}
|
||||
@ -273,7 +264,6 @@ class CefBrowserURLRequest::Context
|
||||
}
|
||||
|
||||
if (cef_flags & UR_FLAG_REPORT_UPLOAD_PROGRESS) {
|
||||
load_flags |= net::LOAD_ENABLE_UPLOAD_PROGRESS;
|
||||
upload_data_size_ = upload_data_size;
|
||||
}
|
||||
|
||||
@ -396,6 +386,15 @@ class CefBrowserURLRequest::Context
|
||||
CefRefPtr<CefResponse> response() { return response_; }
|
||||
|
||||
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() {
|
||||
if (!got_upload_progress_complete_ && upload_data_size_ > 0) {
|
||||
// URLFetcher sends upload notifications using a timer and will not send
|
||||
|
@ -14,17 +14,17 @@ class CefBrowserURLRequest : public CefURLRequest {
|
||||
|
||||
CefBrowserURLRequest(CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefURLRequestClient> client);
|
||||
virtual ~CefBrowserURLRequest();
|
||||
~CefBrowserURLRequest() override;
|
||||
|
||||
bool Start();
|
||||
|
||||
// CefURLRequest methods.
|
||||
virtual CefRefPtr<CefRequest> GetRequest() OVERRIDE;
|
||||
virtual CefRefPtr<CefURLRequestClient> GetClient() OVERRIDE;
|
||||
virtual Status GetRequestStatus() OVERRIDE;
|
||||
virtual ErrorCode GetRequestError() OVERRIDE;
|
||||
virtual CefRefPtr<CefResponse> GetResponse() OVERRIDE;
|
||||
virtual void Cancel() OVERRIDE;
|
||||
CefRefPtr<CefRequest> GetRequest() override;
|
||||
CefRefPtr<CefURLRequestClient> GetClient() override;
|
||||
Status GetRequestStatus() override;
|
||||
ErrorCode GetRequestError() override;
|
||||
CefRefPtr<CefResponse> GetResponse() override;
|
||||
void Cancel() override;
|
||||
|
||||
private:
|
||||
bool VerifyContext();
|
||||
|
@ -26,74 +26,74 @@ class BackgroundModeManager {
|
||||
class ChromeBrowserProcessStub : public BrowserProcess {
|
||||
public:
|
||||
ChromeBrowserProcessStub();
|
||||
virtual ~ChromeBrowserProcessStub();
|
||||
~ChromeBrowserProcessStub() override;
|
||||
|
||||
// BrowserProcess implementation.
|
||||
virtual void ResourceDispatcherHostCreated() OVERRIDE;
|
||||
virtual void EndSession() OVERRIDE;
|
||||
virtual MetricsServicesManager* GetMetricsServicesManager() OVERRIDE;
|
||||
virtual metrics::MetricsService* metrics_service() OVERRIDE;
|
||||
virtual rappor::RapporService* rappor_service() OVERRIDE;
|
||||
virtual IOThread* io_thread() OVERRIDE;
|
||||
virtual WatchDogThread* watchdog_thread() OVERRIDE;
|
||||
virtual ProfileManager* profile_manager() OVERRIDE;
|
||||
virtual PrefService* local_state() OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* system_request_context() OVERRIDE;
|
||||
virtual chrome_variations::VariationsService* variations_service() OVERRIDE;
|
||||
virtual BrowserProcessPlatformPart* platform_part() OVERRIDE;
|
||||
virtual extensions::EventRouterForwarder*
|
||||
extension_event_router_forwarder() OVERRIDE;
|
||||
virtual NotificationUIManager* notification_ui_manager() OVERRIDE;
|
||||
virtual message_center::MessageCenter* message_center() OVERRIDE;
|
||||
virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE;
|
||||
virtual policy::PolicyService* policy_service() OVERRIDE;
|
||||
virtual IconManager* icon_manager() OVERRIDE;
|
||||
virtual GLStringManager* gl_string_manager() OVERRIDE;
|
||||
virtual GpuModeManager* gpu_mode_manager() OVERRIDE;
|
||||
virtual void CreateDevToolsHttpProtocolHandler(
|
||||
void ResourceDispatcherHostCreated() override;
|
||||
void EndSession() override;
|
||||
MetricsServicesManager* GetMetricsServicesManager() override;
|
||||
metrics::MetricsService* metrics_service() override;
|
||||
rappor::RapporService* rappor_service() override;
|
||||
IOThread* io_thread() override;
|
||||
WatchDogThread* watchdog_thread() override;
|
||||
ProfileManager* profile_manager() override;
|
||||
PrefService* local_state() override;
|
||||
net::URLRequestContextGetter* system_request_context() override;
|
||||
chrome_variations::VariationsService* variations_service() override;
|
||||
BrowserProcessPlatformPart* platform_part() override;
|
||||
extensions::EventRouterForwarder*
|
||||
extension_event_router_forwarder() override;
|
||||
NotificationUIManager* notification_ui_manager() override;
|
||||
message_center::MessageCenter* message_center() override;
|
||||
policy::BrowserPolicyConnector* browser_policy_connector() override;
|
||||
policy::PolicyService* policy_service() override;
|
||||
IconManager* icon_manager() override;
|
||||
GLStringManager* gl_string_manager() override;
|
||||
GpuModeManager* gpu_mode_manager() override;
|
||||
void CreateDevToolsHttpProtocolHandler(
|
||||
chrome::HostDesktopType host_desktop_type,
|
||||
const std::string& ip,
|
||||
int port) OVERRIDE;
|
||||
virtual unsigned int AddRefModule() OVERRIDE;
|
||||
virtual unsigned int ReleaseModule() OVERRIDE;
|
||||
virtual bool IsShuttingDown() OVERRIDE;
|
||||
virtual printing::PrintJobManager* print_job_manager() OVERRIDE;
|
||||
virtual printing::PrintPreviewDialogController*
|
||||
print_preview_dialog_controller() OVERRIDE;
|
||||
virtual printing::BackgroundPrintingManager*
|
||||
background_printing_manager() OVERRIDE;
|
||||
virtual IntranetRedirectDetector* intranet_redirect_detector() OVERRIDE;
|
||||
virtual const std::string& GetApplicationLocale() OVERRIDE;
|
||||
virtual void SetApplicationLocale(const std::string& locale) OVERRIDE;
|
||||
virtual DownloadStatusUpdater* download_status_updater() OVERRIDE;
|
||||
virtual DownloadRequestLimiter* download_request_limiter() OVERRIDE;
|
||||
virtual BackgroundModeManager* background_mode_manager() OVERRIDE;
|
||||
virtual void set_background_mode_manager_for_test(
|
||||
scoped_ptr<BackgroundModeManager> manager) OVERRIDE;
|
||||
virtual StatusTray* status_tray() OVERRIDE;
|
||||
virtual SafeBrowsingService* safe_browsing_service() OVERRIDE;
|
||||
virtual safe_browsing::ClientSideDetectionService*
|
||||
safe_browsing_detection_service() OVERRIDE;
|
||||
int port) override;
|
||||
unsigned int AddRefModule() override;
|
||||
unsigned int ReleaseModule() override;
|
||||
bool IsShuttingDown() override;
|
||||
printing::PrintJobManager* print_job_manager() override;
|
||||
printing::PrintPreviewDialogController*
|
||||
print_preview_dialog_controller() override;
|
||||
printing::BackgroundPrintingManager*
|
||||
background_printing_manager() override;
|
||||
IntranetRedirectDetector* intranet_redirect_detector() override;
|
||||
const std::string& GetApplicationLocale() override;
|
||||
void SetApplicationLocale(const std::string& locale) override;
|
||||
DownloadStatusUpdater* download_status_updater() override;
|
||||
DownloadRequestLimiter* download_request_limiter() override;
|
||||
BackgroundModeManager* background_mode_manager() override;
|
||||
void set_background_mode_manager_for_test(
|
||||
scoped_ptr<BackgroundModeManager> manager) override;
|
||||
StatusTray* status_tray() override;
|
||||
SafeBrowsingService* safe_browsing_service() override;
|
||||
safe_browsing::ClientSideDetectionService*
|
||||
safe_browsing_detection_service() override;
|
||||
|
||||
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
||||
virtual void StartAutoupdateTimer() OVERRIDE;
|
||||
void StartAutoupdateTimer() override;
|
||||
#endif
|
||||
|
||||
virtual ChromeNetLog* net_log() OVERRIDE;
|
||||
virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE;
|
||||
virtual component_updater::ComponentUpdateService*
|
||||
component_updater() OVERRIDE;
|
||||
virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE;
|
||||
virtual component_updater::PnaclComponentInstaller*
|
||||
pnacl_component_installer() OVERRIDE;
|
||||
virtual MediaFileSystemRegistry*
|
||||
media_file_system_registry() OVERRIDE;
|
||||
virtual bool created_local_state() const OVERRIDE;
|
||||
ChromeNetLog* net_log() override;
|
||||
prerender::PrerenderTracker* prerender_tracker() override;
|
||||
component_updater::ComponentUpdateService*
|
||||
component_updater() override;
|
||||
CRLSetFetcher* crl_set_fetcher() override;
|
||||
component_updater::PnaclComponentInstaller*
|
||||
pnacl_component_installer() override;
|
||||
MediaFileSystemRegistry*
|
||||
media_file_system_registry() override;
|
||||
bool created_local_state() const override;
|
||||
#if defined(ENABLE_WEBRTC)
|
||||
virtual WebRtcLogUploader* webrtc_log_uploader() OVERRIDE;
|
||||
WebRtcLogUploader* webrtc_log_uploader() override;
|
||||
#endif
|
||||
virtual network_time::NetworkTimeTracker* network_time_tracker() OVERRIDE;
|
||||
virtual gcm::GCMDriver* gcm_driver() OVERRIDE;
|
||||
network_time::NetworkTimeTracker* network_time_tracker() override;
|
||||
gcm::GCMDriver* gcm_driver() override;
|
||||
|
||||
private:
|
||||
std::string locale_;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "libcef/common/content_client.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@ -182,8 +182,8 @@ class Delegate : public InternalHandlerDelegate {
|
||||
public:
|
||||
Delegate() {}
|
||||
|
||||
virtual bool OnRequest(CefRefPtr<CefRequest> request,
|
||||
Action* action) OVERRIDE {
|
||||
bool OnRequest(CefRefPtr<CefRequest> request,
|
||||
Action* action) override {
|
||||
GURL url = GURL(request->GetURL().ToString());
|
||||
std::string path = url.path();
|
||||
if (path.length() > 0)
|
||||
@ -298,8 +298,8 @@ void DidFinishChromeVersionLoad(CefRefPtr<CefFrame> frame) {
|
||||
: frame_(frame) {
|
||||
}
|
||||
|
||||
virtual bool Visit(CefRefPtr<CefWebPluginInfo> info,
|
||||
int count, int total) OVERRIDE {
|
||||
bool Visit(CefRefPtr<CefWebPluginInfo> info,
|
||||
int count, int total) override {
|
||||
std::string name = info->GetName();
|
||||
if (name == "Shockwave Flash") {
|
||||
if (frame_->IsValid()) {
|
||||
@ -333,9 +333,9 @@ class ChromeProtocolHandlerWrapper :
|
||||
: chrome_protocol_handler_(chrome_protocol_handler.Pass()) {
|
||||
}
|
||||
|
||||
virtual net::URLRequestJob* MaybeCreateJob(
|
||||
net::URLRequestJob* MaybeCreateJob(
|
||||
net::URLRequest* request,
|
||||
net::NetworkDelegate* network_delegate) const OVERRIDE {
|
||||
net::NetworkDelegate* network_delegate) const override {
|
||||
// Keep synchronized with the checks in ChromeProtocolHandler::MaybeCreateJob.
|
||||
if (content::ViewHttpCacheJobFactory::IsSupportedURL(request->url()) ||
|
||||
(request->url().SchemeIs(content::kChromeUIScheme) &&
|
||||
|
@ -66,14 +66,14 @@ class CefAccessTokenStore : public content::AccessTokenStore {
|
||||
public:
|
||||
CefAccessTokenStore() {}
|
||||
|
||||
virtual void LoadAccessTokens(
|
||||
const LoadAccessTokensCallbackType& callback) OVERRIDE {
|
||||
void LoadAccessTokens(
|
||||
const LoadAccessTokensCallbackType& callback) override {
|
||||
callback.Run(access_token_set_,
|
||||
CefContentBrowserClient::Get()->request_context().get());
|
||||
}
|
||||
|
||||
virtual void SaveAccessToken(
|
||||
const GURL& server_url, const base::string16& access_token) OVERRIDE {
|
||||
void SaveAccessToken(
|
||||
const GURL& server_url, const base::string16& access_token) override {
|
||||
access_token_set_[server_url] = access_token;
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ class CefQuotaCallbackImpl : public CefQuotaCallback {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Continue(bool allow) OVERRIDE {
|
||||
void Continue(bool allow) override {
|
||||
if (CEF_CURRENTLY_ON_IOT()) {
|
||||
if (!callback_.is_null()) {
|
||||
callback_.Run(allow ?
|
||||
@ -116,7 +116,7 @@ class CefQuotaCallbackImpl : public CefQuotaCallback {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Cancel() OVERRIDE {
|
||||
void Cancel() override {
|
||||
if (CEF_CURRENTLY_ON_IOT()) {
|
||||
if (!callback_.is_null()) {
|
||||
CancelNow(callback_);
|
||||
@ -155,7 +155,7 @@ class CefAllowCertificateErrorCallbackImpl
|
||||
: callback_(callback) {
|
||||
}
|
||||
|
||||
virtual void Continue(bool allow) OVERRIDE {
|
||||
void Continue(bool allow) override {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (!callback_.is_null()) {
|
||||
callback_.Run(allow);
|
||||
@ -187,7 +187,7 @@ class CefGeolocationCallbackImpl : public CefGeolocationCallback {
|
||||
explicit CefGeolocationCallbackImpl(const CallbackType& callback)
|
||||
: callback_(callback) {}
|
||||
|
||||
virtual void Continue(bool allow) OVERRIDE {
|
||||
void Continue(bool allow) override {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (!callback_.is_null()) {
|
||||
callback_.Run(allow);
|
||||
@ -215,33 +215,16 @@ class CefGeolocationCallbackImpl : public CefGeolocationCallback {
|
||||
DISALLOW_COPY_AND_ASSIGN(CefGeolocationCallbackImpl);
|
||||
};
|
||||
|
||||
void CancelGeolocationPermission(base::WeakPtr<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 {
|
||||
public:
|
||||
CefQuotaPermissionContext() {
|
||||
}
|
||||
|
||||
// The callback will be dispatched on the IO thread.
|
||||
virtual void RequestQuotaPermission(
|
||||
void RequestQuotaPermission(
|
||||
const content::StorageQuotaParams& params,
|
||||
int render_process_id,
|
||||
const PermissionCallback& callback) OVERRIDE {
|
||||
const PermissionCallback& callback) override {
|
||||
if (params.storage_type != storage::kStorageTypePersistent) {
|
||||
// To match Chrome behavior we only support requesting quota with this
|
||||
// interface for Persistent storage type.
|
||||
@ -278,8 +261,7 @@ class CefQuotaPermissionContext : public content::QuotaPermissionContext {
|
||||
}
|
||||
|
||||
private:
|
||||
virtual ~CefQuotaPermissionContext() {
|
||||
}
|
||||
~CefQuotaPermissionContext() override {}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefQuotaPermissionContext);
|
||||
};
|
||||
@ -287,14 +269,13 @@ class CefQuotaPermissionContext : public content::QuotaPermissionContext {
|
||||
class CefPluginServiceFilter : public content::PluginServiceFilter {
|
||||
public:
|
||||
CefPluginServiceFilter() {}
|
||||
virtual ~CefPluginServiceFilter() {}
|
||||
|
||||
virtual bool IsPluginAvailable(int render_process_id,
|
||||
int render_frame_id,
|
||||
const void* context,
|
||||
const GURL& url,
|
||||
const GURL& policy_url,
|
||||
content::WebPluginInfo* plugin) OVERRIDE {
|
||||
bool IsPluginAvailable(int render_process_id,
|
||||
int render_frame_id,
|
||||
const void* context,
|
||||
const GURL& url,
|
||||
const GURL& policy_url,
|
||||
content::WebPluginInfo* plugin) override {
|
||||
bool allowed = true;
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
@ -319,8 +300,8 @@ class CefPluginServiceFilter : public content::PluginServiceFilter {
|
||||
return allowed;
|
||||
}
|
||||
|
||||
virtual bool CanLoadPlugin(int render_process_id,
|
||||
const base::FilePath& path) OVERRIDE {
|
||||
bool CanLoadPlugin(int render_process_id,
|
||||
const base::FilePath& path) override {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -702,7 +683,6 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
static const char* const kSwitchNames[] = {
|
||||
switches::kContextSafetyImplementation,
|
||||
switches::kDisableSpellChecking,
|
||||
switches::kEnableMediaStream,
|
||||
switches::kEnableSpeechInput,
|
||||
switches::kEnableSpellingAutoCorrect,
|
||||
switches::kUncaughtExceptionStackSize,
|
||||
@ -806,14 +786,20 @@ content::AccessTokenStore* CefContentBrowserClient::CreateAccessTokenStore() {
|
||||
return new CefAccessTokenStore;
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::RequestGeolocationPermission(
|
||||
void CefContentBrowserClient::RequestPermission(
|
||||
content::PermissionType permission,
|
||||
content::WebContents* web_contents,
|
||||
int bridge_id,
|
||||
const GURL& requesting_frame,
|
||||
bool user_gesture,
|
||||
base::Callback<void(bool)> result_callback,
|
||||
base::Closure* cancel_callback) {
|
||||
const base::Callback<void(bool)>& result_callback) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
if (permission != content::PermissionType::PERMISSION_GEOLOCATION) {
|
||||
result_callback.Run(false);
|
||||
return;
|
||||
}
|
||||
|
||||
bool proceed = false;
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
@ -831,15 +817,8 @@ void CefContentBrowserClient::RequestGeolocationPermission(
|
||||
proceed = handler->OnRequestGeolocationPermission(
|
||||
browser.get(), requesting_frame.spec(), bridge_id,
|
||||
callbackImpl.get());
|
||||
if (proceed) {
|
||||
// The callback reference may outlive the browser so use a WeakPtr.
|
||||
*cancel_callback =
|
||||
base::Bind(CancelGeolocationPermission,
|
||||
browser->GetWeakPtr(), requesting_frame,
|
||||
bridge_id);
|
||||
} else {
|
||||
if (!proceed)
|
||||
callbackImpl->Disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -850,6 +829,32 @@ void CefContentBrowserClient::RequestGeolocationPermission(
|
||||
}
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::CancelPermissionRequest(
|
||||
content::PermissionType permission,
|
||||
content::WebContents* web_contents,
|
||||
int bridge_id,
|
||||
const GURL& requesting_frame) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
if (permission != content::PermissionType::PERMISSION_GEOLOCATION)
|
||||
return;
|
||||
|
||||
CefRefPtr<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(
|
||||
const GURL& opener_url,
|
||||
const GURL& opener_top_level_frame_url,
|
||||
@ -1017,11 +1022,10 @@ content::DevToolsManagerDelegate*
|
||||
void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
|
||||
const base::CommandLine& command_line,
|
||||
int child_process_id,
|
||||
std::vector<content::FileDescriptorInfo>* mappings) {
|
||||
content::FileDescriptorInfo* mappings) {
|
||||
int crash_signal_fd = GetCrashSignalFD(command_line);
|
||||
if (crash_signal_fd >= 0) {
|
||||
mappings->push_back(content::FileDescriptorInfo(
|
||||
kCrashDumpSignal, base::FileDescriptor(crash_signal_fd, false)));
|
||||
mappings->Share(kCrashDumpSignal, crash_signal_fd);
|
||||
}
|
||||
}
|
||||
#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
|
||||
|
@ -38,7 +38,7 @@ class SiteInstance;
|
||||
class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
public:
|
||||
CefContentBrowserClient();
|
||||
virtual ~CefContentBrowserClient();
|
||||
~CefContentBrowserClient() override;
|
||||
|
||||
// Returns the singleton CefContentBrowserClient instance.
|
||||
static CefContentBrowserClient* Get();
|
||||
@ -79,31 +79,31 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
void RemoveBrowserContextReference(CefBrowserContext* context);
|
||||
|
||||
// ContentBrowserClient implementation.
|
||||
virtual content::BrowserMainParts* CreateBrowserMainParts(
|
||||
const content::MainFunctionParams& parameters) OVERRIDE;
|
||||
virtual void RenderProcessWillLaunch(
|
||||
content::RenderProcessHost* host) OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* CreateRequestContext(
|
||||
content::BrowserMainParts* CreateBrowserMainParts(
|
||||
const content::MainFunctionParams& parameters) override;
|
||||
void RenderProcessWillLaunch(
|
||||
content::RenderProcessHost* host) override;
|
||||
net::URLRequestContextGetter* CreateRequestContext(
|
||||
content::BrowserContext* browser_context,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors)
|
||||
OVERRIDE;
|
||||
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||
override;
|
||||
net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||
content::BrowserContext* browser_context,
|
||||
const base::FilePath& partition_path,
|
||||
bool in_memory,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors)
|
||||
OVERRIDE;
|
||||
virtual bool IsHandledURL(const GURL& url) OVERRIDE;
|
||||
virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
|
||||
int child_process_id) OVERRIDE;
|
||||
virtual content::QuotaPermissionContext*
|
||||
CreateQuotaPermissionContext() OVERRIDE;
|
||||
virtual content::MediaObserver* GetMediaObserver() OVERRIDE;
|
||||
virtual content::SpeechRecognitionManagerDelegate*
|
||||
GetSpeechRecognitionManagerDelegate() OVERRIDE;
|
||||
virtual void AllowCertificateError(
|
||||
override;
|
||||
bool IsHandledURL(const GURL& url) override;
|
||||
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
|
||||
int child_process_id) override;
|
||||
content::QuotaPermissionContext*
|
||||
CreateQuotaPermissionContext() override;
|
||||
content::MediaObserver* GetMediaObserver() override;
|
||||
content::SpeechRecognitionManagerDelegate*
|
||||
GetSpeechRecognitionManagerDelegate() override;
|
||||
void AllowCertificateError(
|
||||
int render_process_id,
|
||||
int render_frame_id,
|
||||
int cert_error,
|
||||
@ -114,49 +114,53 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::Callback<void(bool)>& callback,
|
||||
content::CertificateRequestResultType* result) OVERRIDE;
|
||||
virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
|
||||
virtual void RequestGeolocationPermission(
|
||||
content::CertificateRequestResultType* result) override;
|
||||
content::AccessTokenStore* CreateAccessTokenStore() override;
|
||||
void RequestPermission(
|
||||
content::PermissionType permission,
|
||||
content::WebContents* web_contents,
|
||||
int bridge_id,
|
||||
const GURL& requesting_frame,
|
||||
bool user_gesture,
|
||||
base::Callback<void(bool)> result_callback,
|
||||
base::Closure* cancel_callback) OVERRIDE;
|
||||
virtual bool CanCreateWindow(const GURL& opener_url,
|
||||
const GURL& opener_top_level_frame_url,
|
||||
const GURL& source_origin,
|
||||
WindowContainerType container_type,
|
||||
const GURL& target_url,
|
||||
const content::Referrer& referrer,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::WebWindowFeatures& features,
|
||||
bool user_gesture,
|
||||
bool opener_suppressed,
|
||||
content::ResourceContext* context,
|
||||
int render_process_id,
|
||||
int opener_id,
|
||||
bool* no_javascript_access) OVERRIDE;
|
||||
virtual void ResourceDispatcherHostCreated() OVERRIDE;
|
||||
virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh,
|
||||
const GURL& url,
|
||||
content::WebPreferences* prefs) OVERRIDE;
|
||||
virtual SkColor GetBaseBackgroundColor(content::RenderViewHost* rvh) OVERRIDE;
|
||||
virtual void BrowserURLHandlerCreated(
|
||||
content::BrowserURLHandler* handler) OVERRIDE;
|
||||
virtual std::string GetDefaultDownloadName() OVERRIDE;
|
||||
virtual content::DevToolsManagerDelegate* GetDevToolsManagerDelegate()
|
||||
OVERRIDE;
|
||||
const base::Callback<void(bool)>& result_callback) override;
|
||||
void CancelPermissionRequest(content::PermissionType permission,
|
||||
content::WebContents* web_contents,
|
||||
int bridge_id,
|
||||
const GURL& requesting_frame) override;
|
||||
bool CanCreateWindow(const GURL& opener_url,
|
||||
const GURL& opener_top_level_frame_url,
|
||||
const GURL& source_origin,
|
||||
WindowContainerType container_type,
|
||||
const GURL& target_url,
|
||||
const content::Referrer& referrer,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::WebWindowFeatures& features,
|
||||
bool user_gesture,
|
||||
bool opener_suppressed,
|
||||
content::ResourceContext* context,
|
||||
int render_process_id,
|
||||
int opener_id,
|
||||
bool* no_javascript_access) override;
|
||||
void ResourceDispatcherHostCreated() override;
|
||||
void OverrideWebkitPrefs(content::RenderViewHost* rvh,
|
||||
const GURL& url,
|
||||
content::WebPreferences* prefs) override;
|
||||
SkColor GetBaseBackgroundColor(content::RenderViewHost* rvh) override;
|
||||
void BrowserURLHandlerCreated(
|
||||
content::BrowserURLHandler* handler) override;
|
||||
std::string GetDefaultDownloadName() override;
|
||||
content::DevToolsManagerDelegate* GetDevToolsManagerDelegate()
|
||||
override;
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
||||
virtual void GetAdditionalMappedFilesForChildProcess(
|
||||
void GetAdditionalMappedFilesForChildProcess(
|
||||
const base::CommandLine& command_line,
|
||||
int child_process_id,
|
||||
std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE;
|
||||
content::FileDescriptorInfo* mappings) override;
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
const wchar_t* GetResourceDllName() OVERRIDE;
|
||||
const wchar_t* GetResourceDllName() override;
|
||||
#endif
|
||||
|
||||
// Perform browser process registration for the custom scheme.
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "base/bind.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/debug/debugger.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
#include "chrome/browser/printing/print_job_manager.h"
|
||||
#include "content/public/app/content_main.h"
|
||||
|
@ -40,7 +40,7 @@ class CefContext : public content::NotificationObserver {
|
||||
typedef std::list<CefRefPtr<CefBrowserHostImpl> > BrowserList;
|
||||
|
||||
CefContext();
|
||||
~CefContext();
|
||||
~CefContext() override;
|
||||
|
||||
// Returns the singleton CefContext instance.
|
||||
static CefContext* Get();
|
||||
@ -83,9 +83,9 @@ class CefContext : public content::NotificationObserver {
|
||||
void FinalizeShutdown();
|
||||
|
||||
// NotificationObserver implementation.
|
||||
virtual void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) OVERRIDE;
|
||||
void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) override;
|
||||
|
||||
// Track context state.
|
||||
bool initialized_;
|
||||
|
@ -18,26 +18,26 @@ class CefContextMenuParamsImpl
|
||||
explicit CefContextMenuParamsImpl(content::ContextMenuParams* value);
|
||||
|
||||
// CefContextMenuParams methods.
|
||||
virtual int GetXCoord() OVERRIDE;
|
||||
virtual int GetYCoord() OVERRIDE;
|
||||
virtual TypeFlags GetTypeFlags() OVERRIDE;
|
||||
virtual CefString GetLinkUrl() OVERRIDE;
|
||||
virtual CefString GetUnfilteredLinkUrl() OVERRIDE;
|
||||
virtual CefString GetSourceUrl() OVERRIDE;
|
||||
virtual bool HasImageContents() OVERRIDE;
|
||||
virtual CefString GetPageUrl() OVERRIDE;
|
||||
virtual CefString GetFrameUrl() OVERRIDE;
|
||||
virtual CefString GetFrameCharset() OVERRIDE;
|
||||
virtual MediaType GetMediaType() OVERRIDE;
|
||||
virtual MediaStateFlags GetMediaStateFlags() OVERRIDE;
|
||||
virtual CefString GetSelectionText() OVERRIDE;
|
||||
virtual CefString GetMisspelledWord() OVERRIDE;
|
||||
virtual int GetMisspellingHash() OVERRIDE;
|
||||
virtual bool GetDictionarySuggestions(
|
||||
std::vector<CefString>& suggestions) OVERRIDE;
|
||||
virtual bool IsEditable() OVERRIDE;
|
||||
virtual bool IsSpellCheckEnabled() OVERRIDE;
|
||||
virtual EditStateFlags GetEditStateFlags() OVERRIDE;
|
||||
int GetXCoord() override;
|
||||
int GetYCoord() override;
|
||||
TypeFlags GetTypeFlags() override;
|
||||
CefString GetLinkUrl() override;
|
||||
CefString GetUnfilteredLinkUrl() override;
|
||||
CefString GetSourceUrl() override;
|
||||
bool HasImageContents() override;
|
||||
CefString GetPageUrl() override;
|
||||
CefString GetFrameUrl() override;
|
||||
CefString GetFrameCharset() override;
|
||||
MediaType GetMediaType() override;
|
||||
MediaStateFlags GetMediaStateFlags() override;
|
||||
CefString GetSelectionText() override;
|
||||
CefString GetMisspelledWord() override;
|
||||
int GetMisspellingHash() override;
|
||||
bool GetDictionarySuggestions(
|
||||
std::vector<CefString>& suggestions) override;
|
||||
bool IsEditable() override;
|
||||
bool IsSpellCheckEnabled() override;
|
||||
EditStateFlags GetEditStateFlags() override;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefContextMenuParamsImpl);
|
||||
};
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "libcef/common/time_util.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/format_macros.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
@ -63,6 +63,10 @@ class VisitCookiesCallback : public base::RefCounted<VisitCookiesCallback> {
|
||||
}
|
||||
|
||||
private:
|
||||
friend class base::RefCounted<VisitCookiesCallback>;
|
||||
|
||||
~VisitCookiesCallback() {}
|
||||
|
||||
scoped_refptr<net::CookieMonster> cookie_monster_;
|
||||
CefRefPtr<CefCookieVisitor> visitor_;
|
||||
};
|
||||
|
@ -13,25 +13,24 @@
|
||||
class CefCookieManagerImpl : public CefCookieManager {
|
||||
public:
|
||||
CefCookieManagerImpl(bool is_global);
|
||||
~CefCookieManagerImpl();
|
||||
~CefCookieManagerImpl() override;
|
||||
|
||||
// Initialize the cookie manager.
|
||||
void Initialize(const CefString& path,
|
||||
bool persist_session_cookies);
|
||||
|
||||
// CefCookieManager methods.
|
||||
virtual void SetSupportedSchemes(const std::vector<CefString>& schemes)
|
||||
OVERRIDE;
|
||||
virtual bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) OVERRIDE;
|
||||
virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly,
|
||||
CefRefPtr<CefCookieVisitor> visitor) OVERRIDE;
|
||||
virtual bool SetCookie(const CefString& url,
|
||||
const CefCookie& cookie) OVERRIDE;
|
||||
virtual bool DeleteCookies(const CefString& url,
|
||||
const CefString& cookie_name) OVERRIDE;
|
||||
virtual bool SetStoragePath(const CefString& path,
|
||||
bool persist_session_cookies) OVERRIDE;
|
||||
virtual bool FlushStore(CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
|
||||
void SetSupportedSchemes(const std::vector<CefString>& schemes) override;
|
||||
bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) override;
|
||||
bool VisitUrlCookies(const CefString& url, bool includeHttpOnly,
|
||||
CefRefPtr<CefCookieVisitor> visitor) override;
|
||||
bool SetCookie(const CefString& url,
|
||||
const CefCookie& cookie) override;
|
||||
bool DeleteCookies(const CefString& url,
|
||||
const CefString& cookie_name) override;
|
||||
bool SetStoragePath(const CefString& path,
|
||||
bool persist_session_cookies) override;
|
||||
bool FlushStore(CefRefPtr<CefCompletionCallback> callback) override;
|
||||
|
||||
net::CookieMonster* cookie_monster() { return cookie_monster_.get(); }
|
||||
|
||||
|
@ -47,7 +47,7 @@ class TCPServerSocketFactory
|
||||
|
||||
private:
|
||||
// content::DevToolsHttpHandler::ServerSocketFactory.
|
||||
virtual scoped_ptr<net::ServerSocket> Create() const OVERRIDE {
|
||||
scoped_ptr<net::ServerSocket> Create() const override {
|
||||
return scoped_ptr<net::ServerSocket>(
|
||||
new net::TCPServerSocket(NULL, net::NetLog::Source()));
|
||||
}
|
||||
@ -65,9 +65,9 @@ class Target : public content::DevToolsTarget {
|
||||
public:
|
||||
explicit Target(scoped_refptr<content::DevToolsAgentHost> agent_host);
|
||||
|
||||
virtual std::string GetId() const OVERRIDE { return agent_host_->GetId(); }
|
||||
virtual std::string GetParentId() const OVERRIDE { return std::string(); }
|
||||
virtual std::string GetType() const OVERRIDE {
|
||||
std::string GetId() const override { return agent_host_->GetId(); }
|
||||
std::string GetParentId() const override { return std::string(); }
|
||||
std::string GetType() const override {
|
||||
switch (agent_host_->GetType()) {
|
||||
case content::DevToolsAgentHost::TYPE_WEB_CONTENTS:
|
||||
return kTargetTypePage;
|
||||
@ -78,24 +78,24 @@ class Target : public content::DevToolsTarget {
|
||||
}
|
||||
return kTargetTypeOther;
|
||||
}
|
||||
virtual std::string GetTitle() const OVERRIDE {
|
||||
std::string GetTitle() const override {
|
||||
return agent_host_->GetTitle();
|
||||
}
|
||||
virtual std::string GetDescription() const OVERRIDE { return std::string(); }
|
||||
virtual GURL GetURL() const OVERRIDE { return agent_host_->GetURL(); }
|
||||
virtual GURL GetFaviconURL() const OVERRIDE { return favicon_url_; }
|
||||
virtual base::TimeTicks GetLastActivityTime() const OVERRIDE {
|
||||
std::string GetDescription() const override { return std::string(); }
|
||||
GURL GetURL() const override { return agent_host_->GetURL(); }
|
||||
GURL GetFaviconURL() const override { return favicon_url_; }
|
||||
base::TimeTicks GetLastActivityTime() const override {
|
||||
return last_activity_time_;
|
||||
}
|
||||
virtual bool IsAttached() const OVERRIDE {
|
||||
bool IsAttached() const override {
|
||||
return agent_host_->IsAttached();
|
||||
}
|
||||
virtual scoped_refptr<content::DevToolsAgentHost> GetAgentHost() const
|
||||
OVERRIDE {
|
||||
scoped_refptr<content::DevToolsAgentHost> GetAgentHost() const
|
||||
override {
|
||||
return agent_host_;
|
||||
}
|
||||
virtual bool Activate() const OVERRIDE;
|
||||
virtual bool Close() const OVERRIDE;
|
||||
bool Activate() const override;
|
||||
bool Close() const override;
|
||||
|
||||
private:
|
||||
scoped_refptr<content::DevToolsAgentHost> agent_host_;
|
||||
|
@ -24,18 +24,18 @@ class RenderViewHost;
|
||||
class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
|
||||
public:
|
||||
explicit CefDevToolsDelegate(int port);
|
||||
virtual ~CefDevToolsDelegate();
|
||||
~CefDevToolsDelegate() override;
|
||||
|
||||
// Stops http server.
|
||||
void Stop();
|
||||
|
||||
// DevToolsHttpHandlerDelegate overrides.
|
||||
virtual std::string GetDiscoveryPageHTML() OVERRIDE;
|
||||
virtual bool BundlesFrontendResources() OVERRIDE;
|
||||
virtual base::FilePath GetDebugFrontendDir() OVERRIDE;
|
||||
virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(
|
||||
std::string GetDiscoveryPageHTML() override;
|
||||
bool BundlesFrontendResources() override;
|
||||
base::FilePath GetDebugFrontendDir() override;
|
||||
scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(
|
||||
net::StreamListenSocket::Delegate* delegate,
|
||||
std::string* name) OVERRIDE;
|
||||
std::string* name) override;
|
||||
|
||||
// Returns the chrome-devtools URL.
|
||||
std::string GetChromeDevToolsURL();
|
||||
@ -50,20 +50,20 @@ class CefDevToolsManagerDelegate : public content::DevToolsManagerDelegate {
|
||||
public:
|
||||
explicit CefDevToolsManagerDelegate(
|
||||
content::BrowserContext* browser_context);
|
||||
virtual ~CefDevToolsManagerDelegate();
|
||||
~CefDevToolsManagerDelegate() override;
|
||||
|
||||
// DevToolsManagerDelegate implementation.
|
||||
virtual void Inspect(content::BrowserContext* browser_context,
|
||||
content::DevToolsAgentHost* agent_host) OVERRIDE {}
|
||||
virtual void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host,
|
||||
bool attached) OVERRIDE {}
|
||||
virtual base::DictionaryValue* HandleCommand(
|
||||
void Inspect(content::BrowserContext* browser_context,
|
||||
content::DevToolsAgentHost* agent_host) override {}
|
||||
void DevToolsAgentStateChanged(content::DevToolsAgentHost* agent_host,
|
||||
bool attached) override {}
|
||||
base::DictionaryValue* HandleCommand(
|
||||
content::DevToolsAgentHost* agent_host,
|
||||
base::DictionaryValue* command) OVERRIDE;
|
||||
virtual scoped_ptr<content::DevToolsTarget> CreateNewTarget(
|
||||
const GURL& url) OVERRIDE;
|
||||
virtual void EnumerateTargets(TargetCallback callback) OVERRIDE;
|
||||
virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE;
|
||||
base::DictionaryValue* command) override;
|
||||
scoped_ptr<content::DevToolsTarget> CreateNewTarget(
|
||||
const GURL& url) override;
|
||||
void EnumerateTargets(TargetCallback callback) override;
|
||||
std::string GetPageThumbnailData(const GURL& url) override;
|
||||
|
||||
private:
|
||||
content::BrowserContext* browser_context_;
|
||||
|
@ -42,27 +42,27 @@ class CefDevToolsFrontend : public content::WebContentsObserver,
|
||||
private:
|
||||
CefDevToolsFrontend(CefRefPtr<CefBrowserHostImpl> frontend_browser,
|
||||
content::DevToolsAgentHost* agent_host);
|
||||
virtual ~CefDevToolsFrontend();
|
||||
~CefDevToolsFrontend() override;
|
||||
|
||||
// WebContentsObserver overrides.
|
||||
virtual void RenderViewCreated(
|
||||
content::RenderViewHost* render_view_host) OVERRIDE;
|
||||
virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE;
|
||||
virtual void WebContentsDestroyed() OVERRIDE;
|
||||
void RenderViewCreated(
|
||||
content::RenderViewHost* render_view_host) override;
|
||||
void DocumentOnLoadCompletedInMainFrame() override;
|
||||
void WebContentsDestroyed() override;
|
||||
|
||||
// content::DevToolsFrontendHost::Delegate implementation.
|
||||
virtual void HandleMessageFromDevToolsFrontend(
|
||||
const std::string& message) OVERRIDE;
|
||||
virtual void HandleMessageFromDevToolsFrontendToBackend(
|
||||
const std::string& message) OVERRIDE;
|
||||
void HandleMessageFromDevToolsFrontend(
|
||||
const std::string& message) override;
|
||||
void HandleMessageFromDevToolsFrontendToBackend(
|
||||
const std::string& message) override;
|
||||
|
||||
// content::DevToolsAgentHostClient implementation.
|
||||
virtual void DispatchProtocolMessage(
|
||||
void DispatchProtocolMessage(
|
||||
content::DevToolsAgentHost* agent_host,
|
||||
const std::string& message) OVERRIDE;
|
||||
virtual void AgentHostClosed(
|
||||
const std::string& message) override;
|
||||
void AgentHostClosed(
|
||||
content::DevToolsAgentHost* agent_host,
|
||||
bool replaced) OVERRIDE;
|
||||
bool replaced) override;
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> frontend_browser_;
|
||||
scoped_refptr<content::DevToolsAgentHost> agent_host_;
|
||||
|
@ -22,8 +22,8 @@ class Delegate : public InternalHandlerDelegate {
|
||||
public:
|
||||
Delegate() {}
|
||||
|
||||
virtual bool OnRequest(CefRefPtr<CefRequest> request,
|
||||
Action* action) OVERRIDE {
|
||||
bool OnRequest(CefRefPtr<CefRequest> request,
|
||||
Action* action) override {
|
||||
GURL url = GURL(request->GetURL().ToString());
|
||||
std::string path = url.path();
|
||||
if (path.length() > 0)
|
||||
|
@ -20,22 +20,22 @@ class CefDownloadItemImpl
|
||||
explicit CefDownloadItemImpl(content::DownloadItem* value);
|
||||
|
||||
// CefDownloadItem methods.
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual bool IsInProgress() OVERRIDE;
|
||||
virtual bool IsComplete() OVERRIDE;
|
||||
virtual bool IsCanceled() OVERRIDE;
|
||||
virtual int64 GetCurrentSpeed() OVERRIDE;
|
||||
virtual int GetPercentComplete() OVERRIDE;
|
||||
virtual int64 GetTotalBytes() OVERRIDE;
|
||||
virtual int64 GetReceivedBytes() OVERRIDE;
|
||||
virtual CefTime GetStartTime() OVERRIDE;
|
||||
virtual CefTime GetEndTime() OVERRIDE;
|
||||
virtual CefString GetFullPath() OVERRIDE;
|
||||
virtual uint32 GetId() OVERRIDE;
|
||||
virtual CefString GetURL() OVERRIDE;
|
||||
virtual CefString GetSuggestedFileName() OVERRIDE;
|
||||
virtual CefString GetContentDisposition() OVERRIDE;
|
||||
virtual CefString GetMimeType() OVERRIDE;
|
||||
bool IsValid() override;
|
||||
bool IsInProgress() override;
|
||||
bool IsComplete() override;
|
||||
bool IsCanceled() override;
|
||||
int64 GetCurrentSpeed() override;
|
||||
int GetPercentComplete() override;
|
||||
int64 GetTotalBytes() override;
|
||||
int64 GetReceivedBytes() override;
|
||||
CefTime GetStartTime() override;
|
||||
CefTime GetEndTime() override;
|
||||
CefString GetFullPath() override;
|
||||
uint32 GetId() override;
|
||||
CefString GetURL() override;
|
||||
CefString GetSuggestedFileName() override;
|
||||
CefString GetContentDisposition() override;
|
||||
CefString GetMimeType() override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(CefDownloadItemImpl);
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "libcef/browser/thread_util.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@ -62,8 +62,8 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
|
||||
callback_(callback) {
|
||||
}
|
||||
|
||||
virtual void Continue(const CefString& download_path,
|
||||
bool show_dialog) OVERRIDE {
|
||||
void Continue(const CefString& download_path,
|
||||
bool show_dialog) override {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (download_id_ <= 0)
|
||||
return;
|
||||
@ -203,7 +203,7 @@ class CefDownloadItemCallbackImpl : public CefDownloadItemCallback {
|
||||
download_id_(download_id) {
|
||||
}
|
||||
|
||||
virtual void Cancel() OVERRIDE {
|
||||
void Cancel() override {
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::Bind(&CefDownloadItemCallbackImpl::DoCancel, this));
|
||||
}
|
||||
|
@ -20,23 +20,23 @@ class CefDownloadManagerDelegate
|
||||
public content::DownloadManagerDelegate {
|
||||
public:
|
||||
explicit CefDownloadManagerDelegate(content::DownloadManager* manager);
|
||||
~CefDownloadManagerDelegate();
|
||||
~CefDownloadManagerDelegate() override;
|
||||
|
||||
private:
|
||||
// DownloadItem::Observer methods.
|
||||
virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE;
|
||||
virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE;
|
||||
void OnDownloadUpdated(content::DownloadItem* download) override;
|
||||
void OnDownloadDestroyed(content::DownloadItem* download) override;
|
||||
|
||||
// DownloadManager::Observer methods.
|
||||
virtual void OnDownloadCreated(content::DownloadManager* manager,
|
||||
content::DownloadItem* item) OVERRIDE;
|
||||
virtual void ManagerGoingDown(content::DownloadManager* manager) OVERRIDE;
|
||||
void OnDownloadCreated(content::DownloadManager* manager,
|
||||
content::DownloadItem* item) override;
|
||||
void ManagerGoingDown(content::DownloadManager* manager) override;
|
||||
|
||||
// DownloadManagerDelegate methods.
|
||||
virtual bool DetermineDownloadTarget(
|
||||
bool DetermineDownloadTarget(
|
||||
content::DownloadItem* item,
|
||||
const content::DownloadTargetCallback& callback) OVERRIDE;
|
||||
virtual void GetNextId(const content::DownloadIdCallback& callback) OVERRIDE;
|
||||
const content::DownloadTargetCallback& callback) override;
|
||||
void GetNextId(const content::DownloadIdCallback& callback) override;
|
||||
|
||||
content::DownloadManager* manager_;
|
||||
base::WeakPtrFactory<content::DownloadManager> manager_ptr_factory_;
|
||||
|
@ -17,7 +17,7 @@ class StringVisitHandler : public CefResponseManager::Handler {
|
||||
explicit StringVisitHandler(CefRefPtr<CefStringVisitor> visitor)
|
||||
: visitor_(visitor) {
|
||||
}
|
||||
virtual void OnResponse(const Cef_Response_Params& params) OVERRIDE {
|
||||
void OnResponse(const Cef_Response_Params& params) override {
|
||||
visitor_->Visit(params.response);
|
||||
}
|
||||
private:
|
||||
@ -32,7 +32,7 @@ class ViewTextHandler : public CefResponseManager::Handler {
|
||||
explicit ViewTextHandler(CefRefPtr<CefFrameHostImpl> 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();
|
||||
if (browser.get()) {
|
||||
static_cast<CefBrowserHostImpl*>(browser.get())->ViewText(
|
||||
|
@ -24,36 +24,36 @@ class CefFrameHostImpl : public CefFrame {
|
||||
const CefString& url,
|
||||
const CefString& name,
|
||||
int64 parent_frame_id);
|
||||
virtual ~CefFrameHostImpl();
|
||||
~CefFrameHostImpl() override;
|
||||
|
||||
// CefFrame methods
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual void Undo() OVERRIDE;
|
||||
virtual void Redo() OVERRIDE;
|
||||
virtual void Cut() OVERRIDE;
|
||||
virtual void Copy() OVERRIDE;
|
||||
virtual void Paste() OVERRIDE;
|
||||
virtual void Delete() OVERRIDE;
|
||||
virtual void SelectAll() OVERRIDE;
|
||||
virtual void ViewSource() OVERRIDE;
|
||||
virtual void GetSource(CefRefPtr<CefStringVisitor> visitor) OVERRIDE;
|
||||
virtual void GetText(CefRefPtr<CefStringVisitor> visitor) OVERRIDE;
|
||||
virtual void LoadRequest(CefRefPtr<CefRequest> request) OVERRIDE;
|
||||
virtual void LoadURL(const CefString& url) OVERRIDE;
|
||||
virtual void LoadString(const CefString& string,
|
||||
const CefString& url) OVERRIDE;
|
||||
virtual void ExecuteJavaScript(const CefString& jsCode,
|
||||
const CefString& scriptUrl,
|
||||
int startLine) OVERRIDE;
|
||||
virtual bool IsMain() OVERRIDE;
|
||||
virtual bool IsFocused() OVERRIDE;
|
||||
virtual CefString GetName() OVERRIDE;
|
||||
virtual int64 GetIdentifier() OVERRIDE;
|
||||
virtual CefRefPtr<CefFrame> GetParent() OVERRIDE;
|
||||
virtual CefString GetURL() OVERRIDE;
|
||||
virtual CefRefPtr<CefBrowser> GetBrowser() OVERRIDE;
|
||||
virtual CefRefPtr<CefV8Context> GetV8Context() OVERRIDE;
|
||||
virtual void VisitDOM(CefRefPtr<CefDOMVisitor> visitor) OVERRIDE;
|
||||
bool IsValid() override;
|
||||
void Undo() override;
|
||||
void Redo() override;
|
||||
void Cut() override;
|
||||
void Copy() override;
|
||||
void Paste() override;
|
||||
void Delete() override;
|
||||
void SelectAll() override;
|
||||
void ViewSource() override;
|
||||
void GetSource(CefRefPtr<CefStringVisitor> visitor) override;
|
||||
void GetText(CefRefPtr<CefStringVisitor> visitor) override;
|
||||
void LoadRequest(CefRefPtr<CefRequest> request) override;
|
||||
void LoadURL(const CefString& url) override;
|
||||
void LoadString(const CefString& string,
|
||||
const CefString& url) override;
|
||||
void ExecuteJavaScript(const CefString& jsCode,
|
||||
const CefString& scriptUrl,
|
||||
int startLine) override;
|
||||
bool IsMain() override;
|
||||
bool IsFocused() override;
|
||||
CefString GetName() override;
|
||||
int64 GetIdentifier() override;
|
||||
CefRefPtr<CefFrame> GetParent() override;
|
||||
CefString GetURL() override;
|
||||
CefRefPtr<CefBrowser> GetBrowser() override;
|
||||
CefRefPtr<CefV8Context> GetV8Context() override;
|
||||
void VisitDOM(CefRefPtr<CefDOMVisitor> visitor) override;
|
||||
|
||||
void SetFocused(bool focused);
|
||||
void SetAttributes(const CefString& url,
|
||||
|
@ -26,6 +26,10 @@ class CefLocationRequest :
|
||||
}
|
||||
|
||||
private:
|
||||
friend class base::RefCountedThreadSafe<CefLocationRequest>;
|
||||
|
||||
~CefLocationRequest() {}
|
||||
|
||||
void OnLocationUpdate(const content::Geoposition& position) {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (callback_.get()) {
|
||||
|
@ -37,27 +37,27 @@ class RedirectHandler : public CefResourceHandler {
|
||||
: url_(url) {
|
||||
}
|
||||
|
||||
virtual bool ProcessRequest(CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefCallback> callback) OVERRIDE {
|
||||
bool ProcessRequest(CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefCallback> callback) override {
|
||||
callback->Continue();
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,
|
||||
int64& response_length,
|
||||
CefString& redirectUrl) OVERRIDE {
|
||||
void GetResponseHeaders(CefRefPtr<CefResponse> response,
|
||||
int64& response_length,
|
||||
CefString& redirectUrl) override {
|
||||
response_length = 0;
|
||||
redirectUrl = url_.spec();
|
||||
}
|
||||
|
||||
virtual bool ReadResponse(void* data_out,
|
||||
int bytes_to_read,
|
||||
int& bytes_read,
|
||||
CefRefPtr<CefCallback> callback) OVERRIDE {
|
||||
bool ReadResponse(void* data_out,
|
||||
int bytes_to_read,
|
||||
int& bytes_read,
|
||||
CefRefPtr<CefCallback> callback) override {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void Cancel() OVERRIDE {
|
||||
void Cancel() override {
|
||||
}
|
||||
|
||||
private:
|
||||
@ -76,30 +76,30 @@ class InternalHandler : public CefResourceHandler {
|
||||
size_(size) {
|
||||
}
|
||||
|
||||
virtual bool ProcessRequest(CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefCallback> callback) OVERRIDE {
|
||||
bool ProcessRequest(CefRefPtr<CefRequest> request,
|
||||
CefRefPtr<CefCallback> callback) override {
|
||||
callback->Continue();
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,
|
||||
int64& response_length,
|
||||
CefString& redirectUrl) OVERRIDE {
|
||||
void GetResponseHeaders(CefRefPtr<CefResponse> response,
|
||||
int64& response_length,
|
||||
CefString& redirectUrl) override {
|
||||
response_length = size_;
|
||||
|
||||
response->SetMimeType(mime_type_);
|
||||
response->SetStatus(200);
|
||||
}
|
||||
|
||||
virtual bool ReadResponse(void* data_out,
|
||||
int bytes_to_read,
|
||||
int& bytes_read,
|
||||
CefRefPtr<CefCallback> callback) OVERRIDE {
|
||||
bool ReadResponse(void* data_out,
|
||||
int bytes_to_read,
|
||||
int& bytes_read,
|
||||
CefRefPtr<CefCallback> callback) override {
|
||||
bytes_read = reader_->Read(data_out, 1, bytes_to_read);
|
||||
return (bytes_read > 0);
|
||||
}
|
||||
|
||||
virtual void Cancel() OVERRIDE {
|
||||
void Cancel() override {
|
||||
}
|
||||
|
||||
private:
|
||||
@ -117,11 +117,11 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory {
|
||||
: delegate_(delegate.Pass()) {
|
||||
}
|
||||
|
||||
virtual CefRefPtr<CefResourceHandler> Create(
|
||||
CefRefPtr<CefResourceHandler> Create(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
const CefString& scheme_name,
|
||||
CefRefPtr<CefRequest> request) OVERRIDE {
|
||||
CefRefPtr<CefRequest> request) override {
|
||||
GURL url = GURL(request->GetURL().ToString());
|
||||
|
||||
InternalHandlerDelegate::Action action;
|
||||
|
@ -21,7 +21,7 @@ class CefJSDialogCallbackImpl : public CefJSDialogCallback {
|
||||
const content::JavaScriptDialogManager::DialogClosedCallback& callback)
|
||||
: callback_(callback) {
|
||||
}
|
||||
~CefJSDialogCallbackImpl() {
|
||||
~CefJSDialogCallbackImpl() override {
|
||||
if (!callback_.is_null()) {
|
||||
// The callback is still pending. Cancel it now.
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
@ -33,8 +33,8 @@ class CefJSDialogCallbackImpl : public CefJSDialogCallback {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Continue(bool success,
|
||||
const CefString& user_input) OVERRIDE {
|
||||
void Continue(bool success,
|
||||
const CefString& user_input) override {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (!callback_.is_null()) {
|
||||
callback_.Run(success, user_input);
|
||||
|
@ -19,10 +19,10 @@ class CefJavaScriptDialog;
|
||||
class CefJavaScriptDialogManager : public content::JavaScriptDialogManager {
|
||||
public:
|
||||
explicit CefJavaScriptDialogManager(CefBrowserHostImpl* browser);
|
||||
virtual ~CefJavaScriptDialogManager();
|
||||
~CefJavaScriptDialogManager() override;
|
||||
|
||||
// JavaScriptDialogManager methods.
|
||||
virtual void RunJavaScriptDialog(
|
||||
void RunJavaScriptDialog(
|
||||
content::WebContents* web_contents,
|
||||
const GURL& origin_url,
|
||||
const std::string& accept_lang,
|
||||
@ -30,19 +30,19 @@ class CefJavaScriptDialogManager : public content::JavaScriptDialogManager {
|
||||
const base::string16& message_text,
|
||||
const base::string16& default_prompt_text,
|
||||
const DialogClosedCallback& callback,
|
||||
bool* did_suppress_message) OVERRIDE;
|
||||
bool* did_suppress_message) override;
|
||||
|
||||
virtual void RunBeforeUnloadDialog(
|
||||
void RunBeforeUnloadDialog(
|
||||
content::WebContents* web_contents,
|
||||
const base::string16& message_text,
|
||||
bool is_reload,
|
||||
const DialogClosedCallback& callback) OVERRIDE;
|
||||
const DialogClosedCallback& callback) override;
|
||||
|
||||
virtual void CancelActiveAndPendingDialogs(
|
||||
content::WebContents* web_contents) OVERRIDE;
|
||||
void CancelActiveAndPendingDialogs(
|
||||
content::WebContents* web_contents) override;
|
||||
|
||||
virtual void WebContentsDestroyed(
|
||||
content::WebContents* web_contents) OVERRIDE;
|
||||
void WebContentsDestroyed(
|
||||
content::WebContents* web_contents) override;
|
||||
|
||||
// Called by the CefJavaScriptDialog when it closes.
|
||||
void DialogClosed(CefJavaScriptDialog* dialog);
|
||||
|
@ -42,23 +42,23 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
|
||||
content::MediaStreamDevices* devices);
|
||||
|
||||
// Overridden from content::MediaObserver:
|
||||
virtual void OnAudioCaptureDevicesChanged() OVERRIDE;
|
||||
virtual void OnVideoCaptureDevicesChanged() OVERRIDE;
|
||||
virtual void OnMediaRequestStateChanged(
|
||||
void OnAudioCaptureDevicesChanged() override;
|
||||
void OnVideoCaptureDevicesChanged() override;
|
||||
void OnMediaRequestStateChanged(
|
||||
int render_process_id,
|
||||
int render_frame_id,
|
||||
int page_request_id,
|
||||
const GURL& security_origin,
|
||||
content::MediaStreamType stream_type,
|
||||
content::MediaRequestState state) OVERRIDE;
|
||||
virtual void OnCreatingAudioStream(int render_process_id,
|
||||
int render_view_id) OVERRIDE;
|
||||
content::MediaRequestState state) override;
|
||||
void OnCreatingAudioStream(int render_process_id,
|
||||
int render_view_id) override;
|
||||
|
||||
private:
|
||||
friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>;
|
||||
|
||||
CefMediaCaptureDevicesDispatcher();
|
||||
virtual ~CefMediaCaptureDevicesDispatcher();
|
||||
~CefMediaCaptureDevicesDispatcher() override;
|
||||
|
||||
const content::MediaStreamDevices& GetAudioCaptureDevices();
|
||||
const content::MediaStreamDevices& GetVideoCaptureDevices();
|
||||
|
@ -29,7 +29,7 @@ class CefMenuCreator : public CefMenuModelImpl::Delegate {
|
||||
};
|
||||
|
||||
explicit CefMenuCreator(CefBrowserHostImpl* browser);
|
||||
virtual ~CefMenuCreator();
|
||||
~CefMenuCreator() override;
|
||||
|
||||
// Returns true if the context menu is currently showing.
|
||||
bool IsShowingContextMenu();
|
||||
@ -47,12 +47,12 @@ class CefMenuCreator : public CefMenuModelImpl::Delegate {
|
||||
bool CreateRunner();
|
||||
|
||||
// CefMenuModelImpl::Delegate methods.
|
||||
virtual void ExecuteCommand(CefRefPtr<CefMenuModelImpl> source,
|
||||
int command_id,
|
||||
cef_event_flags_t event_flags) OVERRIDE;
|
||||
virtual void MenuWillShow(CefRefPtr<CefMenuModelImpl> source) OVERRIDE;
|
||||
virtual void MenuClosed(CefRefPtr<CefMenuModelImpl> source) OVERRIDE;
|
||||
virtual bool FormatLabel(base::string16& label) OVERRIDE;
|
||||
void ExecuteCommand(CefRefPtr<CefMenuModelImpl> source,
|
||||
int command_id,
|
||||
cef_event_flags_t event_flags) override;
|
||||
void MenuWillShow(CefRefPtr<CefMenuModelImpl> source) override;
|
||||
void MenuClosed(CefRefPtr<CefMenuModelImpl> source) override;
|
||||
bool FormatLabel(base::string16& label) override;
|
||||
|
||||
// Create the default menu model.
|
||||
void CreateDefaultModel();
|
||||
|
@ -14,12 +14,12 @@
|
||||
class CefMenuCreatorRunnerLinux: public CefMenuCreator::Runner {
|
||||
public:
|
||||
CefMenuCreatorRunnerLinux();
|
||||
virtual ~CefMenuCreatorRunnerLinux();
|
||||
~CefMenuCreatorRunnerLinux() override;
|
||||
|
||||
// CefMemoryManager::Runner methods.
|
||||
virtual bool RunContextMenu(CefMenuCreator* manager) OVERRIDE;
|
||||
virtual void CancelContextMenu() OVERRIDE;
|
||||
virtual bool FormatLabel(base::string16& label) OVERRIDE;
|
||||
bool RunContextMenu(CefMenuCreator* manager) override;
|
||||
void CancelContextMenu() override;
|
||||
bool FormatLabel(base::string16& label) override;
|
||||
|
||||
private:
|
||||
scoped_ptr<views::MenuRunner> menu_;
|
||||
|
@ -17,10 +17,10 @@ class MenuController;
|
||||
class CefMenuCreatorRunnerMac : public CefMenuCreator::Runner {
|
||||
public:
|
||||
CefMenuCreatorRunnerMac();
|
||||
virtual ~CefMenuCreatorRunnerMac();
|
||||
~CefMenuCreatorRunnerMac() override;
|
||||
|
||||
// CefMemoryManager::Runner methods.
|
||||
virtual bool RunContextMenu(CefMenuCreator* manager) OVERRIDE;
|
||||
bool RunContextMenu(CefMenuCreator* manager) override;
|
||||
|
||||
private:
|
||||
MenuController* menu_controller_;
|
||||
|
@ -16,7 +16,7 @@ class CefMenuCreatorRunnerWin : public CefMenuCreator::Runner {
|
||||
CefMenuCreatorRunnerWin();
|
||||
|
||||
// CefMemoryManager::Runner methods.
|
||||
virtual bool RunContextMenu(CefMenuCreator* manager) OVERRIDE;
|
||||
bool RunContextMenu(CefMenuCreator* manager) override;
|
||||
|
||||
private:
|
||||
scoped_ptr<views::NativeMenuWin> menu_;
|
||||
|
@ -26,19 +26,16 @@ class CefSimpleMenuModel : public ui::MenuModel {
|
||||
menu_model_delegate_(NULL) {
|
||||
}
|
||||
|
||||
virtual ~CefSimpleMenuModel() {
|
||||
}
|
||||
|
||||
// MenuModel methods.
|
||||
virtual bool HasIcons() const OVERRIDE {
|
||||
bool HasIcons() const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual int GetItemCount() const OVERRIDE {
|
||||
int GetItemCount() const override {
|
||||
return impl_->GetCount();
|
||||
}
|
||||
|
||||
virtual ItemType GetTypeAt(int index) const OVERRIDE {
|
||||
ItemType GetTypeAt(int index) const override {
|
||||
switch (impl_->GetTypeAt(index)) {
|
||||
case MENUITEMTYPE_COMMAND:
|
||||
return TYPE_COMMAND;
|
||||
@ -56,24 +53,24 @@ class CefSimpleMenuModel : public ui::MenuModel {
|
||||
}
|
||||
}
|
||||
|
||||
virtual ui::MenuSeparatorType GetSeparatorTypeAt(int index) const OVERRIDE {
|
||||
ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override {
|
||||
return ui::NORMAL_SEPARATOR;
|
||||
}
|
||||
|
||||
virtual int GetCommandIdAt(int index) const OVERRIDE {
|
||||
int GetCommandIdAt(int index) const override {
|
||||
return impl_->GetCommandIdAt(index);
|
||||
}
|
||||
|
||||
virtual base::string16 GetLabelAt(int index) const OVERRIDE {
|
||||
base::string16 GetLabelAt(int index) const override {
|
||||
return impl_->GetFormattedLabelAt(index);
|
||||
}
|
||||
|
||||
virtual bool IsItemDynamicAt(int index) const OVERRIDE {
|
||||
bool IsItemDynamicAt(int index) const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool GetAcceleratorAt(int index,
|
||||
ui::Accelerator* accelerator) const OVERRIDE {
|
||||
bool GetAcceleratorAt(int index,
|
||||
ui::Accelerator* accelerator) const override {
|
||||
int key_code = 0;
|
||||
bool shift_pressed = false;
|
||||
bool ctrl_pressed = false;
|
||||
@ -95,63 +92,63 @@ class CefSimpleMenuModel : public ui::MenuModel {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool IsItemCheckedAt(int index) const OVERRIDE {
|
||||
bool IsItemCheckedAt(int index) const override {
|
||||
return impl_->IsCheckedAt(index);
|
||||
}
|
||||
|
||||
virtual int GetGroupIdAt(int index) const OVERRIDE {
|
||||
int GetGroupIdAt(int index) const override {
|
||||
return impl_->GetGroupIdAt(index);
|
||||
}
|
||||
|
||||
virtual bool GetIconAt(int index, gfx::Image* icon) OVERRIDE {
|
||||
bool GetIconAt(int index, gfx::Image* icon) override {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual ui::ButtonMenuItemModel* GetButtonMenuItemAt(
|
||||
int index) const OVERRIDE {
|
||||
ui::ButtonMenuItemModel* GetButtonMenuItemAt(
|
||||
int index) const override {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virtual bool IsEnabledAt(int index) const OVERRIDE {
|
||||
bool IsEnabledAt(int index) const override {
|
||||
return impl_->IsEnabledAt(index);
|
||||
}
|
||||
|
||||
virtual bool IsVisibleAt(int index) const OVERRIDE {
|
||||
bool IsVisibleAt(int index) const override {
|
||||
return impl_->IsVisibleAt(index);
|
||||
}
|
||||
|
||||
virtual void HighlightChangedTo(int index) OVERRIDE {
|
||||
void HighlightChangedTo(int index) override {
|
||||
}
|
||||
|
||||
virtual void ActivatedAt(int index) OVERRIDE {
|
||||
void ActivatedAt(int index) override {
|
||||
ActivatedAt(index, 0);
|
||||
}
|
||||
|
||||
virtual void ActivatedAt(int index, int event_flags) OVERRIDE {
|
||||
void ActivatedAt(int index, int event_flags) override {
|
||||
impl_->ActivatedAt(index, static_cast<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);
|
||||
if (submenu.get())
|
||||
return static_cast<CefMenuModelImpl*>(submenu.get())->model();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
virtual void MenuWillShow() OVERRIDE {
|
||||
void MenuWillShow() override {
|
||||
impl_->MenuWillShow();
|
||||
}
|
||||
|
||||
virtual void MenuClosed() OVERRIDE {
|
||||
void MenuClosed() override {
|
||||
impl_->MenuClosed();
|
||||
}
|
||||
|
||||
virtual void SetMenuModelDelegate(
|
||||
ui::MenuModelDelegate* menu_model_delegate) OVERRIDE {
|
||||
void SetMenuModelDelegate(
|
||||
ui::MenuModelDelegate* menu_model_delegate) override {
|
||||
menu_model_delegate_ = menu_model_delegate;
|
||||
}
|
||||
|
||||
virtual ui::MenuModelDelegate* GetMenuModelDelegate() const OVERRIDE {
|
||||
ui::MenuModelDelegate* GetMenuModelDelegate() const override {
|
||||
return menu_model_delegate_;
|
||||
}
|
||||
|
||||
|
@ -40,68 +40,68 @@ class CefMenuModelImpl : public CefMenuModel {
|
||||
|
||||
// The delegate must outlive this class.
|
||||
explicit CefMenuModelImpl(Delegate* delegate);
|
||||
virtual ~CefMenuModelImpl();
|
||||
~CefMenuModelImpl() override;
|
||||
|
||||
// CefMenuModel methods.
|
||||
virtual bool Clear() OVERRIDE;
|
||||
virtual int GetCount() OVERRIDE;
|
||||
virtual bool AddSeparator() OVERRIDE;
|
||||
virtual bool AddItem(int command_id, const CefString& label) OVERRIDE;
|
||||
virtual bool AddCheckItem(int command_id, const CefString& label) OVERRIDE;
|
||||
virtual bool AddRadioItem(int command_id, const CefString& label,
|
||||
int group_id) OVERRIDE;
|
||||
virtual CefRefPtr<CefMenuModel> AddSubMenu(int command_id,
|
||||
const CefString& label) OVERRIDE;
|
||||
virtual bool InsertSeparatorAt(int index) OVERRIDE;
|
||||
virtual bool InsertItemAt(int index, int command_id,
|
||||
const CefString& label) OVERRIDE;
|
||||
virtual bool InsertCheckItemAt(int index, int command_id,
|
||||
const CefString& label) OVERRIDE;
|
||||
virtual bool InsertRadioItemAt(int index, int command_id,
|
||||
const CefString& label, int group_id) OVERRIDE;
|
||||
virtual CefRefPtr<CefMenuModel> InsertSubMenuAt(int index, int command_id,
|
||||
const CefString& label) OVERRIDE;
|
||||
virtual bool Remove(int command_id) OVERRIDE;
|
||||
virtual bool RemoveAt(int index) OVERRIDE;
|
||||
virtual int GetIndexOf(int command_id) OVERRIDE;
|
||||
virtual int GetCommandIdAt(int index) OVERRIDE;
|
||||
virtual bool SetCommandIdAt(int index, int command_id) OVERRIDE;
|
||||
virtual CefString GetLabel(int command_id) OVERRIDE;
|
||||
virtual CefString GetLabelAt(int index) OVERRIDE;
|
||||
virtual bool SetLabel(int command_id, const CefString& label) OVERRIDE;
|
||||
virtual bool SetLabelAt(int index, const CefString& label) OVERRIDE;
|
||||
virtual MenuItemType GetType(int command_id) OVERRIDE;
|
||||
virtual MenuItemType GetTypeAt(int index) OVERRIDE;
|
||||
virtual int GetGroupId(int command_id) OVERRIDE;
|
||||
virtual int GetGroupIdAt(int index) OVERRIDE;
|
||||
virtual bool SetGroupId(int command_id, int group_id) OVERRIDE;
|
||||
virtual bool SetGroupIdAt(int index, int group_id) OVERRIDE;
|
||||
virtual CefRefPtr<CefMenuModel> GetSubMenu(int command_id) OVERRIDE;
|
||||
virtual CefRefPtr<CefMenuModel> GetSubMenuAt(int index) OVERRIDE;
|
||||
virtual bool IsVisible(int command_id) OVERRIDE;
|
||||
virtual bool IsVisibleAt(int index) OVERRIDE;
|
||||
virtual bool SetVisible(int command_id, bool visible) OVERRIDE;
|
||||
virtual bool SetVisibleAt(int index, bool visible) OVERRIDE;
|
||||
virtual bool IsEnabled(int command_id) OVERRIDE;
|
||||
virtual bool IsEnabledAt(int index) OVERRIDE;
|
||||
virtual bool SetEnabled(int command_id, bool enabled) OVERRIDE;
|
||||
virtual bool SetEnabledAt(int index, bool enabled) OVERRIDE;
|
||||
virtual bool IsChecked(int command_id) OVERRIDE;
|
||||
virtual bool IsCheckedAt(int index) OVERRIDE;
|
||||
virtual bool SetChecked(int command_id, bool checked) OVERRIDE;
|
||||
virtual bool SetCheckedAt(int index, bool checked) OVERRIDE;
|
||||
virtual bool HasAccelerator(int command_id) OVERRIDE;
|
||||
virtual bool HasAcceleratorAt(int index) OVERRIDE;
|
||||
virtual bool SetAccelerator(int command_id, int key_code, bool shift_pressed,
|
||||
bool ctrl_pressed, bool alt_pressed) OVERRIDE;
|
||||
virtual bool SetAcceleratorAt(int index, int key_code, bool shift_pressed,
|
||||
bool ctrl_pressed, bool alt_pressed) OVERRIDE;
|
||||
virtual bool RemoveAccelerator(int command_id) OVERRIDE;
|
||||
virtual bool RemoveAcceleratorAt(int index) OVERRIDE;
|
||||
virtual bool GetAccelerator(int command_id, int& key_code,
|
||||
bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) OVERRIDE;
|
||||
virtual bool GetAcceleratorAt(int index, int& key_code, bool& shift_pressed,
|
||||
bool& ctrl_pressed, bool& alt_pressed) OVERRIDE;
|
||||
bool Clear() override;
|
||||
int GetCount() override;
|
||||
bool AddSeparator() override;
|
||||
bool AddItem(int command_id, const CefString& label) override;
|
||||
bool AddCheckItem(int command_id, const CefString& label) override;
|
||||
bool AddRadioItem(int command_id, const CefString& label,
|
||||
int group_id) override;
|
||||
CefRefPtr<CefMenuModel> AddSubMenu(int command_id,
|
||||
const CefString& label) override;
|
||||
bool InsertSeparatorAt(int index) override;
|
||||
bool InsertItemAt(int index, int command_id,
|
||||
const CefString& label) override;
|
||||
bool InsertCheckItemAt(int index, int command_id,
|
||||
const CefString& label) override;
|
||||
bool InsertRadioItemAt(int index, int command_id,
|
||||
const CefString& label, int group_id) override;
|
||||
CefRefPtr<CefMenuModel> InsertSubMenuAt(int index, int command_id,
|
||||
const CefString& label) override;
|
||||
bool Remove(int command_id) override;
|
||||
bool RemoveAt(int index) override;
|
||||
int GetIndexOf(int command_id) override;
|
||||
int GetCommandIdAt(int index) override;
|
||||
bool SetCommandIdAt(int index, int command_id) override;
|
||||
CefString GetLabel(int command_id) override;
|
||||
CefString GetLabelAt(int index) override;
|
||||
bool SetLabel(int command_id, const CefString& label) override;
|
||||
bool SetLabelAt(int index, const CefString& label) override;
|
||||
MenuItemType GetType(int command_id) override;
|
||||
MenuItemType GetTypeAt(int index) override;
|
||||
int GetGroupId(int command_id) override;
|
||||
int GetGroupIdAt(int index) override;
|
||||
bool SetGroupId(int command_id, int group_id) override;
|
||||
bool SetGroupIdAt(int index, int group_id) override;
|
||||
CefRefPtr<CefMenuModel> GetSubMenu(int command_id) override;
|
||||
CefRefPtr<CefMenuModel> GetSubMenuAt(int index) override;
|
||||
bool IsVisible(int command_id) override;
|
||||
bool IsVisibleAt(int index) override;
|
||||
bool SetVisible(int command_id, bool visible) override;
|
||||
bool SetVisibleAt(int index, bool visible) override;
|
||||
bool IsEnabled(int command_id) override;
|
||||
bool IsEnabledAt(int index) override;
|
||||
bool SetEnabled(int command_id, bool enabled) override;
|
||||
bool SetEnabledAt(int index, bool enabled) override;
|
||||
bool IsChecked(int command_id) override;
|
||||
bool IsCheckedAt(int index) override;
|
||||
bool SetChecked(int command_id, bool checked) override;
|
||||
bool SetCheckedAt(int index, bool checked) override;
|
||||
bool HasAccelerator(int command_id) override;
|
||||
bool HasAcceleratorAt(int index) override;
|
||||
bool SetAccelerator(int command_id, int key_code, bool shift_pressed,
|
||||
bool ctrl_pressed, bool alt_pressed) override;
|
||||
bool SetAcceleratorAt(int index, int key_code, bool shift_pressed,
|
||||
bool ctrl_pressed, bool alt_pressed) override;
|
||||
bool RemoveAccelerator(int command_id) override;
|
||||
bool RemoveAcceleratorAt(int index) override;
|
||||
bool GetAccelerator(int command_id, int& key_code,
|
||||
bool& shift_pressed, bool& ctrl_pressed, bool& alt_pressed) override;
|
||||
bool GetAcceleratorAt(int index, int& key_code, bool& shift_pressed,
|
||||
bool& ctrl_pressed, bool& alt_pressed) override;
|
||||
|
||||
// Callbacks from the ui::MenuModel implementation.
|
||||
void ActivatedAt(int index, cef_event_flags_t event_flags);
|
||||
|
@ -20,32 +20,32 @@ class CefPrintSettingsImpl
|
||||
bool read_only);
|
||||
|
||||
// CefPrintSettings methods.
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual CefRefPtr<CefPrintSettings> Copy() OVERRIDE;
|
||||
virtual void SetOrientation(bool landscape) OVERRIDE;
|
||||
virtual bool IsLandscape() OVERRIDE;
|
||||
virtual void SetPrinterPrintableArea(
|
||||
bool IsValid() override;
|
||||
bool IsReadOnly() override;
|
||||
CefRefPtr<CefPrintSettings> Copy() override;
|
||||
void SetOrientation(bool landscape) override;
|
||||
bool IsLandscape() override;
|
||||
void SetPrinterPrintableArea(
|
||||
const CefSize& physical_size_device_units,
|
||||
const CefRect& printable_area_device_units,
|
||||
bool landscape_needs_flip) OVERRIDE;
|
||||
virtual void SetDeviceName(const CefString& name) OVERRIDE;
|
||||
virtual CefString GetDeviceName() OVERRIDE;
|
||||
virtual void SetDPI(int dpi) OVERRIDE;
|
||||
virtual int GetDPI() OVERRIDE;
|
||||
virtual void SetPageRanges(const PageRangeList& ranges) OVERRIDE;
|
||||
virtual size_t GetPageRangesCount() OVERRIDE;
|
||||
virtual void GetPageRanges(PageRangeList& ranges) OVERRIDE;
|
||||
virtual void SetSelectionOnly(bool selection_only) OVERRIDE;
|
||||
virtual bool IsSelectionOnly() OVERRIDE;
|
||||
virtual void SetCollate(bool collate) OVERRIDE;
|
||||
virtual bool WillCollate() OVERRIDE;
|
||||
virtual void SetColorModel(ColorModel model) OVERRIDE;
|
||||
virtual ColorModel GetColorModel() OVERRIDE;
|
||||
virtual void SetCopies(int copies) OVERRIDE;
|
||||
virtual int GetCopies() OVERRIDE;
|
||||
virtual void SetDuplexMode(DuplexMode mode) OVERRIDE;
|
||||
virtual DuplexMode GetDuplexMode() OVERRIDE;
|
||||
bool landscape_needs_flip) override;
|
||||
void SetDeviceName(const CefString& name) override;
|
||||
CefString GetDeviceName() override;
|
||||
void SetDPI(int dpi) override;
|
||||
int GetDPI() override;
|
||||
void SetPageRanges(const PageRangeList& ranges) override;
|
||||
size_t GetPageRangesCount() override;
|
||||
void GetPageRanges(PageRangeList& ranges) override;
|
||||
void SetSelectionOnly(bool selection_only) override;
|
||||
bool IsSelectionOnly() override;
|
||||
void SetCollate(bool collate) override;
|
||||
bool WillCollate() override;
|
||||
void SetColorModel(ColorModel model) override;
|
||||
ColorModel GetColorModel() override;
|
||||
void SetCopies(int copies) override;
|
||||
int GetCopies() override;
|
||||
void SetDuplexMode(DuplexMode mode) override;
|
||||
DuplexMode GetDuplexMode() override;
|
||||
|
||||
// Must hold the controller lock while using this value.
|
||||
const printing::PrintSettings& print_settings() { return const_value(); }
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "libcef/common/content_client.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/files/file_util_proxy.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/logging.h"
|
||||
@ -34,7 +34,7 @@ class CefPrintDialogCallbackImpl : public CefPrintDialogCallback {
|
||||
: dialog_(dialog) {
|
||||
}
|
||||
|
||||
virtual void Continue(CefRefPtr<CefPrintSettings> settings) OVERRIDE {
|
||||
void Continue(CefRefPtr<CefPrintSettings> settings) override {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (dialog_.get()) {
|
||||
dialog_->OnPrintContinue(settings);
|
||||
@ -46,7 +46,7 @@ class CefPrintDialogCallbackImpl : public CefPrintDialogCallback {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Cancel() OVERRIDE {
|
||||
void Cancel() override {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (dialog_.get()) {
|
||||
dialog_->OnPrintCancel();
|
||||
@ -75,7 +75,7 @@ class CefPrintJobCallbackImpl : public CefPrintJobCallback {
|
||||
: dialog_(dialog) {
|
||||
}
|
||||
|
||||
virtual void Continue() OVERRIDE {
|
||||
void Continue() override {
|
||||
if (CEF_CURRENTLY_ON_UIT()) {
|
||||
if (dialog_.get()) {
|
||||
dialog_->OnJobCompleted();
|
||||
|
@ -34,26 +34,28 @@ class CefPrintDialogLinux
|
||||
PrintingContextLinux* context);
|
||||
|
||||
// printing::CefPrintDialogLinuxInterface implementation.
|
||||
virtual void UseDefaultSettings() OVERRIDE;
|
||||
virtual bool UpdateSettings(printing::PrintSettings* settings) OVERRIDE;
|
||||
virtual void ShowDialog(
|
||||
void UseDefaultSettings() override;
|
||||
bool UpdateSettings(printing::PrintSettings* settings) override;
|
||||
void ShowDialog(
|
||||
gfx::NativeView parent_view,
|
||||
bool has_selection,
|
||||
const PrintingContextLinux::PrintSettingsCallback& callback) OVERRIDE;
|
||||
virtual void PrintDocument(const printing::MetafilePlayer& metafile,
|
||||
const base::string16& document_name) OVERRIDE;
|
||||
virtual void AddRefToDialog() OVERRIDE;
|
||||
virtual void ReleaseDialog() OVERRIDE;
|
||||
const PrintingContextLinux::PrintSettingsCallback& callback) override;
|
||||
void PrintDocument(const printing::MetafilePlayer& metafile,
|
||||
const base::string16& document_name) override;
|
||||
void AddRefToDialog() override;
|
||||
void ReleaseDialog() override;
|
||||
|
||||
private:
|
||||
friend class base::DeleteHelper<CefPrintDialogLinux>;
|
||||
friend class base::RefCountedThreadSafe<
|
||||
CefPrintDialogLinux, content::BrowserThread::DeleteOnUIThread>;
|
||||
friend struct content::BrowserThread::DeleteOnThread<
|
||||
content::BrowserThread::UI>;
|
||||
friend class base::DeleteHelper<CefPrintDialogLinux>;
|
||||
friend class CefPrintDialogCallbackImpl;
|
||||
friend class CefPrintJobCallbackImpl;
|
||||
|
||||
explicit CefPrintDialogLinux(PrintingContextLinux* context);
|
||||
virtual ~CefPrintDialogLinux();
|
||||
~CefPrintDialogLinux() override;
|
||||
|
||||
void SetHandler();
|
||||
void ReleaseHandler();
|
||||
|
@ -29,11 +29,11 @@ PrintViewManager::PrintViewManager(content::WebContents* web_contents)
|
||||
PrintViewManager::~PrintViewManager() {
|
||||
}
|
||||
|
||||
#if !defined(DISABLE_BASIC_PRINTING)
|
||||
#if defined(ENABLE_BASIC_PRINTING)
|
||||
bool PrintViewManager::PrintForSystemDialogNow() {
|
||||
return PrintNowInternal(new PrintMsg_PrintForSystemDialog(routing_id()));
|
||||
}
|
||||
#endif // !DISABLE_BASIC_PRINTING
|
||||
#endif // ENABLE_BASIC_PRINTING
|
||||
|
||||
void PrintViewManager::RenderProcessGone(base::TerminationStatus status) {
|
||||
PrintViewManagerBase::RenderProcessGone(status);
|
||||
|
@ -18,20 +18,20 @@ namespace printing {
|
||||
class PrintViewManager : public PrintViewManagerBase,
|
||||
public content::WebContentsUserData<PrintViewManager> {
|
||||
public:
|
||||
virtual ~PrintViewManager();
|
||||
~PrintViewManager() override;
|
||||
|
||||
#if !defined(DISABLE_BASIC_PRINTING)
|
||||
#if defined(ENABLE_BASIC_PRINTING)
|
||||
// Same as PrintNow(), but for the case where a user prints with the system
|
||||
// dialog from print preview.
|
||||
bool PrintForSystemDialogNow();
|
||||
#endif // !DISABLE_BASIC_PRINTING
|
||||
#endif // ENABLE_BASIC_PRINTING
|
||||
|
||||
// content::WebContentsObserver implementation.
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
||||
bool OnMessageReceived(const IPC::Message& message) override;
|
||||
|
||||
// content::WebContentsObserver implementation.
|
||||
// Terminates or cancels the print job if one was pending.
|
||||
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
|
||||
void RenderProcessGone(base::TerminationStatus status) override;
|
||||
|
||||
private:
|
||||
explicit PrintViewManager(content::WebContents* web_contents);
|
||||
|
@ -61,11 +61,11 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
DisconnectFromCurrentPrintJob();
|
||||
}
|
||||
|
||||
#if !defined(DISABLE_BASIC_PRINTING)
|
||||
#if defined(ENABLE_BASIC_PRINTING)
|
||||
bool PrintViewManagerBase::PrintNow() {
|
||||
return PrintNowInternal(new PrintMsg_PrintPages(routing_id()));
|
||||
}
|
||||
#endif // !DISABLE_BASIC_PRINTING
|
||||
#endif // ENABLE_BASIC_PRINTING
|
||||
|
||||
void PrintViewManagerBase::UpdateScriptedPrintingBlocked() {
|
||||
Send(new PrintMsg_SetScriptedPrintingBlocked(
|
||||
@ -152,7 +152,7 @@ void PrintViewManagerBase::OnDidPrintPage(
|
||||
#if !defined(OS_WIN)
|
||||
// Update the rendered document. It will send notifications to the listener.
|
||||
document->SetPage(params.page_number,
|
||||
metafile.PassAs<MetafilePlayer>(),
|
||||
metafile.Pass(),
|
||||
params.page_size,
|
||||
params.content_area);
|
||||
|
||||
|
@ -33,20 +33,20 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
public PrintedPagesSource,
|
||||
public content::WebContentsObserver {
|
||||
public:
|
||||
virtual ~PrintViewManagerBase();
|
||||
~PrintViewManagerBase() override;
|
||||
|
||||
#if !defined(DISABLE_BASIC_PRINTING)
|
||||
#if defined(ENABLE_BASIC_PRINTING)
|
||||
// Prints the current document immediately. Since the rendering is
|
||||
// asynchronous, the actual printing will not be completed on the return of
|
||||
// this function. Returns false if printing is impossible at the moment.
|
||||
virtual bool PrintNow();
|
||||
#endif // !DISABLE_BASIC_PRINTING
|
||||
#endif // ENABLE_BASIC_PRINTING
|
||||
|
||||
// Whether to block scripted printing for our tab or not.
|
||||
void UpdateScriptedPrintingBlocked();
|
||||
|
||||
// PrintedPagesSource implementation.
|
||||
virtual base::string16 RenderSourceName() OVERRIDE;
|
||||
base::string16 RenderSourceName() override;
|
||||
|
||||
protected:
|
||||
explicit PrintViewManagerBase(content::WebContents* web_contents);
|
||||
@ -55,26 +55,26 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
bool PrintNowInternal(IPC::Message* message);
|
||||
|
||||
// Terminates or cancels the print job if one was pending.
|
||||
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
|
||||
void RenderProcessGone(base::TerminationStatus status) override;
|
||||
|
||||
// content::WebContentsObserver implementation.
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
||||
bool OnMessageReceived(const IPC::Message& message) override;
|
||||
|
||||
// IPC Message handlers.
|
||||
virtual void OnPrintingFailed(int cookie);
|
||||
|
||||
private:
|
||||
// content::NotificationObserver implementation.
|
||||
virtual void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) OVERRIDE;
|
||||
void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) override;
|
||||
|
||||
// content::WebContentsObserver implementation.
|
||||
virtual void DidStartLoading(
|
||||
content::RenderViewHost* render_view_host) OVERRIDE;
|
||||
void DidStartLoading(
|
||||
content::RenderViewHost* render_view_host) override;
|
||||
|
||||
// Cancels the print job.
|
||||
virtual void NavigationStopped() OVERRIDE;
|
||||
void NavigationStopped() override;
|
||||
|
||||
// IPC Message handlers.
|
||||
void OnDidGetPrintedPagesCount(int cookie, int number_pages);
|
||||
|
@ -38,13 +38,13 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
|
||||
explicit PrintingMessageFilter(int render_process_id);
|
||||
|
||||
// content::BrowserMessageFilter methods.
|
||||
virtual void OverrideThreadForMessage(
|
||||
void OverrideThreadForMessage(
|
||||
const IPC::Message& message,
|
||||
content::BrowserThread::ID* thread) OVERRIDE;
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
||||
content::BrowserThread::ID* thread) override;
|
||||
bool OnMessageReceived(const IPC::Message& message) override;
|
||||
|
||||
private:
|
||||
virtual ~PrintingMessageFilter();
|
||||
~PrintingMessageFilter() override;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Used to pass resulting EMF from renderer to browser in printing.
|
||||
|
@ -54,35 +54,6 @@ static blink::WebScreenInfo webScreenInfoFrom(const CefScreenInfo& src) {
|
||||
return webScreenInfo;
|
||||
}
|
||||
|
||||
// Root layer passed to the ui::Compositor.
|
||||
class CefRootLayer : public ui::Layer, public ui::LayerDelegate {
|
||||
public:
|
||||
CefRootLayer()
|
||||
: Layer(ui::LAYER_TEXTURED) {
|
||||
set_delegate(this);
|
||||
}
|
||||
|
||||
virtual ~CefRootLayer() { }
|
||||
|
||||
// Overridden from LayerDelegate:
|
||||
virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
|
||||
}
|
||||
|
||||
virtual void OnDelegatedFrameDamage(
|
||||
const gfx::Rect& damage_rect_in_dip) OVERRIDE {
|
||||
}
|
||||
|
||||
virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {
|
||||
}
|
||||
|
||||
virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE {
|
||||
return base::Closure();
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(CefRootLayer);
|
||||
};
|
||||
|
||||
// Used to prevent further resizes while a resize is pending.
|
||||
class CefResizeLock : public content::ResizeLock {
|
||||
public:
|
||||
@ -104,21 +75,21 @@ class CefResizeLock : public content::ResizeLock {
|
||||
timeout);
|
||||
}
|
||||
|
||||
virtual ~CefResizeLock() {
|
||||
~CefResizeLock() override {
|
||||
CancelLock();
|
||||
}
|
||||
|
||||
virtual bool GrabDeferredLock() OVERRIDE {
|
||||
bool GrabDeferredLock() override {
|
||||
return ResizeLock::GrabDeferredLock();
|
||||
}
|
||||
|
||||
virtual void UnlockCompositor() OVERRIDE {
|
||||
void UnlockCompositor() override {
|
||||
ResizeLock::UnlockCompositor();
|
||||
compositor_lock_ = NULL;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void LockCompositor() OVERRIDE {
|
||||
void LockCompositor() override {
|
||||
ResizeLock::LockCompositor();
|
||||
compositor_lock_ = host_->compositor()->GetCompositorLock();
|
||||
}
|
||||
@ -171,7 +142,7 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
||||
content::RenderViewHost::From(render_widget_host_));
|
||||
}
|
||||
|
||||
root_layer_.reset(new CefRootLayer);
|
||||
root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
|
||||
|
||||
PlatformCreateCompositorWidget();
|
||||
#if !defined(OS_MACOSX)
|
||||
@ -276,8 +247,9 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetViewBounds() const {
|
||||
return gfx::Rect(rc.x, rc.y, rc.width, rc.height);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetBackgroundOpaque(bool opaque) {
|
||||
content::RenderWidgetHostViewBase::SetBackgroundOpaque(opaque);
|
||||
void CefRenderWidgetHostViewOSR::SetBackgroundColor(SkColor color) {
|
||||
content::RenderWidgetHostViewBase::SetBackgroundColor(color);
|
||||
bool opaque = GetBackgroundOpaque();
|
||||
if (render_widget_host_)
|
||||
render_widget_host_->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
@ -435,8 +407,10 @@ void CefRenderWidgetHostViewOSR::SetIsLoading(bool is_loading) {
|
||||
}
|
||||
|
||||
#if !defined(OS_MACOSX)
|
||||
void CefRenderWidgetHostViewOSR::TextInputStateChanged(
|
||||
const ViewHostMsg_TextInputState_Params& params) {
|
||||
void CefRenderWidgetHostViewOSR::TextInputTypeChanged(ui::TextInputType type,
|
||||
ui::TextInputMode mode,
|
||||
bool can_compose_inline,
|
||||
int flags) {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ImeCancelComposition() {
|
||||
@ -537,28 +511,9 @@ void CefRenderWidgetHostViewOSR::EndFrameSubscription() {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::AcceleratedSurfaceInitialized(
|
||||
int host_id,
|
||||
int route_id) {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::AcceleratedSurfaceBuffersSwapped(
|
||||
const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel,
|
||||
int gpu_host_id) {
|
||||
// Oldschool composited mode is no longer supported.
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::AcceleratedSurfacePostSubBuffer(
|
||||
const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel,
|
||||
int gpu_host_id) {
|
||||
// Oldschool composited mode is no longer supported.
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::AcceleratedSurfaceSuspend() {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::AcceleratedSurfaceRelease() {
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::HasAcceleratedSurface(
|
||||
const gfx::Size& desired_size) {
|
||||
// CEF doesn't use GetBackingStore for accelerated pages, so it doesn't
|
||||
@ -695,7 +650,7 @@ content::DelegatedFrameHost*
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::InstallTransparency() {
|
||||
if (browser_impl_.get() && browser_impl_->IsTransparent()) {
|
||||
SetBackgroundOpaque(false);
|
||||
SetBackgroundColor(SkColorSetARGB(SK_AlphaTRANSPARENT, 0, 0, 0));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -74,145 +74,135 @@ class CefRenderWidgetHostViewOSR
|
||||
public content::DelegatedFrameHostClient {
|
||||
public:
|
||||
explicit CefRenderWidgetHostViewOSR(content::RenderWidgetHost* widget);
|
||||
virtual ~CefRenderWidgetHostViewOSR();
|
||||
~CefRenderWidgetHostViewOSR() override;
|
||||
|
||||
// RenderWidgetHostView implementation.
|
||||
virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE;
|
||||
virtual content::RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE;
|
||||
virtual void SetSize(const gfx::Size& size) OVERRIDE;
|
||||
virtual void SetBounds(const gfx::Rect& rect) OVERRIDE;
|
||||
virtual gfx::Vector2dF GetLastScrollOffset() const OVERRIDE;
|
||||
virtual gfx::NativeView GetNativeView() const OVERRIDE;
|
||||
virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE;
|
||||
virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
|
||||
virtual ui::TextInputClient* GetTextInputClient() OVERRIDE;
|
||||
virtual void Focus() OVERRIDE;
|
||||
virtual bool HasFocus() const OVERRIDE;
|
||||
virtual bool IsSurfaceAvailableForCopy() const OVERRIDE;
|
||||
virtual void Show() OVERRIDE;
|
||||
virtual void Hide() OVERRIDE;
|
||||
virtual bool IsShowing() OVERRIDE;
|
||||
virtual gfx::Rect GetViewBounds() const OVERRIDE;
|
||||
virtual void SetBackgroundOpaque(bool opaque) OVERRIDE;
|
||||
virtual bool LockMouse() OVERRIDE;
|
||||
virtual void UnlockMouse() OVERRIDE;
|
||||
void InitAsChild(gfx::NativeView parent_view) override;
|
||||
content::RenderWidgetHost* GetRenderWidgetHost() const override;
|
||||
void SetSize(const gfx::Size& size) override;
|
||||
void SetBounds(const gfx::Rect& rect) override;
|
||||
gfx::Vector2dF GetLastScrollOffset() const override;
|
||||
gfx::NativeView GetNativeView() const override;
|
||||
gfx::NativeViewId GetNativeViewId() const override;
|
||||
gfx::NativeViewAccessible GetNativeViewAccessible() override;
|
||||
ui::TextInputClient* GetTextInputClient() override;
|
||||
void Focus() override;
|
||||
bool HasFocus() const override;
|
||||
bool IsSurfaceAvailableForCopy() const override;
|
||||
void Show() override;
|
||||
void Hide() override;
|
||||
bool IsShowing() override;
|
||||
gfx::Rect GetViewBounds() const override;
|
||||
void SetBackgroundColor(SkColor color) override;
|
||||
bool LockMouse() override;
|
||||
void UnlockMouse() override;
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
virtual void SetActive(bool active) OVERRIDE;
|
||||
virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE;
|
||||
virtual void SetWindowVisibility(bool visible) OVERRIDE;
|
||||
virtual void WindowFrameChanged() OVERRIDE;
|
||||
virtual void ShowDefinitionForSelection() OVERRIDE;
|
||||
virtual bool SupportsSpeech() const OVERRIDE;
|
||||
virtual void SpeakSelection() OVERRIDE;
|
||||
virtual bool IsSpeaking() const OVERRIDE;
|
||||
virtual void StopSpeaking() OVERRIDE;
|
||||
void SetActive(bool active) override;
|
||||
void SetWindowVisibility(bool visible) override;
|
||||
void WindowFrameChanged() override;
|
||||
void ShowDefinitionForSelection() override;
|
||||
bool SupportsSpeech() const override;
|
||||
void SpeakSelection() override;
|
||||
bool IsSpeaking() const override;
|
||||
void StopSpeaking() override;
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
// RenderWidgetHostViewBase implementation.
|
||||
virtual void OnSwapCompositorFrame(
|
||||
void OnSwapCompositorFrame(
|
||||
uint32 output_surface_id,
|
||||
scoped_ptr<cc::CompositorFrame> frame) OVERRIDE;
|
||||
virtual void InitAsPopup(content::RenderWidgetHostView* parent_host_view,
|
||||
const gfx::Rect& pos) OVERRIDE;
|
||||
virtual void InitAsFullscreen(
|
||||
content::RenderWidgetHostView* reference_host_view) OVERRIDE;
|
||||
virtual void WasShown() OVERRIDE;
|
||||
virtual void WasHidden() OVERRIDE;
|
||||
virtual void MovePluginWindows(
|
||||
const std::vector<content::WebPluginGeometry>& moves) OVERRIDE;
|
||||
virtual void Blur() OVERRIDE;
|
||||
virtual void UpdateCursor(const content::WebCursor& cursor) OVERRIDE;
|
||||
virtual void SetIsLoading(bool is_loading) OVERRIDE;
|
||||
virtual void TextInputStateChanged(
|
||||
const ViewHostMsg_TextInputState_Params& params) OVERRIDE;
|
||||
virtual void ImeCancelComposition() OVERRIDE;
|
||||
virtual void RenderProcessGone(base::TerminationStatus status,
|
||||
int error_code) OVERRIDE;
|
||||
virtual void Destroy() OVERRIDE;
|
||||
virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE;
|
||||
virtual void SelectionChanged(const base::string16& text,
|
||||
size_t offset,
|
||||
const gfx::Range& range) OVERRIDE;
|
||||
virtual gfx::Size GetRequestedRendererSize() const OVERRIDE;
|
||||
virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE;
|
||||
virtual void SelectionBoundsChanged(
|
||||
const ViewHostMsg_SelectionBounds_Params& params) OVERRIDE;
|
||||
virtual void CopyFromCompositingSurface(
|
||||
scoped_ptr<cc::CompositorFrame> frame) override;
|
||||
void InitAsPopup(content::RenderWidgetHostView* parent_host_view,
|
||||
const gfx::Rect& pos) override;
|
||||
void InitAsFullscreen(
|
||||
content::RenderWidgetHostView* reference_host_view) override;
|
||||
void WasShown() override;
|
||||
void WasHidden() override;
|
||||
void MovePluginWindows(
|
||||
const std::vector<content::WebPluginGeometry>& moves) override;
|
||||
void Blur() override;
|
||||
void UpdateCursor(const content::WebCursor& cursor) override;
|
||||
void SetIsLoading(bool is_loading) override;
|
||||
void TextInputTypeChanged(ui::TextInputType type,
|
||||
ui::TextInputMode mode,
|
||||
bool can_compose_inline,
|
||||
int flags) override;
|
||||
void ImeCancelComposition() override;
|
||||
void RenderProcessGone(base::TerminationStatus status,
|
||||
int error_code) override;
|
||||
void Destroy() override;
|
||||
void SetTooltipText(const base::string16& tooltip_text) override;
|
||||
void SelectionChanged(const base::string16& text,
|
||||
size_t offset,
|
||||
const gfx::Range& range) override;
|
||||
gfx::Size GetRequestedRendererSize() const override;
|
||||
gfx::Size GetPhysicalBackingSize() const override;
|
||||
void SelectionBoundsChanged(
|
||||
const ViewHostMsg_SelectionBounds_Params& params) override;
|
||||
void CopyFromCompositingSurface(
|
||||
const gfx::Rect& src_subrect,
|
||||
const gfx::Size& dst_size,
|
||||
const base::Callback<void(bool, const SkBitmap&)>& callback,
|
||||
const SkColorType color_type) OVERRIDE;
|
||||
virtual void CopyFromCompositingSurfaceToVideoFrame(
|
||||
const SkColorType color_type) override;
|
||||
void CopyFromCompositingSurfaceToVideoFrame(
|
||||
const gfx::Rect& src_subrect,
|
||||
const scoped_refptr<media::VideoFrame>& target,
|
||||
const base::Callback<void(bool)>& callback) OVERRIDE;
|
||||
virtual bool CanCopyToVideoFrame() const OVERRIDE;
|
||||
virtual bool CanSubscribeFrame() const OVERRIDE;
|
||||
virtual void BeginFrameSubscription(
|
||||
const base::Callback<void(bool)>& callback) override;
|
||||
bool CanCopyToVideoFrame() const override;
|
||||
bool CanSubscribeFrame() const override;
|
||||
void BeginFrameSubscription(
|
||||
scoped_ptr<content::RenderWidgetHostViewFrameSubscriber> subscriber)
|
||||
OVERRIDE;
|
||||
virtual void EndFrameSubscription() OVERRIDE;
|
||||
virtual void AcceleratedSurfaceInitialized(int host_id,
|
||||
int route_id) OVERRIDE;
|
||||
virtual void AcceleratedSurfaceBuffersSwapped(
|
||||
const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel,
|
||||
int gpu_host_id) OVERRIDE;
|
||||
virtual void AcceleratedSurfacePostSubBuffer(
|
||||
const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params_in_pixel,
|
||||
int gpu_host_id) OVERRIDE;
|
||||
virtual void AcceleratedSurfaceSuspend() OVERRIDE;
|
||||
virtual void AcceleratedSurfaceRelease() OVERRIDE;
|
||||
virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE;
|
||||
virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE;
|
||||
virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
|
||||
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
|
||||
virtual content::BrowserAccessibilityManager*
|
||||
override;
|
||||
void EndFrameSubscription() override;
|
||||
void AcceleratedSurfaceInitialized(int route_id) override;
|
||||
bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
|
||||
void GetScreenInfo(blink::WebScreenInfo* results) override;
|
||||
gfx::Rect GetBoundsInRootWindow() override;
|
||||
gfx::GLSurfaceHandle GetCompositingSurface() override;
|
||||
content::BrowserAccessibilityManager*
|
||||
CreateBrowserAccessibilityManager(
|
||||
content::BrowserAccessibilityDelegate* delegate) OVERRIDE;
|
||||
content::BrowserAccessibilityDelegate* delegate) override;
|
||||
|
||||
#if defined(TOOLKIT_VIEWS) || defined(USE_AURA)
|
||||
virtual void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
|
||||
const SkBitmap& zoomed_bitmap) OVERRIDE;
|
||||
void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
|
||||
const SkBitmap& zoomed_bitmap) override;
|
||||
#endif
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
virtual bool PostProcessEventForPluginIme(
|
||||
const content::NativeWebKeyboardEvent& event) OVERRIDE;
|
||||
bool PostProcessEventForPluginIme(
|
||||
const content::NativeWebKeyboardEvent& event) override;
|
||||
#endif
|
||||
|
||||
#if defined(OS_MACOSX) || defined(USE_AURA)
|
||||
virtual void ImeCompositionRangeChanged(
|
||||
void ImeCompositionRangeChanged(
|
||||
const gfx::Range& range,
|
||||
const std::vector<gfx::Rect>& character_bounds) OVERRIDE;
|
||||
const std::vector<gfx::Rect>& character_bounds) override;
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
virtual void SetParentNativeViewAccessible(
|
||||
gfx::NativeViewAccessible accessible_parent) OVERRIDE;
|
||||
virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE;
|
||||
void SetParentNativeViewAccessible(
|
||||
gfx::NativeViewAccessible accessible_parent) override;
|
||||
gfx::NativeViewId GetParentForWindowlessPlugin() const override;
|
||||
#endif
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
// BrowserCompositorViewMacClient implementation.
|
||||
virtual bool BrowserCompositorViewShouldAckImmediately() const OVERRIDE;
|
||||
virtual void BrowserCompositorViewFrameSwapped(
|
||||
const std::vector<ui::LatencyInfo>& latency_info) OVERRIDE;
|
||||
virtual NSView* BrowserCompositorSuperview() OVERRIDE;
|
||||
virtual ui::Layer* BrowserCompositorRootLayer() OVERRIDE;
|
||||
bool BrowserCompositorViewShouldAckImmediately() const override;
|
||||
void BrowserCompositorViewFrameSwapped(
|
||||
const std::vector<ui::LatencyInfo>& latency_info) override;
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
// DelegatedFrameHostClient implementation.
|
||||
virtual ui::Compositor* GetCompositor() const OVERRIDE;
|
||||
virtual ui::Layer* GetLayer() OVERRIDE;
|
||||
virtual content::RenderWidgetHostImpl* GetHost() OVERRIDE;
|
||||
virtual bool IsVisible() OVERRIDE;
|
||||
virtual scoped_ptr<content::ResizeLock> CreateResizeLock(
|
||||
bool defer_compositor_lock) OVERRIDE;
|
||||
virtual gfx::Size DesiredFrameSize() OVERRIDE;
|
||||
virtual float CurrentDeviceScaleFactor() OVERRIDE;
|
||||
virtual gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) OVERRIDE;
|
||||
virtual content::DelegatedFrameHost* GetDelegatedFrameHost() const OVERRIDE;
|
||||
ui::Compositor* GetCompositor() const override;
|
||||
ui::Layer* GetLayer() override;
|
||||
content::RenderWidgetHostImpl* GetHost() override;
|
||||
bool IsVisible() override;
|
||||
scoped_ptr<content::ResizeLock> CreateResizeLock(
|
||||
bool defer_compositor_lock) override;
|
||||
gfx::Size DesiredFrameSize() override;
|
||||
float CurrentDeviceScaleFactor() override;
|
||||
gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) override;
|
||||
content::DelegatedFrameHost* GetDelegatedFrameHost() const override;
|
||||
|
||||
bool InstallTransparency();
|
||||
|
||||
|
@ -31,9 +31,6 @@ CefTextInputClientOSRMac* GetInputClientFromContext(
|
||||
void CefRenderWidgetHostViewOSR::SetActive(bool active) {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetTakesFocusOnlyOnMouseDown(bool flag) {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetWindowVisibility(bool visible) {
|
||||
if (visible)
|
||||
WasShown();
|
||||
@ -61,8 +58,10 @@ bool CefRenderWidgetHostViewOSR::IsSpeaking() const {
|
||||
void CefRenderWidgetHostViewOSR::StopSpeaking() {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::TextInputStateChanged(
|
||||
const ViewHostMsg_TextInputState_Params& params) {
|
||||
void CefRenderWidgetHostViewOSR::TextInputTypeChanged(ui::TextInputType type,
|
||||
ui::TextInputMode mode,
|
||||
bool can_compose_inline,
|
||||
int flags) {
|
||||
[NSApp updateWindows];
|
||||
}
|
||||
|
||||
@ -107,14 +106,6 @@ void CefRenderWidgetHostViewOSR::BrowserCompositorViewFrameSwapped(
|
||||
}
|
||||
}
|
||||
|
||||
NSView* CefRenderWidgetHostViewOSR::BrowserCompositorSuperview() {
|
||||
return [window_ contentView];
|
||||
}
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::BrowserCompositorRootLayer() {
|
||||
return root_layer_.get();
|
||||
}
|
||||
|
||||
CefTextInputContext CefRenderWidgetHostViewOSR::GetNSTextInputContext() {
|
||||
if (!text_input_context_osr_mac_) {
|
||||
CefTextInputClientOSRMac* text_input_client_osr_mac =
|
||||
@ -297,7 +288,9 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
||||
[content_view setLayer:background_layer_];
|
||||
[content_view setWantsLayer:YES];
|
||||
|
||||
compositor_view_.reset(new content::BrowserCompositorViewMac(this));
|
||||
compositor_view_.reset(
|
||||
new content::BrowserCompositorViewMac(this, content_view,
|
||||
root_layer_.get()));
|
||||
compositor_.reset(compositor_view_->GetCompositor());
|
||||
DCHECK(compositor_);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ class CefCompositorHostWin : public gfx::WindowImpl {
|
||||
Init(NULL, gfx::Rect(0, 0, 1, 1));
|
||||
}
|
||||
|
||||
virtual ~CefCompositorHostWin() {
|
||||
~CefCompositorHostWin() override {
|
||||
DestroyWindow(hwnd());
|
||||
}
|
||||
|
||||
|
@ -14,13 +14,13 @@ class CefRequestContextImpl : public CefRequestContext {
|
||||
public:
|
||||
explicit CefRequestContextImpl(CefBrowserContext* browser_context);
|
||||
explicit CefRequestContextImpl(CefRefPtr<CefRequestContextHandler> handler);
|
||||
virtual ~CefRequestContextImpl();
|
||||
~CefRequestContextImpl() override;
|
||||
|
||||
CefBrowserContext* GetOrCreateBrowserContext();
|
||||
|
||||
virtual bool IsSame(CefRefPtr<CefRequestContext> other) OVERRIDE;
|
||||
virtual bool IsGlobal() OVERRIDE;
|
||||
virtual CefRefPtr<CefRequestContextHandler> GetHandler() OVERRIDE;
|
||||
bool IsSame(CefRefPtr<CefRequestContext> other) override;
|
||||
bool IsGlobal() override;
|
||||
CefRefPtr<CefRequestContextHandler> GetHandler() override;
|
||||
|
||||
protected:
|
||||
CefBrowserContext* browser_context_;
|
||||
|
@ -14,23 +14,23 @@ class CefResourceDispatcherHostDelegate
|
||||
: public content::ResourceDispatcherHostDelegate {
|
||||
public:
|
||||
CefResourceDispatcherHostDelegate();
|
||||
virtual ~CefResourceDispatcherHostDelegate();
|
||||
~CefResourceDispatcherHostDelegate() override;
|
||||
|
||||
// ResourceDispatcherHostDelegate methods.
|
||||
virtual void RequestBeginning(
|
||||
void RequestBeginning(
|
||||
net::URLRequest* request,
|
||||
content::ResourceContext* resource_context,
|
||||
content::AppCacheService* appcache_service,
|
||||
content::ResourceType resource_type,
|
||||
ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE;
|
||||
virtual bool HandleExternalProtocol(const GURL& url,
|
||||
int child_id,
|
||||
int route_id) OVERRIDE;
|
||||
virtual void OnRequestRedirected(
|
||||
ScopedVector<content::ResourceThrottle>* throttles) override;
|
||||
bool HandleExternalProtocol(const GURL& url,
|
||||
int child_id,
|
||||
int route_id) override;
|
||||
void OnRequestRedirected(
|
||||
const GURL& redirect_url,
|
||||
net::URLRequest* request,
|
||||
content::ResourceContext* resource_context,
|
||||
content::ResourceResponse* response) OVERRIDE;
|
||||
content::ResourceResponse* response) override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(CefResourceDispatcherHostDelegate);
|
||||
|
@ -57,13 +57,13 @@ class CefResourceRequestJobCallback : public CefCallback {
|
||||
dest_(NULL),
|
||||
dest_size_(0) {}
|
||||
|
||||
virtual void Continue() OVERRIDE {
|
||||
void Continue() override {
|
||||
// Continue asynchronously.
|
||||
CEF_POST_TASK(CEF_IOT,
|
||||
base::Bind(&CefResourceRequestJobCallback::ContinueOnIOThread, this));
|
||||
}
|
||||
|
||||
virtual void Cancel() OVERRIDE {
|
||||
void Cancel() override {
|
||||
// Cancel asynchronously.
|
||||
CEF_POST_TASK(CEF_IOT,
|
||||
base::Bind(&CefResourceRequestJobCallback::CancelOnIOThread, this));
|
||||
|
@ -27,21 +27,20 @@ class CefResourceRequestJob : public net::URLRequestJob {
|
||||
CefResourceRequestJob(net::URLRequest* request,
|
||||
net::NetworkDelegate* network_delegate,
|
||||
CefRefPtr<CefResourceHandler> handler);
|
||||
virtual ~CefResourceRequestJob();
|
||||
~CefResourceRequestJob() override;
|
||||
|
||||
private:
|
||||
// net::URLRequestJob methods.
|
||||
virtual void Start() OVERRIDE;
|
||||
virtual void Kill() OVERRIDE;
|
||||
virtual bool ReadRawData(net::IOBuffer* dest, int dest_size, int* bytes_read)
|
||||
OVERRIDE;
|
||||
virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE;
|
||||
virtual void GetLoadTimingInfo(
|
||||
net::LoadTimingInfo* load_timing_info) const OVERRIDE;
|
||||
virtual bool GetResponseCookies(std::vector<std::string>* cookies) OVERRIDE;
|
||||
virtual bool IsRedirectResponse(GURL* location, int* http_status_code)
|
||||
OVERRIDE;
|
||||
virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;
|
||||
void Start() override;
|
||||
void Kill() override;
|
||||
bool ReadRawData(net::IOBuffer* dest, int dest_size, int* bytes_read) override;
|
||||
void GetResponseInfo(net::HttpResponseInfo* info) override;
|
||||
void GetLoadTimingInfo(
|
||||
net::LoadTimingInfo* load_timing_info) const override;
|
||||
bool GetResponseCookies(std::vector<std::string>* cookies) override;
|
||||
bool IsRedirectResponse(GURL* location, int* http_status_code)
|
||||
override;
|
||||
bool GetMimeType(std::string* mime_type) const override;
|
||||
|
||||
void SendHeaders();
|
||||
|
||||
|
@ -100,9 +100,9 @@ class CefUrlRequestManager {
|
||||
: scheme_(scheme) {}
|
||||
|
||||
// From net::URLRequestJobFactory::ProtocolHandler
|
||||
virtual net::URLRequestJob* MaybeCreateJob(
|
||||
net::URLRequestJob* MaybeCreateJob(
|
||||
net::URLRequest* request,
|
||||
net::NetworkDelegate* network_delegate) const OVERRIDE {
|
||||
net::NetworkDelegate* network_delegate) const override {
|
||||
CEF_REQUIRE_IOT();
|
||||
return CefUrlRequestManager::GetInstance()->GetRequestJob(
|
||||
request, network_delegate, scheme_);
|
||||
|
@ -7,10 +7,10 @@
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "libcef/common/cef_switches.h"
|
||||
#include "libcef/common/cef_switches.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/command_line.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/notification_observer.h"
|
||||
#include "content/public/browser/notification_registrar.h"
|
||||
@ -80,9 +80,9 @@ class CefSpeechRecognitionManagerDelegate::WebContentsWatcher
|
||||
}
|
||||
|
||||
// content::NotificationObserver implementation.
|
||||
virtual void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) OVERRIDE {
|
||||
void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) override {
|
||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||
DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type);
|
||||
|
||||
@ -102,7 +102,7 @@ class CefSpeechRecognitionManagerDelegate::WebContentsWatcher
|
||||
private:
|
||||
friend class base::RefCountedThreadSafe<WebContentsWatcher>;
|
||||
|
||||
virtual ~WebContentsWatcher() {
|
||||
~WebContentsWatcher() override {
|
||||
// Must be destroyed on the UI thread due to |registrar_| non thread-safety.
|
||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||
}
|
||||
|
@ -20,32 +20,32 @@ class CefSpeechRecognitionManagerDelegate
|
||||
public content::SpeechRecognitionEventListener {
|
||||
public:
|
||||
CefSpeechRecognitionManagerDelegate();
|
||||
virtual ~CefSpeechRecognitionManagerDelegate();
|
||||
~CefSpeechRecognitionManagerDelegate() override;
|
||||
|
||||
protected:
|
||||
// SpeechRecognitionEventListener methods.
|
||||
virtual void OnRecognitionStart(int session_id) OVERRIDE;
|
||||
virtual void OnAudioStart(int session_id) OVERRIDE;
|
||||
virtual void OnEnvironmentEstimationComplete(int session_id) OVERRIDE;
|
||||
virtual void OnSoundStart(int session_id) OVERRIDE;
|
||||
virtual void OnSoundEnd(int session_id) OVERRIDE;
|
||||
virtual void OnAudioEnd(int session_id) OVERRIDE;
|
||||
virtual void OnRecognitionEnd(int session_id) OVERRIDE;
|
||||
virtual void OnRecognitionResults(
|
||||
int session_id, const content::SpeechRecognitionResults& result) OVERRIDE;
|
||||
virtual void OnRecognitionError(
|
||||
int session_id, const content::SpeechRecognitionError& error) OVERRIDE;
|
||||
virtual void OnAudioLevelsChange(int session_id, float volume,
|
||||
float noise_volume) OVERRIDE;
|
||||
void OnRecognitionStart(int session_id) override;
|
||||
void OnAudioStart(int session_id) override;
|
||||
void OnEnvironmentEstimationComplete(int session_id) override;
|
||||
void OnSoundStart(int session_id) override;
|
||||
void OnSoundEnd(int session_id) override;
|
||||
void OnAudioEnd(int session_id) override;
|
||||
void OnRecognitionEnd(int session_id) override;
|
||||
void OnRecognitionResults(
|
||||
int session_id, const content::SpeechRecognitionResults& result) override;
|
||||
void OnRecognitionError(
|
||||
int session_id, const content::SpeechRecognitionError& error) override;
|
||||
void OnAudioLevelsChange(int session_id, float volume,
|
||||
float noise_volume) override;
|
||||
|
||||
// SpeechRecognitionManagerDelegate methods.
|
||||
virtual void GetDiagnosticInformation(bool* can_report_metrics,
|
||||
std::string* hardware_info) OVERRIDE;
|
||||
virtual void CheckRecognitionIsAllowed(
|
||||
void GetDiagnosticInformation(bool* can_report_metrics,
|
||||
std::string* hardware_info) override;
|
||||
void CheckRecognitionIsAllowed(
|
||||
int session_id,
|
||||
base::Callback<void(bool ask_user, bool is_allowed)> callback) OVERRIDE;
|
||||
virtual content::SpeechRecognitionEventListener* GetEventListener() OVERRIDE;
|
||||
virtual bool FilterProfanities(int render_process_id) OVERRIDE;
|
||||
base::Callback<void(bool ask_user, bool is_allowed)> callback) override;
|
||||
content::SpeechRecognitionEventListener* GetEventListener() override;
|
||||
bool FilterProfanities(int render_process_id) override;
|
||||
|
||||
private:
|
||||
class WebContentsWatcher;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "libcef/browser/stream_impl.h"
|
||||
#include <stdlib.h>
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
|
||||
|
@ -17,13 +17,13 @@
|
||||
class CefFileReader : public CefStreamReader {
|
||||
public:
|
||||
CefFileReader(FILE* file, bool close);
|
||||
virtual ~CefFileReader();
|
||||
~CefFileReader() override;
|
||||
|
||||
virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE;
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE;
|
||||
virtual int64 Tell() OVERRIDE;
|
||||
virtual int Eof() OVERRIDE;
|
||||
virtual bool MayBlock() OVERRIDE { return true; }
|
||||
size_t Read(void* ptr, size_t size, size_t n) override;
|
||||
int Seek(int64 offset, int whence) override;
|
||||
int64 Tell() override;
|
||||
int Eof() override;
|
||||
bool MayBlock() override { return true; }
|
||||
|
||||
protected:
|
||||
bool close_;
|
||||
@ -38,13 +38,13 @@ class CefFileReader : public CefStreamReader {
|
||||
class CefFileWriter : public CefStreamWriter {
|
||||
public:
|
||||
CefFileWriter(FILE* file, bool close);
|
||||
virtual ~CefFileWriter();
|
||||
~CefFileWriter() override;
|
||||
|
||||
virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE;
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE;
|
||||
virtual int64 Tell() OVERRIDE;
|
||||
virtual int Flush() OVERRIDE;
|
||||
virtual bool MayBlock() OVERRIDE { return true; }
|
||||
size_t Write(const void* ptr, size_t size, size_t n) override;
|
||||
int Seek(int64 offset, int whence) override;
|
||||
int64 Tell() override;
|
||||
int Flush() override;
|
||||
bool MayBlock() override { return true; }
|
||||
|
||||
protected:
|
||||
FILE* file_;
|
||||
@ -59,13 +59,13 @@ class CefFileWriter : public CefStreamWriter {
|
||||
class CefBytesReader : public CefStreamReader {
|
||||
public:
|
||||
CefBytesReader(void* data, int64 datasize, bool copy);
|
||||
virtual ~CefBytesReader();
|
||||
~CefBytesReader() override;
|
||||
|
||||
virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE;
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE;
|
||||
virtual int64 Tell() OVERRIDE;
|
||||
virtual int Eof() OVERRIDE;
|
||||
virtual bool MayBlock() OVERRIDE { return false; }
|
||||
size_t Read(void* ptr, size_t size, size_t n) override;
|
||||
int Seek(int64 offset, int whence) override;
|
||||
int64 Tell() override;
|
||||
int Eof() override;
|
||||
bool MayBlock() override { return false; }
|
||||
|
||||
void SetData(void* data, int64 datasize, bool copy);
|
||||
|
||||
@ -87,13 +87,13 @@ class CefBytesReader : public CefStreamReader {
|
||||
class CefBytesWriter : public CefStreamWriter {
|
||||
public:
|
||||
explicit CefBytesWriter(size_t grow);
|
||||
virtual ~CefBytesWriter();
|
||||
~CefBytesWriter() override;
|
||||
|
||||
virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE;
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE;
|
||||
virtual int64 Tell() OVERRIDE;
|
||||
virtual int Flush() OVERRIDE;
|
||||
virtual bool MayBlock() OVERRIDE { return false; }
|
||||
size_t Write(const void* ptr, size_t size, size_t n) override;
|
||||
int Seek(int64 offset, int whence) override;
|
||||
int64 Tell() override;
|
||||
int Flush() override;
|
||||
bool MayBlock() override { return false; }
|
||||
|
||||
void* GetData() { return data_; }
|
||||
int64 GetDataSize() { return offset_; }
|
||||
@ -118,19 +118,19 @@ class CefHandlerReader : public CefStreamReader {
|
||||
explicit CefHandlerReader(CefRefPtr<CefReadHandler> handler)
|
||||
: handler_(handler) {}
|
||||
|
||||
virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE {
|
||||
size_t Read(void* ptr, size_t size, size_t n) override {
|
||||
return handler_->Read(ptr, size, n);
|
||||
}
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE {
|
||||
int Seek(int64 offset, int whence) override {
|
||||
return handler_->Seek(offset, whence);
|
||||
}
|
||||
virtual int64 Tell() OVERRIDE {
|
||||
int64 Tell() override {
|
||||
return handler_->Tell();
|
||||
}
|
||||
virtual int Eof() OVERRIDE {
|
||||
int Eof() override {
|
||||
return handler_->Eof();
|
||||
}
|
||||
virtual bool MayBlock() OVERRIDE {
|
||||
bool MayBlock() override {
|
||||
return handler_->MayBlock();
|
||||
}
|
||||
|
||||
@ -146,19 +146,19 @@ class CefHandlerWriter : public CefStreamWriter {
|
||||
explicit CefHandlerWriter(CefRefPtr<CefWriteHandler> handler)
|
||||
: handler_(handler) {}
|
||||
|
||||
virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE {
|
||||
size_t Write(const void* ptr, size_t size, size_t n) override {
|
||||
return handler_->Write(ptr, size, n);
|
||||
}
|
||||
virtual int Seek(int64 offset, int whence) OVERRIDE {
|
||||
int Seek(int64 offset, int whence) override {
|
||||
return handler_->Seek(offset, whence);
|
||||
}
|
||||
virtual int64 Tell() OVERRIDE {
|
||||
int64 Tell() override {
|
||||
return handler_->Tell();
|
||||
}
|
||||
virtual int Flush() OVERRIDE {
|
||||
int Flush() override {
|
||||
return handler_->Flush();
|
||||
}
|
||||
virtual bool MayBlock() OVERRIDE {
|
||||
bool MayBlock() override {
|
||||
return handler_->MayBlock();
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ class CefAuthCallbackImpl : public CefAuthCallback {
|
||||
: callback_(callback),
|
||||
credentials_(credentials) {
|
||||
}
|
||||
~CefAuthCallbackImpl() {
|
||||
~CefAuthCallbackImpl() override {
|
||||
if (!callback_.is_null()) {
|
||||
// The auth callback is still pending. Cancel it now.
|
||||
if (CEF_CURRENTLY_ON_IOT()) {
|
||||
@ -36,8 +36,8 @@ class CefAuthCallbackImpl : public CefAuthCallback {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Continue(const CefString& username,
|
||||
const CefString& password) OVERRIDE {
|
||||
void Continue(const CefString& username,
|
||||
const CefString& password) override {
|
||||
if (CEF_CURRENTLY_ON_IOT()) {
|
||||
if (!callback_.is_null()) {
|
||||
credentials_->Set(username, password);
|
||||
@ -50,7 +50,7 @@ class CefAuthCallbackImpl : public CefAuthCallback {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Cancel() OVERRIDE {
|
||||
void Cancel() override {
|
||||
if (CEF_CURRENTLY_ON_IOT()) {
|
||||
if (!callback_.is_null()) {
|
||||
CancelNow(callback_);
|
||||
|
@ -13,20 +13,20 @@
|
||||
class CefNetworkDelegate : public net::NetworkDelegate {
|
||||
public:
|
||||
CefNetworkDelegate();
|
||||
~CefNetworkDelegate();
|
||||
~CefNetworkDelegate() override;
|
||||
|
||||
private:
|
||||
// net::NetworkDelegate methods.
|
||||
virtual int OnBeforeURLRequest(net::URLRequest* request,
|
||||
const net::CompletionCallback& callback,
|
||||
GURL* new_url) OVERRIDE;
|
||||
virtual AuthRequiredResponse OnAuthRequired(
|
||||
int OnBeforeURLRequest(net::URLRequest* request,
|
||||
const net::CompletionCallback& callback,
|
||||
GURL* new_url) override;
|
||||
AuthRequiredResponse OnAuthRequired(
|
||||
net::URLRequest* request,
|
||||
const net::AuthChallengeInfo& auth_info,
|
||||
const AuthCallback& callback,
|
||||
net::AuthCredentials* credentials) OVERRIDE;
|
||||
virtual bool OnCanAccessFile(const net::URLRequest& request,
|
||||
const base::FilePath& path) const;
|
||||
net::AuthCredentials* credentials) override;
|
||||
bool OnCanAccessFile(const net::URLRequest& request,
|
||||
const base::FilePath& path) const;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefNetworkDelegate);
|
||||
};
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "libcef/common/content_client.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@ -75,17 +75,13 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings {
|
||||
CEF_REQUIRE_IOT();
|
||||
}
|
||||
|
||||
virtual ~CefHttpUserAgentSettings() {
|
||||
CEF_REQUIRE_IOT();
|
||||
}
|
||||
|
||||
// net::HttpUserAgentSettings implementation
|
||||
virtual std::string GetAcceptLanguage() const OVERRIDE {
|
||||
std::string GetAcceptLanguage() const override {
|
||||
CEF_REQUIRE_IOT();
|
||||
return http_accept_language_;
|
||||
}
|
||||
|
||||
virtual std::string GetUserAgent() const OVERRIDE {
|
||||
std::string GetUserAgent() const override {
|
||||
CEF_REQUIRE_IOT();
|
||||
return CefContentClient::Get()->GetUserAgent();
|
||||
}
|
||||
@ -237,7 +233,7 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
|
||||
|
||||
// Set up interceptors in the reverse order.
|
||||
scoped_ptr<net::URLRequestJobFactory> top_job_factory =
|
||||
job_factory.PassAs<net::URLRequestJobFactory>();
|
||||
job_factory.Pass();
|
||||
for (content::URLRequestInterceptorScopedVector::reverse_iterator i =
|
||||
request_interceptors_.rbegin();
|
||||
i != request_interceptors_.rend();
|
||||
|
@ -83,12 +83,12 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter {
|
||||
base::MessageLoop* file_loop,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors);
|
||||
virtual ~CefURLRequestContextGetter();
|
||||
~CefURLRequestContextGetter() override;
|
||||
|
||||
// net::URLRequestContextGetter implementation.
|
||||
virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
|
||||
virtual scoped_refptr<base::SingleThreadTaskRunner>
|
||||
GetNetworkTaskRunner() const OVERRIDE;
|
||||
net::URLRequestContext* GetURLRequestContext() override;
|
||||
scoped_refptr<base::SingleThreadTaskRunner>
|
||||
GetNetworkTaskRunner() const override;
|
||||
|
||||
net::HostResolver* host_resolver();
|
||||
net::URLRequestJobFactoryImpl* job_factory_impl() const {
|
||||
|
@ -22,12 +22,12 @@ class CefURLRequestContextGetterProxy : public net::URLRequestContextGetter {
|
||||
public:
|
||||
CefURLRequestContextGetterProxy(CefRefPtr<CefRequestContextHandler> handler,
|
||||
CefURLRequestContextGetter* parent);
|
||||
virtual ~CefURLRequestContextGetterProxy();
|
||||
~CefURLRequestContextGetterProxy() override;
|
||||
|
||||
// net::URLRequestContextGetter implementation.
|
||||
virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
|
||||
virtual scoped_refptr<base::SingleThreadTaskRunner>
|
||||
GetNetworkTaskRunner() const OVERRIDE;
|
||||
net::URLRequestContext* GetURLRequestContext() override;
|
||||
scoped_refptr<base::SingleThreadTaskRunner>
|
||||
GetNetworkTaskRunner() const override;
|
||||
|
||||
net::HostResolver* GetHostResolver() const;
|
||||
|
||||
|
@ -24,72 +24,78 @@ class CefCookieStoreProxy : public net::CookieStore {
|
||||
: parent_(parent),
|
||||
handler_(handler) {
|
||||
}
|
||||
virtual ~CefCookieStoreProxy() {
|
||||
~CefCookieStoreProxy() override {
|
||||
CEF_REQUIRE_IOT();
|
||||
}
|
||||
|
||||
// net::CookieStore methods.
|
||||
virtual void SetCookieWithOptionsAsync(
|
||||
void SetCookieWithOptionsAsync(
|
||||
const GURL& url,
|
||||
const std::string& cookie_line,
|
||||
const net::CookieOptions& options,
|
||||
const SetCookiesCallback& callback) OVERRIDE {
|
||||
const SetCookiesCallback& callback) override {
|
||||
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||
cookie_store->SetCookieWithOptionsAsync(url, cookie_line, options,
|
||||
callback);
|
||||
}
|
||||
|
||||
virtual void GetCookiesWithOptionsAsync(
|
||||
void GetCookiesWithOptionsAsync(
|
||||
const GURL& url, const net::CookieOptions& options,
|
||||
const GetCookiesCallback& callback) OVERRIDE {
|
||||
const GetCookiesCallback& callback) override {
|
||||
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||
cookie_store->GetCookiesWithOptionsAsync(url, options, callback);
|
||||
}
|
||||
|
||||
virtual void DeleteCookieAsync(const GURL& url,
|
||||
const std::string& cookie_name,
|
||||
const base::Closure& callback) OVERRIDE {
|
||||
void DeleteCookieAsync(const GURL& url,
|
||||
const std::string& cookie_name,
|
||||
const base::Closure& callback) override {
|
||||
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||
cookie_store->DeleteCookieAsync(url, cookie_name, callback);
|
||||
}
|
||||
|
||||
virtual void GetAllCookiesForURLAsync(
|
||||
void GetAllCookiesForURLAsync(
|
||||
const GURL& url,
|
||||
const GetCookieListCallback& callback) OVERRIDE {
|
||||
const GetCookieListCallback& callback) override {
|
||||
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||
cookie_store->GetAllCookiesForURLAsync(url, callback);
|
||||
}
|
||||
|
||||
virtual void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
|
||||
const base::Time& delete_end,
|
||||
const DeleteCallback& callback)
|
||||
OVERRIDE {
|
||||
void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
|
||||
const base::Time& delete_end,
|
||||
const DeleteCallback& callback) override {
|
||||
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||
cookie_store->DeleteAllCreatedBetweenAsync(delete_begin, delete_end,
|
||||
callback);
|
||||
}
|
||||
|
||||
virtual void DeleteAllCreatedBetweenForHostAsync(
|
||||
void DeleteAllCreatedBetweenForHostAsync(
|
||||
const base::Time delete_begin,
|
||||
const base::Time delete_end,
|
||||
const GURL& url,
|
||||
const DeleteCallback& callback) OVERRIDE {
|
||||
const DeleteCallback& callback) override {
|
||||
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||
cookie_store->DeleteAllCreatedBetweenForHostAsync(delete_begin, delete_end,
|
||||
url, callback);
|
||||
}
|
||||
|
||||
virtual void DeleteSessionCookiesAsync(const DeleteCallback& callback)
|
||||
OVERRIDE {
|
||||
void DeleteSessionCookiesAsync(const DeleteCallback& callback) override {
|
||||
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||
cookie_store->DeleteSessionCookiesAsync(callback);
|
||||
}
|
||||
|
||||
virtual net::CookieMonster* GetCookieMonster() OVERRIDE {
|
||||
net::CookieMonster* GetCookieMonster() override {
|
||||
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||
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:
|
||||
net::CookieStore* GetCookieStore() {
|
||||
CEF_REQUIRE_IOT();
|
||||
|
@ -21,7 +21,7 @@ class URLRequestContextGetter;
|
||||
class CefURLRequestContextProxy : public net::URLRequestContext {
|
||||
public:
|
||||
explicit CefURLRequestContextProxy(net::URLRequestContextGetter* parent);
|
||||
virtual ~CefURLRequestContextProxy();
|
||||
~CefURLRequestContextProxy() override;
|
||||
|
||||
void Initialize(CefRefPtr<CefRequestContextHandler> handler);
|
||||
|
||||
|
@ -13,19 +13,19 @@
|
||||
class CefRequestInterceptor : public net::URLRequest::Interceptor {
|
||||
public:
|
||||
CefRequestInterceptor();
|
||||
~CefRequestInterceptor();
|
||||
~CefRequestInterceptor() override;
|
||||
|
||||
// net::URLRequest::Interceptor methods.
|
||||
virtual net::URLRequestJob* MaybeIntercept(
|
||||
net::URLRequestJob* MaybeIntercept(
|
||||
net::URLRequest* request,
|
||||
net::NetworkDelegate* network_delegate) OVERRIDE;
|
||||
virtual net::URLRequestJob* MaybeInterceptRedirect(
|
||||
net::NetworkDelegate* network_delegate) override;
|
||||
net::URLRequestJob* MaybeInterceptRedirect(
|
||||
net::URLRequest* request,
|
||||
net::NetworkDelegate* network_delegate,
|
||||
const GURL& location) OVERRIDE;
|
||||
virtual net::URLRequestJob* MaybeInterceptResponse(
|
||||
const GURL& location) override;
|
||||
net::URLRequestJob* MaybeInterceptResponse(
|
||||
net::URLRequest* request,
|
||||
net::NetworkDelegate* network_delegate) OVERRIDE;
|
||||
net::NetworkDelegate* network_delegate) override;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefRequestInterceptor);
|
||||
};
|
||||
|
@ -15,7 +15,7 @@
|
||||
class CefURLRequestUserData : public base::SupportsUserData::Data {
|
||||
public:
|
||||
CefURLRequestUserData(CefRefPtr<CefURLRequestClient> client);
|
||||
virtual ~CefURLRequestUserData();
|
||||
~CefURLRequestUserData() override;
|
||||
|
||||
CefRefPtr<CefURLRequestClient> GetClient();
|
||||
static const void* kUserDataKey;
|
||||
|
@ -68,7 +68,8 @@ void CefWebContentsViewOSR::CreateView(const gfx::Size& initial_size,
|
||||
}
|
||||
|
||||
content::RenderWidgetHostViewBase* CefWebContentsViewOSR::CreateViewForWidget(
|
||||
content::RenderWidgetHost* render_widget_host) {
|
||||
content::RenderWidgetHost* render_widget_host,
|
||||
bool is_guest_view_hack) {
|
||||
if (render_widget_host->GetView()) {
|
||||
return static_cast<content::RenderWidgetHostViewBase*>(
|
||||
render_widget_host->GetView());
|
||||
|
@ -21,48 +21,49 @@ class CefWebContentsViewOSR : public content::WebContentsView,
|
||||
public content::RenderViewHostDelegateView {
|
||||
public:
|
||||
CefWebContentsViewOSR();
|
||||
virtual ~CefWebContentsViewOSR();
|
||||
~CefWebContentsViewOSR() override;
|
||||
|
||||
void set_web_contents(content::WebContents* web_contents);
|
||||
|
||||
// WebContentsView methods.
|
||||
virtual gfx::NativeView GetNativeView() const OVERRIDE;
|
||||
virtual gfx::NativeView GetContentNativeView() const OVERRIDE;
|
||||
virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE;
|
||||
virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE;
|
||||
virtual void SizeContents(const gfx::Size& size) OVERRIDE;
|
||||
virtual void Focus() OVERRIDE;
|
||||
virtual void SetInitialFocus() OVERRIDE;
|
||||
virtual void StoreFocus() OVERRIDE;
|
||||
virtual void RestoreFocus() OVERRIDE;
|
||||
virtual content::DropData* GetDropData() const OVERRIDE;
|
||||
virtual gfx::Rect GetViewBounds() const OVERRIDE;
|
||||
virtual void CreateView(const gfx::Size& initial_size,
|
||||
gfx::NativeView context) OVERRIDE;
|
||||
virtual content::RenderWidgetHostViewBase* CreateViewForWidget(
|
||||
content::RenderWidgetHost* render_widget_host) OVERRIDE;
|
||||
virtual content::RenderWidgetHostViewBase* CreateViewForPopupWidget(
|
||||
content::RenderWidgetHost* render_widget_host) OVERRIDE;
|
||||
virtual void SetPageTitle(const base::string16& title) OVERRIDE;
|
||||
virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE;
|
||||
virtual void RenderViewSwappedIn(content::RenderViewHost* host) OVERRIDE;
|
||||
virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE;
|
||||
gfx::NativeView GetNativeView() const override;
|
||||
gfx::NativeView GetContentNativeView() const override;
|
||||
gfx::NativeWindow GetTopLevelNativeWindow() const override;
|
||||
void GetContainerBounds(gfx::Rect* out) const override;
|
||||
void SizeContents(const gfx::Size& size) override;
|
||||
void Focus() override;
|
||||
void SetInitialFocus() override;
|
||||
void StoreFocus() override;
|
||||
void RestoreFocus() override;
|
||||
content::DropData* GetDropData() const override;
|
||||
gfx::Rect GetViewBounds() const override;
|
||||
void CreateView(const gfx::Size& initial_size,
|
||||
gfx::NativeView context) override;
|
||||
content::RenderWidgetHostViewBase* CreateViewForWidget(
|
||||
content::RenderWidgetHost* render_widget_host,
|
||||
bool is_guest_view_hack) override;
|
||||
content::RenderWidgetHostViewBase* CreateViewForPopupWidget(
|
||||
content::RenderWidgetHost* render_widget_host) override;
|
||||
void SetPageTitle(const base::string16& title) override;
|
||||
void RenderViewCreated(content::RenderViewHost* host) override;
|
||||
void RenderViewSwappedIn(content::RenderViewHost* host) override;
|
||||
void SetOverscrollControllerEnabled(bool enabled) override;
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
virtual void SetAllowOtherViews(bool allow) OVERRIDE;
|
||||
virtual bool GetAllowOtherViews() const OVERRIDE;
|
||||
virtual bool IsEventTracking() const OVERRIDE;
|
||||
virtual void CloseTabAfterEventTracking() OVERRIDE;
|
||||
void SetAllowOtherViews(bool allow) override;
|
||||
bool GetAllowOtherViews() const override;
|
||||
bool IsEventTracking() const override;
|
||||
void CloseTabAfterEventTracking() override;
|
||||
#endif
|
||||
|
||||
// RenderViewHostDelegateView methods.
|
||||
virtual void StartDragging(
|
||||
void StartDragging(
|
||||
const content::DropData& drop_data,
|
||||
blink::WebDragOperationsMask allowed_ops,
|
||||
const gfx::ImageSkia& image,
|
||||
const gfx::Vector2d& image_offset,
|
||||
const content::DragEventSourceInfo& event_info) OVERRIDE;
|
||||
virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE;
|
||||
const content::DragEventSourceInfo& event_info) override;
|
||||
void UpdateDragCursor(blink::WebDragOperation operation) override;
|
||||
|
||||
private:
|
||||
content::WebContents* web_contents_;
|
||||
|
@ -13,10 +13,10 @@ class CefWebPluginInfoImpl : public CefWebPluginInfo {
|
||||
public:
|
||||
explicit CefWebPluginInfoImpl(const content::WebPluginInfo& plugin_info);
|
||||
|
||||
virtual CefString GetName() OVERRIDE;
|
||||
virtual CefString GetPath() OVERRIDE;
|
||||
virtual CefString GetVersion() OVERRIDE;
|
||||
virtual CefString GetDescription() OVERRIDE;
|
||||
CefString GetName() override;
|
||||
CefString GetPath() override;
|
||||
CefString GetVersion() override;
|
||||
CefString GetDescription() override;
|
||||
|
||||
private:
|
||||
content::WebPluginInfo plugin_info_;
|
||||
|
@ -32,13 +32,13 @@ class CefWindowDelegateView : public views::WidgetDelegateView {
|
||||
void InitContent();
|
||||
|
||||
// WidgetDelegateView methods:
|
||||
virtual bool CanResize() const OVERRIDE { return true; }
|
||||
virtual bool CanMaximize() const OVERRIDE { return true; }
|
||||
virtual View* GetContentsView() OVERRIDE { return this; }
|
||||
bool CanResize() const override { return true; }
|
||||
bool CanMaximize() const override { return true; }
|
||||
View* GetContentsView() override { return this; }
|
||||
|
||||
// View methods:
|
||||
virtual void ViewHierarchyChanged(
|
||||
const ViewHierarchyChangedDetails& details) OVERRIDE;
|
||||
void ViewHierarchyChanged(
|
||||
const ViewHierarchyChangedDetails& details) override;
|
||||
|
||||
private:
|
||||
SkColor background_color_;
|
||||
|
@ -27,7 +27,7 @@ class CefWindowX11 : public ui::PlatformEventDispatcher {
|
||||
CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser,
|
||||
::Window parent_xwindow,
|
||||
const gfx::Rect& bounds);
|
||||
virtual ~CefWindowX11();
|
||||
~CefWindowX11() override;
|
||||
|
||||
void Close();
|
||||
|
||||
@ -43,8 +43,8 @@ class CefWindowX11 : public ui::PlatformEventDispatcher {
|
||||
views::DesktopWindowTreeHostX11* GetHost();
|
||||
|
||||
// ui::PlatformEventDispatcher methods:
|
||||
virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
|
||||
virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE;
|
||||
bool CanDispatchEvent(const ui::PlatformEvent& event) override;
|
||||
uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
|
||||
|
||||
::Window xwindow() const { return xwindow_; }
|
||||
gfx::Rect bounds() const { return bounds_; }
|
||||
|
@ -16,43 +16,43 @@
|
||||
class CefXmlReaderImpl : public CefXmlReader {
|
||||
public:
|
||||
CefXmlReaderImpl();
|
||||
~CefXmlReaderImpl();
|
||||
~CefXmlReaderImpl() override;
|
||||
|
||||
// Initialize the reader context.
|
||||
bool Initialize(CefRefPtr<CefStreamReader> stream,
|
||||
EncodingType encodingType, const CefString& URI);
|
||||
|
||||
virtual bool MoveToNextNode() OVERRIDE;
|
||||
virtual bool Close() OVERRIDE;
|
||||
virtual bool HasError() OVERRIDE;
|
||||
virtual CefString GetError() OVERRIDE;
|
||||
virtual NodeType GetType() OVERRIDE;
|
||||
virtual int GetDepth() OVERRIDE;
|
||||
virtual CefString GetLocalName() OVERRIDE;
|
||||
virtual CefString GetPrefix() OVERRIDE;
|
||||
virtual CefString GetQualifiedName() OVERRIDE;
|
||||
virtual CefString GetNamespaceURI() OVERRIDE;
|
||||
virtual CefString GetBaseURI() OVERRIDE;
|
||||
virtual CefString GetXmlLang() OVERRIDE;
|
||||
virtual bool IsEmptyElement() OVERRIDE;
|
||||
virtual bool HasValue() OVERRIDE;
|
||||
virtual CefString GetValue() OVERRIDE;
|
||||
virtual bool HasAttributes() OVERRIDE;
|
||||
virtual size_t GetAttributeCount() OVERRIDE;
|
||||
virtual CefString GetAttribute(int index) OVERRIDE;
|
||||
virtual CefString GetAttribute(const CefString& qualifiedName) OVERRIDE;
|
||||
virtual CefString GetAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) OVERRIDE;
|
||||
virtual CefString GetInnerXml() OVERRIDE;
|
||||
virtual CefString GetOuterXml() OVERRIDE;
|
||||
virtual int GetLineNumber() OVERRIDE;
|
||||
virtual bool MoveToAttribute(int index) OVERRIDE;
|
||||
virtual bool MoveToAttribute(const CefString& qualifiedName) OVERRIDE;
|
||||
virtual bool MoveToAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) OVERRIDE;
|
||||
virtual bool MoveToFirstAttribute() OVERRIDE;
|
||||
virtual bool MoveToNextAttribute() OVERRIDE;
|
||||
virtual bool MoveToCarryingElement() OVERRIDE;
|
||||
bool MoveToNextNode() override;
|
||||
bool Close() override;
|
||||
bool HasError() override;
|
||||
CefString GetError() override;
|
||||
NodeType GetType() override;
|
||||
int GetDepth() override;
|
||||
CefString GetLocalName() override;
|
||||
CefString GetPrefix() override;
|
||||
CefString GetQualifiedName() override;
|
||||
CefString GetNamespaceURI() override;
|
||||
CefString GetBaseURI() override;
|
||||
CefString GetXmlLang() override;
|
||||
bool IsEmptyElement() override;
|
||||
bool HasValue() override;
|
||||
CefString GetValue() override;
|
||||
bool HasAttributes() override;
|
||||
size_t GetAttributeCount() override;
|
||||
CefString GetAttribute(int index) override;
|
||||
CefString GetAttribute(const CefString& qualifiedName) override;
|
||||
CefString GetAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) override;
|
||||
CefString GetInnerXml() override;
|
||||
CefString GetOuterXml() override;
|
||||
int GetLineNumber() override;
|
||||
bool MoveToAttribute(int index) override;
|
||||
bool MoveToAttribute(const CefString& qualifiedName) override;
|
||||
bool MoveToAttribute(const CefString& localName,
|
||||
const CefString& namespaceURI) override;
|
||||
bool MoveToFirstAttribute() override;
|
||||
bool MoveToNextAttribute() override;
|
||||
bool MoveToCarryingElement() override;
|
||||
|
||||
// Add another line to the error string.
|
||||
void AppendError(const CefString& error_str);
|
||||
|
@ -16,23 +16,23 @@
|
||||
class CefZipReaderImpl : public CefZipReader {
|
||||
public:
|
||||
CefZipReaderImpl();
|
||||
~CefZipReaderImpl();
|
||||
~CefZipReaderImpl() override;
|
||||
|
||||
// Initialize the reader context.
|
||||
bool Initialize(CefRefPtr<CefStreamReader> stream);
|
||||
|
||||
virtual bool MoveToFirstFile();
|
||||
virtual bool MoveToNextFile();
|
||||
virtual bool MoveToFile(const CefString& fileName, bool caseSensitive);
|
||||
virtual bool Close();
|
||||
virtual CefString GetFileName();
|
||||
virtual int64 GetFileSize();
|
||||
virtual time_t GetFileLastModified();
|
||||
virtual bool OpenFile(const CefString& password);
|
||||
virtual bool CloseFile();
|
||||
virtual int ReadFile(void* buffer, size_t bufferSize);
|
||||
virtual int64 Tell();
|
||||
virtual bool Eof();
|
||||
bool MoveToFirstFile() override;
|
||||
bool MoveToNextFile() override;
|
||||
bool MoveToFile(const CefString& fileName, bool caseSensitive) override;
|
||||
bool Close() override;
|
||||
CefString GetFileName() override;
|
||||
int64 GetFileSize() override;
|
||||
time_t GetFileLastModified() override;
|
||||
bool OpenFile(const CefString& password) override;
|
||||
bool CloseFile() override;
|
||||
int ReadFile(void* buffer, size_t bufferSize) override;
|
||||
int64 Tell() override;
|
||||
bool Eof() override;
|
||||
|
||||
bool GetFileInfo();
|
||||
|
||||
|
@ -19,27 +19,27 @@ class CefCommandLineImpl : public CefValueBase<CefCommandLine, CommandLine> {
|
||||
bool read_only);
|
||||
|
||||
// CefCommandLine methods.
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual CefRefPtr<CefCommandLine> Copy() OVERRIDE;
|
||||
virtual void InitFromArgv(int argc, const char* const* argv) OVERRIDE;
|
||||
virtual void InitFromString(const CefString& command_line) OVERRIDE;
|
||||
virtual void Reset() OVERRIDE;
|
||||
virtual void GetArgv(std::vector<CefString>& argv) OVERRIDE;
|
||||
virtual CefString GetCommandLineString() OVERRIDE;
|
||||
virtual CefString GetProgram() OVERRIDE;
|
||||
virtual void SetProgram(const CefString& program) OVERRIDE;
|
||||
virtual bool HasSwitches() OVERRIDE;
|
||||
virtual bool HasSwitch(const CefString& name) OVERRIDE;
|
||||
virtual CefString GetSwitchValue(const CefString& name) OVERRIDE;
|
||||
virtual void GetSwitches(SwitchMap& switches) OVERRIDE;
|
||||
virtual void AppendSwitch(const CefString& name) OVERRIDE;
|
||||
virtual void AppendSwitchWithValue(const CefString& name,
|
||||
const CefString& value) OVERRIDE;
|
||||
virtual bool HasArguments() OVERRIDE;
|
||||
virtual void GetArguments(ArgumentList& arguments) OVERRIDE;
|
||||
virtual void AppendArgument(const CefString& argument) OVERRIDE;
|
||||
virtual void PrependWrapper(const CefString& wrapper) OVERRIDE;
|
||||
bool IsValid() override;
|
||||
bool IsReadOnly() override;
|
||||
CefRefPtr<CefCommandLine> Copy() override;
|
||||
void InitFromArgv(int argc, const char* const* argv) override;
|
||||
void InitFromString(const CefString& command_line) override;
|
||||
void Reset() override;
|
||||
void GetArgv(std::vector<CefString>& argv) override;
|
||||
CefString GetCommandLineString() override;
|
||||
CefString GetProgram() override;
|
||||
void SetProgram(const CefString& program) override;
|
||||
bool HasSwitches() override;
|
||||
bool HasSwitch(const CefString& name) override;
|
||||
CefString GetSwitchValue(const CefString& name) override;
|
||||
void GetSwitches(SwitchMap& switches) override;
|
||||
void AppendSwitch(const CefString& name) override;
|
||||
void AppendSwitchWithValue(const CefString& name,
|
||||
const CefString& value) override;
|
||||
bool HasArguments() override;
|
||||
void GetArguments(ArgumentList& arguments) override;
|
||||
void AppendArgument(const CefString& argument) override;
|
||||
void PrependWrapper(const CefString& wrapper) override;
|
||||
|
||||
// Must hold the controller lock while using this value.
|
||||
const CommandLine& command_line() { return const_value(); }
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "libcef/common/scheme_registration.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
|
@ -20,23 +20,23 @@ class CefContentClient : public content::ContentClient,
|
||||
public ui::ResourceBundle::Delegate {
|
||||
public:
|
||||
explicit CefContentClient(CefRefPtr<CefApp> application);
|
||||
virtual ~CefContentClient();
|
||||
~CefContentClient() override;
|
||||
|
||||
// Returns the singleton CefContentClient instance.
|
||||
static CefContentClient* Get();
|
||||
|
||||
// content::ContentClient methods.
|
||||
virtual void AddPepperPlugins(
|
||||
std::vector<content::PepperPluginInfo>* plugins) OVERRIDE;
|
||||
virtual void AddAdditionalSchemes(
|
||||
void AddPepperPlugins(
|
||||
std::vector<content::PepperPluginInfo>* plugins) override;
|
||||
void AddAdditionalSchemes(
|
||||
std::vector<std::string>* standard_schemes,
|
||||
std::vector<std::string>* savable_schemes) OVERRIDE;
|
||||
virtual std::string GetUserAgent() const OVERRIDE;
|
||||
virtual base::string16 GetLocalizedString(int message_id) const OVERRIDE;
|
||||
virtual base::StringPiece GetDataResource(
|
||||
std::vector<std::string>* savable_schemes) override;
|
||||
std::string GetUserAgent() const override;
|
||||
base::string16 GetLocalizedString(int message_id) const override;
|
||||
base::StringPiece GetDataResource(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) const OVERRIDE;
|
||||
virtual gfx::Image& GetNativeImageNamed(int resource_id) const OVERRIDE;
|
||||
ui::ScaleFactor scale_factor) const override;
|
||||
gfx::Image& GetNativeImageNamed(int resource_id) const override;
|
||||
|
||||
struct SchemeInfo {
|
||||
std::string scheme_name;
|
||||
@ -59,26 +59,26 @@ class CefContentClient : public content::ContentClient,
|
||||
|
||||
private:
|
||||
// ui::ResourceBundle::Delegate methods.
|
||||
virtual base::FilePath GetPathForResourcePack(
|
||||
base::FilePath GetPathForResourcePack(
|
||||
const base::FilePath& pack_path,
|
||||
ui::ScaleFactor scale_factor) OVERRIDE;
|
||||
virtual base::FilePath GetPathForLocalePack(
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
base::FilePath GetPathForLocalePack(
|
||||
const base::FilePath& pack_path,
|
||||
const std::string& locale) OVERRIDE;
|
||||
virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE;
|
||||
virtual gfx::Image GetNativeImageNamed(
|
||||
const std::string& locale) override;
|
||||
gfx::Image GetImageNamed(int resource_id) override;
|
||||
gfx::Image GetNativeImageNamed(
|
||||
int resource_id,
|
||||
ui::ResourceBundle::ImageRTL rtl) OVERRIDE;
|
||||
virtual base::RefCountedStaticMemory* LoadDataResourceBytes(
|
||||
ui::ResourceBundle::ImageRTL rtl) override;
|
||||
base::RefCountedStaticMemory* LoadDataResourceBytes(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) OVERRIDE;
|
||||
virtual bool GetRawDataResource(int resource_id,
|
||||
ui::ScaleFactor scale_factor,
|
||||
base::StringPiece* value) OVERRIDE;
|
||||
virtual bool GetLocalizedString(int message_id,
|
||||
base::string16* value) OVERRIDE;
|
||||
virtual scoped_ptr<gfx::Font> GetFont(
|
||||
ui::ResourceBundle::FontStyle style) OVERRIDE;
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
bool GetRawDataResource(int resource_id,
|
||||
ui::ScaleFactor scale_factor,
|
||||
base::StringPiece* value) override;
|
||||
bool GetLocalizedString(int message_id,
|
||||
base::string16* value) override;
|
||||
scoped_ptr<gfx::Font> GetFont(
|
||||
ui::ResourceBundle::FontStyle style) override;
|
||||
|
||||
CefRefPtr<CefApp> application_;
|
||||
bool pack_loading_disabled_;
|
||||
|
@ -32,11 +32,16 @@ void CefCrashReporterClient::GetProductNameAndVersion(
|
||||
#endif
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
|
||||
void CefCrashReporterClient::GetProductNameAndVersion(std::string* product_name,
|
||||
std::string* version) {
|
||||
#define PRODUCT_VERSION \
|
||||
MAKE_STRING(CEF_VERSION_MAJOR) "." \
|
||||
MAKE_STRING(CHROME_VERSION_BUILD) "." \
|
||||
MAKE_STRING(CEF_REVISION)
|
||||
|
||||
void CefCrashReporterClient::GetProductNameAndVersion(
|
||||
const char** product_name,
|
||||
const char** version) {
|
||||
*product_name = "cef";
|
||||
*version = base::StringPrintf(
|
||||
"%d.%d.%d", CEF_VERSION_MAJOR, CHROME_VERSION_BUILD, CEF_REVISION);
|
||||
*version = PRODUCT_VERSION;
|
||||
}
|
||||
|
||||
base::FilePath CefCrashReporterClient::GetReporterLogFilename() {
|
||||
|
@ -11,30 +11,30 @@
|
||||
class CefCrashReporterClient : public crash_reporter::CrashReporterClient {
|
||||
public:
|
||||
CefCrashReporterClient();
|
||||
virtual ~CefCrashReporterClient();
|
||||
~CefCrashReporterClient() override;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Returns a textual description of the product type and version to include
|
||||
// in the crash report.
|
||||
virtual void GetProductNameAndVersion(const base::FilePath& exe_path,
|
||||
base::string16* product_name,
|
||||
base::string16* version,
|
||||
base::string16* special_build,
|
||||
base::string16* channel_name) OVERRIDE;
|
||||
void GetProductNameAndVersion(const base::FilePath& exe_path,
|
||||
base::string16* product_name,
|
||||
base::string16* version,
|
||||
base::string16* special_build,
|
||||
base::string16* channel_name) override;
|
||||
#endif
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS)
|
||||
// Returns a textual description of the product type and version to include
|
||||
// in the crash report.
|
||||
virtual void GetProductNameAndVersion(std::string* product_name,
|
||||
std::string* version) OVERRIDE;
|
||||
void GetProductNameAndVersion(const char** product_name,
|
||||
const char** version) override;
|
||||
|
||||
virtual base::FilePath GetReporterLogFilename() OVERRIDE;
|
||||
base::FilePath GetReporterLogFilename() override;
|
||||
#endif
|
||||
|
||||
// The location where minidump files should be written. Returns true if
|
||||
// |crash_dir| was set.
|
||||
virtual bool GetCrashDumpLocation(base::FilePath* crash_dir) OVERRIDE;
|
||||
bool GetCrashDumpLocation(base::FilePath* crash_dir) override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(CefCrashReporterClient);
|
||||
|
@ -18,30 +18,29 @@ class CefDragDataImpl : public CefDragData {
|
||||
public:
|
||||
CefDragDataImpl();
|
||||
explicit CefDragDataImpl(const content::DropData& data);
|
||||
virtual CefRefPtr<CefDragData> Clone();
|
||||
virtual bool IsReadOnly();
|
||||
|
||||
virtual bool IsLink();
|
||||
virtual bool IsFragment();
|
||||
virtual bool IsFile();
|
||||
virtual CefString GetLinkURL();
|
||||
virtual CefString GetLinkTitle();
|
||||
virtual CefString GetLinkMetadata();
|
||||
virtual CefString GetFragmentText();
|
||||
virtual CefString GetFragmentHtml();
|
||||
virtual CefString GetFragmentBaseURL();
|
||||
virtual CefString GetFileName();
|
||||
virtual size_t GetFileContents(CefRefPtr<CefStreamWriter> writer);
|
||||
virtual bool GetFileNames(std::vector<CefString>& names);
|
||||
|
||||
virtual void SetLinkURL(const CefString& url);
|
||||
virtual void SetLinkTitle(const CefString& title);
|
||||
virtual void SetLinkMetadata(const CefString& data);
|
||||
virtual void SetFragmentText(const CefString& text);
|
||||
virtual void SetFragmentHtml(const CefString& fragment);
|
||||
virtual void SetFragmentBaseURL(const CefString& fragment);
|
||||
virtual void ResetFileContents();
|
||||
virtual void AddFile(const CefString& path, const CefString& display_name);
|
||||
CefRefPtr<CefDragData> Clone() override;
|
||||
bool IsReadOnly() override;
|
||||
bool IsLink() override;
|
||||
bool IsFragment() override;
|
||||
bool IsFile() override;
|
||||
CefString GetLinkURL() override;
|
||||
CefString GetLinkTitle() override;
|
||||
CefString GetLinkMetadata() override;
|
||||
CefString GetFragmentText() override;
|
||||
CefString GetFragmentHtml() override;
|
||||
CefString GetFragmentBaseURL() override;
|
||||
CefString GetFileName() override;
|
||||
size_t GetFileContents(CefRefPtr<CefStreamWriter> writer) override;
|
||||
bool GetFileNames(std::vector<CefString>& names) override;
|
||||
void SetLinkURL(const CefString& url) override;
|
||||
void SetLinkTitle(const CefString& title) override;
|
||||
void SetLinkMetadata(const CefString& data) override;
|
||||
void SetFragmentText(const CefString& text) override;
|
||||
void SetFragmentHtml(const CefString& fragment) override;
|
||||
void SetFragmentBaseURL(const CefString& fragment) override;
|
||||
void ResetFileContents() override;
|
||||
void AddFile(const CefString& path, const CefString& display_name) override;
|
||||
|
||||
// This method is not safe. Use Lock/Unlock to get mutually exclusive access.
|
||||
const content::DropData& drop_data() {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "base/base_switches.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
@ -151,7 +151,7 @@ class CefUIThread : public base::Thread {
|
||||
main_function_params_(main_function_params) {
|
||||
}
|
||||
|
||||
virtual void Init() OVERRIDE {
|
||||
void Init() override {
|
||||
#if defined(OS_WIN)
|
||||
// Initializes the COM library on the current thread.
|
||||
CoInitialize(NULL);
|
||||
@ -165,7 +165,7 @@ class CefUIThread : public base::Thread {
|
||||
CHECK_EQ(exit_code, -1);
|
||||
}
|
||||
|
||||
virtual void CleanUp() OVERRIDE {
|
||||
void CleanUp() override {
|
||||
browser_runner_->Shutdown();
|
||||
browser_runner_.reset(NULL);
|
||||
|
||||
|
@ -30,21 +30,21 @@ class CefContentUtilityClient;
|
||||
class CefMainDelegate : public content::ContentMainDelegate {
|
||||
public:
|
||||
explicit CefMainDelegate(CefRefPtr<CefApp> application);
|
||||
virtual ~CefMainDelegate();
|
||||
~CefMainDelegate() override;
|
||||
|
||||
virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
|
||||
virtual void PreSandboxStartup() OVERRIDE;
|
||||
virtual int RunProcess(
|
||||
bool BasicStartupComplete(int* exit_code) override;
|
||||
void PreSandboxStartup() override;
|
||||
int RunProcess(
|
||||
const std::string& process_type,
|
||||
const content::MainFunctionParams& main_function_params) OVERRIDE;
|
||||
virtual void ProcessExiting(const std::string& process_type) OVERRIDE;
|
||||
const content::MainFunctionParams& main_function_params) override;
|
||||
void ProcessExiting(const std::string& process_type) override;
|
||||
#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
|
||||
virtual void ZygoteForked() OVERRIDE;
|
||||
void ZygoteForked() override;
|
||||
#endif
|
||||
virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
|
||||
virtual content::ContentRendererClient*
|
||||
CreateContentRendererClient() OVERRIDE;
|
||||
virtual content::ContentUtilityClient* CreateContentUtilityClient() OVERRIDE;
|
||||
content::ContentBrowserClient* CreateContentBrowserClient() override;
|
||||
content::ContentRendererClient*
|
||||
CreateContentRendererClient() override;
|
||||
content::ContentUtilityClient* CreateContentUtilityClient() override;
|
||||
|
||||
// Shut down the browser runner.
|
||||
void ShutdownBrowser();
|
||||
|
@ -23,11 +23,11 @@ class CefProcessMessageImpl
|
||||
bool CopyTo(Cef_Request_Params& target);
|
||||
|
||||
// CefProcessMessage methods.
|
||||
virtual bool IsValid() OVERRIDE;
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual CefRefPtr<CefProcessMessage> Copy() OVERRIDE;
|
||||
virtual CefString GetName() OVERRIDE;
|
||||
virtual CefRefPtr<CefListValue> GetArgumentList() OVERRIDE;
|
||||
bool IsValid() override;
|
||||
bool IsReadOnly() override;
|
||||
CefRefPtr<CefProcessMessage> Copy() override;
|
||||
CefString GetName() override;
|
||||
CefRefPtr<CefListValue> GetArgumentList() override;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefProcessMessageImpl);
|
||||
};
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "content/public/browser/resource_request_info.h"
|
||||
#include "content/public/common/resource_type.h"
|
||||
#include "net/base/elements_upload_data_stream.h"
|
||||
#include "net/base/upload_data_stream.h"
|
||||
#include "net/base/upload_element_reader.h"
|
||||
#include "net/base/upload_bytes_element_reader.h"
|
||||
@ -38,8 +39,6 @@ class BytesElementReader : public net::UploadBytesElementReader {
|
||||
DCHECK_EQ(net::UploadElement::TYPE_BYTES, element_->type());
|
||||
}
|
||||
|
||||
virtual ~BytesElementReader() {}
|
||||
|
||||
private:
|
||||
scoped_ptr<net::UploadElement> element_;
|
||||
|
||||
@ -68,8 +67,6 @@ class FileElementReader : public net::UploadFileElementReader {
|
||||
DCHECK_EQ(net::UploadElement::TYPE_FILE, element_->type());
|
||||
}
|
||||
|
||||
virtual ~FileElementReader() {}
|
||||
|
||||
private:
|
||||
scoped_ptr<net::UploadElement> element_;
|
||||
|
||||
@ -385,8 +382,8 @@ void CefRequestImpl::GetHeaderMap(const blink::WebURLRequest& request,
|
||||
public:
|
||||
explicit HeaderVisitor(HeaderMap* map) : map_(map) {}
|
||||
|
||||
virtual void visitHeader(const blink::WebString& name,
|
||||
const blink::WebString& value) {
|
||||
void visitHeader(const blink::WebString& name,
|
||||
const blink::WebString& value) override {
|
||||
map_->insert(std::make_pair(base::string16(name),
|
||||
base::string16(value)));
|
||||
}
|
||||
@ -505,13 +502,16 @@ void CefPostDataImpl::Set(const net::UploadDataStream& data_stream) {
|
||||
|
||||
CefRefPtr<CefPostDataElement> postelem;
|
||||
|
||||
const ScopedVector<net::UploadElementReader>& elements =
|
||||
data_stream.element_readers();
|
||||
ScopedVector<net::UploadElementReader>::const_iterator it = elements.begin();
|
||||
for (; it != elements.end(); ++it) {
|
||||
postelem = CefPostDataElement::Create();
|
||||
static_cast<CefPostDataElementImpl*>(postelem.get())->Set(**it);
|
||||
AddElement(postelem);
|
||||
const ScopedVector<net::UploadElementReader>* elements =
|
||||
data_stream.GetElementReaders();
|
||||
if (elements) {
|
||||
ScopedVector<net::UploadElementReader>::const_iterator it =
|
||||
elements->begin();
|
||||
for (; it != elements->end(); ++it) {
|
||||
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());
|
||||
}
|
||||
|
||||
return new net::UploadDataStream(element_readers.Pass(), 0);
|
||||
return new net::ElementsUploadDataStream(element_readers.Pass(), 0);
|
||||
}
|
||||
|
||||
void CefPostDataImpl::Set(const blink::WebHTTPBody& data) {
|
||||
|
@ -28,27 +28,26 @@ class WebURLRequest;
|
||||
class CefRequestImpl : public CefRequest {
|
||||
public:
|
||||
CefRequestImpl();
|
||||
~CefRequestImpl() {}
|
||||
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual CefString GetURL() OVERRIDE;
|
||||
virtual void SetURL(const CefString& url) OVERRIDE;
|
||||
virtual CefString GetMethod() OVERRIDE;
|
||||
virtual void SetMethod(const CefString& method) OVERRIDE;
|
||||
virtual CefRefPtr<CefPostData> GetPostData() OVERRIDE;
|
||||
virtual void SetPostData(CefRefPtr<CefPostData> postData) OVERRIDE;
|
||||
virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE;
|
||||
virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE;
|
||||
virtual void Set(const CefString& url,
|
||||
const CefString& method,
|
||||
CefRefPtr<CefPostData> postData,
|
||||
const HeaderMap& headerMap) OVERRIDE;
|
||||
virtual int GetFlags() OVERRIDE;
|
||||
virtual void SetFlags(int flags) OVERRIDE;
|
||||
virtual CefString GetFirstPartyForCookies() OVERRIDE;
|
||||
virtual void SetFirstPartyForCookies(const CefString& url) OVERRIDE;
|
||||
virtual ResourceType GetResourceType() OVERRIDE;
|
||||
virtual TransitionType GetTransitionType() OVERRIDE;
|
||||
bool IsReadOnly() override;
|
||||
CefString GetURL() override;
|
||||
void SetURL(const CefString& url) override;
|
||||
CefString GetMethod() override;
|
||||
void SetMethod(const CefString& method) override;
|
||||
CefRefPtr<CefPostData> GetPostData() override;
|
||||
void SetPostData(CefRefPtr<CefPostData> postData) override;
|
||||
void GetHeaderMap(HeaderMap& headerMap) override;
|
||||
void SetHeaderMap(const HeaderMap& headerMap) override;
|
||||
void Set(const CefString& url,
|
||||
const CefString& method,
|
||||
CefRefPtr<CefPostData> postData,
|
||||
const HeaderMap& headerMap) override;
|
||||
int GetFlags() override;
|
||||
void SetFlags(int flags) override;
|
||||
CefString GetFirstPartyForCookies() override;
|
||||
void SetFirstPartyForCookies(const CefString& url) override;
|
||||
ResourceType GetResourceType() override;
|
||||
TransitionType GetTransitionType() override;
|
||||
|
||||
// Populate this object from the URLRequest object.
|
||||
void Set(net::URLRequest* request);
|
||||
@ -95,14 +94,13 @@ class CefRequestImpl : public CefRequest {
|
||||
class CefPostDataImpl : public CefPostData {
|
||||
public:
|
||||
CefPostDataImpl();
|
||||
~CefPostDataImpl() {}
|
||||
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual size_t GetElementCount() OVERRIDE;
|
||||
virtual void GetElements(ElementVector& elements) OVERRIDE;
|
||||
virtual bool RemoveElement(CefRefPtr<CefPostDataElement> element) OVERRIDE;
|
||||
virtual bool AddElement(CefRefPtr<CefPostDataElement> element) OVERRIDE;
|
||||
virtual void RemoveElements();
|
||||
bool IsReadOnly() override;
|
||||
size_t GetElementCount() override;
|
||||
void GetElements(ElementVector& elements) override;
|
||||
bool RemoveElement(CefRefPtr<CefPostDataElement> element) override;
|
||||
bool AddElement(CefRefPtr<CefPostDataElement> element) override;
|
||||
void RemoveElements() override;
|
||||
|
||||
void Set(const net::UploadData& data);
|
||||
void Set(const net::UploadDataStream& data_stream);
|
||||
@ -128,16 +126,16 @@ class CefPostDataImpl : public CefPostData {
|
||||
class CefPostDataElementImpl : public CefPostDataElement {
|
||||
public:
|
||||
CefPostDataElementImpl();
|
||||
~CefPostDataElementImpl();
|
||||
~CefPostDataElementImpl() override;
|
||||
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual void SetToEmpty() OVERRIDE;
|
||||
virtual void SetToFile(const CefString& fileName) OVERRIDE;
|
||||
virtual void SetToBytes(size_t size, const void* bytes) OVERRIDE;
|
||||
virtual Type GetType() OVERRIDE;
|
||||
virtual CefString GetFile() OVERRIDE;
|
||||
virtual size_t GetBytesCount() OVERRIDE;
|
||||
virtual size_t GetBytes(size_t size, void* bytes) OVERRIDE;
|
||||
bool IsReadOnly() override;
|
||||
void SetToEmpty() override;
|
||||
void SetToFile(const CefString& fileName) override;
|
||||
void SetToBytes(size_t size, const void* bytes) override;
|
||||
Type GetType() override;
|
||||
CefString GetFile() override;
|
||||
size_t GetBytesCount() override;
|
||||
size_t GetBytes(size_t size, void* bytes) override;
|
||||
|
||||
void* GetBytes() { return data_.bytes.bytes; }
|
||||
|
||||
|
@ -185,8 +185,8 @@ void CefResponseImpl::Set(const blink::WebURLResponse& response) {
|
||||
public:
|
||||
explicit HeaderVisitor(HeaderMap* map) : map_(map) {}
|
||||
|
||||
virtual void visitHeader(const blink::WebString& name,
|
||||
const blink::WebString& value) {
|
||||
void visitHeader(const blink::WebString& name,
|
||||
const blink::WebString& value) override {
|
||||
map_->insert(std::make_pair(base::string16(name),
|
||||
base::string16(value)));
|
||||
}
|
||||
|
@ -22,19 +22,18 @@ class WebURLResponse;
|
||||
class CefResponseImpl : public CefResponse {
|
||||
public:
|
||||
CefResponseImpl();
|
||||
~CefResponseImpl() {}
|
||||
|
||||
// CefResponse methods.
|
||||
virtual bool IsReadOnly() OVERRIDE;
|
||||
virtual int GetStatus() OVERRIDE;
|
||||
virtual void SetStatus(int status) OVERRIDE;
|
||||
virtual CefString GetStatusText() OVERRIDE;
|
||||
virtual void SetStatusText(const CefString& statusText) OVERRIDE;
|
||||
virtual CefString GetMimeType() OVERRIDE;
|
||||
virtual void SetMimeType(const CefString& mimeType) OVERRIDE;
|
||||
virtual CefString GetHeader(const CefString& name) OVERRIDE;
|
||||
virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE;
|
||||
virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE;
|
||||
bool IsReadOnly() override;
|
||||
int GetStatus() override;
|
||||
void SetStatus(int status) override;
|
||||
CefString GetStatusText() override;
|
||||
void SetStatusText(const CefString& statusText) override;
|
||||
CefString GetMimeType() override;
|
||||
void SetMimeType(const CefString& mimeType) override;
|
||||
CefString GetHeader(const CefString& name) override;
|
||||
void GetHeaderMap(HeaderMap& headerMap) override;
|
||||
void SetHeaderMap(const HeaderMap& headerMap) override;
|
||||
|
||||
net::HttpResponseHeaders* GetResponseHeaders();
|
||||
void SetResponseHeaders(const net::HttpResponseHeaders& headers);
|
||||
|
@ -18,10 +18,10 @@ class CefSchemeRegistrarImpl : public CefSchemeRegistrar {
|
||||
CefSchemeRegistrarImpl();
|
||||
|
||||
// CefSchemeRegistrar methods.
|
||||
virtual bool AddCustomScheme(const CefString& scheme_name,
|
||||
bool is_standard,
|
||||
bool is_local,
|
||||
bool is_display_isolated) OVERRIDE;
|
||||
bool AddCustomScheme(const CefString& scheme_name,
|
||||
bool is_standard,
|
||||
bool is_local,
|
||||
bool is_display_isolated) override;
|
||||
|
||||
void GetStandardSchemes(std::vector<std::string>* standard_schemes);
|
||||
|
||||
|
@ -21,12 +21,12 @@ class CefTaskRunnerImpl : public CefTaskRunner {
|
||||
static scoped_refptr<base::SequencedTaskRunner> GetCurrentTaskRunner();
|
||||
|
||||
// CefTaskRunner methods:
|
||||
virtual bool IsSame(CefRefPtr<CefTaskRunner> that) OVERRIDE;
|
||||
virtual bool BelongsToCurrentThread() OVERRIDE;
|
||||
virtual bool BelongsToThread(CefThreadId threadId) OVERRIDE;
|
||||
virtual bool PostTask(CefRefPtr<CefTask> task) OVERRIDE;
|
||||
virtual bool PostDelayedTask(CefRefPtr<CefTask> task,
|
||||
int64 delay_ms) OVERRIDE;
|
||||
bool IsSame(CefRefPtr<CefTaskRunner> that) override;
|
||||
bool BelongsToCurrentThread() override;
|
||||
bool BelongsToThread(CefThreadId threadId) override;
|
||||
bool PostTask(CefRefPtr<CefTask> task) override;
|
||||
bool PostDelayedTask(CefRefPtr<CefTask> task,
|
||||
int64 delay_ms) override;
|
||||
|
||||
private:
|
||||
scoped_refptr<base::SequencedTaskRunner> task_runner_;
|
||||
|
@ -51,7 +51,7 @@ class CefTrackNode {
|
||||
class CefTrackManager : public CefBase {
|
||||
public:
|
||||
CefTrackManager();
|
||||
virtual ~CefTrackManager();
|
||||
~CefTrackManager() override;
|
||||
|
||||
// Add an object to be tracked by this manager.
|
||||
void Add(CefTrackNode* object);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user