Commit eef89ccd authored by Marshall Greenblatt's avatar Marshall Greenblatt

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
parent 470518a5
......@@ -7,5 +7,5 @@
# https://code.google.com/p/chromiumembedded/wiki/BranchesAndBuilding
{
'chromium_checkout': '267aeeb8d85c8503a7fd12bd14654b8ea78d3974',
'chromium_checkout': '40af916dfb14ca12890e3a7cf8b50d8e62c69695',
}
......@@ -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',
......
......@@ -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.
......
This diff is collapsed.
......@@ -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());