Commit e7ddc933 authored by Marshall Greenblatt's avatar Marshall Greenblatt

Update to Chromium revision 6e53600d (#386251)

- Remove |accept_lang| parameter from CefJSDialogHandler::OnJSDialog
  and CefFormatUrlForSecurityDisplay (see https://crbug.com/336973#c36).
- Remove remaining NPAPI-related code including functions from
  cef_web_plugin.h (see https://crbug.com/493212#c55).
- Mac: 10.7+ deployment target is now required for client applications.
- Mac: Remove CefBrowserHost::SetWindowVisibility (issue #1375). No
  replacement is required for windowed rendering. Use WasHidden for
  off-screen rendering.
- Windows: Visual Studio 2015 Update 2 is now required when building
  CEF/Chromium.
parent 3c957f92
......@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': '0bfd25d460a1cff98f9f0573a0d6cc072ecbe359',
'chromium_checkout': '6e53600def8f60d8c632fadc70d7c1939ccea347',
}
......@@ -978,7 +978,6 @@
'<(DEPTH)/content/content.gyp:content_browser',
'<(DEPTH)/content/content.gyp:content_common',
'<(DEPTH)/content/content.gyp:content_gpu',
'<(DEPTH)/content/content.gyp:content_plugin',
'<(DEPTH)/content/content.gyp:content_ppapi_plugin',
'<(DEPTH)/content/content.gyp:content_renderer',
'<(DEPTH)/content/content.gyp:content_resources',
......@@ -1518,9 +1517,6 @@
'<(DEPTH)/chrome/browser/printing/pdf_to_emf_converter.cc',
'<(DEPTH)/chrome/browser/printing/pdf_to_emf_converter.h',
'<(DEPTH)/chrome/common/chrome_utility_printing_messages.h',
# Include sources for font cache.
'<(DEPTH)/chrome/utility/font_cache_handler_win.cc',
'<(DEPTH)/chrome/utility/font_cache_handler_win.h',
],
}],
[ 'OS=="mac"', {
......
......@@ -321,13 +321,6 @@ typedef struct _cef_browser_host_t {
///
void (CEF_CALLBACK *set_focus)(struct _cef_browser_host_t* self, int focus);
///
// Set whether the window containing the browser is visible
// (minimized/unminimized, app hidden/unhidden, etc). Only used on Mac OS X.
///
void (CEF_CALLBACK *set_window_visibility)(struct _cef_browser_host_t* self,
int visible);
///
// Retrieve the window handle for this browser. If this browser is wrapped in
// a cef_browser_view_t this function should be called on the browser process
......
......@@ -76,26 +76,25 @@ typedef struct _cef_jsdialog_handler_t {
cef_base_t base;
///
// Called to run a JavaScript dialog. If |origin_url| and |accept_lang| are
// non-NULL they can be passed to the CefFormatUrlForSecurityDisplay function
// to retrieve a secure and user-friendly display string. The
// |default_prompt_text| value will be specified for prompt dialogs only. Set
// |suppress_message| to true (1) and return false (0) to suppress the message
// (suppressing messages is preferable to immediately executing the callback
// as this is used to detect presumably malicious behavior like spamming alert
// messages in onbeforeunload). Set |suppress_message| to false (0) and return
// false (0) to use the default implementation (the default implementation
// will show one modal dialog at a time and suppress any additional dialog
// requests until the displayed dialog is dismissed). Return true (1) if the
// application will use a custom dialog or if the callback has been executed
// immediately. Custom dialogs may be either modal or modeless. If a custom
// dialog is used the application must execute |callback| once the custom
// dialog is dismissed.
// Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be
// passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure
// and user-friendly display string. The |default_prompt_text| value will be
// specified for prompt dialogs only. Set |suppress_message| to true (1) and
// return false (0) to suppress the message (suppressing messages is
// preferable to immediately executing the callback as this is used to detect
// presumably malicious behavior like spamming alert messages in
// onbeforeunload). Set |suppress_message| to false (0) and return false (0)
// to use the default implementation (the default implementation will show one
// modal dialog at a time and suppress any additional dialog requests until
// the displayed dialog is dismissed). Return true (1) if the application will
// use a custom dialog or if the callback has been executed immediately.
// Custom dialogs may be either modal or modeless. If a custom dialog is used
// the application must execute |callback| once the custom dialog is
// dismissed.
///
int (CEF_CALLBACK *on_jsdialog)(struct _cef_jsdialog_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* origin_url,
const cef_string_t* accept_lang, cef_jsdialog_type_t dialog_type,
const cef_string_t* message_text,
cef_jsdialog_type_t dialog_type, const cef_string_t* message_text,
const cef_string_t* default_prompt_text,
struct _cef_jsdialog_callback_t* callback, int* suppress_message);
......
......@@ -65,14 +65,14 @@ CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,
// friendly way to help users make security-related decisions (or in other
// circumstances when people need to distinguish sites, origins, or otherwise-
// simplified URLs from each other). Internationalized domain names (IDN) may be
// presented in Unicode if |languages| accepts the Unicode representation. The
// returned value will (a) omit the path for standard schemes, excepting file
// and filesystem, and (b) omit the port if it is the default for the scheme. Do
// not use this for URLs which will be parsed or sent to other applications.
// presented in Unicode if the conversion is considered safe. The returned value
// will (a) omit the path for standard schemes, excepting file and filesystem,
// and (b) omit the port if it is the default for the scheme. Do not use this
// for URLs which will be parsed or sent to other applications.
///
// The resulting string must be freed by calling cef_string_userfree_free().
CEF_EXPORT cef_string_userfree_t cef_format_url_for_security_display(
const cef_string_t* origin_url, const cef_string_t* languages);
const cef_string_t* origin_url);
///
// Returns the mime type for the specified file extension or an NULL string if
......
......@@ -141,27 +141,6 @@ CEF_EXPORT void cef_visit_web_plugin_info(
///
CEF_EXPORT void cef_refresh_web_plugins();
///
// Add a plugin path (directory + file). This change may not take affect until
// after cef_refresh_web_plugins() is called. Can be called on any thread in the
// browser process.
///
CEF_EXPORT void cef_add_web_plugin_path(const cef_string_t* path);
///
// Add a plugin directory. This change may not take affect until after
// cef_refresh_web_plugins() is called. Can be called on any thread in the
// browser process.
///
CEF_EXPORT void cef_add_web_plugin_directory(const cef_string_t* dir);
///
// Remove a plugin path (directory + file). This change may not take affect
// until after cef_refresh_web_plugins() is called. Can be called on any thread
// in the browser process.
///
CEF_EXPORT void cef_remove_web_plugin_path(const cef_string_t* path);
///
// Unregister an internal plugin. This may be undone the next time
// cef_refresh_web_plugins() is called. Can be called on any thread in the
......@@ -169,12 +148,6 @@ CEF_EXPORT void cef_remove_web_plugin_path(const cef_string_t* path);
///
CEF_EXPORT void cef_unregister_internal_web_plugin(const cef_string_t* path);
///
// Force a plugin to shutdown. Can be called on any thread in the browser
// process but will be executed on the IO thread.
///
CEF_EXPORT void cef_force_web_plugin_shutdown(const cef_string_t* path);
///
// Register a plugin crash. Can be called on any thread in the browser process
// but will be executed on the IO thread.
......
......@@ -353,13 +353,6 @@ class CefBrowserHost : public virtual CefBase {
/*--cef()--*/
virtual void SetFocus(bool focus) =0;
///
// Set whether the window containing the browser is visible
// (minimized/unminimized, app hidden/unhidden, etc). Only used on Mac OS X.
///
/*--cef()--*/
virtual void SetWindowVisibility(bool visible) =0;
///
// Retrieve the window handle for this browser. If this browser is wrapped in
// a CefBrowserView this method should be called on the browser process UI
......
......@@ -68,27 +68,25 @@ class CefJSDialogHandler : public virtual CefBase {
typedef cef_jsdialog_type_t JSDialogType;
///
// Called to run a JavaScript dialog. If |origin_url| and |accept_lang| are
// non-empty they can be passed to the CefFormatUrlForSecurityDisplay function
// to retrieve a secure and user-friendly display string. The
// |default_prompt_text| value will be specified for prompt dialogs only. Set
// |suppress_message| to true and return false to suppress the message
// (suppressing messages is preferable to immediately executing the callback
// as this is used to detect presumably malicious behavior like spamming alert
// messages in onbeforeunload). Set |suppress_message| to false and return
// false to use the default implementation (the default implementation will
// show one modal dialog at a time and suppress any additional dialog requests
// until the displayed dialog is dismissed). Return true if the application
// will use a custom dialog or if the callback has been executed immediately.
// Custom dialogs may be either modal or modeless. If a custom dialog is used
// the application must execute |callback| once the custom dialog is
// dismissed.
// Called to run a JavaScript dialog. If |origin_url| is non-empty it can be
// passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure
// and user-friendly display string. The |default_prompt_text| value will be
// specified for prompt dialogs only. Set |suppress_message| to true and
// return false to suppress the message (suppressing messages is preferable to
// immediately executing the callback as this is used to detect presumably
// malicious behavior like spamming alert messages in onbeforeunload). Set
// |suppress_message| to false and return false to use the default
// implementation (the default implementation will show one modal dialog at a
// time and suppress any additional dialog requests until the displayed dialog
// is dismissed). Return true if the application will use a custom dialog or
// if the callback has been executed immediately. Custom dialogs may be either
// modal or modeless. If a custom dialog is used the application must execute
// |callback| once the custom dialog is dismissed.
///
/*--cef(optional_param=origin_url,optional_param=accept_lang,
optional_param=message_text,optional_param=default_prompt_text)--*/
virtual bool OnJSDialog(CefRefPtr<CefBrowser> browser,
const CefString& origin_url,
const CefString& accept_lang,
JSDialogType dialog_type,
const CefString& message_text,
const CefString& default_prompt_text,
......
......@@ -65,14 +65,13 @@ bool CefCreateURL(const CefURLParts& parts,
// friendly way to help users make security-related decisions (or in other
// circumstances when people need to distinguish sites, origins, or otherwise-
// simplified URLs from each other). Internationalized domain names (IDN) may be
// presented in Unicode if |languages| accepts the Unicode representation. The
// returned value will (a) omit the path for standard schemes, excepting file
// and filesystem, and (b) omit the port if it is the default for the scheme. Do
// not use this for URLs which will be parsed or sent to other applications.
// presented in Unicode if the conversion is considered safe. The returned value
// will (a) omit the path for standard schemes, excepting file and filesystem,
// and (b) omit the port if it is the default for the scheme. Do not use this
// for URLs which will be parsed or sent to other applications.
///
/*--cef(optional_param=languages)--*/
CefString CefFormatUrlForSecurityDisplay(const CefString& origin_url,
const CefString& languages);
CefString CefFormatUrlForSecurityDisplay(const CefString& origin_url);
///
// Returns the mime type for the specified file extension or an empty string if
......
......@@ -104,30 +104,6 @@ void CefVisitWebPluginInfo(CefRefPtr<CefWebPluginInfoVisitor> visitor);
/*--cef()--*/
void CefRefreshWebPlugins();
///
// Add a plugin path (directory + file). This change may not take affect until
// after CefRefreshWebPlugins() is called. Can be called on any thread in the
// browser process.
///
/*--cef()--*/
void CefAddWebPluginPath(const CefString& path);
///
// Add a plugin directory. This change may not take affect until after
// CefRefreshWebPlugins() is called. Can be called on any thread in the browser
// process.
///
/*--cef()--*/
void CefAddWebPluginDirectory(const CefString& dir);
///
// Remove a plugin path (directory + file). This change may not take affect
// until after CefRefreshWebPlugins() is called. Can be called on any thread in
// the browser process.
///
/*--cef()--*/
void CefRemoveWebPluginPath(const CefString& path);
///
// Unregister an internal plugin. This may be undone the next time
// CefRefreshWebPlugins() is called. Can be called on any thread in the browser
......@@ -136,13 +112,6 @@ void CefRemoveWebPluginPath(const CefString& path);
/*--cef()--*/
void CefUnregisterInternalWebPlugin(const CefString& path);
///
// Force a plugin to shutdown. Can be called on any thread in the browser
// process but will be executed on the IO thread.
///
/*--cef()--*/
void CefForceWebPluginShutdown(const CefString& path);
///
// Register a plugin crash. Can be called on any thread in the browser process
// but will be executed on the IO thread.
......
......@@ -41,6 +41,7 @@
#include "include/base/cef_macros.h"
#include "include/base/cef_ref_counted.h"
#include "include/base/cef_scoped_ptr.h"
#include "include/base/cef_weak_ptr.h"
#include "include/cef_request_handler.h"
#include "include/wrapper/cef_closure_task.h"
......
......@@ -14,6 +14,8 @@
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h"
#include "extensions/browser/extension_protocols.h"
#include "extensions/common/constants.h"
#ifndef NDEBUG
base::AtomicRefCount CefBrowserContext::DebugObjCt = 0;
......@@ -65,6 +67,21 @@ void CefBrowserContext::Initialize() {
extension_system_->Init();
}
void CefBrowserContext::CreateProtocolHandlers(
content::ProtocolHandlerMap* protocol_handlers) {
if (extensions::ExtensionsEnabled()) {
// Handle only chrome-extension:// requests. CEF does not support
// chrome-extension-resource:// requests (it does not store shared extension
// data in its installation directory).
extensions::InfoMap* extension_info_map =
extension_system()->info_map();
(*protocol_handlers)[extensions::kExtensionScheme] =
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
extensions::CreateExtensionProtocolHandler(
IsOffTheRecord(), extension_info_map).release());
}
}
void CefBrowserContext::Shutdown() {
CEF_REQUIRE_UIT();
......
......@@ -139,16 +139,6 @@ class CefBrowserContext
// thread.
virtual CefRefPtr<CefRequestContextHandler> GetHandler() const = 0;
// Called from CefContentBrowserClient to create the URLRequestContextGetter.
virtual net::URLRequestContextGetter* CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) = 0;
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) = 0;
// Settings for plugins and extensions.
virtual HostContentSettingsMap* GetHostContentSettingsMap() = 0;
......@@ -171,6 +161,8 @@ class CefBrowserContext
protected:
~CefBrowserContext() override;
void CreateProtocolHandlers(content::ProtocolHandlerMap* protocol_handlers);
// Must be called before the child object destructor has completed.
void Shutdown();
......@@ -180,7 +172,7 @@ class CefBrowserContext
content::BrowserThread::UI>;
friend class base::DeleteHelper<CefBrowserContext>;
scoped_ptr<CefResourceContext> resource_context_;
std::unique_ptr<CefResourceContext> resource_context_;
// Owned by the KeyedService system.
extensions::CefExtensionSystem* extension_system_;
......
......@@ -146,7 +146,7 @@ class CefVisitedLinkListener : public visitedlink::VisitedLinkMaster::Listener {
void CreateListenerForContext(const CefBrowserContext* context) {
CEF_REQUIRE_UIT();
scoped_ptr<visitedlink::VisitedLinkEventListener> listener(
std::unique_ptr<visitedlink::VisitedLinkEventListener> listener(
new visitedlink::VisitedLinkEventListener(
master_, const_cast<CefBrowserContext*>(context)));
listener_map_.insert(std::make_pair(context, std::move(listener)));
......@@ -187,7 +187,7 @@ class CefVisitedLinkListener : public visitedlink::VisitedLinkMaster::Listener {
// Map of CefBrowserContext to the associated VisitedLinkEventListener.
typedef std::map<const CefBrowserContext*,
scoped_ptr<visitedlink::VisitedLinkEventListener> >
std::unique_ptr<visitedlink::VisitedLinkEventListener> >
ListenerMap;
ListenerMap listener_map_;
......@@ -333,11 +333,11 @@ base::FilePath CefBrowserContextImpl::GetPath() const {
return cache_path_;
}
scoped_ptr<content::ZoomLevelDelegate>
std::unique_ptr<content::ZoomLevelDelegate>
CefBrowserContextImpl::CreateZoomLevelDelegate(
const base::FilePath& partition_path) {
if (cache_path_.empty())
return scoped_ptr<content::ZoomLevelDelegate>();
return std::unique_ptr<content::ZoomLevelDelegate>();
return make_scoped_ptr(new ChromeZoomLevelPrefs(
GetPrefs(), cache_path_, partition_path,
......@@ -362,12 +362,6 @@ net::URLRequestContextGetter* CefBrowserContextImpl::GetRequestContext() {
return GetDefaultStoragePartition(this)->GetURLRequestContext();
}
net::URLRequestContextGetter*
CefBrowserContextImpl::GetRequestContextForRenderProcess(
int renderer_child_id) {
return GetRequestContext();
}
net::URLRequestContextGetter*
CefBrowserContextImpl::GetMediaRequestContext() {
return GetRequestContext();
......@@ -442,10 +436,12 @@ net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
DCHECK(!url_request_getter_.get());
// Initialize the proxy configuration service.
scoped_ptr<net::ProxyConfigService> proxy_config_service(
std::unique_ptr<net::ProxyConfigService> proxy_config_service(
ProxyServiceFactory::CreateProxyConfigService(
pref_proxy_config_tracker_.get()));
CreateProtocolHandlers(protocol_handlers);
url_request_getter_ = new CefURLRequestContextGetterImpl(
settings_,
GetPrefs(),
......
......@@ -12,7 +12,6 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "components/proxy_config/pref_proxy_config_tracker.h"
#include "components/visitedlink/browser/visitedlink_delegate.h"
......@@ -56,13 +55,11 @@ class CefBrowserContextImpl : public CefBrowserContext,
// BrowserContext methods.
base::FilePath GetPath() const override;
scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
const base::FilePath& partition_path) 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;
......@@ -121,15 +118,15 @@ class CefBrowserContextImpl : public CefBrowserContext,
typedef std::vector<const CefBrowserContextProxy*> ProxyList;
ProxyList proxy_list_;
scoped_ptr<PrefService> pref_service_;
scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
std::unique_ptr<PrefService> pref_service_;
std::unique_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
scoped_ptr<CefDownloadManagerDelegate> download_manager_delegate_;
std::unique_ptr<CefDownloadManagerDelegate> download_manager_delegate_;
scoped_refptr<CefURLRequestContextGetterImpl> url_request_getter_;
scoped_ptr<content::PermissionManager> permission_manager_;
scoped_ptr<CefSSLHostStateDelegate> ssl_host_state_delegate_;
std::unique_ptr<content::PermissionManager> permission_manager_;
std::unique_ptr<CefSSLHostStateDelegate> ssl_host_state_delegate_;
scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
scoped_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_;
std::unique_ptr<visitedlink::VisitedLinkMaster> visitedlink_master_;
// |visitedlink_listener_| is owned by visitedlink_master_.
CefVisitedLinkListener* visitedlink_listener_;
......
......@@ -82,7 +82,7 @@ base::FilePath CefBrowserContextProxy::GetPath() const {
return parent_->GetPath();
}
scoped_ptr<content::ZoomLevelDelegate>
std::unique_ptr<content::ZoomLevelDelegate>
CefBrowserContextProxy::CreateZoomLevelDelegate(
const base::FilePath& partition_path) {
return parent_->CreateZoomLevelDelegate(partition_path);
......@@ -106,12 +106,6 @@ net::URLRequestContextGetter* CefBrowserContextProxy::GetRequestContext() {
return GetDefaultStoragePartition(this)->GetURLRequestContext();
}
net::URLRequestContextGetter*
CefBrowserContextProxy::GetRequestContextForRenderProcess(
int renderer_child_id) {
return GetRequestContext();
}
net::URLRequestContextGetter*
CefBrowserContextProxy::GetMediaRequestContext() {
return GetRequestContext();
......@@ -179,6 +173,9 @@ net::URLRequestContextGetter* CefBrowserContextProxy::CreateRequestContext(
content::URLRequestInterceptorScopedVector request_interceptors) {
CEF_REQUIRE_UIT();
DCHECK(!url_request_getter_.get());
CreateProtocolHandlers(protocol_handlers);
url_request_getter_ =
new CefURLRequestContextGetterProxy(handler_, parent_->request_context());
resource_context()->set_url_request_context_getter(url_request_getter_.get());
......
......@@ -11,7 +11,6 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
class CefDownloadManagerDelegate;
class CefURLRequestContextGetterProxy;
......@@ -31,13 +30,11 @@ class CefBrowserContextProxy : public CefBrowserContext {
// BrowserContext methods.
base::FilePath GetPath() const override;
scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
const base::FilePath& partition_path) 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;
......@@ -88,7 +85,7 @@ class CefBrowserContextProxy : public CefBrowserContext {
CefRefPtr<CefRequestContextHandler> handler_;
scoped_refptr<CefBrowserContextImpl> parent_;
scoped_ptr<CefDownloadManagerDelegate> download_manager_delegate_;
std::unique_ptr<CefDownloadManagerDelegate> download_manager_delegate_;
scoped_refptr<CefURLRequestContextGetterProxy> url_request_getter_;
DISALLOW_COPY_AND_ASSIGN(CefBrowserContextProxy);
......
......@@ -42,7 +42,7 @@
#include "chrome/browser/spellchecker/spellcheck_factory.h"
#include "chrome/browser/spellchecker/spellcheck_service.h"
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/common/view_messages.h"
#include "content/public/browser/download_manager.h"
......@@ -265,7 +265,7 @@ CefRefPtr<CefBrowser> CefBrowserHost::CreateBrowserSync(
// static
CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::Create(
CreateParams& create_params) {
scoped_ptr<CefBrowserPlatformDelegate> platform_delegate =
std::unique_ptr<CefBrowserPlatformDelegate> platform_delegate =
CefBrowserPlatformDelegate::Create(create_params);
CHECK(platform_delegate);
......@@ -331,7 +331,7 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::CreateInternal(
CefRefPtr<CefBrowserHostImpl> opener,
bool is_devtools_popup,
CefRefPtr<CefRequestContext> request_context,
scoped_ptr<CefBrowserPlatformDelegate> platform_delegate) {
std::unique_ptr<CefBrowserPlatformDelegate> platform_delegate) {
CEF_REQUIRE_UIT();
DCHECK(web_contents);
DCHECK(browser_info);
......@@ -600,22 +600,6 @@ void CefBrowserHostImpl::SetFocus(bool focus) {
platform_delegate_->SendFocusEvent(false);
}
void CefBrowserHostImpl::SetWindowVisibility(bool visible) {
#if defined(OS_MACOSX)
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::SetWindowVisibility,
this, visible));
return;
}
if (!web_contents())
return;
platform_delegate_->SetWindowVisibility(false);
#endif
}
CefWindowHandle CefBrowserHostImpl::GetWindowHandle() {
if (IsViewsHosted() && CEF_CURRENTLY_ON_UIT()) {
// Always return the most up-to-date window handle for a views-hosted
......@@ -710,7 +694,7 @@ void CefBrowserHostImpl::StartDownload(const CefString& url) {
if (!manager)
return;
scoped_ptr<content::DownloadUrlParameters> params(
std::unique_ptr<content::DownloadUrlParameters> params(
content::DownloadUrlParameters::FromWebContents(web_contents(), gurl));
manager->DownloadUrl(std::move(params));
}
......@@ -1206,7 +1190,7 @@ void CefBrowserHostImpl::ReloadIgnoreCache() {
}
if (web_contents_.get())
web_contents_->GetController().ReloadIgnoringCache(true);
web_contents_->GetController().ReloadBypassingCache(true);
} else {
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::ReloadIgnoreCache, this));
......@@ -2201,7 +2185,7 @@ void CefBrowserHostImpl::WebContentsCreated(
content::WebContents* new_contents) {
CefBrowserSettings settings;
CefRefPtr<CefClient> client;
scoped_ptr<CefBrowserPlatformDelegate> platform_delegate;
std::unique_ptr<CefBrowserPlatformDelegate> platform_delegate;
CefBrowserInfoManager::GetInstance()->WebContentsCreated(
source_contents, target_url, new_contents, settings, client,
......@@ -2285,7 +2269,7 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
if (!command_line->HasSwitch(switches::kEnableMediaStream)) {
// Cancel the request.
callback.Run(devices, content::MEDIA_DEVICE_PERMISSION_DENIED,
scoped_ptr<content::MediaStreamUI>());
std::unique_ptr<content::MediaStreamUI>());
return;
}
......@@ -2318,7 +2302,7 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
}
callback.Run(devices, content::MEDIA_DEVICE_OK,
scoped_ptr<content::MediaStreamUI>());
std::unique_ptr<