Update to Chromium revision 1ae106db (#414607)

This commit is contained in:
Marshall Greenblatt
2016-08-31 14:25:56 +03:00
parent c48cac8dc4
commit 9064e30296
89 changed files with 831 additions and 710 deletions

View File

@ -101,9 +101,11 @@ import("//build/config/ui.gni")
import("//cef/cef_repack_locales.gni")
import("//media/media_options.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//third_party/icu/config.gni")
import("//third_party/widevine/cdm/widevine.gni")
import("//tools/grit/repack.gni")
import("//tools/grit/grit_rule.gni")
import("//v8/gni/v8.gni")
if (is_clang) {
import("//build/config/clang/clang.gni")
}
@ -124,6 +126,7 @@ if (is_win) {
#
# Verify required global arguments configured via `gn args`.
# Set by GetRequiredArgs() in //cef/tools/gn_args.py.
#
# Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1.
@ -141,6 +144,10 @@ if (is_clang) {
assert(!clang_use_chrome_plugins)
}
# CEF does not currently support component builds. See
# https://bitbucket.org/chromiumembedded/cef/issues/1617
assert(!is_component_build)
#
# Local variables.
@ -541,6 +548,7 @@ static_library("libcef_static") {
# libcef/common/extensions/api/README.txt for details.
#"libcef/common/extensions/api",
#"libcef/common/extensions/api:api_registration",
"libcef/common/extensions/api:extensions_features",
# Normal build dependencies. Should be sorted alphabetically.
"//base",
@ -564,7 +572,6 @@ static_library("libcef_static") {
"//components/keyed_service/content:content",
"//components/keyed_service/core:core",
"//components/navigation_interception",
"//components/network_session_configurator:switches",
"//components/pdf/browser",
"//components/pdf/renderer",
"//components/plugins/renderer",
@ -590,6 +597,7 @@ static_library("libcef_static") {
"//content/public/utility",
"//crypto",
"//device/core",
"//device/geolocation:device_geolocation",
"//device/hid",
"//extensions/browser",
"//extensions/common/api",
@ -606,8 +614,7 @@ static_library("libcef_static") {
"//pdf",
"//skia",
"//storage/browser",
"//sync",
"//third_party/cld_2",
"//third_party/cld",
"//third_party/hunspell",
"//third_party/leveldatabase",
"//third_party/libxml",
@ -1152,7 +1159,7 @@ if (is_mac) {
tweak_info_plist("cef_framework_plist") {
info_plist = "libcef/resources/framework-Info.plist"
args = [
"--breakpad=1",
"--breakpad=0",
"--keystone=0",
"--scm=1",
"--version",
@ -1184,7 +1191,6 @@ if (is_mac) {
"$root_out_dir/cef_200_percent.pak",
"$root_out_dir/cef_extensions.pak",
"$root_out_dir/devtools_resources.pak",
"$root_out_dir/icudtl.dat",
# TODO(cef): Restore this line once Widevine build errors are resolved.
# "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin",
]
@ -1195,11 +1201,15 @@ if (is_mac) {
":pak_200_percent",
":pak_devtools",
":pak_extensions",
"//third_party/icu:icudata",
# TODO(cef): Restore this line once Widevine build errors are resolved.
# "//third_party/widevine/cdm:widevinecdmadapter",
]
if (icu_use_data_file) {
sources += [ "$root_out_dir/icudtl.dat" ]
public_deps += [ "//third_party/icu:icudata", ]
}
if (v8_use_external_startup_data) {
sources += [
"$root_out_dir/natives_blob.bin",

View File

@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'fc6aaca4ed6ff4f050e6f5c7fb19af85da8db574',
'chromium_checkout': '1ae106dbab4bddd85132d5b75c670794311f4c57',
}

View File

@ -19,8 +19,9 @@
base::AtomicRefCount CefBrowserContext::DebugObjCt = 0;
#endif
CefBrowserContext::CefBrowserContext()
: extension_system_(NULL) {
CefBrowserContext::CefBrowserContext(bool is_proxy)
: is_proxy_(is_proxy),
extension_system_(NULL) {
#ifndef NDEBUG
base::AtomicRefCountInc(&DebugObjCt);
#endif
@ -39,7 +40,6 @@ void CefBrowserContext::Initialize() {
content::BrowserContext::Initialize(this, GetPath());
const bool extensions_enabled = extensions::ExtensionsEnabled();
bool extensions_initialized = false;
if (extensions_enabled) {
// Create the custom ExtensionSystem first because other KeyedServices
// depend on it.
@ -47,10 +47,12 @@ void CefBrowserContext::Initialize() {
// and CefBrowserContextProxy objects.
extension_system_ = static_cast<extensions::CefExtensionSystem*>(
extensions::ExtensionSystem::Get(this));
extensions_initialized = extension_system_->initialized();
if (!extensions_initialized)
if (is_proxy_) {
DCHECK(extension_system_->initialized());
} else {
extension_system_->InitForRegularProfile(true);
}
}
resource_context_.reset(new CefResourceContext(
IsOffTheRecord(),
@ -66,7 +68,7 @@ void CefBrowserContext::Initialize() {
DCHECK(pref_service);
user_prefs::UserPrefs::Set(this, pref_service);
if (extensions_enabled && !extensions_initialized)
if (extensions_enabled && !is_proxy_)
extension_system_->Init();
}
@ -76,17 +78,26 @@ void CefBrowserContext::Shutdown() {
// Send notifications to clean up objects associated with this Profile.
MaybeSendDestroyedNotification();
// Remove any BrowserContextKeyedServiceFactory associations. This must be
// called before the ProxyService owned by CefBrowserContextImpl is destroyed.
BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
this);
if (!is_proxy_) {
// Shuts down the storage partitions associated with this browser context.
// This must be called before the browser context is actually destroyed
// and before a clean-up task for its corresponding IO thread residents
// (e.g. ResourceContext) is posted, so that the classes that hung on
// StoragePartition can have time to do necessary cleanups on IO thread.
ShutdownStoragePartitions();
}
if (resource_context_.get()) {
// Destruction of the ResourceContext will trigger destruction of all
// associated URLRequests.
content::BrowserThread::DeleteSoon(
content::BrowserThread::IO, FROM_HERE, resource_context_.release());
}
// Remove any BrowserContextKeyedServiceFactory associations. This must be
// called before the ProxyService owned by CefBrowserContextImpl is destroyed.
BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
this);
}
content::ResourceContext* CefBrowserContext::GetResourceContext() {

View File

@ -133,7 +133,7 @@ class CefBrowserContext
public base::RefCountedThreadSafe<
CefBrowserContext, content::BrowserThread::DeleteOnUIThread> {
public:
CefBrowserContext();
explicit CefBrowserContext(bool is_proxy);
// Must be called immediately after this object is created.
virtual void Initialize();
@ -188,6 +188,9 @@ class CefBrowserContext
content::BrowserThread::UI>;
friend class base::DeleteHelper<CefBrowserContext>;
// True if this CefBrowserContext is a CefBrowserContextProxy.
const bool is_proxy_;
std::unique_ptr<CefResourceContext> resource_context_;
// Owned by the KeyedService system.

View File

@ -199,7 +199,8 @@ class CefVisitedLinkListener : public visitedlink::VisitedLinkMaster::Listener {
CefBrowserContextImpl::CefBrowserContextImpl(
const CefRequestContextSettings& settings)
: settings_(settings) {
: CefBrowserContext(false),
settings_(settings) {
g_manager.Get().AddImpl(this);
}
@ -278,6 +279,14 @@ void CefBrowserContextImpl::Initialize() {
// CefURLRequestContextImpl.
GetRequestContext();
DCHECK(url_request_getter_.get());
// Create the StoragePartitionImplMap and StoragePartitionImpl for this
// object. This must be done before the first WebContents is created using a
// CefBrowserContextProxy of this object, otherwise the StoragePartitionProxy
// will not be created (in that case
// CefBrowserContextProxy::CreateRequestContext will be called, which is
// incorrect).
GetDefaultStoragePartition(this);
}
void CefBrowserContextImpl::AddProxy(const CefBrowserContextProxy* proxy) {

View File

@ -55,7 +55,8 @@ bool ShouldProxyUserData(const void* key) {
CefBrowserContextProxy::CefBrowserContextProxy(
CefRefPtr<CefRequestContextHandler> handler,
scoped_refptr<CefBrowserContextImpl> parent)
: handler_(handler),
: CefBrowserContext(true),
handler_(handler),
parent_(parent) {
DCHECK(handler_.get());
DCHECK(parent_.get());

View File

@ -64,7 +64,7 @@
#include "third_party/WebKit/public/web/WebFindOptions.h"
#if defined(OS_MACOSX)
#include "chrome/browser/spellchecker/spellcheck_platform.h"
#include "components/spellcheck/browser/spellcheck_platform.h"
#endif
namespace {
@ -287,6 +287,11 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::Create(
request_context_impl->GetBrowserContext();
DCHECK(browser_context);
// A StoragePartitionImplMap must already exist for the BrowserContext. See
// additional comments in CefBrowserContextImpl::Initialize().
DCHECK(browser_context->GetUserData(
content::BrowserContext::GetStoragePartitionMapUserDataKey()));
if (!create_params.request_context) {
// Using the global request context.
create_params.request_context = request_context_impl.get();

View File

@ -32,6 +32,9 @@
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/browser/web_ui_controller_factory.h"
#include "content/public/common/content_switches.h"
#include "device/geolocation/access_token_store.h"
#include "device/geolocation/geolocation_delegate.h"
#include "device/geolocation/geolocation_provider.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/constants.h"
#include "net/base/net_module.h"
@ -56,6 +59,50 @@
#include "libcef/browser/printing/print_dialog_linux.h"
#endif
namespace {
// In-memory store for access tokens used by geolocation.
class CefAccessTokenStore : public device::AccessTokenStore {
public:
// |system_context| is used by NetworkLocationProvider to communicate with a
// remote geolocation service.
explicit CefAccessTokenStore(net::URLRequestContextGetter* system_context)
: system_context_(system_context) {}
void LoadAccessTokens(const LoadAccessTokensCallback& callback) override {
callback.Run(access_token_map_, system_context_);
}
void SaveAccessToken(
const GURL& server_url, const base::string16& access_token) override {
access_token_map_[server_url] = access_token;
}
private:
net::URLRequestContextGetter* system_context_;
AccessTokenMap access_token_map_;
DISALLOW_COPY_AND_ASSIGN(CefAccessTokenStore);
};
// A provider of services for geolocation.
class CefGeolocationDelegate : public device::GeolocationDelegate {
public:
explicit CefGeolocationDelegate(net::URLRequestContextGetter* system_context)
: system_context_(system_context) {}
scoped_refptr<device::AccessTokenStore> CreateAccessTokenStore() override {
return new CefAccessTokenStore(system_context_);
}
private:
net::URLRequestContextGetter* system_context_;
DISALLOW_COPY_AND_ASSIGN(CefGeolocationDelegate);
};
} // namespace
CefBrowserMainParts::CefBrowserMainParts(
const content::MainFunctionParams& parameters)
: BrowserMainParts(),
@ -163,6 +210,10 @@ void CefBrowserMainParts::PreMainMessageLoopRun() {
// Triggers initialization of the singleton instance on UI thread.
PluginFinder::GetInstance()->Init();
device::GeolocationProvider::SetGeolocationDelegate(
new CefGeolocationDelegate(
global_browser_context_->request_context().get()));
}
void CefBrowserMainParts::PostMainMessageLoopRun() {

View File

@ -188,12 +188,12 @@ IconManager* ChromeBrowserProcessStub::icon_manager() {
return NULL;
}
GLStringManager* ChromeBrowserProcessStub::gl_string_manager() {
GpuModeManager* ChromeBrowserProcessStub::gpu_mode_manager() {
NOTIMPLEMENTED();
return NULL;
}
GpuModeManager* ChromeBrowserProcessStub::gpu_mode_manager() {
GpuProfileCache* ChromeBrowserProcessStub::gpu_profile_cache() {
NOTIMPLEMENTED();
return NULL;
}

View File

@ -62,8 +62,8 @@ class ChromeBrowserProcessStub : public BrowserProcess,
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;
GpuProfileCache* gpu_profile_cache() override;
void CreateDevToolsHttpProtocolHandler(const std::string& ip,
uint16_t port) override;
void CreateDevToolsAutoOpener() override;

View File

@ -6,7 +6,10 @@
#include "include/cef_version.h"
#include "base/version.h"
#include "chrome/common/pref_names.h"
#include "components/component_updater/configurator_impl.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/update_client/component_patcher_operation.h"
#include "content/public/browser/browser_thread.h"
@ -37,9 +40,10 @@ class CefConfigurator : public update_client::Configurator {
net::URLRequestContextGetter* RequestContext() const override;
scoped_refptr<update_client::OutOfProcessPatcher>
CreateOutOfProcessPatcher() const override;
bool DeltasEnabled() const override;
bool UseBackgroundDownloader() const override;
bool UseCupSigning() const override;
bool EnabledDeltas() const override;
bool EnabledComponentUpdates() const override;
bool EnabledBackgroundDownloader() const override;
bool EnabledCupSigning() const override;
scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner()
const override;
PrefService* GetPrefService() const override;
@ -59,6 +63,7 @@ CefConfigurator::CefConfigurator(
PrefService* pref_service)
: configurator_impl_(cmdline, url_request_getter, false),
pref_service_(pref_service) {
DCHECK(pref_service_);
}
int CefConfigurator::InitialDelay() const {
@ -126,16 +131,20 @@ CefConfigurator::CreateOutOfProcessPatcher() const {
return nullptr;
}
bool CefConfigurator::DeltasEnabled() const {
return configurator_impl_.DeltasEnabled();
bool CefConfigurator::EnabledDeltas() const {
return configurator_impl_.EnabledDeltas();
}
bool CefConfigurator::UseBackgroundDownloader() const {
return configurator_impl_.UseBackgroundDownloader();
bool CefConfigurator::EnabledComponentUpdates() const {
return pref_service_->GetBoolean(prefs::kComponentUpdatesEnabled);
}
bool CefConfigurator::UseCupSigning() const {
return configurator_impl_.UseCupSigning();
bool CefConfigurator::EnabledBackgroundDownloader() const {
return configurator_impl_.EnabledBackgroundDownloader();
}
bool CefConfigurator::EnabledCupSigning() const {
return configurator_impl_.EnabledCupSigning();
}
// Returns a task runner to run blocking tasks. The task runner continues to run
@ -156,6 +165,12 @@ PrefService* CefConfigurator::GetPrefService() const {
} // namespace
void RegisterPrefsForCefComponentUpdaterConfigurator(
PrefRegistrySimple* registry) {
// The component updates are enabled by default, if the preference is not set.
registry->RegisterBooleanPref(prefs::kComponentUpdatesEnabled, true);
}
scoped_refptr<update_client::Configurator>
MakeCefComponentUpdaterConfigurator(
const base::CommandLine* cmdline,

View File

@ -16,10 +16,18 @@ namespace net {
class URLRequestContextGetter;
}
class PrefRegistrySimple;
class PrefService;
namespace component_updater {
// Registers preferences associated with the component updater configurator
// for CEF. The preferences must be registered with the local pref store
// before they can be queried by the configurator instance.
// This function is called before MakeCefComponentUpdaterConfigurator.
void RegisterPrefsForCefComponentUpdaterConfigurator(
PrefRegistrySimple* registry);
scoped_refptr<update_client::Configurator>
MakeCefComponentUpdaterConfigurator(
const base::CommandLine* cmdline,

View File

@ -46,12 +46,10 @@
#include "content/browser/frame_host/navigation_handle_impl.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/plugin_service_impl.h"
#include "content/public/browser/access_token_store.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_url_handler.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/geolocation_delegate.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/quota_permission_context.h"
@ -78,7 +76,7 @@
#include "url/gurl.h"
#if defined(OS_MACOSX)
#include "chrome/browser/spellchecker/spellcheck_message_filter_platform.h"
#include "components/spellcheck/browser/spellcheck_message_filter_platform.h"
#endif
#if defined(OS_POSIX) && !defined(OS_MACOSX)
@ -94,47 +92,6 @@
namespace {
// In-memory store for access tokens used by geolocation.
class CefAccessTokenStore : public content::AccessTokenStore {
public:
// |system_context| is used by NetworkLocationProvider to communicate with a
// remote geolocation service.
explicit CefAccessTokenStore(net::URLRequestContextGetter* system_context)
: system_context_(system_context) {}
void LoadAccessTokens(const LoadAccessTokensCallback& callback) override {
callback.Run(access_token_map_, system_context_);
}
void SaveAccessToken(
const GURL& server_url, const base::string16& access_token) override {
access_token_map_[server_url] = access_token;
}
private:
net::URLRequestContextGetter* system_context_;
AccessTokenMap access_token_map_;
DISALLOW_COPY_AND_ASSIGN(CefAccessTokenStore);
};
// A provider of services for geolocation.
class CefGeolocationDelegate : public content::GeolocationDelegate {
public:
explicit CefGeolocationDelegate(net::URLRequestContextGetter* system_context)
: system_context_(system_context) {}
scoped_refptr<content::AccessTokenStore> CreateAccessTokenStore() override {
return new CefAccessTokenStore(system_context_);
}
private:
net::URLRequestContextGetter* system_context_;
DISALLOW_COPY_AND_ASSIGN(CefGeolocationDelegate);
};
class CefQuotaCallbackImpl : public CefRequestCallback {
public:
explicit CefQuotaCallbackImpl(
@ -192,7 +149,7 @@ class CefQuotaCallbackImpl : public CefRequestCallback {
class CefAllowCertificateErrorCallbackImpl : public CefRequestCallback {
public:
typedef base::Callback<void(bool)> // NOLINT(readability/function)
typedef base::Callback<void(content::CertificateRequestResultType)>
CallbackType;
explicit CefAllowCertificateErrorCallbackImpl(const CallbackType& callback)
@ -236,7 +193,8 @@ class CefAllowCertificateErrorCallbackImpl : public CefRequestCallback {
private:
static void RunNow(const CallbackType& callback, bool allow) {
CEF_REQUIRE_UIT();
callback.Run(allow);
callback.Run(allow ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE :
content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY);
}
CallbackType callback_;
@ -701,15 +659,15 @@ void CefContentBrowserClient::AllowCertificateError(
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* result) {
const base::Callback<
void(content::CertificateRequestResultType)>& callback) {
CEF_REQUIRE_UIT();
if (resource_type != content::ResourceType::RESOURCE_TYPE_MAIN_FRAME) {
// A sub-resource has a certificate error. The user doesn't really
// have a context for making the right decision, so block the request
// hard.
*result = content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
return;
}
@ -735,8 +693,8 @@ void CefContentBrowserClient::AllowCertificateError(
if (!proceed)
callbackImpl->Disconnect();
*result = proceed ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE :
content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL;
callback.Run(proceed ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE :
content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
}
void CefContentBrowserClient::SelectClientCertificate(
@ -749,12 +707,6 @@ void CefContentBrowserClient::SelectClientCertificate(
}
}
content::GeolocationDelegate*
CefContentBrowserClient::CreateGeolocationDelegate() {
return new CefGeolocationDelegate(
browser_main_parts_->browser_context()->request_context().get());
}
bool CefContentBrowserClient::CanCreateWindow(
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
@ -762,6 +714,7 @@ bool CefContentBrowserClient::CanCreateWindow(
WindowContainerType container_type,
const GURL& target_url,
const content::Referrer& referrer,
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::WebWindowFeatures& features,
bool user_gesture,
@ -792,7 +745,8 @@ void CefContentBrowserClient::OverrideWebkitPrefs(
content::WebPreferences* prefs) {
renderer_prefs::PopulateWebPreferences(rvh, *prefs);
if (rvh->GetWidget()->GetView()) {
if (rvh->GetWidget()->GetView() &&
rvh->GetWidget()->GetView()->GetNativeView()) {
rvh->GetWidget()->GetView()->SetBackgroundColor(
prefs->base_background_color);
}

View File

@ -62,19 +62,19 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
bool overridable,
bool strict_enforcement,
bool expired_previous_decision,
const base::Callback<void(bool)>& callback,
content::CertificateRequestResultType* result) override;
const base::Callback<
void(content::CertificateRequestResultType)>& callback) override;
void SelectClientCertificate(
content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
content::GeolocationDelegate* CreateGeolocationDelegate() 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,
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::WebWindowFeatures& features,
bool user_gesture,

View File

@ -21,7 +21,6 @@
#include "base/debug/debugger.h"
#include "base/files/file_util.h"
#include "base/synchronization/waitable_event.h"
#include "components/network_session_configurator/switches.h"
#include "content/public/app/content_main.h"
#include "content/public/app/content_main_runner.h"
#include "content/public/browser/notification_service.h"

View File

@ -135,6 +135,6 @@ base::DictionaryValue* CefDevToolsManagerDelegate::HandleCommand(
base::DictionaryValue* command_dict) {
std::unique_ptr<base::DictionaryValue> result =
devtools_discovery::DevToolsDiscoveryManager::GetInstance()
->HandleNewTargetCommand(command_dict);
->HandleCreateTargetCommand(command_dict);
return result.release(); // Caller takes ownership.
}

View File

@ -320,6 +320,21 @@ void CefDevToolsFrontend::DispatchProtocolMessage(
}
}
void CefDevToolsFrontend::SetPreferences(const std::string& json) {
preferences_.Clear();
if (json.empty())
return;
base::DictionaryValue* dict = nullptr;
std::unique_ptr<base::Value> parsed = base::JSONReader::Read(json);
if (!parsed || !parsed->GetAsDictionary(&dict))
return;
for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
if (!it.value().IsType(base::Value::TYPE_STRING))
continue;
preferences_.SetWithoutPathExpansion(it.key(), it.value().CreateDeepCopy());
}
}
void CefDevToolsFrontend::OnURLFetchComplete(const net::URLFetcher* source) {
// TODO(pfeldman): this is a copy of chrome's devtools_ui_bindings.cc.
// We should handle some of the commands including this one in content.

View File

@ -62,7 +62,7 @@ class CefDevToolsFrontend : public content::WebContentsObserver,
bool replaced) override;
void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host,
const std::string& message) override;
base::DictionaryValue* preferences() { return &preferences_; }
void SetPreferences(const std::string& json);
// WebContentsObserver overrides
void RenderViewCreated(content::RenderViewHost* render_view_host) override;

View File

@ -1,21 +0,0 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'cef_api_registration',
'type': 'static_library',
# TODO(jschuh): http://crbug.com/167187 size_t -> int
'msvs_disabled_warnings': [ 4267 ],
'includes': [
'../../../../../build/json_schema_bundle_registration_compile.gypi',
'../../../common/extensions/api/schemas.gypi',
],
'dependencies': [
'../../../common/extensions/api/api.gyp:cef_api',
],
},
],
}

View File

@ -271,7 +271,7 @@ ContentVerifier* CefExtensionSystem::content_verifier() {
std::unique_ptr<ExtensionSet> CefExtensionSystem::GetDependentExtensions(
const Extension* extension) {
return base::WrapUnique(new ExtensionSet());
return base::MakeUnique<ExtensionSet>();
}
void CefExtensionSystem::InstallUpdate(const std::string& extension_id,

View File

@ -206,7 +206,7 @@ CefExtensionsBrowserClient::CreateRuntimeAPIDelegate(
content::BrowserContext* context) const {
// TODO(extensions): Implement to support Apps.
NOTREACHED();
return std::unique_ptr<RuntimeAPIDelegate>();
return nullptr;
}
const ComponentExtensionResourceManager*

View File

@ -7,8 +7,8 @@
#include "libcef/browser/thread_util.h"
#include "libcef/common/time_util.h"
#include "base/logging.h"
#include "content/public/browser/geolocation_provider.h"
#include "content/public/common/geoposition.h"
#include "device/geolocation/geolocation_provider.h"
#include "device/geolocation/geoposition.h"
namespace {
@ -19,8 +19,8 @@ class CefLocationRequest :
: callback_(callback) {
CEF_REQUIRE_UIT();
geo_callback_ = base::Bind(&CefLocationRequest::OnLocationUpdate, this);
content::GeolocationProvider* provider =
content::GeolocationProvider::GetInstance();
device::GeolocationProvider* provider =
device::GeolocationProvider::GetInstance();
subscription_ = provider->AddLocationUpdateCallback(geo_callback_, true);
provider->UserDidOptIntoLocationServices();
}
@ -30,7 +30,7 @@ class CefLocationRequest :
~CefLocationRequest() {}
void OnLocationUpdate(const content::Geoposition& position) {
void OnLocationUpdate(const device::Geoposition& position) {
CEF_REQUIRE_UIT();
if (callback_.get()) {
CefGeoposition cef_position;
@ -42,7 +42,7 @@ class CefLocationRequest :
geo_callback_.Reset();
}
void SetPosition(const content::Geoposition& source, CefGeoposition& target) {
void SetPosition(const device::Geoposition& source, CefGeoposition& target) {
target.latitude = source.latitude;
target.longitude = source.longitude;
target.altitude = source.altitude;
@ -53,16 +53,16 @@ class CefLocationRequest :
cef_time_from_basetime(source.timestamp, target.timestamp);
switch (source.error_code) {
case content::Geoposition::ERROR_CODE_NONE:
case device::Geoposition::ERROR_CODE_NONE:
target.error_code = GEOPOSITON_ERROR_NONE;
break;
case content::Geoposition::ERROR_CODE_PERMISSION_DENIED:
case device::Geoposition::ERROR_CODE_PERMISSION_DENIED:
target.error_code = GEOPOSITON_ERROR_PERMISSION_DENIED;
break;
case content::Geoposition::ERROR_CODE_POSITION_UNAVAILABLE:
case device::Geoposition::ERROR_CODE_POSITION_UNAVAILABLE:
target.error_code = GEOPOSITON_ERROR_POSITION_UNAVAILABLE;
break;
case content::Geoposition::ERROR_CODE_TIMEOUT:
case device::Geoposition::ERROR_CODE_TIMEOUT:
target.error_code = GEOPOSITON_ERROR_TIMEOUT;
break;
}
@ -71,8 +71,8 @@ class CefLocationRequest :
}
CefRefPtr<CefGetGeolocationCallback> callback_;
content::GeolocationProvider::LocationUpdateCallback geo_callback_;
std::unique_ptr<content::GeolocationProvider::Subscription> subscription_;
device::GeolocationProvider::LocationUpdateCallback geo_callback_;
std::unique_ptr<device::GeolocationProvider::Subscription> subscription_;
DISALLOW_COPY_AND_ASSIGN(CefLocationRequest);
};
@ -91,7 +91,7 @@ bool CefGetGeolocation(CefRefPtr<CefGetGeolocationCallback> callback) {
}
if (CEF_CURRENTLY_ON_UIT()) {
if (content::GeolocationProvider::GetInstance()) {
if (device::GeolocationProvider::GetInstance()) {
// Will be released after the callback executes.
new CefLocationRequest(callback);
return true;

View File

@ -301,17 +301,17 @@ void CefBrowserPlatformDelegateNativeLinux::TranslateClickEvent(
case MBT_LEFT:
result.type = mouseUp ? blink::WebInputEvent::MouseUp :
blink::WebInputEvent::MouseDown;
result.button = blink::WebMouseEvent::ButtonLeft;
result.button = blink::WebMouseEvent::Button::Left;
break;
case MBT_MIDDLE:
result.type = mouseUp ? blink::WebInputEvent::MouseUp :
blink::WebInputEvent::MouseDown;
result.button = blink::WebMouseEvent::ButtonMiddle;
result.button = blink::WebMouseEvent::Button::Middle;
break;
case MBT_RIGHT:
result.type = mouseUp ? blink::WebInputEvent::MouseUp :
blink::WebInputEvent::MouseDown;
result.button = blink::WebMouseEvent::ButtonRight;
result.button = blink::WebMouseEvent::Button::Right;
break;
default:
NOTREACHED();
@ -329,16 +329,16 @@ void CefBrowserPlatformDelegateNativeLinux::TranslateMoveEvent(
if (!mouseLeave) {
result.type = blink::WebInputEvent::MouseMove;
if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonLeft;
result.button = blink::WebMouseEvent::Button::Left;
else if (mouse_event.modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonMiddle;
result.button = blink::WebMouseEvent::Button::Middle;
else if (mouse_event.modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonRight;
result.button = blink::WebMouseEvent::Button::Right;
else
result.button = blink::WebMouseEvent::ButtonNone;
result.button = blink::WebMouseEvent::Button::NoButton;
} else {
result.type = blink::WebInputEvent::MouseLeave;
result.button = blink::WebMouseEvent::ButtonNone;
result.button = blink::WebMouseEvent::Button::NoButton;
}
result.clickCount = 0;
@ -366,13 +366,13 @@ void CefBrowserPlatformDelegateNativeLinux::TranslateWheelEvent(
result.momentumPhase = blink::WebMouseWheelEvent::PhaseNone;
if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonLeft;
result.button = blink::WebMouseEvent::Button::Left;
else if (mouse_event.modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonMiddle;
result.button = blink::WebMouseEvent::Button::Middle;
else if (mouse_event.modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonRight;
result.button = blink::WebMouseEvent::Button::Right;
else
result.button = blink::WebMouseEvent::ButtonNone;
result.button = blink::WebMouseEvent::Button::NoButton;
}
CefEventHandle CefBrowserPlatformDelegateNativeLinux::GetEventHandle(

View File

@ -373,17 +373,17 @@ void CefBrowserPlatformDelegateNativeMac::TranslateClickEvent(
case MBT_LEFT:
result.type = mouseUp ? blink::WebInputEvent::MouseUp :
blink::WebInputEvent::MouseDown;
result.button = blink::WebMouseEvent::ButtonLeft;
result.button = blink::WebMouseEvent::Button::Left;
break;
case MBT_MIDDLE:
result.type = mouseUp ? blink::WebInputEvent::MouseUp :
blink::WebInputEvent::MouseDown;
result.button = blink::WebMouseEvent::ButtonMiddle;
result.button = blink::WebMouseEvent::Button::Middle;
break;
case MBT_RIGHT:
result.type = mouseUp ? blink::WebInputEvent::MouseUp :
blink::WebInputEvent::MouseDown;
result.button = blink::WebMouseEvent::ButtonRight;
result.button = blink::WebMouseEvent::Button::Right;
break;
default:
NOTREACHED();
@ -401,16 +401,16 @@ void CefBrowserPlatformDelegateNativeMac::TranslateMoveEvent(
if (!mouseLeave) {
result.type = blink::WebInputEvent::MouseMove;
if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonLeft;
result.button = blink::WebMouseEvent::Button::Left;
else if (mouse_event.modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonMiddle;
result.button = blink::WebMouseEvent::Button::Middle;
else if (mouse_event.modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonRight;
result.button = blink::WebMouseEvent::Button::Right;
else
result.button = blink::WebMouseEvent::ButtonNone;
result.button = blink::WebMouseEvent::Button::NoButton;
} else {
result.type = blink::WebInputEvent::MouseLeave;
result.button = blink::WebMouseEvent::ButtonNone;
result.button = blink::WebMouseEvent::Button::NoButton;
}
result.clickCount = 0;
@ -438,13 +438,13 @@ void CefBrowserPlatformDelegateNativeMac::TranslateWheelEvent(
result.momentumPhase = blink::WebMouseWheelEvent::PhaseNone;
if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonLeft;
result.button = blink::WebMouseEvent::Button::Left;
else if (mouse_event.modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonMiddle;
result.button = blink::WebMouseEvent::Button::Middle;
else if (mouse_event.modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonRight;
result.button = blink::WebMouseEvent::Button::Right;
else
result.button = blink::WebMouseEvent::ButtonNone;
result.button = blink::WebMouseEvent::Button::NoButton;
}
CefEventHandle CefBrowserPlatformDelegateNativeMac::GetEventHandle(

View File

@ -421,17 +421,17 @@ void CefBrowserPlatformDelegateNativeWin::TranslateClickEvent(
case MBT_LEFT:
result.type = mouseUp ? blink::WebInputEvent::MouseUp :
blink::WebInputEvent::MouseDown;
result.button = blink::WebMouseEvent::ButtonLeft;
result.button = blink::WebMouseEvent::Button::Left;
break;
case MBT_MIDDLE:
result.type = mouseUp ? blink::WebInputEvent::MouseUp :
blink::WebInputEvent::MouseDown;
result.button = blink::WebMouseEvent::ButtonMiddle;
result.button = blink::WebMouseEvent::Button::Middle;
break;
case MBT_RIGHT:
result.type = mouseUp ? blink::WebInputEvent::MouseUp :
blink::WebInputEvent::MouseDown;
result.button = blink::WebMouseEvent::ButtonRight;
result.button = blink::WebMouseEvent::Button::Right;
break;
default:
NOTREACHED();
@ -449,16 +449,16 @@ void CefBrowserPlatformDelegateNativeWin::TranslateMoveEvent(
if (!mouseLeave) {
result.type = blink::WebInputEvent::MouseMove;
if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonLeft;
result.button = blink::WebMouseEvent::Button::Left;
else if (mouse_event.modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonMiddle;
result.button = blink::WebMouseEvent::Button::Middle;
else if (mouse_event.modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON)
result.button = blink::WebMouseEvent::ButtonRight;
result.button = blink::WebMouseEvent::Button::Right;
else
result.button = blink::WebMouseEvent::ButtonNone;
result.button = blink::WebMouseEvent::Button::NoButton;
} else {
result.type = blink::WebInputEvent::MouseLeave;
result.button = blink::WebMouseEvent::ButtonNone;
result.button = blink::WebMouseEvent::Button::NoButton;
}
result.clickCount = 0;
@ -471,7 +471,7 @@ void CefBrowserPlatformDelegateNativeWin::TranslateWheelEvent(
TranslateMouseEvent(result, mouse_event);
result.type = blink::WebInputEvent::MouseWheel;
result.button = blink::WebMouseEvent::ButtonNone;
result.button = blink::WebMouseEvent::Button::NoButton;
float wheelDelta;
bool horizontalScroll = false;

View File

@ -403,7 +403,7 @@ CefNativeMenuWin::CefNativeMenuWin(ui::MenuModel* model, HWND system_menu_for)
CefNativeMenuWin::~CefNativeMenuWin() {
if (destroyed_flag_)
*destroyed_flag_ = true;
STLDeleteContainerPointers(items_.begin(), items_.end());
base::STLDeleteContainerPointers(items_.begin(), items_.end());
DestroyMenu(menu_);
}

View File

@ -924,40 +924,6 @@ bool CefRenderWidgetHostViewOSR::HasAcceleratedSurface(
return false;
}
void CefRenderWidgetHostViewOSR::GetScreenInfo(blink::WebScreenInfo* results) {
if (!browser_impl_.get())
return;
CefScreenInfo screen_info(
kDefaultScaleFactor, 0, 0, false, CefRect(), CefRect());
CefRefPtr<CefRenderHandler> handler =
browser_impl_->client()->GetRenderHandler();
if (handler.get() &&
(!handler->GetScreenInfo(browser_impl_.get(), screen_info) ||
screen_info.rect.width == 0 ||
screen_info.rect.height == 0 ||
screen_info.available_rect.width == 0 ||
screen_info.available_rect.height == 0)) {
// If a screen rectangle was not provided, try using the view rectangle
// instead. Otherwise, popup views may be drawn incorrectly, or not at all.
CefRect screenRect;
if (!handler->GetViewRect(browser_impl_.get(), screenRect)) {
NOTREACHED();
screenRect = CefRect();
}
if (screen_info.rect.width == 0 && screen_info.rect.height == 0)
screen_info.rect = screenRect;
if (screen_info.available_rect.width == 0 &&
screen_info.available_rect.height == 0)
screen_info.available_rect = screenRect;
}
*results = webScreenInfoFrom(screen_info);
}
gfx::Rect CefRenderWidgetHostViewOSR::GetBoundsInRootWindow() {
if (!browser_impl_.get())
return gfx::Rect();
@ -999,20 +965,7 @@ void CefRenderWidgetHostViewOSR::ImeCompositionRangeChanged(
}
#endif
bool CefRenderWidgetHostViewOSR::OnMessageReceived(const IPC::Message& msg) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(CefRenderWidgetHostViewOSR, msg)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames,
OnSetNeedsBeginFrames)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
if (!handled)
return content::RenderWidgetHostViewBase::OnMessageReceived(msg);
return handled;
}
void CefRenderWidgetHostViewOSR::OnSetNeedsBeginFrames(bool enabled) {
void CefRenderWidgetHostViewOSR::SetNeedsBeginFrames(bool enabled) {
SetFrameRate();
// Start/stop the timer that sends BeginFrame requests.
@ -1143,6 +1096,40 @@ void CefRenderWidgetHostViewOSR::WasResized() {
GetDelegatedFrameHost()->WasResized();
}
void CefRenderWidgetHostViewOSR::GetScreenInfo(blink::WebScreenInfo* results) {
if (!browser_impl_.get())
return;
CefScreenInfo screen_info(
kDefaultScaleFactor, 0, 0, false, CefRect(), CefRect());
CefRefPtr<CefRenderHandler> handler =
browser_impl_->client()->GetRenderHandler();
if (handler.get() &&
(!handler->GetScreenInfo(browser_impl_.get(), screen_info) ||
screen_info.rect.width == 0 ||
screen_info.rect.height == 0 ||
screen_info.available_rect.width == 0 ||
screen_info.available_rect.height == 0)) {
// If a screen rectangle was not provided, try using the view rectangle
// instead. Otherwise, popup views may be drawn incorrectly, or not at all.
CefRect screenRect;
if (!handler->GetViewRect(browser_impl_.get(), screenRect)) {
NOTREACHED();
screenRect = CefRect();
}
if (screen_info.rect.width == 0 && screen_info.rect.height == 0)
screen_info.rect = screenRect;
if (screen_info.available_rect.width == 0 &&
screen_info.available_rect.height == 0)
screen_info.available_rect = screenRect;
}
*results = webScreenInfoFrom(screen_info);
}
void CefRenderWidgetHostViewOSR::OnScreenInfoChanged() {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::OnScreenInfoChanged");
if (!render_widget_host_)
@ -1375,7 +1362,7 @@ void CefRenderWidgetHostViewOSR::SetFrameRate() {
}
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(cc::switches::kEnableBeginFrameScheduling)) {
if (!command_line->HasSwitch(cc::switches::kDisableBeginFrameScheduling)) {
if (begin_frame_timer_.get()) {
begin_frame_timer_->SetFrameRateThresholdMs(frame_rate_threshold_ms_);
} else {
@ -1388,6 +1375,8 @@ void CefRenderWidgetHostViewOSR::SetFrameRate() {
}
void CefRenderWidgetHostViewOSR::SetDeviceScaleFactor() {
float new_scale_factor = kDefaultScaleFactor;
if (browser_impl_.get()) {
CefScreenInfo screen_info(
kDefaultScaleFactor, 0, 0, false, CefRect(), CefRect());
@ -1395,12 +1384,23 @@ void CefRenderWidgetHostViewOSR::SetDeviceScaleFactor() {
browser_impl_->client()->GetRenderHandler();
if (handler.get() && handler->GetScreenInfo(browser_impl_.get(),
screen_info)) {
scale_factor_ = screen_info.device_scale_factor;
return;
new_scale_factor = screen_info.device_scale_factor;
}
}
scale_factor_ = kDefaultScaleFactor;
scale_factor_ = new_scale_factor;
if (render_widget_host_ && render_widget_host_->delegate())
render_widget_host_->delegate()->UpdateDeviceScaleFactor(new_scale_factor);
// Notify the guest hosts if any.
for (auto guest_host_view : guest_host_views_) {
if (guest_host_view->render_widget_host() &&
guest_host_view->render_widget_host()->delegate()) {
guest_host_view->render_widget_host()->delegate()->
UpdateDeviceScaleFactor(new_scale_factor);
}
}
}
void CefRenderWidgetHostViewOSR::ResizeRootLayer() {

View File

@ -164,7 +164,6 @@ class CefRenderWidgetHostViewOSR
override;
void EndFrameSubscription() override;
bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
void GetScreenInfo(blink::WebScreenInfo* results) override;
gfx::Rect GetBoundsInRootWindow() override;
content::BrowserAccessibilityManager*
CreateBrowserAccessibilityManager(
@ -184,10 +183,7 @@ class CefRenderWidgetHostViewOSR
const std::vector<gfx::Rect>& character_bounds) override;
#endif
bool OnMessageReceived(const IPC::Message& msg) override;
// Message handlers.
void OnSetNeedsBeginFrames(bool enabled);
void SetNeedsBeginFrames(bool enabled) override;
// ui::CompositorDelegate implementation.
std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice(
@ -218,6 +214,7 @@ class CefRenderWidgetHostViewOSR
bool InstallTransparency();
void WasResized();
void GetScreenInfo(blink::WebScreenInfo* results);
void OnScreenInfoChanged();
void Invalidate(CefBrowserHost::PaintElementType type);
void SendKeyEvent(const content::NativeWebKeyboardEvent& event);

View File

@ -49,6 +49,13 @@ gfx::NativeWindow CefWebContentsViewOSR::GetTopLevelNativeWindow() const {
return gfx::NativeWindow();
}
void CefWebContentsViewOSR::GetScreenInfo(blink::WebScreenInfo* results) const {
if (view_)
view_->GetScreenInfo(results);
else
WebContentsView::GetDefaultScreenInfo(results);
}
void CefWebContentsViewOSR::GetContainerBounds(gfx::Rect* out) const {
if (guest_) {
// Based on WebContentsViewGuest::GetContainerBounds.

View File

@ -32,6 +32,7 @@ class CefWebContentsViewOSR : public content::WebContentsView,
gfx::NativeView GetNativeView() const override;
gfx::NativeView GetContentNativeView() const override;
gfx::NativeWindow GetTopLevelNativeWindow() const override;
void GetScreenInfo(blink::WebScreenInfo* web_screen_info) const override;
void GetContainerBounds(gfx::Rect* out) const override;
void SizeContents(const gfx::Size& size) override;
void Focus() override;

View File

@ -12,10 +12,10 @@
#include "libcef/browser/thread_util.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "content/public/browser/geolocation_provider.h"
#include "content/public/browser/permission_type.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/origin_util.h"
#include "device/geolocation/geolocation_provider.h"
namespace {
@ -35,7 +35,7 @@ class CefGeolocationCallbackImpl : public CefGeolocationCallback {
if (CEF_CURRENTLY_ON_UIT()) {
if (!callback_.is_null()) {
if (allow) {
content::GeolocationProvider::GetInstance()->
device::GeolocationProvider::GetInstance()->
UserDidOptIntoLocationServices();
}

View File

@ -15,7 +15,6 @@ ContentSettingsType PermissionTypeToContentSetting(PermissionType permission) {
case PermissionType::MIDI_SYSEX:
return CONTENT_SETTINGS_TYPE_MIDI_SYSEX;
case PermissionType::PUSH_MESSAGING:
return CONTENT_SETTINGS_TYPE_PUSH_MESSAGING;
case PermissionType::NOTIFICATIONS:
return CONTENT_SETTINGS_TYPE_NOTIFICATIONS;
case PermissionType::GEOLOCATION:

View File

@ -4,6 +4,7 @@
#include "libcef/browser/prefs/browser_prefs.h"
#include "libcef/browser/component_updater/cef_component_updater_configurator.h"
#include "libcef/browser/media_capture_devices_dispatcher.h"
#include "libcef/browser/net/url_request_context_getter_impl.h"
#include "libcef/browser/prefs/renderer_prefs.h"
@ -32,6 +33,7 @@
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "components/proxy_config/proxy_config_dictionary.h"
#include "components/spellcheck/browser/pref_names.h"
#include "components/update_client/update_client.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/extension_prefs.h"
@ -168,27 +170,30 @@ std::unique_ptr<PrefService> CreatePrefService(
renderer_prefs::RegisterProfilePrefs(registry.get());
update_client::RegisterPrefs(registry.get());
content_settings::CookieSettings::RegisterProfilePrefs(registry.get());
component_updater::RegisterPrefsForCefComponentUpdaterConfigurator(
registry.get());
// Print preferences.
registry->RegisterBooleanPref(prefs::kPrintingEnabled, true);
// Spell checking preferences.
// Based on SpellcheckServiceFactory::RegisterProfilePrefs.
registry->RegisterListPref(prefs::kSpellCheckDictionaries,
registry->RegisterListPref(spellcheck::prefs::kSpellCheckDictionaries,
new base::ListValue);
std::string spellcheck_lang =
command_line->GetSwitchValueASCII(switches::kOverrideSpellCheckLang);
if (!spellcheck_lang.empty()) {
registry->RegisterStringPref(prefs::kSpellCheckDictionary, spellcheck_lang);
registry->RegisterStringPref(spellcheck::prefs::kSpellCheckDictionary,
spellcheck_lang);
} else {
RegisterLocalizedValue(registry.get(),
prefs::kSpellCheckDictionary,
spellcheck::prefs::kSpellCheckDictionary,
base::Value::TYPE_STRING,
IDS_SPELLCHECK_DICTIONARY);
}
registry->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService,
registry->RegisterBooleanPref(
spellcheck::prefs::kSpellCheckUseSpellingService,
command_line->HasSwitch(switches::kEnableSpellingService));
registry->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck, true);
// Pepper flash preferences.
// Based on DeviceIDFetcher::RegisterProfilePrefs.

View File

@ -127,8 +127,6 @@ void SetChromePrefs(CefBrowserContext* profile,
web.password_echo_enabled = browser_defaults::kPasswordEchoEnabled;
web.unified_textchecker_enabled = true;
web.uses_universal_detector =
prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector);
web.text_areas_are_resizable =
@ -352,6 +350,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, true);
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
content::kWebRTCIPHandlingDefault);
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
#endif
#if !defined(OS_MACOSX)

View File

@ -35,6 +35,11 @@
#include "printing/printed_document.h"
#include "ui/base/l10n/l10n_util.h"
#if defined(OS_WIN)
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
#endif
using base::TimeDelta;
using content::BrowserThread;
@ -165,14 +170,19 @@ void CefPrintViewManagerBase::OnDidPrintPage(
}
#if defined(OS_WIN)
print_job_->AppendPrintedPage(params.page_number);
if (metafile_must_be_valid) {
bool print_text_with_gdi =
document->settings().print_text_with_gdi() &&
!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableGDITextPrinting);
scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes(
reinterpret_cast<const unsigned char*>(shared_buf->memory()),
params.data_size);
document->DebugDumpData(bytes.get(), FILE_PATH_LITERAL(".pdf"));
print_job_->StartPdfToEmfConversion(
bytes, params.page_size, params.content_area);
bytes, params.page_size, params.content_area, print_text_with_gdi);
}
#else
// Update the rendered document. It will send notifications to the listener.

View File

@ -79,15 +79,10 @@ void CefPrintingMessageFilter::OnGetDefaultPrintSettings(
// Loads default settings. This is asynchronous, only the IPC message sender
// will hang until the settings are retrieved.
printer_query->GetSettings(
PrinterQuery::GetSettingsAskParam::DEFAULTS,
0,
false,
DEFAULT_MARGINS,
false,
PrinterQuery::GetSettingsAskParam::DEFAULTS, 0, false, DEFAULT_MARGINS,
false, false,
base::Bind(&CefPrintingMessageFilter::OnGetDefaultPrintSettingsReply,
this,
printer_query,
reply_msg));
this, printer_query, reply_msg));
}
void CefPrintingMessageFilter::OnGetDefaultPrintSettingsReply(
@ -124,15 +119,11 @@ void CefPrintingMessageFilter::OnScriptedPrint(
queue_->CreatePrinterQuery(render_process_id_, reply_msg->routing_id());
}
printer_query->GetSettings(
PrinterQuery::GetSettingsAskParam::ASK_USER,
params.expected_pages_count,
params.has_selection,
params.margin_type,
params.is_scripted,
base::Bind(&CefPrintingMessageFilter::OnScriptedPrintReply,
this,
printer_query,
reply_msg));
PrinterQuery::GetSettingsAskParam::ASK_USER, params.expected_pages_count,
params.has_selection, params.margin_type, params.is_scripted,
params.is_modifiable,
base::Bind(&CefPrintingMessageFilter::OnScriptedPrintReply, this,
printer_query, reply_msg));
}
void CefPrintingMessageFilter::OnScriptedPrintReply(

View File

@ -72,6 +72,7 @@ struct ResolveHostHelper {
CefRefPtr<CefResolveCallback> callback_;
net::AddressList address_list_;
std::unique_ptr<net::HostResolver::Request> request_;
};
} // namespace
@ -691,7 +692,7 @@ void CefRequestContextImpl::ResolveHostInternal(
&helper->address_list_,
base::Bind(&ResolveHostHelper::OnResolveCompleted,
base::Unretained(helper)),
NULL, net::BoundNetLog());
&helper->request_, net::BoundNetLog());
if (retval == net::ERR_IO_PENDING) {
// The result will be delivered asynchronously via the callback.
return;

View File

@ -54,13 +54,17 @@ CefSSLHostStateDelegate::CefSSLHostStateDelegate() {
CefSSLHostStateDelegate::~CefSSLHostStateDelegate() {
}
void CefSSLHostStateDelegate::HostRanInsecureContent(const std::string& host,
int pid) {
void CefSSLHostStateDelegate::HostRanInsecureContent(
const std::string& host,
int child_id,
InsecureContentType content_type) {
// Intentional no-op.
}
bool CefSSLHostStateDelegate::DidHostRunInsecureContent(const std::string& host,
int pid) const {
bool CefSSLHostStateDelegate::DidHostRunInsecureContent(
const std::string& host,
int child_id,
InsecureContentType content_type) const {
// Intentional no-op.
return false;
}

View File

@ -58,9 +58,13 @@ class CefSSLHostStateDelegate : public content::SSLHostStateDelegate {
const net::X509Certificate& cert,
net::CertStatus error,
bool* expired_previous_decision) override;
void HostRanInsecureContent(const std::string& host, int pid) override;
bool DidHostRunInsecureContent(const std::string& host,
int pid) const override;
void HostRanInsecureContent(const std::string& host,
int child_id,
InsecureContentType content_type) override;
bool DidHostRunInsecureContent(
const std::string& host,
int child_id,
InsecureContentType content_type) const override;
void RevokeUserAllowExceptions(const std::string& host) override;
bool HasAllowException(const std::string& host) const override;

View File

@ -81,7 +81,7 @@ CefStoragePartitionProxy::GetBackgroundSyncContext() {
return parent_->GetBackgroundSyncContext();
}
webmessaging::BroadcastChannelProvider*
content::BroadcastChannelProvider*
CefStoragePartitionProxy::GetBroadcastChannelProvider() {
return parent_->GetBroadcastChannelProvider();
}

View File

@ -37,8 +37,7 @@ class CefStoragePartitionProxy : public content::StoragePartition {
content::PlatformNotificationContext* GetPlatformNotificationContext()
override;
content::BackgroundSyncContext* GetBackgroundSyncContext() override;
webmessaging::BroadcastChannelProvider*
GetBroadcastChannelProvider() override;
content::BroadcastChannelProvider* GetBroadcastChannelProvider() override;
void ClearDataForOrigin(uint32_t remove_mask,
uint32_t quota_storage_remove_mask,
const GURL& storage_origin,

View File

@ -3,25 +3,75 @@
# governed by a BSD-style license that can be found in the LICENSE file.
import("//build/json_schema_api.gni")
import("//tools/json_schema_compiler/json_features.gni")
import("schemas.gni")
json_schema_api("api") {
schemas = true
bundle = true
configs = [ "//build/config:precompiled_headers" ]
bundle_name = "Cef"
# TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See README.txt for
# details.
#json_schema_api("api") {
# sources = schema_sources
# schemas = true
# bundle = true
# configs = [ "//build/config:precompiled_headers" ]
# bundle_name = "Cef"
#
# deps = schema_dependencies
#}
#
#json_schema_api("api_registration") {
# sources = schema_sources
# impl_dir = "//cef/libcef/browser/extensions/api"
# bundle_registration = true
# configs = [ "//build/config:precompiled_headers" ]
# bundle_name = "Cef"
#
# deps = [
# ":api",
# ]
# deps += schema_dependencies
#}
deps = schema_dependencies
}
json_schema_api("api_registration") {
impl_dir = "//cef/libcef/browser/extensions/api"
bundle_registration = true
configs = [ "//build/config:precompiled_headers" ]
bundle_name = "Cef"
deps = [
":api",
json_features("cef_api_features") {
feature_class = "APIFeature"
provider_class = "CefAPIFeatureProvider"
sources = [
"//extensions/common/api/_api_features.json",
"_api_features.json",
]
}
json_features("cef_permission_features") {
feature_class = "PermissionFeature"
provider_class = "CefPermissionFeatureProvider"
sources = [
"//extensions/common/api/_permission_features.json",
"_permission_features.json",
]
}
json_features("cef_manifest_features") {
feature_class = "ManifestFeature"
provider_class = "CefManifestFeatureProvider"
sources = [
# Use the same manifest features as Chrome.
"//chrome/common/extensions/api/_manifest_features.json",
"//extensions/common/api/_manifest_features.json",
]
}
json_features("cef_behavior_features") {
feature_class = "BehaviorFeature"
provider_class = "CefBehaviorFeatureProvider"
sources = [
"//extensions/common/api/_behavior_features.json",
]
}
group("extensions_features") {
public_deps = [
":cef_api_features",
":cef_behavior_features",
":cef_manifest_features",
":cef_permission_features",
]
deps += schema_dependencies
}

View File

@ -8,13 +8,13 @@ To add a new extension API implemented only in CEF ***:
1. Add libcef/common/extensions/api/<api>.idl or .json file which defines the
API.
2. Add <api>.idl or .json to the 'schema_files' list in
libcef/common/extensions/api/schemas.gypi. Serialization code will be
2. Add <api>.idl or .json to the 'schema_sources' list in
libcef/common/extensions/api/schemas.gni. Serialization code will be
generated based on this list in step 5.
3. Add an entry in the libcef/common/extensions/api/_*_features.json files if
necessary [1].
4. Add libcef/browser/extensions/api/<api>/<api>_api.[h|cc] class implementation
files and associated entries to the 'libcef_static' target in cef.gyp.
files and associated entries to the 'libcef_static' target in BUILD.gn.
5. Run the cef_create_projects script and build to generate the
cef/libcef/common/extensions/api/<api>.h file and other serialization code
required by the extensions system.
@ -27,8 +27,8 @@ To add a new extension API implemented only in CEF ***:
*** Note that CEF does not currently expose its own Mojo APIs. Related code is
commented out in:
BUILD.gn
cef.gyp
cef/BUILD.gn
cef/libcef/common/extensions/api/BUILD.gn
CefExtensionsBrowserClient::RegisterExtensionFunctions
CefExtensionsClient::IsAPISchemaGenerated
CefExtensionsClient::GetAPISchema

View File

@ -1,19 +0,0 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'cef_api',
'type': 'static_library',
# TODO(jschuh): http://crbug.com/167187 size_t -> int
'msvs_disabled_warnings': [ 4267 ],
'includes': [
'../../../../../build/json_schema_bundle_compile.gypi',
'../../../../../build/json_schema_compile.gypi',
'schemas.gypi',
],
},
],
}

View File

@ -2,14 +2,12 @@
# 2014 the Chromium Authors. All rights reserved. Use of this source code is
# governed by a BSD-style license that can be found in the LICENSE file.
gypi_values = exec_script("//build/gypi_to_gn.py",
[ rebase_path("schemas.gypi") ],
"scope",
[ "schemas.gypi" ])
schema_sources = [
# TODO(cef): Add CEF-specific Mojo APIs here.
]
sources = gypi_values.schema_files
uncompiled_sources = gypi_values.non_compiled_schema_files
uncompiled_sources = [
]
root_namespace = "extensions::api::cef::%(namespace)s"
schema_include_rules = "//cef/libcef/browser/extensions/api:extensions::api::cef::%(namespace)s"

View File

@ -1,22 +0,0 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'sources': [
'<@(schema_files)',
],
'variables': {
'schema_files': [
# TODO(cef): Add CEF-specific Mojo APIs here.
],
'non_compiled_schema_files': [
],
'chromium_code': 1,
'cc_dir': 'cef/libcef/common/extensions/api',
'root_namespace': 'extensions::api::cef::%(namespace)s',
'bundle_name': 'Cef',
'impl_dir_': 'cef/libcef/browser/extensions/api',
},
}

View File

@ -13,6 +13,10 @@
#include "base/logging.h"
#include "cef/grit/cef_resources.h"
//#include "cef/libcef/common/extensions/api/generated_schemas.h"
#include "cef/libcef/common/extensions/api/cef_api_features.h"
#include "cef/libcef/common/extensions/api/cef_behavior_features.h"
#include "cef/libcef/common/extensions/api/cef_manifest_features.h"
#include "cef/libcef/common/extensions/api/cef_permission_features.h"
#include "chrome/common/extensions/chrome_manifest_handlers.h"
#include "chrome/grit/common_resources.h"
#include "extensions/common/api/generated_schemas.h"
@ -20,7 +24,6 @@
#include "extensions/common/extension_urls.h"
#include "extensions/common/features/api_feature.h"
#include "extensions/common/features/behavior_feature.h"
#include "extensions/common/features/json_feature_provider.h"
#include "extensions/common/features/json_feature_provider_source.h"
#include "extensions/common/features/manifest_feature.h"
#include "extensions/common/features/permission_feature.h"
@ -72,20 +75,14 @@ const std::string CefExtensionsClient::GetProductName() {
std::unique_ptr<FeatureProvider> CefExtensionsClient::CreateFeatureProvider(
const std::string& name) const {
std::unique_ptr<FeatureProvider> provider;
std::unique_ptr<JSONFeatureProviderSource> source(
CreateFeatureProviderSource(name));
if (name == "api") {
provider.reset(new JSONFeatureProvider(source->dictionary(),
CreateFeature<APIFeature>));
provider.reset(new CefAPIFeatureProvider());
} else if (name == "manifest") {
provider.reset(new JSONFeatureProvider(source->dictionary(),
CreateFeature<ManifestFeature>));
provider.reset(new CefManifestFeatureProvider());
} else if (name == "permission") {
provider.reset(new JSONFeatureProvider(source->dictionary(),
CreateFeature<PermissionFeature>));
provider.reset(new CefPermissionFeatureProvider());
} else if (name == "behavior") {
provider.reset(new JSONFeatureProvider(source->dictionary(),
CreateFeature<BehaviorFeature>));
provider.reset(new CefBehaviorFeatureProvider());
} else {
NOTREACHED();
}
@ -93,33 +90,15 @@ std::unique_ptr<FeatureProvider> CefExtensionsClient::CreateFeatureProvider(
}
std::unique_ptr<JSONFeatureProviderSource>
CefExtensionsClient::CreateFeatureProviderSource(
const std::string& name) const {
CefExtensionsClient::CreateAPIFeatureSource() const {
std::unique_ptr<JSONFeatureProviderSource> source(
new JSONFeatureProviderSource(name));
if (name == "api") {
new JSONFeatureProviderSource("api"));
source->LoadJSON(IDR_EXTENSION_API_FEATURES);
// Extension API features specific to CEF. See
// libcef/common/extensions/api/README.txt for additional details.
source->LoadJSON(IDR_CEF_EXTENSION_API_FEATURES);
} else if (name == "manifest") {
source->LoadJSON(IDR_EXTENSION_MANIFEST_FEATURES);
// Use the same manifest features as Chrome.
source->LoadJSON(IDR_CHROME_EXTENSION_MANIFEST_FEATURES);
} else if (name == "permission") {
source->LoadJSON(IDR_EXTENSION_PERMISSION_FEATURES);
// Extension permission features specific to CEF. See
// libcef/common/extensions/api/README.txt for additional details.
source->LoadJSON(IDR_CEF_EXTENSION_PERMISSION_FEATURES);
} else if (name == "behavior") {
source->LoadJSON(IDR_EXTENSION_BEHAVIOR_FEATURES);
} else {
NOTREACHED();
source.reset();
}
return source;
}
@ -187,10 +166,6 @@ base::StringPiece CefExtensionsClient::GetAPISchema(
return api::GeneratedSchemas::Get(name);
}
void CefExtensionsClient::RegisterAPISchemaResources(
ExtensionAPI* api) const {
}
bool CefExtensionsClient::ShouldSuppressFatalErrors() const {
return true;
}

View File

@ -28,8 +28,8 @@ class CefExtensionsClient : public ExtensionsClient {
const std::string GetProductName() override;
std::unique_ptr<FeatureProvider> CreateFeatureProvider(
const std::string& name) const override;
std::unique_ptr<JSONFeatureProviderSource> CreateFeatureProviderSource(
const std::string& name) const override;
std::unique_ptr<JSONFeatureProviderSource> CreateAPIFeatureSource()
const override;
void FilterHostPermissions(const URLPatternSet& hosts,
URLPatternSet* new_hosts,
PermissionIDSet* permissions) const override;
@ -41,7 +41,6 @@ class CefExtensionsClient : public ExtensionsClient {
bool IsScriptableURL(const GURL& url, std::string* error) const override;
bool IsAPISchemaGenerated(const std::string& name) const override;
base::StringPiece GetAPISchema(const std::string& name) const override;
void RegisterAPISchemaResources(ExtensionAPI* api) const override;
bool ShouldSuppressFatalErrors() const override;
void RecordDidSuppressFatalError() override;
std::string GetWebstoreBaseURL() const override;

View File

@ -28,7 +28,7 @@ namespace net {
// Until there is a more abstract class for this, this one derives from
// SupportsUserData to allow users to stash random data by
// key and ensure its destruction when UploadData is finally deleted.
class NET_EXPORT UploadData
class UploadData
: public base::RefCounted<UploadData>,
public base::SupportsUserData {
public:

View File

@ -17,7 +17,7 @@
namespace net {
// A class representing an element contained by UploadData.
class NET_EXPORT UploadElement {
class UploadElement {
public:
enum Type {
TYPE_BYTES,

View File

@ -703,7 +703,7 @@ bool CefDictionaryValueImpl::Clear() {
bool CefDictionaryValueImpl::HasKey(const CefString& key) {
CEF_VALUE_VERIFY_RETURN(false, 0);
return const_value().HasKey(key);
return const_value().HasKey(base::StringPiece(key));
}
bool CefDictionaryValueImpl::GetKeys(KeyList& keys) {
@ -726,7 +726,8 @@ CefValueType CefDictionaryValueImpl::GetType(const CefString& key) {
CEF_VALUE_VERIFY_RETURN(false, VTYPE_INVALID);
const base::Value* out_value = NULL;
if (const_value().GetWithoutPathExpansion(key, &out_value)) {
if (const_value().GetWithoutPathExpansion(base::StringPiece(key),
&out_value)) {
switch (out_value->GetType()) {
case base::Value::TYPE_NULL:
return VTYPE_NULL;
@ -754,7 +755,8 @@ CefRefPtr<CefValue> CefDictionaryValueImpl::GetValue(const CefString& key) {
CEF_VALUE_VERIFY_RETURN(false, NULL);
const base::Value* out_value = NULL;
if (const_value().GetWithoutPathExpansion(key, &out_value)) {
if (const_value().GetWithoutPathExpansion(base::StringPiece(key),
&out_value)) {
return CefValueImpl::GetOrCreateRefOrCopy(
const_cast<base::Value*>(out_value),
const_cast<base::DictionaryValue*>(&const_value()),
@ -771,7 +773,7 @@ bool CefDictionaryValueImpl::GetBool(const CefString& key) {
const base::Value* out_value = NULL;
bool ret_value = false;
if (const_value().GetWithoutPathExpansion(key, &out_value))
if (const_value().GetWithoutPathExpansion(base::StringPiece(key), &out_value))
out_value->GetAsBoolean(&ret_value);
return ret_value;
@ -783,7 +785,7 @@ int CefDictionaryValueImpl::GetInt(const CefString& key) {
const base::Value* out_value = NULL;
int ret_value = 0;
if (const_value().GetWithoutPathExpansion(key, &out_value))
if (const_value().GetWithoutPathExpansion(base::StringPiece(key), &out_value))
out_value->GetAsInteger(&ret_value);
return ret_value;
@ -795,7 +797,7 @@ double CefDictionaryValueImpl::GetDouble(const CefString& key) {
const base::Value* out_value = NULL;
double ret_value = 0;
if (const_value().GetWithoutPathExpansion(key, &out_value))
if (const_value().GetWithoutPathExpansion(base::StringPiece(key), &out_value))
out_value->GetAsDouble(&ret_value);
return ret_value;
@ -807,7 +809,7 @@ CefString CefDictionaryValueImpl::GetString(const CefString& key) {
const base::Value* out_value = NULL;
std::string ret_value;
if (const_value().GetWithoutPathExpansion(key, &out_value))
if (const_value().GetWithoutPathExpansion(base::StringPiece(key), &out_value))
out_value->GetAsString(&ret_value);
return ret_value;
@ -819,7 +821,8 @@ CefRefPtr<CefBinaryValue> CefDictionaryValueImpl::GetBinary(
const base::Value* out_value = NULL;
if (const_value().GetWithoutPathExpansion(key, &out_value) &&
if (const_value().GetWithoutPathExpansion(base::StringPiece(key),
&out_value) &&
out_value->IsType(base::Value::TYPE_BINARY)) {
base::BinaryValue* binary_value =
static_cast<base::BinaryValue*>(const_cast<base::Value*>(out_value));
@ -836,7 +839,8 @@ CefRefPtr<CefDictionaryValue> CefDictionaryValueImpl::GetDictionary(
const base::Value* out_value = NULL;
if (const_value().GetWithoutPathExpansion(key, &out_value) &&
if (const_value().GetWithoutPathExpansion(base::StringPiece(key),
&out_value) &&
out_value->IsType(base::Value::TYPE_DICTIONARY)) {
base::DictionaryValue* dict_value =
static_cast<base::DictionaryValue*>(
@ -856,7 +860,8 @@ CefRefPtr<CefListValue> CefDictionaryValueImpl::GetList(const CefString& key) {
const base::Value* out_value = NULL;
if (const_value().GetWithoutPathExpansion(key, &out_value) &&
if (const_value().GetWithoutPathExpansion(base::StringPiece(key),
&out_value) &&
out_value->IsType(base::Value::TYPE_LIST)) {
base::ListValue* list_value =
static_cast<base::ListValue*>(const_cast<base::Value*>(out_value));
@ -950,8 +955,10 @@ bool CefDictionaryValueImpl::SetList(const CefString& key,
bool CefDictionaryValueImpl::RemoveInternal(const CefString& key) {
std::unique_ptr<base::Value> out_value;
if (!mutable_value()->RemoveWithoutPathExpansion(key, &out_value))
if (!mutable_value()->RemoveWithoutPathExpansion(base::StringPiece(key),
&out_value)) {
return false;
}
// Remove the value.
controller()->Remove(out_value.get(), true);
@ -969,7 +976,7 @@ void CefDictionaryValueImpl::SetInternal(const CefString& key,
base::Value* value) {
DCHECK(value);
RemoveInternal(key);
mutable_value()->SetWithoutPathExpansion(key, value);
mutable_value()->SetWithoutPathExpansion(base::StringPiece(key), value);
}
CefDictionaryValueImpl::CefDictionaryValueImpl(

View File

@ -55,11 +55,11 @@
#include "chrome/renderer/loadtimes_extension_bindings.h"
#include "chrome/renderer/pepper/chrome_pdf_print_client.h"
#include "chrome/renderer/plugins/power_saver_info.h"
#include "chrome/renderer/spellchecker/spellcheck.h"
#include "chrome/renderer/spellchecker/spellcheck_provider.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/nacl/common/nacl_constants.h"
#include "components/printing/renderer/print_web_view_helper.h"
#include "components/spellcheck/renderer/spellcheck.h"
#include "components/spellcheck/renderer/spellcheck_provider.h"
#include "components/visitedlink/renderer/visitedlink_slave.h"
#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/common/frame_messages.h"
@ -128,6 +128,7 @@ class CefPrerendererClient : public content::RenderViewObserver,
// WebPrerendererClient methods:
void willAddPrerender(blink::WebPrerender* prerender) override {}
bool isPrefetchOnly() override { return false; }
};
void AppendParams(const std::vector<base::string16>& additional_names,
@ -192,7 +193,7 @@ CefContentRendererClient::CefContentRendererClient()
CefContentRendererClient::~CefContentRendererClient() {
if (!guest_views_.empty()) {
STLDeleteContainerPairSecondPointers(guest_views_.begin(),
base::STLDeleteContainerPairSecondPointers(guest_views_.begin(),
guest_views_.end());
}
}
@ -741,7 +742,8 @@ blink::WebPlugin* CefContentRendererClient::CreatePlugin(
std::unique_ptr<content::PluginInstanceThrottler> throttler;
if (power_saver_info.power_saver_enabled) {
throttler = content::PluginInstanceThrottler::Create();
throttler = content::PluginInstanceThrottler::Create(
content::RenderFrame::DONT_RECORD_DECISION);
// PluginPreroller manages its own lifetime.
new CefPluginPreroller(
render_frame, frame, params, info, identifier, group_name,

View File

@ -274,7 +274,8 @@ blink::WebPlugin* CefPluginPlaceholder::CreatePlugin() {
// If the plugin has already been marked essential in its placeholder form,
// we shouldn't create a new throttler and start the process all over again.
if (power_saver_enabled()) {
throttler = content::PluginInstanceThrottler::Create();
throttler = content::PluginInstanceThrottler::Create(
content::RenderFrame::DONT_RECORD_DECISION);
// PluginPreroller manages its own lifetime.
new CefPluginPreroller(
render_frame(), GetFrame(), GetPluginParams(),

View File

@ -40,7 +40,8 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient {
void willFollowRedirect(
WebURLLoader* loader,
WebURLRequest& newRequest,
const WebURLResponse& redirectResponse) override;
const WebURLResponse& redirectResponse,
int64_t encodedDataLength) override;
void didSendData(
WebURLLoader* loader,
unsigned long long bytesSent,
@ -54,7 +55,8 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient {
void didReceiveData(WebURLLoader* loader,
const char* data,
int dataLength,
int encodedDataLength) override;
int encodedDataLength,
int encodedBodyLength) override;
void didReceiveCachedMetadata(WebURLLoader* loader,
const char* data,
int dataLength) override;
@ -253,7 +255,8 @@ CefWebURLLoaderClient::~CefWebURLLoaderClient() {
void CefWebURLLoaderClient::willFollowRedirect(
WebURLLoader* loader,
WebURLRequest& newRequest,
const WebURLResponse& redirectResponse) {
const WebURLResponse& redirectResponse,
int64_t encodedDataLength) {
}
void CefWebURLLoaderClient::didSendData(
@ -278,7 +281,8 @@ void CefWebURLLoaderClient::didDownloadData(WebURLLoader* loader,
void CefWebURLLoaderClient::didReceiveData(WebURLLoader* loader,
const char* data,
int dataLength,
int encodedDataLength) {
int encodedDataLength,
int encodedBodyLength) {
context_->OnDownloadProgress(dataLength);
if (!(request_flags_ & UR_FLAG_NO_DOWNLOAD_DATA))

View File

@ -12,14 +12,6 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "core/dom/Document.h"
#include "core/frame/Frame.h"
#include "core/frame/LocalFrame.h"
#include "bindings/core/v8/ScriptController.h"
#include "bindings/core/v8/V8Binding.h"
MSVC_POP_WARNING();
// Enable deprecation warnings for MSVC. See http://crbug.com/585142.
#if defined(OS_WIN)
#pragma warning(push)
@ -653,29 +645,6 @@ void AccessorNameSetterCallbackImpl(
}
}
v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
v8::Local<v8::Function> function,
v8::Local<v8::Object> receiver,
int argc,
v8::Local<v8::Value> args[],
v8::Isolate* isolate) {
v8::MaybeLocal<v8::Value> func_rv;
// Execute the function call using the V8ScriptRunner so that inspector
// instrumentation works.
blink::LocalFrame* frame =
toLocalFrame(blink::toFrameIfNotDetached(context));
DCHECK(frame);
if (frame &&
frame->script().canExecuteScripts(blink::AboutToExecuteScript)) {
func_rv = blink::V8ScriptRunner::callFunction(
function, frame->document(), receiver, argc, args, isolate);
}
return func_rv;
}
// V8 extension registration.
class ExtensionWrapper : public v8::Extension {
@ -978,7 +947,7 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() {
CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(NULL);
if (blink::ScriptForbiddenScope::isScriptForbidden())
if (webkit_glue::IsScriptForbidden())
return nullptr;
v8::Isolate* isolate = handle_->isolate();
@ -991,7 +960,7 @@ CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
bool CefV8ContextImpl::Enter() {
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
if (blink::ScriptForbiddenScope::isScriptForbidden())
if (webkit_glue::IsScriptForbidden())
return false;
v8::Isolate* isolate = handle_->isolate();
@ -1012,7 +981,7 @@ bool CefV8ContextImpl::Enter() {
bool CefV8ContextImpl::Exit() {
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
if (blink::ScriptForbiddenScope::isScriptForbidden())
if (webkit_glue::IsScriptForbidden())
return false;
if (enter_count_ <= 0) {
@ -1049,7 +1018,7 @@ bool CefV8ContextImpl::Eval(const CefString& code,
CefRefPtr<CefV8Exception>& exception) {
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
if (blink::ScriptForbiddenScope::isScriptForbidden())
if (webkit_glue::IsScriptForbidden())
return false;
if (code.empty()) {
@ -1078,7 +1047,8 @@ bool CefV8ContextImpl::Eval(const CefString& code,
exception = NULL;
v8::MaybeLocal<v8::Value> func_rv =
CallV8Function(context, func, obj, 1, &code_val, handle_->isolate());
webkit_glue::CallV8Function(context, func, obj, 1, &code_val,
handle_->isolate());
if (try_catch.HasCaught()) {
exception = new CefV8ExceptionImpl(context, try_catch.Message());
@ -1096,7 +1066,7 @@ v8::Local<v8::Context> CefV8ContextImpl::GetV8Context() {
blink::WebFrame* CefV8ContextImpl::GetWebFrame() {
CEF_REQUIRE_RT();
if (blink::ScriptForbiddenScope::isScriptForbidden())
if (webkit_glue::IsScriptForbidden())
return nullptr;
v8::HandleScope handle_scope(handle_->isolate());
@ -2256,7 +2226,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
try_catch.SetVerbose(true);
v8::MaybeLocal<v8::Value> func_rv =
CallV8Function(context_local, func, recv, argc, argv,
webkit_glue::CallV8Function(context_local, func, recv, argc, argv,
handle_->isolate());
if (!HasCaught(context_local, try_catch) && !func_rv.IsEmpty()) {

View File

@ -24,9 +24,13 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "third_party/WebKit/public/web/WebNode.h"
#include "third_party/WebKit/public/web/WebViewClient.h"
#include "third_party/WebKit/Source/bindings/core/v8/ScriptController.h"
#include "third_party/WebKit/Source/bindings/core/v8/V8Binding.h"
#include "third_party/WebKit/Source/core/dom/Document.h"
#include "third_party/WebKit/Source/core/dom/Element.h"
#include "third_party/WebKit/Source/core/dom/Node.h"
#include "third_party/WebKit/Source/core/editing/serializers/Serialization.h"
#include "third_party/WebKit/Source/core/frame/LocalFrame.h"
#include "third_party/WebKit/Source/web/WebLocalFrameImpl.h"
#include "third_party/WebKit/Source/web/WebViewImpl.h"
MSVC_POP_WARNING();
@ -83,23 +87,23 @@ std::string DumpDocumentText(blink::WebFrame* frame) {
cef_dom_node_type_t GetNodeType(const blink::WebNode& node) {
const blink::Node* web_node = node.constUnwrap<blink::Node>();
switch (web_node->getNodeType()) {
case blink::Node::ELEMENT_NODE:
case blink::Node::kElementNode:
return DOM_NODE_TYPE_ELEMENT;
case blink::Node::ATTRIBUTE_NODE:
case blink::Node::kAttributeNode:
return DOM_NODE_TYPE_ATTRIBUTE;
case blink::Node::TEXT_NODE:
case blink::Node::kTextNode:
return DOM_NODE_TYPE_TEXT;
case blink::Node::CDATA_SECTION_NODE:
case blink::Node::kCdataSectionNode:
return DOM_NODE_TYPE_CDATA_SECTION;
case blink::Node::PROCESSING_INSTRUCTION_NODE:
case blink::Node::kProcessingInstructionNode:
return DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS;
case blink::Node::COMMENT_NODE:
case blink::Node::kCommentNode:
return DOM_NODE_TYPE_COMMENT;
case blink::Node::DOCUMENT_NODE:
case blink::Node::kDocumentNode:
return DOM_NODE_TYPE_DOCUMENT;
case blink::Node::DOCUMENT_TYPE_NODE:
case blink::Node::kDocumentTypeNode:
return DOM_NODE_TYPE_DOCUMENT_TYPE;
case blink::Node::DOCUMENT_FRAGMENT_NODE:
case blink::Node::kDocumentFragmentNode:
return DOM_NODE_TYPE_DOCUMENT_FRAGMENT;
}
return DOM_NODE_TYPE_UNSUPPORTED;
@ -158,4 +162,30 @@ blink::WebFrame* FindFrameByUniqueName(const blink::WebString& unique_name,
return NULL;
}
v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
v8::Local<v8::Function> function,
v8::Local<v8::Object> receiver,
int argc,
v8::Local<v8::Value> args[],
v8::Isolate* isolate) {
v8::MaybeLocal<v8::Value> func_rv;
// Execute the function call using the V8ScriptRunner so that inspector
// instrumentation works.
blink::LocalFrame* frame =
toLocalFrame(blink::toFrameIfNotDetached(context));
DCHECK(frame);
if (frame &&
frame->script().canExecuteScripts(blink::AboutToExecuteScript)) {
func_rv = blink::V8ScriptRunner::callFunction(
function, frame->document(), receiver, argc, args, isolate);
}
return func_rv;
}
bool IsScriptForbidden() {
return blink::ScriptForbiddenScope::isScriptForbidden();
}
} // webkit_glue

View File

@ -11,6 +11,7 @@
#include <string>
#include "include/internal/cef_types.h"
#include "v8/include/v8.h"
namespace blink {
class WebFrame;
@ -44,6 +45,15 @@ int64_t GetIdentifier(blink::WebFrame* frame);
blink::WebFrame* FindFrameByUniqueName(const blink::WebString& unique_name,
blink::WebFrame* relative_to_frame);
v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
v8::Local<v8::Function> function,
v8::Local<v8::Object> receiver,
int argc,
v8::Local<v8::Value> args[],
v8::Isolate* isolate);
bool IsScriptForbidden();
} // webkit_glue
#endif // CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_

View File

@ -15,7 +15,6 @@
<!-- Extension features supported by CEF. -->
<include name="IDR_CEF_EXTENSION_API_FEATURES" file="..\common\extensions\api\_api_features.json" type="BINDATA" />
<include name="IDR_CEF_EXTENSION_PERMISSION_FEATURES" file="..\common\extensions\api\_permission_features.json" type="BINDATA" />
</includes>
</release>
</grit>

View File

@ -35,9 +35,22 @@ void ReleaseProcessIfNeeded() {
content::UtilityThread::Get()->ReleaseProcessIfNeeded();
}
#if defined(OS_WIN)
void PreCacheFontCharacters(const LOGFONT* logfont,
const wchar_t* text,
size_t text_length) {
Send(new ChromeUtilityHostMsg_PreCacheFontCharacters(
*logfont, base::string16(text, text_length)));
}
#endif
} // namespace
PrintingHandler::PrintingHandler() {}
PrintingHandler::PrintingHandler() {
#if defined(OS_WIN)
chrome_pdf::SetPDFEnsureTypefaceCharactersAccessible(PreCacheFontCharacters);
#endif
}
PrintingHandler::~PrintingHandler() {}
@ -60,8 +73,10 @@ bool PrintingHandler::OnMessageReceived(const IPC::Message& message) {
#if defined(OS_WIN)
void PrintingHandler::OnRenderPDFPagesToMetafile(
IPC::PlatformFileForTransit pdf_transit,
const printing::PdfRenderSettings& settings) {
const printing::PdfRenderSettings& settings,
bool print_text_with_gdi) {
pdf_rendering_settings_ = settings;
chrome_pdf::SetPDFUseGDIPrinting(print_text_with_gdi);
base::File pdf_file = IPC::PlatformFileForTransitToFile(pdf_transit);
int page_count = LoadPDF(std::move(pdf_file));
Send(

View File

@ -35,7 +35,8 @@ class PrintingHandler : public UtilityMessageHandler {
// IPC message handlers.
#if defined(OS_WIN)
void OnRenderPDFPagesToMetafile(IPC::PlatformFileForTransit pdf_transit,
const printing::PdfRenderSettings& settings);
const printing::PdfRenderSettings& settings,
bool print_text_with_gdi);
void OnRenderPDFPagesToMetafileGetPage(
int page_number,
IPC::PlatformFileForTransit output_file);

View File

@ -15,11 +15,11 @@ index 75651c4..e422ae7 100644
void SwapCompositorFrame(uint32_t output_surface_id,
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 58d2a2f..69e3bbb 100644
index 3619d4d..89adf27 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -183,6 +183,12 @@ void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
g_spare_recyclable_compositor.Get().reset();
@@ -198,6 +198,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
g_spare_recyclable_compositors.Get().clear();
}
+ui::Compositor* BrowserCompositorMac::GetCompositor() {
@ -31,7 +31,7 @@ index 58d2a2f..69e3bbb 100644
ui::AcceleratedWidgetMac* BrowserCompositorMac::GetAcceleratedWidgetMac() {
if (recyclable_compositor_)
return recyclable_compositor_->accelerated_widget_mac();
@@ -400,8 +406,13 @@ void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
@@ -414,8 +420,13 @@ SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor(
}
gfx::Size BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP() const {

View File

@ -1,5 +1,5 @@
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
index 1297035..5f45202 100644
index 64e1be3..834a4dc 100644
--- render_widget_host_view_guest.cc
+++ render_widget_host_view_guest.cc
@@ -243,6 +243,9 @@ void RenderWidgetHostViewGuest::Destroy() {

View File

@ -1,5 +1,5 @@
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
index ceeaaa3..4ef1a54 100644
index d0a39e2..8fa0e1e 100644
--- browser/browser_plugin/browser_plugin_guest.cc
+++ browser/browser_plugin/browser_plugin_guest.cc
@@ -28,7 +28,7 @@

View File

@ -25,7 +25,7 @@ index d62973e..fc2dfa4 100644
for (const crash_reporter::Report& report : reports) {
diff --git chrome/browser/google/google_update_settings_posix.cc chrome/browser/google/google_update_settings_posix.cc
index 059672e..cdecb1a 100644
index d053b1e..cdecb1a 100644
--- chrome/browser/google/google_update_settings_posix.cc
+++ chrome/browser/google/google_update_settings_posix.cc
@@ -63,10 +63,6 @@ bool GoogleUpdateSettings::GetCollectStatsConsent() {
@ -33,7 +33,7 @@ index 059672e..cdecb1a 100644
// static
bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) {
-#if defined(OS_MACOSX)
- crash_reporter::SetUploadsEnabled(consented);
- crash_reporter::SetUploadConsent(consented);
-#endif
-
base::FilePath consent_dir;

View File

@ -1,5 +1,5 @@
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
index f67c51c..6d0a894 100644
index 4325cec..7cb8a86 100644
--- chrome/common/chrome_content_client.cc
+++ chrome/common/chrome_content_client.cc
@@ -76,7 +76,7 @@

View File

@ -1,8 +1,8 @@
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
index 821f642..ae61f08 100644
index 9af7049..87f1b01 100644
--- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -206,6 +206,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
@@ -199,6 +199,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
std::unique_ptr<cc::SoftwareOutputDevice>
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
ui::Compositor* compositor) {
@ -13,22 +13,22 @@ index 821f642..ae61f08 100644
+ return output_device;
+ }
+
#if defined(MOJO_RUNNER_CLIENT)
#if defined(USE_AURA)
if (shell::ShellIsRemote()) {
return std::unique_ptr<cc::SoftwareOutputDevice>(
NOTREACHED();
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index ee39c59..8f6082b 100644
index b73eb86..81957b2 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -17,6 +17,7 @@
#include "base/single_thread_task_runner.h"
@@ -18,6 +18,7 @@
#include "base/time/time.h"
#include "build/build_config.h"
#include "cc/output/begin_frame_args.h"
+#include "cc/output/software_output_device.h"
#include "cc/surfaces/surface_sequence.h"
#include "cc/trees/layer_tree_host_client.h"
#include "cc/trees/layer_tree_host_single_thread_client.h"
@@ -179,6 +180,17 @@ class COMPOSITOR_EXPORT CompositorLock
@@ -194,6 +195,17 @@ class COMPOSITOR_EXPORT CompositorLock
DISALLOW_COPY_AND_ASSIGN(CompositorLock);
};
@ -46,7 +46,7 @@ index ee39c59..8f6082b 100644
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -199,6 +211,9 @@ class COMPOSITOR_EXPORT Compositor
@@ -220,6 +232,9 @@ class COMPOSITOR_EXPORT Compositor
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@ -56,7 +56,7 @@ index ee39c59..8f6082b 100644
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -368,6 +383,8 @@ class COMPOSITOR_EXPORT Compositor
@@ -403,6 +418,8 @@ class COMPOSITOR_EXPORT Compositor
ui::ContextFactory* context_factory_;

View File

@ -1,8 +1,8 @@
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
index 4ad49c8..f1fa7ab 100644
index b7bafaf..09d1d07 100644
--- public/renderer/content_renderer_client.cc
+++ public/renderer/content_renderer_client.cc
@@ -98,7 +98,6 @@ bool ContentRendererClient::AllowPopup() {
@@ -99,7 +99,6 @@ bool ContentRendererClient::AllowPopup() {
return false;
}
@ -10,7 +10,7 @@ index 4ad49c8..f1fa7ab 100644
bool ContentRendererClient::HandleNavigation(
RenderFrame* render_frame,
bool is_content_initiated,
@@ -111,6 +110,7 @@ bool ContentRendererClient::HandleNavigation(
@@ -112,6 +111,7 @@ bool ContentRendererClient::HandleNavigation(
return false;
}
@ -19,7 +19,7 @@ index 4ad49c8..f1fa7ab 100644
return false;
}
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
index 9ad5aef..957ef88 100644
index b7b042f..69a62f2 100644
--- public/renderer/content_renderer_client.h
+++ public/renderer/content_renderer_client.h
@@ -204,7 +204,6 @@ class CONTENT_EXPORT ContentRendererClient {
@ -39,10 +39,10 @@ index 9ad5aef..957ef88 100644
// built in media player for the given |url|. Defaults to false.
virtual bool ShouldUseMediaPlayerForURL(const GURL& url);
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
index aa0b905..90c705b 100644
index 95165ff..608409e 100644
--- renderer/render_frame_impl.cc
+++ renderer/render_frame_impl.cc
@@ -4928,7 +4928,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
@@ -4917,7 +4917,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
(pending_navigation_params_ &&
!pending_navigation_params_->request_params.redirects.empty());
@ -50,7 +50,7 @@ index aa0b905..90c705b 100644
// The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved.
if (GetContentClient()->renderer()->HandleNavigation(
@@ -4937,7 +4936,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
@@ -4926,7 +4925,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
is_redirect)) {
return blink::WebNavigationPolicyIgnore;
}

View File

@ -1,8 +1,8 @@
diff --git .gn .gn
index 658f215..223e0f1 100644
index 1e0e3bd..9e70917 100644
--- .gn
+++ .gn
@@ -252,6 +252,8 @@ exec_script_whitelist = [
@@ -231,6 +231,8 @@ exec_script_whitelist = [
"//build/toolchain/win/BUILD.gn",
"//build/util/branding.gni",
"//build/util/version.gni",
@ -12,10 +12,10 @@ index 658f215..223e0f1 100644
"//chrome/browser/BUILD.gn",
"//chrome/browser/chromeos/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index 2bbc1eb..715fa70 100644
index acc203c..49113a4 100644
--- BUILD.gn
+++ BUILD.gn
@@ -260,6 +260,7 @@ group("both_gn_and_gyp") {
@@ -265,6 +265,7 @@ group("both_gn_and_gyp") {
# and whether there should be other targets that are iOS-only and missing.
deps += [
"//cc:cc_unittests",
@ -56,11 +56,10 @@ index 5bfa9a7..5e6e05d 100644
+ "studio path")
}
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
index d58cb85..c7384b9 100644
index 0d0975d..cfb5d3f 100644
--- build/toolchain/win/setup_toolchain.py
+++ build/toolchain/win/setup_toolchain.py
@@ -124,11 +124,15 @@ def _LoadToolchainEnv(cpu, sdk_dir):
@@ -127,11 +127,15 @@ def _LoadToolchainEnv(cpu, sdk_dir):
script_path = os.path.normpath(os.path.join(
os.environ['GYP_MSVS_OVERRIDE_PATH'],
'VC/vcvarsall.bat'))
@ -82,7 +81,7 @@ index d58cb85..c7384b9 100644
diff --git build/vs_toolchain.py build/vs_toolchain.py
index 2b640fa..8b235a0 100755
index 829e718..89361a0 100755
--- build/vs_toolchain.py
+++ build/vs_toolchain.py
@@ -74,11 +74,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
@ -105,10 +104,10 @@ index 2b640fa..8b235a0 100755
# directory in order to run binaries locally, but they are needed in order
# to create isolates or the mini_installer. Copying them to the output
diff --git chrome/BUILD.gn chrome/BUILD.gn
index 70a1759..7822a80 100644
index aa67e96..e2af2f3 100644
--- chrome/BUILD.gn
+++ chrome/BUILD.gn
@@ -686,7 +686,7 @@ if (is_win) {
@@ -709,7 +709,7 @@ if (is_win) {
]
foreach(locale, locales_as_mac_outputs) {
@ -118,10 +117,10 @@ index 70a1759..7822a80 100644
outputs = [
diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni
index 54559c7..8ef1e66 100644
index b9a1d95..54d7677 100644
--- chrome/chrome_repack_locales.gni
+++ chrome/chrome_repack_locales.gni
@@ -192,9 +192,9 @@ template("chrome_repack_locales") {
@@ -189,9 +189,9 @@ template("chrome_repack_locales") {
if (defined(invoker.output_dir)) {
output = "${invoker.output_dir}/${output_locale}.pak"
} else if (is_mac || is_ios) {
@ -134,7 +133,7 @@ index 54559c7..8ef1e66 100644
if (defined(invoker.additional_source_patterns)) {
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
index 842a0b5..8814ec1 100644
index 1e269aa..b562c3e 100644
--- chrome/installer/mini_installer/BUILD.gn
+++ chrome/installer/mini_installer/BUILD.gn
@@ -125,7 +125,7 @@ template("generate_mini_installer") {

View File

@ -1,5 +1,5 @@
diff --git resource_ids resource_ids
index e681012..b54b107 100644
index f5f641d..c052709 100644
--- resource_ids
+++ resource_ids
@@ -14,6 +14,12 @@

View File

@ -1,5 +1,5 @@
diff --git message_loop.cc message_loop.cc
index 93b9d0a..d150345 100644
index 8a2f213..6dbaa8a 100644
--- message_loop.cc
+++ message_loop.cc
@@ -143,12 +143,6 @@ MessageLoop::~MessageLoop() {
@ -26,10 +26,10 @@ index 93b9d0a..d150345 100644
message_histogram_(NULL),
run_loop_(NULL),
diff --git message_loop.h message_loop.h
index d8eae01..d80aba4 100644
index 1957b99..93b3a9d 100644
--- message_loop.h
+++ message_loop.h
@@ -383,6 +383,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
@@ -395,6 +395,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
void AddTaskObserver(TaskObserver* task_observer);
void RemoveTaskObserver(TaskObserver* task_observer);
@ -46,7 +46,7 @@ index d8eae01..d80aba4 100644
// Can only be called from the thread that owns the MessageLoop.
bool is_running() const;
@@ -530,6 +540,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
@@ -542,6 +552,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// insider a (accidentally induced?) nested message pump.
bool nestable_tasks_allowed_;

View File

@ -25,7 +25,7 @@ index 2deb9c58..0896a36 100644
// This is the interface for subclasses of NetworkDelegate to implement. These
// member functions will be called by the respective public notification
diff --git filter/filter.h filter/filter.h
index 78b8c34..387bea5 100644
index 1940399..bf8722c 100644
--- filter/filter.h
+++ filter/filter.h
@@ -59,6 +59,7 @@
@ -36,7 +36,7 @@ index 78b8c34..387bea5 100644
class GURL;
namespace net {
@@ -240,6 +241,7 @@ class NET_EXPORT_PRIVATE Filter {
@@ -240,6 +241,7 @@ class NET_EXPORT Filter {
FilterType type() const { return type_id_; }
protected:
@ -45,10 +45,10 @@ index 78b8c34..387bea5 100644
friend class GZipUnitTest;
friend class SdchFilterChainingTest;
diff --git url_request/url_request_job.cc url_request/url_request_job.cc
index b80c0b3..90d4331 100644
index 259a2d8..c1d02cc 100644
--- url_request/url_request_job.cc
+++ url_request/url_request_job.cc
@@ -499,6 +499,9 @@ void URLRequestJob::NotifyHeadersComplete() {
@@ -498,6 +498,9 @@ void URLRequestJob::NotifyHeadersComplete() {
if (request_->status().is_success())
filter_ = SetupFilter();

View File

@ -1,5 +1,5 @@
diff --git url_request.h url_request.h
index 005ae29..28e201e0 100644
index 73e02d9..5a20709 100644
--- url_request.h
+++ url_request.h
@@ -648,10 +648,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
@ -11,6 +11,6 @@ index 005ae29..28e201e0 100644
void set_is_pending(bool value) { is_pending_ = value; }
+ protected:
// Allow the URLRequestJob class to set our status too
void set_status(const URLRequestStatus& value) { status_ = value; }
// Allow the URLRequestJob class to set our status too.
void set_status(URLRequestStatus status);

View File

@ -1,8 +1,8 @@
diff --git BUILD.gn BUILD.gn
index c9a5fdd..81fc17a 100644
index ca2338f..a5e62a2 100644
--- BUILD.gn
+++ BUILD.gn
@@ -145,6 +145,10 @@ static_library("pdfium") {
@@ -172,6 +172,10 @@ static_library("pdfium") {
} else {
libs += [ "freetype" ]
}
@ -12,20 +12,20 @@ index c9a5fdd..81fc17a 100644
+ ]
}
source_set("test_support") {
static_library("test_support") {
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
index 34e7d23..d65ea13 100644
index dee71ac..e2563bc 100644
--- fpdfsdk/fpdfview.cpp
+++ fpdfsdk/fpdfview.cpp
@@ -20,6 +20,7 @@
@@ -28,6 +28,7 @@
#include "fpdfsdk/include/fsdk_mgr.h"
#include "fpdfsdk/include/fsdk_rendercontext.h"
#include "fpdfsdk/include/fsdk_pauseadapter.h"
#include "fpdfsdk/javascript/ijs_runtime.h"
+#include "fxjs/include/fxjs_v8.h"
#include "public/fpdf_ext.h"
#include "public/fpdf_progressive.h"
#include "third_party/base/numerics/safe_conversions_impl.h"
@@ -288,6 +289,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
@@ -296,6 +297,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
#endif // PDF_ENABLE_XFA
CPDF_ModuleMgr::Destroy();
CFX_GEModule::Destroy();

View File

@ -1,8 +1,8 @@
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
index da2c4d1..9e777de 100644
index 5627e6f..b3ed37a 100644
--- public/common/common_param_traits_macros.h
+++ public/common/common_param_traits_macros.h
@@ -212,6 +212,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
@@ -213,6 +213,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
@ -11,10 +11,10 @@ index da2c4d1..9e777de 100644
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
index f070324..c204659 100644
index b856339..e71b819 100644
--- public/common/web_preferences.cc
+++ public/common/web_preferences.cc
@@ -177,6 +177,7 @@ WebPreferences::WebPreferences()
@@ -175,6 +175,7 @@ WebPreferences::WebPreferences()
pinch_overlay_scrollbar_thickness(0),
use_solid_color_scrollbars(false),
navigate_on_drag_drop(true),
@ -23,10 +23,10 @@ index f070324..c204659 100644
inert_visual_viewport(false),
record_whole_document(false),
diff --git public/common/web_preferences.h public/common/web_preferences.h
index 3fb1a79..b97ab57 100644
index f9b778b..35f1967 100644
--- public/common/web_preferences.h
+++ public/common/web_preferences.h
@@ -189,6 +189,7 @@ struct CONTENT_EXPORT WebPreferences {
@@ -188,6 +188,7 @@ struct CONTENT_EXPORT WebPreferences {
int pinch_overlay_scrollbar_thickness;
bool use_solid_color_scrollbars;
bool navigate_on_drag_drop;
@ -35,10 +35,10 @@ index 3fb1a79..b97ab57 100644
bool inert_visual_viewport;
bool record_whole_document;
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
index bc6a4ee..015a22f 100644
index c544c288..3ab4478 100644
--- renderer/render_view_impl.cc
+++ renderer/render_view_impl.cc
@@ -1465,6 +1465,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
@@ -1491,6 +1491,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
blink::WebView* web_view,
CompositorDependencies* compositor_deps) {
ApplyWebPreferences(prefs, web_view);
@ -46,4 +46,4 @@ index bc6a4ee..015a22f 100644
+ GetWebFrameWidget()->setBaseBackgroundColor(prefs.base_background_color);
}
void RenderViewImpl::OnForceRedraw(int id) {
void RenderViewImpl::OnForceRedraw(const ui::LatencyInfo& latency_info) {

View File

@ -1,5 +1,5 @@
diff --git prefs_tab_helper.cc prefs_tab_helper.cc
index f8ca619..872050c 100644
index d22384c..cb9d457 100644
--- prefs_tab_helper.cc
+++ prefs_tab_helper.cc
@@ -11,8 +11,8 @@
@ -12,7 +12,7 @@ index f8ca619..872050c 100644
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -423,12 +423,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
@@ -424,12 +424,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
GetInstance()->GetServiceForBrowserContext(profile, true));
}
@ -27,7 +27,7 @@ index f8ca619..872050c 100644
PrefWatcherFactory() : BrowserContextKeyedServiceFactory(
"PrefWatcher",
@@ -449,6 +447,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
@@ -450,6 +448,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
}
};

View File

@ -46,7 +46,7 @@ index 6798e35..215777f 100644
}
-#endif // defined(ENABLE_PRINT_PREVIEW)
diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h
index 705211b..a524333 100644
index a019144..af8839d 100644
--- components/printing/common/print_messages.h
+++ components/printing/common/print_messages.h
@@ -71,7 +71,6 @@ struct PrintMsg_PrintPages_Params {
@ -97,7 +97,7 @@ index 705211b..a524333 100644
// Parameters to describe a rendered page.
IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params)
@@ -310,22 +304,20 @@ IPC_STRUCT_END()
@@ -311,22 +305,20 @@ IPC_STRUCT_END()
// Messages sent from the browser to the renderer.
@ -122,7 +122,7 @@ index 705211b..a524333 100644
#if defined(ENABLE_BASIC_PRINTING)
// Tells the render view to switch the CSS to print media type, renders every
@@ -344,13 +336,11 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
@@ -345,13 +337,11 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
IPC_MESSAGE_ROUTED1(PrintMsg_SetScriptedPrintingBlocked,
bool /* blocked */)
@ -136,7 +136,7 @@ index 705211b..a524333 100644
// Messages sent from the renderer to the browser.
@@ -410,7 +400,6 @@ IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten,
@@ -411,7 +401,6 @@ IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten,
int /* fd in browser */) // Used only by Chrome OS.
#endif // defined(OS_ANDROID)
@ -144,7 +144,7 @@ index 705211b..a524333 100644
// Asks the browser to do print preview.
IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview,
PrintHostMsg_RequestPrintPreview_Params /* params */)
@@ -444,7 +433,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
@@ -445,7 +434,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
// The memory handle in this message is already valid in the browser process.
IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting,
PrintHostMsg_DidPreviewDocument_Params /* params */)
@ -152,7 +152,7 @@ index 705211b..a524333 100644
// This is sent when there are invalid printer settings.
IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
@@ -453,7 +441,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
@@ -454,7 +442,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed,
int /* document cookie */)
@ -160,16 +160,16 @@ index 705211b..a524333 100644
// Tell the browser print preview failed.
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed,
int /* document cookie */)
@@ -480,4 +467,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
@@ -481,4 +468,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
// Notify the browser to set print presets based on source PDF document.
IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
-#endif // defined(ENABLE_PRINT_PREVIEW)
diff --git components/printing/renderer/print_web_view_helper.cc components/printing/renderer/print_web_view_helper.cc
index 0169f36..c316ff2 100644
index 22207f3..5924464 100644
--- components/printing/renderer/print_web_view_helper.cc
+++ components/printing/renderer/print_web_view_helper.cc
@@ -85,6 +85,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
@@ -86,6 +86,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
#if defined(ENABLE_PRINT_PREVIEW)
bool g_is_preview_enabled = true;
@ -179,7 +179,7 @@ index 0169f36..c316ff2 100644
const char kPageLoadScriptFormat[] =
"document.open(); document.write(%s); document.close();";
@@ -99,9 +102,6 @@ void ExecuteScript(blink::WebFrame* frame,
@@ -100,9 +103,6 @@ void ExecuteScript(blink::WebFrame* frame,
std::string script = base::StringPrintf(script_format, json.c_str());
frame->executeScript(blink::WebString(base::UTF8ToUTF16(script)));
}
@ -189,7 +189,7 @@ index 0169f36..c316ff2 100644
int GetDPI(const PrintMsg_Print_Params* print_params) {
#if defined(OS_MACOSX)
@@ -311,7 +311,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
@@ -302,7 +302,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
return plugin && plugin->supportsPaginatedPrint();
}
@ -197,7 +197,7 @@ index 0169f36..c316ff2 100644
// Returns true if the current destination printer is PRINT_TO_PDF.
bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) {
bool print_to_pdf = false;
@@ -333,7 +332,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame,
@@ -324,7 +323,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame,
}
return frame_has_custom_page_size_style;
}
@ -205,7 +205,7 @@ index 0169f36..c316ff2 100644
// Disable scaling when either:
// - The PDF specifies disabling scaling.
@@ -380,7 +378,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
@@ -371,7 +369,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
}
#endif
@ -213,7 +213,7 @@ index 0169f36..c316ff2 100644
bool FitToPageEnabled(const base::DictionaryValue& job_settings) {
bool fit_to_paper_size = false;
if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) {
@@ -422,7 +419,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
@@ -413,7 +410,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
}
return blink::WebPrintScalingOptionFitToPrintableArea;
}
@ -221,7 +221,7 @@ index 0169f36..c316ff2 100644
PrintMsg_Print_Params CalculatePrintParamsForCss(
blink::WebLocalFrame* frame,
@@ -506,7 +502,6 @@ blink::WebView* FrameReference::view() {
@@ -497,7 +493,6 @@ blink::WebView* FrameReference::view() {
return view_;
}
@ -229,7 +229,7 @@ index 0169f36..c316ff2 100644
// static - Not anonymous so that platform implementations can use it.
void PrintWebViewHelper::PrintHeaderAndFooter(
blink::WebCanvas* canvas,
@@ -566,7 +561,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
@@ -557,7 +552,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
web_view->close();
frame->close();
}
@ -237,7 +237,7 @@ index 0169f36..c316ff2 100644
// static - Not anonymous so that platform implementations can use it.
float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame,
@@ -852,6 +846,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
@@ -843,6 +837,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
print_for_preview_(false),
delegate_(std::move(delegate)),
print_node_in_progress_(false),
@ -245,7 +245,7 @@ index 0169f36..c316ff2 100644
is_loading_(false),
is_scripted_preview_delayed_(false),
ipc_nesting_level_(0),
@@ -910,10 +905,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
@@ -901,10 +896,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
return;
if (g_is_preview_enabled) {
@ -256,7 +256,7 @@ index 0169f36..c316ff2 100644
} else {
#if defined(ENABLE_BASIC_PRINTING)
Print(frame, blink::WebNode(), true);
@@ -937,14 +930,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
@@ -928,14 +921,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
#endif // defined(ENABLE_BASIC_PRINTING)
@ -271,7 +271,7 @@ index 0169f36..c316ff2 100644
IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked,
SetScriptedPrintBlocked)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -999,7 +988,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
@@ -990,7 +979,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
}
#endif // defined(ENABLE_BASIC_PRINTING)
@ -279,7 +279,7 @@ index 0169f36..c316ff2 100644
void PrintWebViewHelper::OnPrintForPrintPreview(
const base::DictionaryValue& job_settings) {
CHECK_LE(ipc_nesting_level_, 1);
@@ -1064,7 +1052,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
@@ -1055,7 +1043,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
DidFinishPrinting(FAIL_PRINT);
}
}
@ -287,7 +287,7 @@ index 0169f36..c316ff2 100644
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
const PageSizeMargins& page_layout_in_points,
@@ -1089,7 +1076,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
@@ -1080,7 +1067,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
}
@ -295,7 +295,7 @@ index 0169f36..c316ff2 100644
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
if (ipc_nesting_level_ > 1)
return;
@@ -1250,7 +1236,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
@@ -1241,7 +1227,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
return true;
}
@ -304,7 +304,7 @@ index 0169f36..c316ff2 100644
bool PrintWebViewHelper::RenderPreviewPage(
int page_number,
const PrintMsg_Print_Params& print_params) {
@@ -1280,7 +1266,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
@@ -1271,7 +1257,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
}
return PreviewPageRendered(page_number, draft_metafile.get());
}
@ -313,7 +313,7 @@ index 0169f36..c316ff2 100644
bool PrintWebViewHelper::FinalizePrintReadyDocument() {
DCHECK(!is_print_ready_metafile_sent_);
@@ -1310,7 +1296,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
@@ -1301,7 +1287,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
return true;
}
@ -321,7 +321,7 @@ index 0169f36..c316ff2 100644
void PrintWebViewHelper::OnPrintingDone(bool success) {
if (ipc_nesting_level_ > 1)
@@ -1325,7 +1310,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
@@ -1316,7 +1301,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
is_scripted_printing_blocked_ = blocked;
}
@ -329,7 +329,7 @@ index 0169f36..c316ff2 100644
void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
if (ipc_nesting_level_ > 1)
return;
@@ -1336,7 +1320,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
@@ -1327,7 +1311,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.isNull()) {
@ -339,7 +339,7 @@ index 0169f36..c316ff2 100644
return;
}
print_preview_context_.InitWithFrame(frame);
@@ -1344,7 +1330,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
@@ -1335,7 +1321,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
? PRINT_PREVIEW_USER_INITIATED_SELECTION
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
}
@ -347,7 +347,7 @@ index 0169f36..c316ff2 100644
bool PrintWebViewHelper::IsPrintingEnabled() {
bool result = false;
@@ -1370,11 +1355,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
@@ -1361,11 +1346,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets
// its |context_menu_node_|.
@ -360,7 +360,7 @@ index 0169f36..c316ff2 100644
} else {
#if defined(ENABLE_BASIC_PRINTING)
blink::WebNode duplicate_node(node);
@@ -1440,7 +1423,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
@@ -1431,7 +1414,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
}
break;
@ -368,7 +368,7 @@ index 0169f36..c316ff2 100644
case FAIL_PREVIEW:
int cookie =
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
@@ -1452,7 +1434,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
@@ -1443,7 +1425,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
}
print_preview_context_.Failed(notify_browser_of_print_failure_);
break;
@ -376,7 +376,7 @@ index 0169f36..c316ff2 100644
}
prep_frame_view_.reset();
print_pages_params_.reset();
@@ -1584,7 +1565,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
@@ -1575,7 +1556,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
return true;
}
@ -384,7 +384,7 @@ index 0169f36..c316ff2 100644
bool PrintWebViewHelper::SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options) {
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
@@ -1693,7 +1673,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
@@ -1684,7 +1664,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
return true;
}
@ -392,7 +392,7 @@ index 0169f36..c316ff2 100644
#if defined(ENABLE_BASIC_PRINTING)
bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame,
@@ -1801,7 +1780,6 @@ void PrintWebViewHelper::PrintPageInternal(
@@ -1793,7 +1772,6 @@ void PrintWebViewHelper::PrintPageInternal(
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
@ -400,7 +400,7 @@ index 0169f36..c316ff2 100644
if (params.params.display_header_footer) {
// TODO(thestig): Figure out why Linux needs this. It is almost certainly
// |printingMinimumShrinkFactor| from Blink.
@@ -1816,7 +1794,6 @@ void PrintWebViewHelper::PrintPageInternal(
@@ -1808,7 +1786,6 @@ void PrintWebViewHelper::PrintPageInternal(
scale_factor / fudge_factor, page_layout_in_points,
params.params);
}
@ -408,7 +408,7 @@ index 0169f36..c316ff2 100644
float webkit_scale_factor =
RenderPageContent(frame, params.page_number, canvas_area, content_area,
@@ -1852,7 +1829,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
@@ -1844,7 +1821,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
return true;
}
@ -416,7 +416,7 @@ index 0169f36..c316ff2 100644
void PrintWebViewHelper::ShowScriptedPrintPreview() {
if (is_scripted_preview_delayed_) {
is_scripted_preview_delayed_ = false;
@@ -1980,7 +1956,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
@@ -1972,7 +1948,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
return true;
}

View File

@ -1,5 +1,5 @@
diff --git render_view_host_impl.h render_view_host_impl.h
index 5f850f2..1cae2ee 100644
index e550b57..81743c8 100644
--- render_view_host_impl.h
+++ render_view_host_impl.h
@@ -200,6 +200,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,

View File

@ -1,8 +1,8 @@
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
index 0dc3ef0..705d8f4 100644
index ecfcc9c..6bb0eda 100644
--- render_widget_host_view_mac.mm
+++ render_widget_host_view_mac.mm
@@ -499,9 +499,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
@@ -467,9 +467,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
// Paint this view host with |background_color_| when there is no content
// ready to draw.
background_layer_.reset([[CALayer alloc] init]);

View File

@ -1,8 +1,8 @@
diff --git renderer_preferences_util.cc renderer_preferences_util.cc
index 1a1a910..94fe66a 100644
index d47d2d0..e6a5d9d 100644
--- renderer_preferences_util.cc
+++ renderer_preferences_util.cc
@@ -22,7 +22,8 @@
@@ -26,7 +26,8 @@
#include "ui/views/controls/textfield/textfield.h"
#endif
@ -12,7 +12,7 @@ index 1a1a910..94fe66a 100644
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "ui/views/linux_ui/linux_ui.h"
@@ -72,7 +73,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs,
@@ -120,7 +121,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs,
prefs->caret_blink_interval = views::Textfield::GetCaretBlinkMs() / 1000.0;
#endif

View File

@ -1,5 +1,5 @@
diff --git spellcheck_factory.cc spellcheck_factory.cc
index deabf96..3d34032 100644
index 3857256..3d1562c 100644
--- spellcheck_factory.cc
+++ spellcheck_factory.cc
@@ -16,6 +16,13 @@

View File

@ -1,8 +1,8 @@
diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc
index 18eb9fc..002feea 100644
index 41f74ae..daca31a7 100644
--- content/browser/appcache/appcache_internals_ui.cc
+++ content/browser/appcache/appcache_internals_ui.cc
@@ -368,8 +368,8 @@ void AppCacheInternalsUI::CreateProxyForPartition(
@@ -369,8 +369,8 @@ void AppCacheInternalsUI::CreateProxyForPartition(
StoragePartition* storage_partition) {
scoped_refptr<Proxy> proxy =
new Proxy(weak_ptr_factory_.GetWeakPtr(), storage_partition->GetPath());
@ -30,19 +30,19 @@ index 533d3f1..f0fc700 100644
BrowserContext* context) {
if (!context->GetUserData(kBlobStorageContextKeyName)) {
diff --git content/browser/blob_storage/chrome_blob_storage_context.h content/browser/blob_storage/chrome_blob_storage_context.h
index bd02cb1..92d1580 100644
index bd02cb1..074e77f 100644
--- content/browser/blob_storage/chrome_blob_storage_context.h
+++ content/browser/blob_storage/chrome_blob_storage_context.h
@@ -41,6 +41,7 @@ class CONTENT_EXPORT ChromeBlobStorageContext
public:
ChromeBlobStorageContext();
+ CONTENT_EXPORT static const void* GetUserDataKey();
+ static const void* GetUserDataKey();
static ChromeBlobStorageContext* GetFor(
BrowserContext* browser_context);
diff --git content/browser/browser_context.cc content/browser/browser_context.cc
index 729df89..992c2bc 100644
index 6ca86e7..cf081e4 100644
--- content/browser/browser_context.cc
+++ content/browser/browser_context.cc
@@ -113,7 +113,14 @@ StoragePartition* GetStoragePartitionFromConfig(
@ -61,8 +61,8 @@ index 729df89..992c2bc 100644
}
void SaveSessionStateOnIOThread(
@@ -481,6 +488,11 @@ shell::Connector* BrowserContext::GetShellConnectorFor(
return connection_holder->shell_connection()->GetConnector();
@@ -486,6 +493,11 @@ MojoShellConnection* BrowserContext::GetMojoShellConnectionFor(
return connection_holder ? connection_holder->shell_connection() : nullptr;
}
+// static
@ -74,7 +74,7 @@ index 729df89..992c2bc 100644
CHECK(GetUserData(kMojoWasInitialized))
<< "Attempting to destroy a BrowserContext that never called "
diff --git content/browser/devtools/protocol/service_worker_handler.cc content/browser/devtools/protocol/service_worker_handler.cc
index b9f528f..d385da4 100644
index 127b0c0..9dce5af 100644
--- content/browser/devtools/protocol/service_worker_handler.cc
+++ content/browser/devtools/protocol/service_worker_handler.cc
@@ -523,10 +523,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent(
@ -91,10 +91,10 @@ index b9f528f..d385da4 100644
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
index f427078..e76cc58 100644
index 7d69ab0..91d968a 100644
--- content/browser/renderer_host/render_process_host_impl.cc
+++ content/browser/renderer_host/render_process_host_impl.cc
@@ -543,7 +543,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() {
@@ -653,7 +653,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() {
RenderProcessHostImpl::RenderProcessHostImpl(
BrowserContext* browser_context,
@ -103,7 +103,7 @@ index f427078..e76cc58 100644
bool is_for_guests_only)
: fast_shutdown_started_(false),
deleting_soon_(false),
@@ -866,6 +866,22 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
@@ -978,6 +978,22 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
void RenderProcessHostImpl::CreateMessageFilters() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@ -125,32 +125,31 @@ index f427078..e76cc58 100644
+
AddFilter(new ResourceSchedulerFilter(GetID()));
MediaInternals* media_internals = MediaInternals::GetInstance();
media::AudioManager* audio_manager =
@@ -882,8 +898,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
@@ -992,8 +1008,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
new RenderMessageFilter(
GetID(), GetBrowserContext(), request_context.get(),
widget_helper_.get(), audio_manager, media_internals,
widget_helper_.get(), media_internals,
- storage_partition_impl_->GetDOMStorageContext(),
- storage_partition_impl_->GetCacheStorageContext()));
+ dom_storage_context,
+ cache_storage_context));
AddFilter(render_message_filter.get());
AddFilter(new RenderFrameMessageFilter(
GetID(),
@@ -911,10 +927,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter(
render_frame_message_filter_ = new RenderFrameMessageFilter(
@@ -1024,9 +1040,9 @@ void RenderProcessHostImpl::CreateMessageFilters() {
resource_message_filter_ = new ResourceMessageFilter(
GetID(), PROCESS_TYPE_RENDERER,
- storage_partition_impl_->GetAppCacheService(),
+ app_cache_service,
blob_storage_context.get(),
- storage_partition_impl_->GetAppCacheService(), blob_storage_context.get(),
+ app_cache_service, blob_storage_context.get(),
storage_partition_impl_->GetFileSystemContext(),
- storage_partition_impl_->GetServiceWorkerContext(),
+ service_worker_context,
storage_partition_impl_->GetHostZoomLevelContext(),
get_contexts_callback);
@@ -936,14 +952,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1051,14 +1067,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager()));
AddFilter(new VideoCaptureHost(media_stream_manager));
@ -168,7 +167,7 @@ index f427078..e76cc58 100644
blob_storage_context.get()));
#if defined(ENABLE_WEBRTC)
@@ -1002,14 +1016,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1110,14 +1124,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter =
new CacheStorageDispatcherHost();
@ -185,7 +184,7 @@ index f427078..e76cc58 100644
AddFilter(service_worker_filter.get());
AddFilter(new SharedWorkerMessageFilter(
@@ -1017,12 +1030,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1125,12 +1138,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
WorkerStoragePartition(
storage_partition_impl_->GetURLRequestContext(),
storage_partition_impl_->GetMediaURLRequestContext(),
@ -201,16 +200,20 @@ index f427078..e76cc58 100644
message_port_message_filter_.get()));
#if defined(ENABLE_WEBRTC)
@@ -1038,7 +1051,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1145,11 +1158,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
GetID(), storage_partition_impl_->GetQuotaManager(),
GetContentClient()->browser()->CreateQuotaPermissionContext()));
- scoped_refptr<ServiceWorkerContextWrapper> service_worker_context(
- static_cast<ServiceWorkerContextWrapper*>(
- storage_partition_impl_->GetServiceWorkerContext()));
notification_message_filter_ = new NotificationMessageFilter(
- GetID(), storage_partition_impl_->GetPlatformNotificationContext(),
+ GetID(), platform_notification_context,
resource_context, browser_context);
resource_context, service_worker_context, browser_context);
AddFilter(notification_message_filter_.get());
@@ -1047,13 +1060,18 @@ void RenderProcessHostImpl::CreateMessageFilters() {
@@ -1158,7 +1168,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(new HistogramMessageFilter());
AddFilter(new MemoryMessageFilter(this));
AddFilter(new PushMessagingMessageFilter(
@ -219,40 +222,41 @@ index f427078..e76cc58 100644
#if defined(OS_ANDROID)
AddFilter(new ScreenOrientationMessageFilterAndroid());
#endif
}
@@ -1167,6 +1177,11 @@ void RenderProcessHostImpl::CreateMessageFilters() {
void RenderProcessHostImpl::RegisterMojoInterfaces() {
std::unique_ptr<shell::InterfaceRegistry> registry(
new shell::InterfaceRegistry);
+ // Cast to the derived type from StoragePartitionImpl.
+ auto platform_notification_context =
+ static_cast<PlatformNotificationContextImpl*>(
+ storage_partition_impl_->GetPlatformNotificationContext());
+
#if !defined(OS_ANDROID)
GetInterfaceRegistry()->AddInterface(
base::Bind(&device::BatteryMonitorImpl::Create));
@@ -1076,8 +1094,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
GetInterfaceRegistry()->AddInterface(base::Bind(
&PlatformNotificationContextImpl::CreateService,
#if defined(OS_ANDROID)
interface_registry_android_ =
InterfaceRegistryAndroid::Create(registry.get());
@@ -1194,8 +1209,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
AddUIThreadInterface(
registry.get(),
base::Bind(&PlatformNotificationContextImpl::CreateService,
- base::Unretained(
- storage_partition_impl_->GetPlatformNotificationContext()), GetID()));
+ base::Unretained(platform_notification_context), GetID()));
GetInterfaceRegistry()->AddInterface(
base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService,
- storage_partition_impl_->GetPlatformNotificationContext()),
+ base::Unretained(platform_notification_context),
GetID()));
AddUIThreadInterface(
registry.get(),
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
index c3aa818..e64cd43 100644
index 7fb91a6..503e6ba 100644
--- content/browser/renderer_host/render_process_host_impl.h
+++ content/browser/renderer_host/render_process_host_impl.h
@@ -66,7 +66,6 @@ class RenderWidgetHost;
class RenderWidgetHostImpl;
@@ -75,7 +75,6 @@ class RenderWidgetHostImpl;
class RenderWidgetHostViewFrameSubscriber;
class ResourceMessageFilter;
class StoragePartition;
-class StoragePartitionImpl;
namespace mojom {
class StoragePartitionService;
@@ -100,7 +99,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -109,7 +108,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
public ui::GpuSwitchingObserver {
public:
RenderProcessHostImpl(BrowserContext* browser_context,
@ -261,7 +265,7 @@ index c3aa818..e64cd43 100644
bool is_for_guests_only);
~RenderProcessHostImpl() override;
@@ -420,7 +419,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
@@ -468,7 +467,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
BrowserContext* browser_context_;
// Owned by |browser_context_|.
@ -270,11 +274,27 @@ index c3aa818..e64cd43 100644
// The observers watching our lifetime.
base::ObserverList<RenderProcessHostObserver> observers_;
diff --git content/browser/site_instance_impl.cc content/browser/site_instance_impl.cc
index 8978640..a1e4cdd 100644
--- content/browser/site_instance_impl.cc
+++ content/browser/site_instance_impl.cc
@@ -116,9 +116,8 @@ RenderProcessHost* SiteInstanceImpl::GetProcess() {
process_ = g_render_process_host_factory_->CreateRenderProcessHost(
browser_context, this);
} else {
- StoragePartitionImpl* partition =
- static_cast<StoragePartitionImpl*>(
- BrowserContext::GetStoragePartition(browser_context, this));
+ StoragePartition* partition =
+ BrowserContext::GetStoragePartition(browser_context, this);
process_ = new RenderProcessHostImpl(browser_context,
partition,
site_.SchemeIs(kGuestScheme));
diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h
index 49b8d14..7a7d3da 100644
index 584f2db..551e350 100644
--- content/browser/storage_partition_impl.h
+++ content/browser/storage_partition_impl.h
@@ -22,9 +22,7 @@
@@ -24,9 +24,7 @@
#include "content/browser/notifications/platform_notification_context_impl.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/common/content_export.h"
@ -284,20 +304,19 @@ index 49b8d14..7a7d3da 100644
#include "net/cookies/cookie_store.h"
#include "storage/browser/quota/special_storage_policy.h"
@@ -67,9 +65,9 @@ class CONTENT_EXPORT StoragePartitionImpl
@@ -72,9 +70,8 @@ class CONTENT_EXPORT StoragePartitionImpl
HostZoomLevelContext* GetHostZoomLevelContext() override;
ZoomLevelDelegate* GetZoomLevelDelegate() override;
PlatformNotificationContextImpl* GetPlatformNotificationContext() override;
-
- BackgroundSyncContext* GetBackgroundSyncContext();
- webmessaging::BroadcastChannelProvider* GetBroadcastChannelProvider();
- BroadcastChannelProvider* GetBroadcastChannelProvider();
+ BackgroundSyncContext* GetBackgroundSyncContext() override;
+ webmessaging::BroadcastChannelProvider* GetBroadcastChannelProvider()
+ override;
+ BroadcastChannelProvider* GetBroadcastChannelProvider() override;
// mojom::StoragePartitionService interface.
void OpenLocalStorage(
@@ -104,7 +102,8 @@ class CONTENT_EXPORT StoragePartitionImpl
@@ -109,7 +106,8 @@ class CONTENT_EXPORT StoragePartitionImpl
BrowserContext* browser_context() const;
// Called by each renderer process once.
@ -336,19 +355,19 @@ index 075ae3e..57fb5fd 100644
void InitializeOnIOThread();
diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h
index 05f8086..825ee9d 100644
index 15be1d2..70a2816 100644
--- content/public/browser/browser_context.h
+++ content/public/browser/browser_context.h
@@ -167,6 +167,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
static shell::Connector* GetShellConnectorFor(
@@ -170,6 +170,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
static MojoShellConnection* GetMojoShellConnectionFor(
BrowserContext* browser_context);
+ static const void* GetStoragePartitionMapUserDataKey();
+
~BrowserContext() override;
// Creates a delegate to initialize a HostZoomMap and persist its information.
@@ -234,6 +236,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
// Shuts down the storage partitions associated to this browser context.
@@ -244,6 +246,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
CreateMediaRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory) = 0;
@ -364,7 +383,7 @@ index 05f8086..825ee9d 100644
} // namespace content
diff --git content/public/browser/storage_partition.h content/public/browser/storage_partition.h
index 909b370..b1ffd2a 100644
index 909b370..8c6f09d 100644
--- content/public/browser/storage_partition.h
+++ content/public/browser/storage_partition.h
@@ -13,6 +13,8 @@
@ -376,32 +395,25 @@ index 909b370..b1ffd2a 100644
#include "net/cookies/cookie_store.h"
class GURL;
@@ -38,9 +40,14 @@ namespace storage {
class DatabaseTracker;
}
+namespace webmessaging {
+class BroadcastChannelProvider;
+}
+
@@ -41,6 +43,8 @@ class DatabaseTracker;
namespace content {
class AppCacheService;
+class BackgroundSyncContext;
+class BroadcastChannelProvider;
class BrowserContext;
class CacheStorageContext;
class DOMStorageContext;
@@ -74,6 +81,9 @@ class CONTENT_EXPORT StoragePartition {
@@ -74,6 +78,8 @@ class CONTENT_EXPORT StoragePartition {
virtual HostZoomLevelContext* GetHostZoomLevelContext() = 0;
virtual ZoomLevelDelegate* GetZoomLevelDelegate() = 0;
virtual PlatformNotificationContext* GetPlatformNotificationContext() = 0;
+ virtual BackgroundSyncContext* GetBackgroundSyncContext() = 0;
+ virtual webmessaging::BroadcastChannelProvider*
+ GetBroadcastChannelProvider() = 0;
+ virtual BroadcastChannelProvider* GetBroadcastChannelProvider() = 0;
enum : uint32_t {
REMOVE_DATA_MASK_APPCACHE = 1 << 0,
@@ -166,6 +176,10 @@ class CONTENT_EXPORT StoragePartition {
@@ -166,6 +172,10 @@ class CONTENT_EXPORT StoragePartition {
// unwritten data has been written out to the filesystem.
virtual void Flush() = 0;

View File

@ -1,8 +1,8 @@
diff --git os_exchange_data_provider_aurax11.cc os_exchange_data_provider_aurax11.cc
index 6048670..b37f4bf 100644
index 9b93593..fe0f44a 100644
--- os_exchange_data_provider_aurax11.cc
+++ os_exchange_data_provider_aurax11.cc
@@ -158,7 +158,8 @@ void OSExchangeDataProviderAuraX11::SetURL(const GURL& url,
@@ -162,7 +162,8 @@ void OSExchangeDataProviderAuraX11::SetURL(const GURL& url,
mem);
// Set a string fallback as well.

View File

@ -1,8 +1,8 @@
diff --git controls/button/menu_button.cc controls/button/menu_button.cc
index b891849..a41dc85 100644
index 4b562c5..17e2d3b 100644
--- controls/button/menu_button.cc
+++ controls/button/menu_button.cc
@@ -198,7 +198,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) {
@@ -197,7 +197,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) {
gfx::Size MenuButton::GetPreferredSize() const {
gfx::Size prefsize = LabelButton::GetPreferredSize();
if (show_menu_marker_) {
@ -11,7 +11,7 @@ index b891849..a41dc85 100644
kMenuMarkerPaddingRight,
0);
}
@@ -327,7 +327,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() {
@@ -324,7 +324,7 @@ gfx::Rect MenuButton::GetChildAreaBounds() {
gfx::Size s = size();
if (show_menu_marker_) {
@ -20,7 +20,7 @@ index b891849..a41dc85 100644
kMenuMarkerPaddingRight);
}
@@ -415,4 +415,10 @@ int MenuButton::GetMaximumScreenXCoordinate() {
@@ -412,4 +412,10 @@ int MenuButton::GetMaximumScreenXCoordinate() {
return monitor_bounds.right() - 1;
}
@ -56,7 +56,7 @@ index 696a941..ce5abcd 100644
// The time is used for simulating menu behavior for the menu button; that
// is, if the menu is shown and the button is pressed, we need to close the
diff --git view.h view.h
index 6b45c63..7e52409 100644
index 55cc02b..c402f55 100644
--- view.h
+++ view.h
@@ -18,6 +18,7 @@

View File

@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
index 284533c..6e56986 100644
index c681785..fc49f2d 100644
--- content/browser/renderer_host/render_widget_host_view_aura.cc
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -769,6 +769,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
@@ -747,6 +747,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
}
}
#endif
@ -17,18 +17,18 @@ index 284533c..6e56986 100644
if (host_ && set_focus_on_mouse_down_or_key_event_) {
set_focus_on_mouse_down_or_key_event_ = false;
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 8b8907e..52bee5e 100644
index b41c4f1..f52b243 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -42,6 +42,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
@@ -44,6 +44,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
current_display_rotation_(display::Display::ROTATE_0),
pinch_zoom_enabled_(content::IsPinchToZoomEnabled()),
text_input_manager_(nullptr),
+ has_external_parent_(false),
renderer_frame_number_(0),
weak_factory_(this) {}
@@ -275,6 +276,10 @@ void RenderWidgetHostViewBase::FocusedNodeTouched(
weak_factory_(this) {
}
@@ -324,6 +325,10 @@ void RenderWidgetHostViewBase::FocusedNodeTouched(
DVLOG(1) << "FocusedNodeTouched: " << editable;
}
@ -40,10 +40,10 @@ index 8b8907e..52bee5e 100644
return renderer_frame_number_;
}
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
index 0a1e01e..e8439d2 100644
index c69e9b8..d1d4f3f 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -101,6 +101,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@@ -107,6 +107,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
void EndFrameSubscription() override;
void FocusedNodeTouched(const gfx::Point& location_dips_screen,
bool editable) override;
@ -51,7 +51,7 @@ index 0a1e01e..e8439d2 100644
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
@@ -458,6 +459,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
@@ -468,6 +469,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// destroyed before the RWHV is destroyed.
TextInputManager* text_input_manager_;
@ -63,12 +63,12 @@ index 0a1e01e..e8439d2 100644
void FlushInput();
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
index 5475763..d92ecd0 100644
index ff3127b..e666db1 100644
--- content/public/browser/render_widget_host_view.h
+++ content/public/browser/render_widget_host_view.h
@@ -167,6 +167,10 @@ class CONTENT_EXPORT RenderWidgetHostView {
virtual void FocusedNodeTouched(const gfx::Point& location_dips_screen,
bool editable) = 0;
@@ -172,6 +172,10 @@ class CONTENT_EXPORT RenderWidgetHostView {
// when the value has changed. Views must initially default to false.
virtual void SetNeedsBeginFrames(bool needs_begin_frames) = 0;
+ // Set whether the widget has a external parent view/window outside of the
+ // Chromium-controlled view/window hierarchy.
@ -91,7 +91,7 @@ index f772f64..7d13f9f 100644
return host ? host->GetAcceleratedWidget() : NULL;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index f58bbaa..1643f5a 100644
index d02a06c0..e5982e0 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -86,6 +86,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
@ -146,7 +146,7 @@ index f58bbaa..1643f5a 100644
bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index ec0bd2a..e4c2403 100644
index 884df90..518a69c 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -138,6 +138,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@ -169,7 +169,7 @@ index ec0bd2a..e4c2403 100644
// a reference.
corewm::TooltipWin* tooltip_;
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 0475bf7..3a810de 100644
index 5327938..e8345de 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -174,6 +174,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
@ -256,7 +256,7 @@ index 0475bf7..3a810de 100644
if (xev->xfocus.mode != NotifyGrab) {
ReleaseCapture();
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index aced1ef..9e72692 100644
index b9ba521..7478c1a 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -86,6 +86,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
@ -365,7 +365,7 @@ index aa3c234..021bd01 100644
x_active_window_ = None;
}
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index eebeb87..eed32f8 100644
index ca92c5b..f628c39 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -126,9 +126,11 @@ Widget::InitParams::InitParams(Type type)
@ -413,10 +413,10 @@ index eebeb87..eed32f8 100644
// This must come after SetContentsView() or it might not be able to find
// the correct NativeTheme (on Linux). See http://crbug.com/384492
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index 4e1617f..5b1f06b 100644
index a92dbce..db28032 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -235,12 +235,17 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -234,12 +234,17 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// rendered, and that the client area should be equivalent to the window
// area. Only used on some platforms (Windows and Linux).
bool remove_standard_frame;
@ -434,7 +434,7 @@ index 4e1617f..5b1f06b 100644
// Used only by mus and is necessitated by mus not being a NativeView.
ui::Window* parent_mus = nullptr;
// Specifies the initial bounds of the Widget. Default is empty, which means
@@ -757,6 +762,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -756,6 +761,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
bool movement_disabled() const { return movement_disabled_; }
void set_movement_disabled(bool disabled) { movement_disabled_ = disabled; }
@ -445,7 +445,7 @@ index 4e1617f..5b1f06b 100644
// Returns the work area bounds of the screen the Widget belongs to.
gfx::Rect GetWorkAreaBoundsInScreen() const;
@@ -975,6 +984,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -974,6 +983,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// disabled.
bool movement_disabled_;
@ -473,10 +473,10 @@ index b843416..8b81a51 100644
}
case Widget::InitParams::TYPE_CONTROL:
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index b035fd3..81dd204 100644
index ec631af..2d55a51 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -866,6 +866,8 @@ void HWNDMessageHandler::SizeConstraintsChanged() {
@@ -851,6 +851,8 @@ void HWNDMessageHandler::SizeConstraintsChanged() {
} else {
style &= ~WS_MINIMIZEBOX;
}
@ -485,7 +485,7 @@ index b035fd3..81dd204 100644
SetWindowLong(hwnd(), GWL_STYLE, style);
}
@@ -2522,8 +2524,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -2469,8 +2471,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
active_mouse_tracking_flags_ = 0;
} else if (event.type() == ui::ET_MOUSEWHEEL) {
// Reroute the mouse wheel to the window under the pointer if applicable.
@ -501,7 +501,7 @@ index b035fd3..81dd204 100644
// There are cases where the code handling the message destroys the window,
diff --git ui/views/win/hwnd_message_handler_delegate.h ui/views/win/hwnd_message_handler_delegate.h
index f9e027d..5483352 100644
index ddf26d2..79e5db2 100644
--- ui/views/win/hwnd_message_handler_delegate.h
+++ ui/views/win/hwnd_message_handler_delegate.h
@@ -57,6 +57,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/extensions/api/tab_capture/offscreen_tab.cc chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
index ddc31cf..81b7d1c 100644
index d7e2677..71436d2 100644
--- chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
+++ chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
@@ -203,7 +203,9 @@ bool OffscreenTab::ShouldCreateWebContents(
@@ -204,7 +204,9 @@ bool OffscreenTab::ShouldCreateWebContents(
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@ -29,10 +29,10 @@ index 712c117..4dc59be 100644
void EnterFullscreenModeForTab(content::WebContents* contents,
const GURL& origin) final;
diff --git chrome/browser/prerender/prerender_contents.cc chrome/browser/prerender/prerender_contents.cc
index d646060..697bf1b 100644
index ff3f72d..6647f76 100644
--- chrome/browser/prerender/prerender_contents.cc
+++ chrome/browser/prerender/prerender_contents.cc
@@ -129,7 +129,9 @@ class PrerenderContents::WebContentsDelegateImpl
@@ -131,7 +131,9 @@ class PrerenderContents::WebContentsDelegateImpl
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@ -44,10 +44,10 @@ index d646060..697bf1b 100644
// window.opener property, terminate prerendering.
prerender_contents_->Destroy(FINAL_STATUS_CREATE_NEW_WINDOW);
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index 3951954..ca52685 100644
index 93b36dc..b25c512 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -1618,7 +1618,9 @@ bool Browser::ShouldCreateWebContents(
@@ -1616,7 +1616,9 @@ bool Browser::ShouldCreateWebContents(
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
@ -74,10 +74,10 @@ index 693e84d..be1f1dd 100644
int opener_render_frame_id,
const std::string& frame_name,
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index 62dfcec..acdc44d 100644
index 51f3bba..dead593 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -1521,6 +1521,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1543,6 +1543,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name = params.main_frame_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@ -90,7 +90,7 @@ index 62dfcec..acdc44d 100644
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -1553,6 +1559,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -1575,6 +1581,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::move(view_),
&render_view_host_delegate_view_));
}
@ -98,7 +98,7 @@ index 62dfcec..acdc44d 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -2010,11 +2017,14 @@ void WebContentsImpl::CreateNewWindow(
@@ -2028,11 +2035,14 @@ void WebContentsImpl::CreateNewWindow(
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
@ -114,7 +114,7 @@ index 62dfcec..acdc44d 100644
if (route_id != MSG_ROUTING_NONE &&
!RenderViewHost::FromID(render_process_id, route_id)) {
// If the embedder didn't create a WebContents for this route, we need to
@@ -2038,6 +2048,8 @@ void WebContentsImpl::CreateNewWindow(
@@ -2056,6 +2066,8 @@ void WebContentsImpl::CreateNewWindow(
create_params.opener_render_process_id = render_process_id;
create_params.opener_render_frame_id = params.opener_render_frame_id;
create_params.opener_suppressed = params.opener_suppressed;
@ -139,7 +139,7 @@ index fa0afb5..d677b31 100644
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 65de3da..6807203 100644
index efa8ae5..8ea0055 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -55,8 +55,10 @@ class PageState;
@ -207,7 +207,7 @@ index 2816c4d..387821f 100644
// Notifies the delegate about the creation of a new WebContents. This
// typically happens when popups are created.
diff --git extensions/browser/guest_view/extension_options/extension_options_guest.cc extensions/browser/guest_view/extension_options/extension_options_guest.cc
index 3849b7e..a974f34 100644
index 6c9ff47..75b91bf 100644
--- extensions/browser/guest_view/extension_options/extension_options_guest.cc
+++ extensions/browser/guest_view/extension_options/extension_options_guest.cc
@@ -203,7 +203,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(

View File

@ -1,8 +1,8 @@
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
index da897ce..c1d6cf8 100644
index f274fb4..2aa6a17 100644
--- Source/web/ChromeClientImpl.cpp
+++ Source/web/ChromeClientImpl.cpp
@@ -843,7 +843,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
@@ -873,7 +873,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
{
notifyPopupOpeningObservers();
@ -12,10 +12,10 @@ index da897ce..c1d6cf8 100644
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
index fcb4d10..dea498b 100644
index cae232a..2ed1596 100644
--- Source/web/WebViewImpl.cpp
+++ Source/web/WebViewImpl.cpp
@@ -422,6 +422,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebPageVisibilityState visibilit
@@ -417,6 +417,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebPageVisibilityState visibilit
, m_enableFakePageScaleAnimationForTesting(false)
, m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false)
@ -23,7 +23,7 @@ index fcb4d10..dea498b 100644
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_compositorDeviceScaleFactorOverride(0)
@@ -4108,9 +4109,14 @@ void WebViewImpl::pageScaleFactorChanged()
@@ -4092,9 +4093,14 @@ void WebViewImpl::pageScaleFactorChanged()
m_client->pageScaleFactorChanged();
}
@ -40,10 +40,10 @@ index fcb4d10..dea498b 100644
void WebViewImpl::startDragging(LocalFrame* frame,
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
index 5292560..08e6afe 100644
index 26e93e7..86240c7 100644
--- Source/web/WebViewImpl.h
+++ Source/web/WebViewImpl.h
@@ -382,7 +382,8 @@ public:
@@ -388,7 +388,8 @@ public:
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
@ -53,7 +53,7 @@ index 5292560..08e6afe 100644
bool shouldAutoResize() const
{
@@ -678,6 +679,8 @@ private:
@@ -683,6 +684,8 @@ private:
float m_fakePageScaleAnimationPageScaleFactor;
bool m_fakePageScaleAnimationUseAnchor;
@ -63,10 +63,10 @@ index 5292560..08e6afe 100644
bool m_ignoreInputEvents;
diff --git public/web/WebView.h public/web/WebView.h
index 4f81bb6..66f1b2d 100644
index bba44bc..345f5c2 100644
--- public/web/WebView.h
+++ public/web/WebView.h
@@ -437,6 +437,7 @@ public:
@@ -438,6 +438,7 @@ public:
// Sets whether select popup menus should be rendered by the browser.
BLINK_EXPORT static void setUseExternalPopupMenus(bool);

View File

@ -38,15 +38,6 @@ void ClientAppBrowser::OnBeforeCommandLineProcessing(
command_line->AppendSwitch("disable-gpu");
command_line->AppendSwitch("disable-gpu-compositing");
}
// Synchronize the frame rate between all processes. This results in
// decreased CPU usage by avoiding the generation of extra frames that
// would otherwise be discarded. The frame rate can be set at browser
// creation time via CefBrowserSettings.windowless_frame_rate or changed
// dynamically using CefBrowserHost::SetWindowlessFrameRate. In cefclient
// it can be set via the command-line using `--off-screen-frame-rate=XX`.
// See https://bitbucket.org/chromiumembedded/cef/issues/1368 for details.
command_line->AppendSwitch("enable-begin-frame-scheduling");
}
if (command_line->HasSwitch(switches::kUseViews) &&

View File

@ -11,6 +11,11 @@
#include "tests/unittests/test_handler.h"
#include "tests/unittests/test_util.h"
// Comment in this define if you have configured API keys that enable Google
// Maps Geolocation API support.
// See https://www.chromium.org/developers/how-tos/api-keys for details.
// #define HAS_GEOLOCATION_API_KEYS 1
namespace {
// Geolocation access is now restricted to "secure" origins.
@ -146,7 +151,11 @@ TEST(GeolocationTest, HandlerAllow) {
CefRefPtr<GeolocationTestHandler> handler =
new GeolocationTestHandler(TEST_ALLOW, false);
handler->ExecuteTest();
#if defined(HAS_GEOLOCATION_API_KEYS)
EXPECT_TRUE(handler->got_allow_);
#else
EXPECT_FALSE(handler->got_allow_);
#endif
ReleaseAndWaitForDestructor(handler);
}
@ -154,7 +163,11 @@ TEST(GeolocationTest, HandlerAllowAsync) {
CefRefPtr<GeolocationTestHandler> handler =
new GeolocationTestHandler(TEST_ALLOW, true);
handler->ExecuteTest();
#if defined(HAS_GEOLOCATION_API_KEYS)
EXPECT_TRUE(handler->got_allow_);
#else
EXPECT_FALSE(handler->got_allow_);
#endif
ReleaseAndWaitForDestructor(handler);
}
@ -193,11 +206,15 @@ class TestGetGeolocationCallback : public CefGetGeolocationCallback {
void OnLocationUpdate(const CefGeoposition& position) override {
EXPECT_TRUE(CefCurrentlyOn(TID_UI));
EXPECT_EQ(position.error_code, GEOPOSITON_ERROR_NONE);
EXPECT_NE(position.latitude, 0.0);
EXPECT_NE(position.longitude, 0.0);
EXPECT_NE(position.accuracy, 0.0);
EXPECT_NE(position.timestamp.year, 0);
#if defined(HAS_GEOLOCATION_API_KEYS)
EXPECT_EQ(GEOPOSITON_ERROR_NONE, position.error_code);
#else
EXPECT_EQ(GEOPOSITON_ERROR_POSITION_UNAVAILABLE, position.error_code);
#endif
EXPECT_NE(0.0, position.latitude);
EXPECT_NE(0.0, position.longitude);
EXPECT_NE(0.0, position.accuracy);
EXPECT_NE(0, position.timestamp.year);
event_->Signal();
}

View File

@ -70,6 +70,7 @@ def MergeDicts(*dict_args):
def GetChromiumDefaultArgs():
"""
Return default GN args. These must match the Chromium defaults.
Only args that may be retrieved via GetArgValue() need to be specified here.
"""
# Search for these values in declare_args() sections of *.gni files to find
# the defaults.
@ -132,7 +133,7 @@ def GetGNEnvArgs():
def GetRequiredArgs():
"""
Return required GN args.
Return required GN args. Also enforced by assert() in //cef/BUILD.gn.
"""
result = {
# Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1.
@ -144,6 +145,10 @@ def GetRequiredArgs():
# Disable support for plugin installation.
'enable_plugin_installation': False,
# CEF does not currently support component builds. See
# https://bitbucket.org/chromiumembedded/cef/issues/1617
'is_component_build': False,
}
if platform == 'linux' or platform == 'macosx':