mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-02 12:17:15 +01:00
Update to Chromium revision 9ef2aa86 (#550428)
This commit is contained in:
parent
f6c9a96a12
commit
a3c55f1d26
46
BUILD.gn
46
BUILD.gn
@ -100,11 +100,11 @@ import("//build/config/sanitizers/sanitizers.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//cef/cef_repack_locales.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//extensions/features/features.gni")
|
||||
import("//extensions/buildflags/buildflags.gni")
|
||||
import("//media/media_options.gni")
|
||||
import("//mojo/public/tools/bindings/mojom.gni")
|
||||
import("//ppapi/features/features.gni")
|
||||
import("//printing/features/features.gni")
|
||||
import("//ppapi/buildflags/buildflags.gni")
|
||||
import("//printing/buildflags/buildflags.gni")
|
||||
import("//services/catalog/public/tools/catalog.gni")
|
||||
import("//services/service_manager/public/service_manifest.gni")
|
||||
import("//third_party/icu/config.gni")
|
||||
@ -274,8 +274,8 @@ if (is_win) {
|
||||
|
||||
# Required by chrome_switches.cc
|
||||
"//chrome/common:buildflags",
|
||||
"//ppapi/features:features",
|
||||
"//printing/features:features",
|
||||
"//ppapi/buildflags:buildflags",
|
||||
"//printing/buildflags:buildflags",
|
||||
"//ui/base:ui_features",
|
||||
]
|
||||
}
|
||||
@ -698,10 +698,9 @@ static_library("libcef_static") {
|
||||
"//device/base",
|
||||
"//extensions/browser",
|
||||
"//extensions/browser/api:api_registration",
|
||||
"//extensions/buildflags",
|
||||
"//extensions/common/api",
|
||||
"//extensions/features",
|
||||
"//extensions/renderer",
|
||||
"//extensions/utility",
|
||||
"//gpu",
|
||||
"//ipc",
|
||||
"//media",
|
||||
@ -711,8 +710,8 @@ static_library("libcef_static") {
|
||||
"//net:net_utility_services",
|
||||
"//net:net_with_v8",
|
||||
"//pdf",
|
||||
"//ppapi/features",
|
||||
"//printing/features",
|
||||
"//ppapi/buildflags",
|
||||
"//printing/buildflags",
|
||||
"//services/network:network_service",
|
||||
"//services/network/public/cpp",
|
||||
"//services/service_manager/embedder",
|
||||
@ -720,14 +719,14 @@ static_library("libcef_static") {
|
||||
"//services/service_manager/runner/common",
|
||||
"//skia",
|
||||
"//storage/browser",
|
||||
"//third_party/blink/public:blink",
|
||||
"//third_party/brotli:dec",
|
||||
"//third_party/cld_3/src/src:cld_3",
|
||||
"//third_party/hunspell",
|
||||
"//third_party/leveldatabase",
|
||||
"//third_party/libxml",
|
||||
"//third_party/WebKit/public:blink",
|
||||
"//third_party/widevine/cdm:headers",
|
||||
"//third_party/widevine/cdm:widevinecdmadapter",
|
||||
"//third_party/widevine/cdm",
|
||||
"//third_party/icu",
|
||||
"//third_party/zlib:minizip",
|
||||
"//ui/base",
|
||||
@ -1075,11 +1074,11 @@ template("cef_pak_scaled") {
|
||||
# Each input pak file should also have a deps line for completeness.
|
||||
# Add associated .h files in the make_pack_header("resources") target.
|
||||
sources = [
|
||||
"$root_gen_dir/blink/public/resources/blink_scaled_resources_${percent}_percent.pak",
|
||||
"$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
|
||||
"$root_gen_dir/components/components_resources_${percent}_percent.pak",
|
||||
"$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
|
||||
"$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak",
|
||||
"$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_${percent}_percent.pak",
|
||||
"$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
|
||||
]
|
||||
|
||||
@ -1087,18 +1086,18 @@ template("cef_pak_scaled") {
|
||||
# the libcef_static target. Grit deps that generate .cc files must be
|
||||
# listed both here and in the libcef_static target.
|
||||
public_deps = [
|
||||
"//third_party/WebKit/public:scaled_resources",
|
||||
"//chrome/renderer:resources",
|
||||
"//components/resources:components_scaled_resources",
|
||||
"//content/app/resources",
|
||||
"//extensions:extensions_browser_resources",
|
||||
"//third_party/blink/public:scaled_resources",
|
||||
"//ui/resources:ui_resources_grd",
|
||||
]
|
||||
|
||||
deps = [
|
||||
# This repack target generates the blink_scaled_resources_*_percent.pak
|
||||
# file but doesn't expose the public_deps required by make_pack_header.
|
||||
"//third_party/WebKit/public:scaled_resources_${percent}_percent",
|
||||
"//third_party/blink/public:scaled_resources_${percent}_percent",
|
||||
]
|
||||
|
||||
if (toolkit_views) {
|
||||
@ -1215,7 +1214,6 @@ repack("pak") {
|
||||
# Each input pak file should also have a deps line for completeness.
|
||||
# Add associated .h files in the make_pack_header("resources") target.
|
||||
sources = [
|
||||
"$root_gen_dir/blink/public/resources/blink_resources.pak",
|
||||
"$root_gen_dir/chrome/browser_resources.pak",
|
||||
"$root_gen_dir/chrome/net_internals_resources.pak",
|
||||
"$root_gen_dir/chrome/common_resources.pak",
|
||||
@ -1224,13 +1222,13 @@ repack("pak") {
|
||||
"$root_gen_dir/content/browser/tracing/tracing_resources.pak",
|
||||
"$root_gen_dir/content/content_resources.pak",
|
||||
"$root_gen_dir/net/net_resources.pak",
|
||||
"$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
|
||||
]
|
||||
|
||||
# Use public_deps so that generated grit headers are discoverable from
|
||||
# the libcef_static target. Grit deps that generate .cc files must be
|
||||
# listed both here and in the libcef_static target.
|
||||
public_deps = [
|
||||
"//third_party/WebKit/public:resources_grit",
|
||||
"//chrome/browser:resources",
|
||||
"//chrome/browser/resources:net_internals_resources",
|
||||
"//chrome/common:resources",
|
||||
@ -1239,6 +1237,7 @@ repack("pak") {
|
||||
"//content/browser/tracing:resources",
|
||||
"//content:resources",
|
||||
"//net:net_resources",
|
||||
"//third_party/blink/public:resources",
|
||||
]
|
||||
|
||||
output = "$root_out_dir/cef.pak"
|
||||
@ -1275,9 +1274,6 @@ template("make_pack_header") {
|
||||
make_pack_header("resources") {
|
||||
header = "$root_out_dir/includes/include/cef_pack_resources.h"
|
||||
inputs = [
|
||||
"$root_gen_dir/blink/public/resources/grit/media_controls_resources.h",
|
||||
"$root_gen_dir/blink/public/resources/grit/blink_image_resources.h",
|
||||
"$root_gen_dir/blink/public/resources/grit/blink_resources.h",
|
||||
"$root_gen_dir/cef/grit/cef_resources.h",
|
||||
"$root_gen_dir/chrome/grit/browser_resources.h",
|
||||
"$root_gen_dir/chrome/grit/common_resources.h",
|
||||
@ -1292,6 +1288,7 @@ make_pack_header("resources") {
|
||||
"$root_gen_dir/extensions/grit/extensions_renderer_resources.h",
|
||||
"$root_gen_dir/extensions/grit/extensions_resources.h",
|
||||
"$root_gen_dir/net/grit/net_resources.h",
|
||||
"$root_gen_dir/third_party/blink/public/resources/grit/blink_resources.h",
|
||||
"$root_gen_dir/ui/resources/grit/ui_resources.h",
|
||||
"$root_gen_dir/ui/resources/grit/webui_resources.h",
|
||||
"$root_gen_dir/ui/views/resources/grit/views_resources.h",
|
||||
@ -1357,7 +1354,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/$widevine_cdm_path/widevinecdmadapter.plugin",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
@ -1366,7 +1362,6 @@ if (is_mac) {
|
||||
":pak_200_percent",
|
||||
":pak_devtools",
|
||||
":pak_extensions",
|
||||
"//third_party/widevine/cdm:widevinecdmadapter",
|
||||
]
|
||||
|
||||
if (icu_use_data_file) {
|
||||
@ -1394,6 +1389,11 @@ if (is_mac) {
|
||||
mac_framework_bundle("cef_framework") {
|
||||
output_name = cef_framework_name
|
||||
|
||||
framework_version = "A"
|
||||
framework_contents = [
|
||||
"Resources",
|
||||
]
|
||||
|
||||
sources = gypi_paths2.includes_common +
|
||||
gypi_paths2.includes_mac +
|
||||
gypi_paths.autogen_cpp_includes +
|
||||
@ -1429,11 +1429,11 @@ if (is_mac) {
|
||||
if (is_component_build) {
|
||||
# Set up the rpath for the framework so that it can find dylibs in the
|
||||
# root output directory. The framework is at
|
||||
# $app_name.app/Contents/Frameworks/$output_name.framework/$output_name
|
||||
# $app_name.app/Contents/Frameworks/$output_name.framework/Versions/A/$output_name
|
||||
# so use loader_path to go back to the root output directory.
|
||||
ldflags += [
|
||||
"-rpath",
|
||||
"@loader_path/../../../..",
|
||||
"@loader_path/../../../../../..",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': '66afc5e5d10127546cc4b98b9117aff588b5e66b',
|
||||
'chromium_checkout': '9ef2aa869bc7bc0c089e255d698cca6e47d6b038',
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=ec4f722423ff89dd2ff61fd3336bda1776081023$
|
||||
// $hash=8815d0d0778cc210fb6f9ede9dafc5ca51124169$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
|
||||
@ -202,9 +202,6 @@ CEF_EXPORT void cef_is_web_plugin_unstable(
|
||||
// 2. widevinecdm file from the CDM binary distribution (e.g.
|
||||
// widevinecdm.dll on on Windows, libwidevinecdm.dylib on OS X,
|
||||
// libwidevinecdm.so on Linux).
|
||||
// 3. widevidecdmadapter file from the CEF binary distribution (e.g.
|
||||
// widevinecdmadapter.dll on Windows, widevinecdmadapter.plugin on OS X,
|
||||
// libwidevinecdmadapter.so on Linux).
|
||||
//
|
||||
// If any of these files are missing or if the manifest file has incorrect
|
||||
// contents the registration will fail and |callback| will receive a |result|
|
||||
|
@ -179,9 +179,6 @@ class CefRegisterCdmCallback : public virtual CefBaseRefCounted {
|
||||
// 2. widevinecdm file from the CDM binary distribution (e.g.
|
||||
// widevinecdm.dll on on Windows, libwidevinecdm.dylib on OS X,
|
||||
// libwidevinecdm.so on Linux).
|
||||
// 3. widevidecdmadapter file from the CEF binary distribution (e.g.
|
||||
// widevinecdmadapter.dll on Windows, widevinecdmadapter.plugin on OS X,
|
||||
// libwidevinecdmadapter.so on Linux).
|
||||
//
|
||||
// If any of these files are missing or if the manifest file has incorrect
|
||||
// contents the registration will fail and |callback| will receive a |result|
|
||||
|
@ -1423,6 +1423,11 @@ typedef enum {
|
||||
///
|
||||
TID_FILE_USER_BLOCKING,
|
||||
|
||||
///
|
||||
// Used to launch and terminate browser processes.
|
||||
///
|
||||
TID_PROCESS_LAUNCHER,
|
||||
|
||||
///
|
||||
// Used to process IPC and network messages. Do not perform blocking tasks on
|
||||
// this thread. All tasks posted after
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "extensions/browser/extension_protocols.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "net/proxy_resolution/proxy_config_service.h"
|
||||
#include "net/proxy_resolution/proxy_service.h"
|
||||
#include "net/proxy_resolution/proxy_resolution_service.h"
|
||||
|
||||
using content::BrowserThread;
|
||||
|
||||
@ -176,11 +176,11 @@ class CefVisitedLinkListener : public visitedlink::VisitedLinkMaster::Listener {
|
||||
|
||||
// visitedlink::VisitedLinkMaster::Listener methods.
|
||||
|
||||
void NewTable(mojo::SharedBufferHandle table) override {
|
||||
void NewTable(base::ReadOnlySharedMemoryRegion* table_region) override {
|
||||
CEF_REQUIRE_UIT();
|
||||
ListenerMap::iterator it = listener_map_.begin();
|
||||
for (; it != listener_map_.end(); ++it)
|
||||
it->second->NewTable(table);
|
||||
it->second->NewTable(table_region);
|
||||
}
|
||||
|
||||
void Add(visitedlink::VisitedLinkCommon::Fingerprint fingerprint) override {
|
||||
@ -462,10 +462,8 @@ net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
|
||||
// data in its installation directory).
|
||||
extensions::InfoMap* extension_info_map = extension_system()->info_map();
|
||||
(*protocol_handlers)[extensions::kExtensionScheme] =
|
||||
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
||||
extensions::CreateExtensionProtocolHandler(IsOffTheRecord(),
|
||||
extension_info_map)
|
||||
.release());
|
||||
extensions::CreateExtensionProtocolHandler(IsOffTheRecord(),
|
||||
extension_info_map);
|
||||
}
|
||||
|
||||
url_request_getter_ = new CefURLRequestContextGetterImpl(
|
||||
|
@ -71,7 +71,7 @@
|
||||
#include "content/public/common/favicon_url.h"
|
||||
#include "extensions/browser/process_manager.h"
|
||||
#include "net/base/net_errors.h"
|
||||
#include "third_party/WebKit/public/web/WebFindOptions.h"
|
||||
#include "third_party/blink/public/web/web_find_options.h"
|
||||
#include "ui/events/base_event_utils.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
@ -999,16 +999,17 @@ void CefBrowserHostImpl::SetAutoResizeEnabled(bool enabled,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!web_contents() || !web_contents()->GetRenderViewHost())
|
||||
if (enabled == auto_resize_enabled_)
|
||||
return;
|
||||
|
||||
auto_resize_enabled_ = enabled;
|
||||
if (enabled) {
|
||||
web_contents()->GetRenderViewHost()->EnableAutoResize(
|
||||
gfx::Size(min_size.width, min_size.height),
|
||||
gfx::Size(max_size.width, max_size.height));
|
||||
auto_resize_min_ = gfx::Size(min_size.width, min_size.height);
|
||||
auto_resize_max_ = gfx::Size(max_size.width, max_size.height);
|
||||
} else {
|
||||
web_contents()->GetRenderViewHost()->DisableAutoResize(gfx::Size());
|
||||
auto_resize_min_ = auto_resize_max_ = gfx::Size();
|
||||
}
|
||||
ConfigureAutoResize();
|
||||
}
|
||||
|
||||
CefRefPtr<CefExtension> CefBrowserHostImpl::GetExtension() {
|
||||
@ -2583,7 +2584,7 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
|
||||
}
|
||||
|
||||
bool CefBrowserHostImpl::CheckMediaAccessPermission(
|
||||
content::WebContents* web_contents,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& security_origin,
|
||||
content::MediaStreamType type) {
|
||||
// Check media access permission without prompting the user. This is called
|
||||
@ -2701,6 +2702,8 @@ void CefBrowserHostImpl::RenderViewDeleted(
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::RenderViewReady() {
|
||||
ConfigureAutoResize();
|
||||
|
||||
// Send the queued messages.
|
||||
queue_messages_ = false;
|
||||
while (!queued_messages_.empty()) {
|
||||
@ -3507,6 +3510,20 @@ void CefBrowserHostImpl::EnsureFileDialogManager() {
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::ConfigureAutoResize() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!web_contents() || !web_contents()->GetRenderWidgetHostView()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (auto_resize_enabled_) {
|
||||
web_contents()->GetRenderWidgetHostView()->EnableAutoResize(
|
||||
auto_resize_min_, auto_resize_max_);
|
||||
} else {
|
||||
web_contents()->GetRenderWidgetHostView()->DisableAutoResize(gfx::Size());
|
||||
}
|
||||
}
|
||||
|
||||
bool CefBrowserHostImpl::Send(IPC::Message* message) {
|
||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||
CEF_POST_TASK(
|
||||
|
@ -473,7 +473,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
content::WebContents* web_contents,
|
||||
const content::MediaStreamRequest& request,
|
||||
const content::MediaResponseCallback& callback) override;
|
||||
bool CheckMediaAccessPermission(content::WebContents* web_contents,
|
||||
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
|
||||
const GURL& security_origin,
|
||||
content::MediaStreamType type) override;
|
||||
bool IsNeverVisible(content::WebContents* web_contents) override;
|
||||
@ -626,6 +626,8 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
// Create the CefFileDialogManager if it doesn't already exist.
|
||||
void EnsureFileDialogManager();
|
||||
|
||||
void ConfigureAutoResize();
|
||||
|
||||
// Send a message to the RenderViewHost associated with this browser.
|
||||
// TODO(cef): With the introduction of OOPIFs, WebContents can span multiple
|
||||
// processes. Messages should be sent to specific RenderFrameHosts instead.
|
||||
@ -727,6 +729,11 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
CefRefPtr<CefExtension> extension_;
|
||||
bool is_background_host_ = false;
|
||||
|
||||
// Used with auto-resize.
|
||||
bool auto_resize_enabled_ = false;
|
||||
gfx::Size auto_resize_min_;
|
||||
gfx::Size auto_resize_max_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(CefBrowserHostImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefBrowserHostImpl);
|
||||
};
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "content/public/browser/render_process_host_observer.h"
|
||||
#include "third_party/WebKit/public/web/window_features.mojom.h"
|
||||
#include "third_party/blink/public/web/window_features.mojom.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
|
@ -8,11 +8,7 @@
|
||||
|
||||
#include "libcef/browser/browser_main.h"
|
||||
|
||||
#include "cef/grit/cef_strings.h"
|
||||
#include "content/public/browser/utility_process_host.h"
|
||||
#include "content/public/browser/utility_process_host_client.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/gfx/win/direct_write.h"
|
||||
#include "base/logging.h"
|
||||
|
||||
void CefBrowserMainParts::PlatformInitialize() {
|
||||
HRESULT res;
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/extensions/event_router_forwarder.h"
|
||||
#include "chrome/browser/profiles/incognito_helpers.h"
|
||||
#include "media/media_features.h"
|
||||
#include "media/media_buildflags.h"
|
||||
|
||||
class ChromeProfileManagerStub;
|
||||
|
||||
|
@ -75,7 +75,9 @@
|
||||
#include "content/public/common/service_names.mojom.h"
|
||||
#include "content/public/common/storage_quota_params.h"
|
||||
#include "content/public/common/web_preferences.h"
|
||||
#include "extensions/browser/api/web_request/web_request_api.h"
|
||||
#include "extensions/browser/extension_message_filter.h"
|
||||
#include "extensions/browser/extension_protocols.h"
|
||||
#include "extensions/browser/extension_registry.h"
|
||||
#include "extensions/browser/extensions_browser_client.h"
|
||||
#include "extensions/browser/guest_view/extensions_guest_view_message_filter.h"
|
||||
@ -86,7 +88,7 @@
|
||||
#include "ppapi/host/ppapi_host.h"
|
||||
#include "services/service_manager/public/mojom/connector.mojom.h"
|
||||
#include "storage/browser/quota/quota_settings.h"
|
||||
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
|
||||
#include "third_party/blink/public/web/web_window_features.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
@ -729,7 +731,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
|
||||
if (!browser_cmd->HasSwitch(switches::kNoSandbox)) {
|
||||
// Pass the Widevine CDM path to the Zygote process. See comments in
|
||||
// CefWidevineLoader::AddPepperPlugins.
|
||||
// CefWidevineLoader::AddContentDecryptionModules.
|
||||
const base::FilePath& cdm_path = CefWidevineLoader::GetInstance()->path();
|
||||
if (!cdm_path.empty())
|
||||
command_line->AppendSwitchPath(switches::kWidevineCdmPath, cdm_path);
|
||||
@ -1025,6 +1027,68 @@ CefContentBrowserClient::CreateClientCertStore(
|
||||
->CreateClientCertStore();
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
|
||||
content::RenderFrameHost* frame_host,
|
||||
NonNetworkURLLoaderFactoryMap* factories) {
|
||||
if (!extensions::ExtensionsEnabled())
|
||||
return;
|
||||
|
||||
content::BrowserContext* browser_context =
|
||||
frame_host->GetProcess()->GetBrowserContext();
|
||||
factories->emplace(
|
||||
extensions::kExtensionScheme,
|
||||
extensions::CreateExtensionNavigationURLLoaderFactory(
|
||||
frame_host,
|
||||
extensions::ExtensionSystem::Get(browser_context)->info_map()));
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories(
|
||||
content::RenderFrameHost* frame_host,
|
||||
const GURL& frame_url,
|
||||
NonNetworkURLLoaderFactoryMap* factories) {
|
||||
if (!extensions::ExtensionsEnabled())
|
||||
return;
|
||||
|
||||
content::BrowserContext* browser_context =
|
||||
frame_host->GetProcess()->GetBrowserContext();
|
||||
auto factory = extensions::MaybeCreateExtensionSubresourceURLLoaderFactory(
|
||||
frame_host, frame_url,
|
||||
extensions::ExtensionSystem::Get(browser_context)->info_map());
|
||||
if (factory)
|
||||
factories->emplace(extensions::kExtensionScheme, std::move(factory));
|
||||
}
|
||||
|
||||
bool CefContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
content::RenderFrameHost* frame,
|
||||
bool is_navigation,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request) {
|
||||
if (!extensions::ExtensionsEnabled())
|
||||
return false;
|
||||
|
||||
auto* web_request_api =
|
||||
extensions::BrowserContextKeyedAPIFactory<extensions::WebRequestAPI>::Get(
|
||||
frame->GetProcess()->GetBrowserContext());
|
||||
return web_request_api->MaybeProxyURLLoaderFactory(frame, is_navigation,
|
||||
factory_request);
|
||||
}
|
||||
|
||||
bool CefContentBrowserClient::HandleExternalProtocol(
|
||||
const GURL& url,
|
||||
content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
|
||||
int child_id,
|
||||
content::NavigationUIData* navigation_data,
|
||||
bool is_main_frame,
|
||||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture) {
|
||||
CEF_POST_TASK(
|
||||
CEF_UIT,
|
||||
base::Bind(
|
||||
base::IgnoreResult(
|
||||
&CefContentBrowserClient::HandleExternalProtocolOnUIThread),
|
||||
url, web_contents_getter));
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::RegisterCustomScheme(const std::string& scheme) {
|
||||
// Register as a Web-safe scheme so that requests for the scheme from a
|
||||
// render process will be allowed in resource_dispatcher_host_impl.cc
|
||||
@ -1068,3 +1132,18 @@ const extensions::Extension* CefContentBrowserClient::GetExtension(
|
||||
return registry->enabled_extensions().GetExtensionOrAppByURL(
|
||||
site_instance->GetSiteURL());
|
||||
}
|
||||
|
||||
// static
|
||||
void CefContentBrowserClient::HandleExternalProtocolOnUIThread(
|
||||
const GURL& url,
|
||||
const content::ResourceRequestInfo::WebContentsGetter&
|
||||
web_contents_getter) {
|
||||
CEF_REQUIRE_UIT();
|
||||
content::WebContents* web_contents = web_contents_getter.Run();
|
||||
if (web_contents) {
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
CefBrowserHostImpl::GetBrowserForContents(web_contents);
|
||||
if (browser.get())
|
||||
browser->HandleExternalProtocol(url);
|
||||
}
|
||||
}
|
||||
|
@ -127,6 +127,27 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
std::unique_ptr<net::ClientCertStore> CreateClientCertStore(
|
||||
content::ResourceContext* resource_context) override;
|
||||
|
||||
void RegisterNonNetworkNavigationURLLoaderFactories(
|
||||
content::RenderFrameHost* frame_host,
|
||||
NonNetworkURLLoaderFactoryMap* factories) override;
|
||||
void RegisterNonNetworkSubresourceURLLoaderFactories(
|
||||
content::RenderFrameHost* frame_host,
|
||||
const GURL& frame_url,
|
||||
NonNetworkURLLoaderFactoryMap* factories) override;
|
||||
bool WillCreateURLLoaderFactory(
|
||||
content::RenderFrameHost* frame,
|
||||
bool is_navigation,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request) override;
|
||||
|
||||
bool HandleExternalProtocol(
|
||||
const GURL& url,
|
||||
content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
|
||||
int child_id,
|
||||
content::NavigationUIData* navigation_data,
|
||||
bool is_main_frame,
|
||||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture) override;
|
||||
|
||||
// Perform browser process registration for the custom scheme.
|
||||
void RegisterCustomScheme(const std::string& scheme);
|
||||
|
||||
@ -142,6 +163,11 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
const extensions::Extension* GetExtension(
|
||||
content::SiteInstance* site_instance);
|
||||
|
||||
static void HandleExternalProtocolOnUIThread(
|
||||
const GURL& url,
|
||||
const content::ResourceRequestInfo::WebContentsGetter&
|
||||
web_contents_getter);
|
||||
|
||||
CefBrowserMainParts* browser_main_parts_;
|
||||
|
||||
std::unique_ptr<content::PluginServiceFilter> plugin_service_filter_;
|
||||
|
@ -142,11 +142,11 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
|
||||
return set_init_result(SUCCESS);
|
||||
}
|
||||
|
||||
bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage() {
|
||||
bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage(std::string* error) {
|
||||
CHECK_GE(execute_tab_id_, 0);
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
cef_details_.GetBrowserForTabIdAgain(execute_tab_id_, &error_);
|
||||
cef_details_.GetBrowserForTabIdAgain(execute_tab_id_, error);
|
||||
if (!browser)
|
||||
return false;
|
||||
|
||||
@ -156,7 +156,7 @@ bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage() {
|
||||
ExtensionApiFrameIdMap::GetRenderFrameHostById(browser->web_contents(),
|
||||
frame_id);
|
||||
if (!rfh) {
|
||||
error_ = ErrorUtils::FormatErrorMessage(keys::kFrameNotFoundError,
|
||||
*error = ErrorUtils::FormatErrorMessage(keys::kFrameNotFoundError,
|
||||
base::IntToString(frame_id),
|
||||
base::IntToString(execute_tab_id_));
|
||||
return false;
|
||||
@ -181,11 +181,11 @@ bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage() {
|
||||
// NOTE: This can give the wrong answer due to race conditions, but it is OK,
|
||||
// we check again in the renderer.
|
||||
if (!extension()->permissions_data()->CanAccessPage(
|
||||
extension(), effective_document_url, execute_tab_id_, &error_)) {
|
||||
extension(), effective_document_url, execute_tab_id_, error)) {
|
||||
if (is_about_url &&
|
||||
extension()->permissions_data()->active_permissions().HasAPIPermission(
|
||||
APIPermission::kTab)) {
|
||||
error_ = ErrorUtils::FormatErrorMessage(
|
||||
*error = ErrorUtils::FormatErrorMessage(
|
||||
manifest_errors::kCannotAccessAboutUrl,
|
||||
rfh->GetLastCommittedURL().spec(),
|
||||
rfh->GetLastCommittedOrigin().Serialize());
|
||||
@ -196,11 +196,12 @@ bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
ScriptExecutor* ExecuteCodeInTabFunction::GetScriptExecutor() {
|
||||
ScriptExecutor* ExecuteCodeInTabFunction::GetScriptExecutor(
|
||||
std::string* error) {
|
||||
CHECK_GE(execute_tab_id_, 0);
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
cef_details_.GetBrowserForTabIdAgain(execute_tab_id_, &error_);
|
||||
cef_details_.GetBrowserForTabIdAgain(execute_tab_id_, error);
|
||||
if (!browser)
|
||||
return nullptr;
|
||||
|
||||
@ -217,7 +218,8 @@ const GURL& ExecuteCodeInTabFunction::GetWebViewSrc() const {
|
||||
return GURL::EmptyGURL();
|
||||
}
|
||||
|
||||
bool ExecuteCodeInTabFunction::LoadFile(const std::string& file) {
|
||||
bool ExecuteCodeInTabFunction::LoadFile(const std::string& file,
|
||||
std::string* error) {
|
||||
if (cef_details_.LoadFile(
|
||||
file, base::BindOnce(&ExecuteCodeInTabFunction::LoadFileComplete,
|
||||
this, file))) {
|
||||
@ -225,7 +227,7 @@ bool ExecuteCodeInTabFunction::LoadFile(const std::string& file) {
|
||||
}
|
||||
|
||||
// Default handling.
|
||||
return ExecuteCodeFunction::LoadFile(file);
|
||||
return ExecuteCodeFunction::LoadFile(file, error);
|
||||
}
|
||||
|
||||
void ExecuteCodeInTabFunction::LoadFileComplete(
|
||||
@ -239,15 +241,6 @@ bool TabsExecuteScriptFunction::ShouldInsertCSS() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void TabsExecuteScriptFunction::OnExecuteCodeFinished(
|
||||
const std::string& error,
|
||||
const GURL& on_url,
|
||||
const base::ListValue& result) {
|
||||
if (error.empty())
|
||||
SetResult(result.CreateDeepCopy());
|
||||
ExecuteCodeInTabFunction::OnExecuteCodeFinished(error, on_url, result);
|
||||
}
|
||||
|
||||
bool TabsInsertCSSFunction::ShouldInsertCSS() const {
|
||||
return true;
|
||||
}
|
||||
@ -264,10 +257,31 @@ content::WebContents* ZoomAPIFunction::GetWebContents(int tab_id) {
|
||||
return browser->web_contents();
|
||||
}
|
||||
|
||||
void ZoomAPIFunction::SendResponse(bool success) {
|
||||
ResponseValue response;
|
||||
if (success) {
|
||||
response = ArgumentList(std::move(results_));
|
||||
} else {
|
||||
response = results_ ? ErrorWithArguments(std::move(results_), error_)
|
||||
: Error(error_);
|
||||
}
|
||||
Respond(std::move(response));
|
||||
}
|
||||
|
||||
ExtensionFunction::ResponseAction ZoomAPIFunction::Run() {
|
||||
if (RunAsync())
|
||||
return RespondLater();
|
||||
// TODO(devlin): Track these down and eliminate them if possible. We
|
||||
// shouldn't return results and an error.
|
||||
if (results_)
|
||||
return RespondNow(ErrorWithArguments(std::move(results_), error_));
|
||||
return RespondNow(Error(error_));
|
||||
}
|
||||
|
||||
bool TabsSetZoomFunction::RunAsync() {
|
||||
std::unique_ptr<tabs::SetZoom::Params> params(
|
||||
tabs::SetZoom::Params::Create(*args_));
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
EXTENSION_FUNCTION_PRERUN_VALIDATE(params);
|
||||
|
||||
int tab_id = params->tab_id ? *params->tab_id : -1;
|
||||
content::WebContents* web_contents = GetWebContents(tab_id);
|
||||
@ -299,7 +313,7 @@ bool TabsSetZoomFunction::RunAsync() {
|
||||
bool TabsGetZoomFunction::RunAsync() {
|
||||
std::unique_ptr<tabs::GetZoom::Params> params(
|
||||
tabs::GetZoom::Params::Create(*args_));
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
EXTENSION_FUNCTION_PRERUN_VALIDATE(params);
|
||||
|
||||
int tab_id = params->tab_id ? *params->tab_id : -1;
|
||||
content::WebContents* web_contents = GetWebContents(tab_id);
|
||||
@ -319,7 +333,7 @@ bool TabsSetZoomSettingsFunction::RunAsync() {
|
||||
|
||||
std::unique_ptr<tabs::SetZoomSettings::Params> params(
|
||||
tabs::SetZoomSettings::Params::Create(*args_));
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
EXTENSION_FUNCTION_PRERUN_VALIDATE(params);
|
||||
|
||||
int tab_id = params->tab_id ? *params->tab_id : -1;
|
||||
content::WebContents* web_contents = GetWebContents(tab_id);
|
||||
@ -370,7 +384,7 @@ bool TabsSetZoomSettingsFunction::RunAsync() {
|
||||
bool TabsGetZoomSettingsFunction::RunAsync() {
|
||||
std::unique_ptr<tabs::GetZoomSettings::Params> params(
|
||||
tabs::GetZoomSettings::Params::Create(*args_));
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
EXTENSION_FUNCTION_PRERUN_VALIDATE(params);
|
||||
|
||||
int tab_id = params->tab_id ? *params->tab_id : -1;
|
||||
content::WebContents* web_contents = GetWebContents(tab_id);
|
||||
|
@ -55,11 +55,11 @@ class ExecuteCodeInTabFunction : public ExecuteCodeFunction {
|
||||
|
||||
// Initializes |execute_tab_id_| and |details_|.
|
||||
InitResult Init() override;
|
||||
bool CanExecuteScriptOnPage() override;
|
||||
ScriptExecutor* GetScriptExecutor() override;
|
||||
bool CanExecuteScriptOnPage(std::string* error) override;
|
||||
ScriptExecutor* GetScriptExecutor(std::string* error) override;
|
||||
bool IsWebView() const override;
|
||||
const GURL& GetWebViewSrc() const override;
|
||||
bool LoadFile(const std::string& file) override;
|
||||
bool LoadFile(const std::string& file, std::string* error) override;
|
||||
|
||||
private:
|
||||
const CefExtensionFunctionDetails cef_details_;
|
||||
@ -78,10 +78,6 @@ class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction {
|
||||
private:
|
||||
~TabsExecuteScriptFunction() override {}
|
||||
|
||||
void OnExecuteCodeFinished(const std::string& error,
|
||||
const GURL& on_url,
|
||||
const base::ListValue& script_result) override;
|
||||
|
||||
DECLARE_EXTENSION_FUNCTION("tabs.executeScript", TABS_EXECUTESCRIPT)
|
||||
};
|
||||
|
||||
@ -94,7 +90,8 @@ class TabsInsertCSSFunction : public ExecuteCodeInTabFunction {
|
||||
DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS)
|
||||
};
|
||||
|
||||
class ZoomAPIFunction : public AsyncExtensionFunction {
|
||||
// Based on ChromeAsyncExtensionFunction.
|
||||
class ZoomAPIFunction : public UIThreadExtensionFunction {
|
||||
public:
|
||||
ZoomAPIFunction();
|
||||
|
||||
@ -103,10 +100,26 @@ class ZoomAPIFunction : public AsyncExtensionFunction {
|
||||
|
||||
// Gets the WebContents for |tab_id| if it is specified. Otherwise get the
|
||||
// WebContents for the active tab in the current window. Calling this function
|
||||
// may set error_.
|
||||
// may set |error_|.
|
||||
content::WebContents* GetWebContents(int tab_id);
|
||||
|
||||
virtual bool RunAsync() = 0;
|
||||
|
||||
// Responds with success/failure. |results_| or |error_| should be set
|
||||
// accordingly.
|
||||
void SendResponse(bool success);
|
||||
|
||||
// Exposed versions of ExtensionFunction::results_ and
|
||||
// ExtensionFunction::error_ that are curried into the response.
|
||||
// These need to keep the same name to avoid breaking existing
|
||||
// implementations, but this should be temporary with crbug.com/648275
|
||||
// and crbug.com/634140.
|
||||
std::unique_ptr<base::ListValue> results_;
|
||||
std::string error_;
|
||||
|
||||
private:
|
||||
ResponseAction Run() final;
|
||||
|
||||
const CefExtensionFunctionDetails cef_details_;
|
||||
};
|
||||
|
||||
|
@ -47,7 +47,7 @@ void CefExtensionHostDelegate::ProcessMediaAccessRequest(
|
||||
}
|
||||
|
||||
bool CefExtensionHostDelegate::CheckMediaAccessPermission(
|
||||
content::WebContents* web_contents,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& security_origin,
|
||||
content::MediaStreamType type,
|
||||
const Extension* extension) {
|
||||
|
@ -30,7 +30,7 @@ class CefExtensionHostDelegate : public ExtensionHostDelegate {
|
||||
const content::MediaStreamRequest& request,
|
||||
const content::MediaResponseCallback& callback,
|
||||
const Extension* extension) override;
|
||||
bool CheckMediaAccessPermission(content::WebContents* web_contents,
|
||||
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
|
||||
const GURL& security_origin,
|
||||
content::MediaStreamType type,
|
||||
const Extension* extension) override;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "extensions/browser/extension_system.h"
|
||||
#include "extensions/browser/notification_types.h"
|
||||
#include "extensions/browser/runtime_data.h"
|
||||
#include "third_party/WebKit/public/platform/WebGestureEvent.h"
|
||||
#include "third_party/blink/public/platform/web_gesture_event.h"
|
||||
|
||||
using content::NativeWebKeyboardEvent;
|
||||
using content::OpenURLParams;
|
||||
|
@ -21,6 +21,16 @@ CefExtensionWebContentsObserver::CefExtensionWebContentsObserver(
|
||||
|
||||
CefExtensionWebContentsObserver::~CefExtensionWebContentsObserver() {}
|
||||
|
||||
// static
|
||||
void CefExtensionWebContentsObserver::CreateForWebContents(
|
||||
content::WebContents* web_contents) {
|
||||
content::WebContentsUserData<
|
||||
CefExtensionWebContentsObserver>::CreateForWebContents(web_contents);
|
||||
|
||||
// Initialize this instance if necessary.
|
||||
FromWebContents(web_contents)->Initialize();
|
||||
}
|
||||
|
||||
void CefExtensionWebContentsObserver::RenderFrameCreated(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
ExtensionWebContentsObserver::RenderFrameCreated(render_frame_host);
|
||||
|
@ -22,6 +22,10 @@ class CefExtensionWebContentsObserver
|
||||
public:
|
||||
~CefExtensionWebContentsObserver() override;
|
||||
|
||||
// Creates and initializes an instance of this class for the given
|
||||
// |web_contents|, if it doesn't already exist.
|
||||
static void CreateForWebContents(content::WebContents* web_contents);
|
||||
|
||||
ScriptExecutor* script_executor() { return script_executor_.get(); }
|
||||
|
||||
private:
|
||||
|
@ -20,9 +20,9 @@
|
||||
#include "content/public/browser/native_web_keyboard_event.h"
|
||||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "third_party/WebKit/public/platform/WebInputEvent.h"
|
||||
#include "third_party/WebKit/public/platform/WebMouseEvent.h"
|
||||
#include "third_party/WebKit/public/platform/WebMouseWheelEvent.h"
|
||||
#include "third_party/blink/public/platform/web_input_event.h"
|
||||
#include "third_party/blink/public/platform/web_mouse_event.h"
|
||||
#include "third_party/blink/public/platform/web_mouse_wheel_event.h"
|
||||
#import "ui/base/cocoa/cocoa_base_utils.h"
|
||||
#import "ui/base/cocoa/underlay_opengl_hosting_window.h"
|
||||
#include "ui/events/keycodes/keyboard_codes_posix.h"
|
||||
|
@ -22,8 +22,8 @@
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/win_util.h"
|
||||
#include "content/public/browser/native_web_keyboard_event.h"
|
||||
#include "third_party/WebKit/public/platform/WebMouseEvent.h"
|
||||
#include "third_party/WebKit/public/platform/WebMouseWheelEvent.h"
|
||||
#include "third_party/blink/public/platform/web_mouse_event.h"
|
||||
#include "third_party/blink/public/platform/web_mouse_wheel_event.h"
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/base/win/shell.h"
|
||||
#include "ui/display/display.h"
|
||||
|
@ -26,7 +26,7 @@ const char kNetWMPing[] = "_NET_WM_PING";
|
||||
const char kNetWMState[] = "_NET_WM_STATE";
|
||||
const char kXdndProxy[] = "XdndProxy";
|
||||
|
||||
::Window FindEventTarget(const base::NativeEvent& xev) {
|
||||
::Window FindEventTarget(const ui::PlatformEvent& xev) {
|
||||
::Window target = xev->xany.window;
|
||||
if (xev->type == GenericEvent)
|
||||
target = static_cast<XIDeviceEvent*>(xev->xcookie.data)->event;
|
||||
|
@ -22,12 +22,18 @@ class NullCookieChangeDispatcher : public net::CookieChangeDispatcher {
|
||||
std::unique_ptr<net::CookieChangeSubscription> AddCallbackForCookie(
|
||||
const GURL& url,
|
||||
const std::string& name,
|
||||
net::CookieChangeCallback callback) override WARN_UNUSED_RESULT {
|
||||
net::CookieChangeCallback callback) override {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<net::CookieChangeSubscription> AddCallbackForUrl(
|
||||
const GURL& url,
|
||||
net::CookieChangeCallback callback) override {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<net::CookieChangeSubscription> AddCallbackForAllChanges(
|
||||
net::CookieChangeCallback callback) override WARN_UNUSED_RESULT {
|
||||
net::CookieChangeCallback callback) override {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "base/task_scheduler/post_task.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "net/net_features.h"
|
||||
#include "net/net_buildflags.h"
|
||||
#include "net/url_request/data_protocol_handler.h"
|
||||
#include "net/url_request/file_protocol_handler.h"
|
||||
#include "net/url_request/ftp_protocol_handler.h"
|
||||
@ -29,19 +29,16 @@ void InstallInternalProtectedHandlers(
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
net::HostResolver* host_resolver) {
|
||||
protocol_handlers->insert(std::make_pair(
|
||||
url::kDataScheme, linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
||||
new net::DataProtocolHandler)));
|
||||
url::kDataScheme, std::make_unique<net::DataProtocolHandler>()));
|
||||
protocol_handlers->insert(std::make_pair(
|
||||
url::kFileScheme,
|
||||
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
||||
new net::FileProtocolHandler(base::CreateTaskRunnerWithTraits(
|
||||
std::make_unique<net::FileProtocolHandler>(
|
||||
base::CreateTaskRunnerWithTraits(
|
||||
{base::MayBlock(), base::TaskPriority::USER_VISIBLE,
|
||||
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})))));
|
||||
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}))));
|
||||
#if !BUILDFLAG(DISABLE_FTP_SUPPORT)
|
||||
protocol_handlers->insert(std::make_pair(
|
||||
url::kFtpScheme,
|
||||
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
||||
net::FtpProtocolHandler::Create(host_resolver).release())));
|
||||
url::kFtpScheme, net::FtpProtocolHandler::Create(host_resolver)));
|
||||
#endif
|
||||
|
||||
for (content::ProtocolHandlerMap::iterator it = protocol_handlers->begin();
|
||||
|
@ -53,7 +53,7 @@
|
||||
#include "net/http/transport_security_state.h"
|
||||
#include "net/proxy_resolution/dhcp_pac_file_fetcher_factory.h"
|
||||
#include "net/proxy_resolution/pac_file_fetcher_impl.h"
|
||||
#include "net/proxy_resolution/proxy_service.h"
|
||||
#include "net/proxy_resolution/proxy_resolution_service.h"
|
||||
#include "net/ssl/ssl_config_service_defaults.h"
|
||||
#include "net/url_request/http_user_agent_settings.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
@ -132,14 +132,14 @@ std::unique_ptr<net::ProxyResolutionService> CreateProxyResolutionService(
|
||||
|
||||
std::unique_ptr<net::ProxyResolutionService> proxy_service;
|
||||
if (use_v8) {
|
||||
std::unique_ptr<net::DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher;
|
||||
net::DhcpProxyScriptFetcherFactory dhcp_factory;
|
||||
dhcp_proxy_script_fetcher = dhcp_factory.Create(context);
|
||||
std::unique_ptr<net::DhcpPacFileFetcher> dhcp_pac_file_fetcher;
|
||||
net::DhcpPacFileFetcherFactory dhcp_factory;
|
||||
dhcp_pac_file_fetcher = dhcp_factory.Create(context);
|
||||
|
||||
proxy_service = network::CreateProxyServiceUsingMojoFactory(
|
||||
proxy_service = network::CreateProxyResolutionServiceUsingMojoFactory(
|
||||
std::move(proxy_resolver_factory), std::move(proxy_config_service),
|
||||
std::make_unique<net::ProxyScriptFetcherImpl>(context),
|
||||
std::move(dhcp_proxy_script_fetcher), context->host_resolver(), net_log,
|
||||
std::make_unique<net::PacFileFetcherImpl>(context),
|
||||
std::move(dhcp_pac_file_fetcher), context->host_resolver(), net_log,
|
||||
network_delegate);
|
||||
} else {
|
||||
proxy_service = net::ProxyResolutionService::CreateUsingSystemProxyResolver(
|
||||
|
@ -40,8 +40,8 @@ CefRefPtr<CefListValue> ToCefValue(uint32_t state) {
|
||||
|
||||
int index = 0;
|
||||
// Iterate and find which states are set.
|
||||
for (unsigned i = static_cast<unsigned>(ax::mojom::Role::kNone);
|
||||
i <= static_cast<unsigned>(ax::mojom::Role::kLast); i++) {
|
||||
for (unsigned i = static_cast<unsigned>(ax::mojom::Role::kMinValue) + 1;
|
||||
i <= static_cast<unsigned>(ax::mojom::Role::kMaxValue); i++) {
|
||||
if (state & (1 << i))
|
||||
value->SetString(index++, ToString(static_cast<ax::mojom::State>(i)));
|
||||
}
|
||||
@ -267,8 +267,8 @@ CefRefPtr<CefDictionaryValue> ToCefValue(const ui::AXNodeData& node) {
|
||||
|
||||
CefRefPtr<CefListValue> actions_strings;
|
||||
size_t actions_idx = 0;
|
||||
for (int action_index = static_cast<int>(ax::mojom::Action::kNone) + 1;
|
||||
action_index <= static_cast<int>(ax::mojom::Action::kLast);
|
||||
for (int action_index = static_cast<int>(ax::mojom::Action::kMinValue) + 1;
|
||||
action_index <= static_cast<int>(ax::mojom::Action::kMaxValue);
|
||||
++action_index) {
|
||||
auto action = static_cast<ax::mojom::Action>(action_index);
|
||||
if (node.HasAction(action)) {
|
||||
|
@ -94,7 +94,7 @@ class CefCopyFrameGenerator {
|
||||
&CefCopyFrameGenerator::CopyFromCompositingSurfaceHasResult,
|
||||
weak_ptr_factory_.GetWeakPtr(), damage_rect));
|
||||
|
||||
request->set_area(gfx::Rect(view_->GetPhysicalBackingSize()));
|
||||
request->set_area(gfx::Rect(view_->GetCompositorViewportPixelSize()));
|
||||
view_->GetRootLayer()->RequestCopyOfOutput(std::move(request));
|
||||
}
|
||||
|
||||
@ -206,7 +206,8 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
||||
content::RenderWidgetHost* widget,
|
||||
CefRenderWidgetHostViewOSR* parent_host_view,
|
||||
bool is_guest_view_hack)
|
||||
: background_color_(background_color),
|
||||
: content::RenderWidgetHostViewBase(widget),
|
||||
background_color_(background_color),
|
||||
frame_rate_threshold_us_(0),
|
||||
#if !defined(OS_MACOSX)
|
||||
compositor_widget_(gfx::kNullAcceleratedWidget),
|
||||
@ -336,10 +337,6 @@ void CefRenderWidgetHostViewOSR::SetSize(const gfx::Size& size) {}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetBounds(const gfx::Rect& rect) {}
|
||||
|
||||
gfx::Vector2dF CefRenderWidgetHostViewOSR::GetLastScrollOffset() const {
|
||||
return last_scroll_offset_;
|
||||
}
|
||||
|
||||
gfx::NativeView CefRenderWidgetHostViewOSR::GetNativeView() const {
|
||||
return gfx::NativeView();
|
||||
}
|
||||
@ -441,6 +438,22 @@ bool CefRenderWidgetHostViewOSR::LockMouse() {
|
||||
|
||||
void CefRenderWidgetHostViewOSR::UnlockMouse() {}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::TakeFallbackContentFrom(
|
||||
content::RenderWidgetHostView* view) {
|
||||
DCHECK(!static_cast<RenderWidgetHostViewBase*>(view)
|
||||
->IsRenderWidgetHostViewChildFrame());
|
||||
DCHECK(!static_cast<RenderWidgetHostViewBase*>(view)
|
||||
->IsRenderWidgetHostViewGuest());
|
||||
CefRenderWidgetHostViewOSR* view_cef =
|
||||
static_cast<CefRenderWidgetHostViewOSR*>(view);
|
||||
SetBackgroundColor(view_cef->background_color());
|
||||
if (GetDelegatedFrameHost() && view_cef->GetDelegatedFrameHost()) {
|
||||
GetDelegatedFrameHost()->TakeFallbackContentFrom(
|
||||
view_cef->GetDelegatedFrameHost());
|
||||
}
|
||||
host()->GetContentRenderingTimeoutFrom(view_cef->host());
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::DidCreateNewRendererCompositorFrameSink(
|
||||
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) {
|
||||
renderer_compositor_frame_sink_ = renderer_compositor_frame_sink;
|
||||
@ -665,7 +678,7 @@ gfx::Size CefRenderWidgetHostViewOSR::GetRequestedRendererSize() const {
|
||||
return GetDelegatedFrameHost()->GetRequestedRendererSize();
|
||||
}
|
||||
|
||||
gfx::Size CefRenderWidgetHostViewOSR::GetPhysicalBackingSize() const {
|
||||
gfx::Size CefRenderWidgetHostViewOSR::GetCompositorViewportPixelSize() const {
|
||||
return gfx::ScaleToCeiledSize(GetRequestedRendererSize(),
|
||||
current_device_scale_factor_);
|
||||
}
|
||||
@ -728,11 +741,6 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetBoundsInRootWindow() {
|
||||
return GetViewBounds();
|
||||
}
|
||||
|
||||
content::RenderWidgetHostImpl*
|
||||
CefRenderWidgetHostViewOSR::GetRenderWidgetHostImpl() const {
|
||||
return render_widget_host_;
|
||||
}
|
||||
|
||||
viz::SurfaceId CefRenderWidgetHostViewOSR::GetCurrentSurfaceId() const {
|
||||
return GetDelegatedFrameHost()
|
||||
? GetDelegatedFrameHost()->GetCurrentSurfaceId()
|
||||
@ -766,7 +774,9 @@ void CefRenderWidgetHostViewOSR::ImeSetComposition(
|
||||
for (const CefCompositionUnderline& line : underlines) {
|
||||
web_underlines.push_back(ui::ImeTextSpan(
|
||||
ui::ImeTextSpan::Type::kComposition, line.range.from, line.range.to,
|
||||
line.color, line.thick ? true : false, line.background_color));
|
||||
line.thick ? ui::ImeTextSpan::Thickness::kThick
|
||||
: ui::ImeTextSpan::Thickness::kThin,
|
||||
line.color, line.background_color, std::vector<std::string>()));
|
||||
}
|
||||
gfx::Range range(replacement_range.from, replacement_range.to);
|
||||
|
||||
@ -1026,7 +1036,7 @@ void CefRenderWidgetHostViewOSR::OnScreenInfoChanged() {
|
||||
// to send to the renderer, so it is required that BrowserCompositorMac be
|
||||
// updated first. Only notify RenderWidgetHostImpl of the update if any
|
||||
// properties it will query have changed.
|
||||
if (browser_compositor_->UpdateNSViewAndDisplay())
|
||||
if (UpdateNSViewAndDisplay())
|
||||
render_widget_host_->NotifyScreenInfoChanged();
|
||||
#else
|
||||
render_widget_host_->NotifyScreenInfoChanged();
|
||||
@ -1051,7 +1061,7 @@ void CefRenderWidgetHostViewOSR::Invalidate(
|
||||
return;
|
||||
}
|
||||
|
||||
InvalidateInternal(gfx::Rect(GetPhysicalBackingSize()));
|
||||
InvalidateInternal(gfx::Rect(GetCompositorViewportPixelSize()));
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SendKeyEvent(
|
||||
@ -1359,7 +1369,7 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
||||
PlatformResizeCompositorWidget(size_in_pixels);
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
bool resized = browser_compositor_->UpdateNSViewAndDisplay();
|
||||
bool resized = UpdateNSViewAndDisplay();
|
||||
#else
|
||||
bool resized = true;
|
||||
GetDelegatedFrameHost()->WasResized(local_surface_id_, size,
|
||||
|
@ -102,7 +102,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
void InitAsChild(gfx::NativeView parent_view) override;
|
||||
void SetSize(const gfx::Size& size) override;
|
||||
void SetBounds(const gfx::Rect& rect) override;
|
||||
gfx::Vector2dF GetLastScrollOffset() const override;
|
||||
gfx::NativeView GetNativeView() const override;
|
||||
gfx::NativeViewAccessible GetNativeViewAccessible() override;
|
||||
void Focus() override;
|
||||
@ -116,14 +115,12 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
SkColor background_color() const override;
|
||||
bool LockMouse() override;
|
||||
void UnlockMouse() override;
|
||||
void TakeFallbackContentFrom(content::RenderWidgetHostView* view) override;
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
void SetActive(bool active) override;
|
||||
void ShowDefinitionForSelection() override;
|
||||
bool SupportsSpeech() const override;
|
||||
void SpeakSelection() override;
|
||||
bool IsSpeaking() const override;
|
||||
void StopSpeaking() override;
|
||||
bool ShouldContinueToPauseForFrame() override;
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
@ -150,7 +147,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
void SetTooltipText(const base::string16& tooltip_text) override;
|
||||
|
||||
gfx::Size GetRequestedRendererSize() const override;
|
||||
gfx::Size GetPhysicalBackingSize() const override;
|
||||
gfx::Size GetCompositorViewportPixelSize() const override;
|
||||
void CopyFromSurface(
|
||||
const gfx::Rect& src_rect,
|
||||
const gfx::Size& output_size,
|
||||
@ -158,7 +155,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
void GetScreenInfo(content::ScreenInfo* results) const override;
|
||||
gfx::Vector2d GetOffsetFromRootSurface() override;
|
||||
gfx::Rect GetBoundsInRootWindow() override;
|
||||
content::RenderWidgetHostImpl* GetRenderWidgetHostImpl() const override;
|
||||
viz::SurfaceId GetCurrentSurfaceId() const override;
|
||||
content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
|
||||
content::BrowserAccessibilityDelegate* delegate,
|
||||
@ -302,7 +298,9 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
friend class MacHelper;
|
||||
#endif
|
||||
bool UpdateNSViewAndDisplay();
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
void PlatformCreateCompositorWidget(bool is_guest_view_hack);
|
||||
void PlatformResizeCompositorWidget(const gfx::Size& size);
|
||||
void PlatformDestroyCompositorWidget();
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "libcef/browser/native/window_x11.h"
|
||||
|
||||
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
|
||||
#include "third_party/blink/public/platform/web_cursor_info.h"
|
||||
#include "ui/base/x/x11_util.h"
|
||||
#include "ui/gfx/x/x11_types.h"
|
||||
|
||||
|
@ -17,6 +17,16 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "content/common/view_messages.h"
|
||||
#include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
|
||||
#include "ui/display/screen.h"
|
||||
|
||||
namespace {
|
||||
|
||||
display::Display GetDisplay() {
|
||||
// TODO(cef): Get display info from callbacks.
|
||||
return display::Screen::GetScreen()->GetDisplayNearestView(nullptr);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
class MacHelper : public content::BrowserCompositorMacClient,
|
||||
public ui::AcceleratedWidgetMacNSView {
|
||||
@ -37,7 +47,7 @@ class MacHelper : public content::BrowserCompositorMacClient,
|
||||
return view_->background_color();
|
||||
}
|
||||
|
||||
void BrowserCompositorMacOnBeginFrame() override {}
|
||||
void BrowserCompositorMacOnBeginFrame(base::TimeTicks frame_time) override {}
|
||||
|
||||
void OnFrameTokenChanged(uint32_t frame_token) override {
|
||||
view_->render_widget_host()->DidProcessFrame(frame_token);
|
||||
@ -64,6 +74,10 @@ class MacHelper : public content::BrowserCompositorMacClient,
|
||||
view_->render_widget_host()->DidReceiveFirstFrameAfterNavigation();
|
||||
}
|
||||
|
||||
void DestroyCompositorForShutdown() override {}
|
||||
|
||||
void WasResized() override { view_->render_widget_host()->WasResized(); }
|
||||
|
||||
private:
|
||||
// Guaranteed to outlive this object.
|
||||
CefRenderWidgetHostViewOSR* view_;
|
||||
@ -75,18 +89,8 @@ void CefRenderWidgetHostViewOSR::SetActive(bool active) {}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ShowDefinitionForSelection() {}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::SupportsSpeech() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SpeakSelection() {}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::IsSpeaking() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::StopSpeaking() {}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::ShouldContinueToPauseForFrame() {
|
||||
return browser_compositor_->ShouldContinueToPauseForFrame();
|
||||
}
|
||||
@ -104,6 +108,11 @@ content::DelegatedFrameHost* CefRenderWidgetHostViewOSR::GetDelegatedFrameHost()
|
||||
return browser_compositor_->GetDelegatedFrameHost();
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::UpdateNSViewAndDisplay() {
|
||||
return browser_compositor_->UpdateNSViewAndDisplay(
|
||||
GetRootLayer()->bounds().size(), GetDisplay());
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget(
|
||||
bool is_guest_view_hack) {
|
||||
// Create a borderless non-visible 1x1 window.
|
||||
@ -122,7 +131,7 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget(
|
||||
mac_helper_ = new MacHelper(this);
|
||||
browser_compositor_.reset(new content::BrowserCompositorMac(
|
||||
mac_helper_, mac_helper_, render_widget_host_->is_hidden(), true,
|
||||
AllocateFrameSinkId(is_guest_view_hack)));
|
||||
GetDisplay(), AllocateFrameSinkId(is_guest_view_hack)));
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformResizeCompositorWidget(
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "libcef/browser/browser_host_impl.h"
|
||||
#include "libcef/browser/content_browser_client.h"
|
||||
|
||||
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
|
||||
#include "third_party/blink/public/platform/web_cursor_info.h"
|
||||
#include "ui/resources/grit/ui_unscaled_resources.h"
|
||||
|
||||
namespace {
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "components/update_client/update_client.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "extensions/browser/extension_prefs.h"
|
||||
#include "extensions/features/features.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
|
||||
namespace browser_prefs {
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "extensions/browser/extension_registry.h"
|
||||
#include "extensions/browser/view_type_utils.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "media/media_features.h"
|
||||
#include "media/media_buildflags.h"
|
||||
|
||||
namespace renderer_prefs {
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "base/auto_reset.h"
|
||||
#include "base/bind.h"
|
||||
#include "base/location.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/memory/ref_counted_memory.h"
|
||||
#include "base/memory/shared_memory.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/run_loop.h"
|
||||
@ -27,6 +27,7 @@
|
||||
#include "chrome/browser/printing/printer_query.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/printing/browser/print_composite_client.h"
|
||||
@ -42,12 +43,14 @@
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "mojo/public/cpp/system/buffer.h"
|
||||
#include "printing/features/features.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "printing/pdf_metafile_skia.h"
|
||||
#include "printing/print_settings.h"
|
||||
#include "printing/printed_document.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "base/command_line.h"
|
||||
@ -59,6 +62,18 @@ using content::BrowserThread;
|
||||
|
||||
namespace printing {
|
||||
|
||||
namespace {
|
||||
|
||||
bool PrintingPdfContent(content::RenderFrameHost* rfh) {
|
||||
GURL url = rfh->GetLastCommittedURL();
|
||||
// Whether it is inside print preview or pdf plugin extension.
|
||||
return url.GetOrigin() == chrome::kChromeUIPrintURL ||
|
||||
(url.SchemeIs(extensions::kExtensionScheme) &&
|
||||
url.host_piece() == extension_misc::kPdfExtensionId);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
CefPrintViewManagerBase::CefPrintViewManagerBase(
|
||||
content::WebContents* web_contents)
|
||||
: PrintManager(web_contents),
|
||||
@ -93,7 +108,7 @@ bool CefPrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
|
||||
void CefPrintViewManagerBase::PrintDocument(
|
||||
PrintedDocument* document,
|
||||
const scoped_refptr<base::RefCountedBytes>& print_data,
|
||||
const scoped_refptr<base::RefCountedMemory>& print_data,
|
||||
const gfx::Size& page_size,
|
||||
const gfx::Rect& content_area,
|
||||
const gfx::Point& offsets) {
|
||||
@ -121,6 +136,11 @@ void CefPrintViewManagerBase::PrintDocument(
|
||||
print_job_->StartPdfToEmfConversion(print_data, page_size, content_area,
|
||||
print_text_with_gdi);
|
||||
}
|
||||
// Indicate that the PDF is fully rendered and we no longer need the renderer
|
||||
// and web contents, so the print job does not need to be cancelled if they
|
||||
// die. This is needed on Windows because the PrintedDocument will not be
|
||||
// considered complete until PDF conversion finishes.
|
||||
document->SetConvertingPdf();
|
||||
#else
|
||||
std::unique_ptr<PdfMetafileSkia> metafile =
|
||||
std::make_unique<PdfMetafileSkia>();
|
||||
@ -187,11 +207,13 @@ void CefPrintViewManagerBase::OnComposePdfDone(
|
||||
|
||||
std::unique_ptr<base::SharedMemory> shared_buf =
|
||||
GetShmFromMojoHandle(std::move(handle));
|
||||
scoped_refptr<base::RefCountedBytes> bytes =
|
||||
base::MakeRefCounted<base::RefCountedBytes>(
|
||||
reinterpret_cast<const unsigned char*>(shared_buf->memory()),
|
||||
shared_buf->mapped_size());
|
||||
PrintDocument(document, bytes, params.page_size, params.content_area,
|
||||
if (!shared_buf)
|
||||
return;
|
||||
|
||||
size_t size = shared_buf->mapped_size();
|
||||
auto data = base::MakeRefCounted<base::RefCountedSharedMemory>(
|
||||
std::move(shared_buf), size);
|
||||
PrintDocument(document, data, params.page_size, params.content_area,
|
||||
params.physical_offsets);
|
||||
}
|
||||
|
||||
@ -210,8 +232,7 @@ void CefPrintViewManagerBase::OnDidPrintDocument(
|
||||
}
|
||||
|
||||
auto* client = PrintCompositeClient::FromWebContents(web_contents());
|
||||
if (IsOopifEnabled() && !client->for_preview() &&
|
||||
document->settings().is_modifiable()) {
|
||||
if (IsOopifEnabled() && !PrintingPdfContent(render_frame_host)) {
|
||||
client->DoCompositeDocumentToPdf(
|
||||
params.document_cookie, render_frame_host, content.metafile_data_handle,
|
||||
content.data_size, content.subframe_content_info,
|
||||
@ -219,7 +240,6 @@ void CefPrintViewManagerBase::OnDidPrintDocument(
|
||||
weak_ptr_factory_.GetWeakPtr(), params));
|
||||
return;
|
||||
}
|
||||
|
||||
auto shared_buf =
|
||||
std::make_unique<base::SharedMemory>(content.metafile_data_handle, true);
|
||||
if (!shared_buf->Map(content.data_size)) {
|
||||
@ -227,11 +247,10 @@ void CefPrintViewManagerBase::OnDidPrintDocument(
|
||||
web_contents()->Stop();
|
||||
return;
|
||||
}
|
||||
scoped_refptr<base::RefCountedBytes> bytes =
|
||||
base::MakeRefCounted<base::RefCountedBytes>(
|
||||
reinterpret_cast<const unsigned char*>(shared_buf->memory()),
|
||||
content.data_size);
|
||||
PrintDocument(document, bytes, params.page_size, params.content_area,
|
||||
|
||||
auto data = base::MakeRefCounted<base::RefCountedSharedMemory>(
|
||||
std::move(shared_buf), content.data_size);
|
||||
PrintDocument(document, data, params.page_size, params.content_area,
|
||||
params.physical_offsets);
|
||||
}
|
||||
|
||||
@ -358,18 +377,18 @@ bool CefPrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
if (!print_job_.get() || !print_job_->is_job_pending())
|
||||
return false;
|
||||
|
||||
// We can't print if there is no renderer.
|
||||
if (!web_contents() || !web_contents()->GetRenderViewHost() ||
|
||||
!web_contents()->GetRenderViewHost()->IsRenderViewLive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Is the document already complete?
|
||||
if (print_job_->document() && print_job_->document()->IsComplete()) {
|
||||
printing_succeeded_ = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
// We can't print if there is no renderer.
|
||||
if (!web_contents() || !web_contents()->GetRenderViewHost() ||
|
||||
!web_contents()->GetRenderViewHost()->IsRenderViewLive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// WebContents is either dying or a second consecutive request to print
|
||||
// happened before the first had time to finish. We need to render all the
|
||||
// pages in an hurry if a print_job_ is still pending. No need to wait for it
|
||||
@ -413,14 +432,12 @@ bool CefPrintViewManagerBase::CreateNewPrintJob(PrintJobWorkerOwner* job) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ask the renderer to generate the print preview, create the print preview
|
||||
// view and switch to it, initialize the printer and show the print dialog.
|
||||
DCHECK(!print_job_.get());
|
||||
DCHECK(job);
|
||||
if (!job)
|
||||
return false;
|
||||
|
||||
print_job_ = new PrintJob();
|
||||
print_job_ = base::MakeRefCounted<PrintJob>();
|
||||
print_job_->Initialize(job, RenderSourceName(), number_pages_);
|
||||
registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
|
||||
content::Source<PrintJob>(print_job_.get()));
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "build/build_config.h"
|
||||
@ -18,12 +18,12 @@
|
||||
#include "content/public/browser/notification_observer.h"
|
||||
#include "content/public/browser/notification_registrar.h"
|
||||
#include "mojo/public/cpp/system/platform_handle.h"
|
||||
#include "printing/features/features.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
|
||||
struct PrintHostMsg_DidPrintDocument_Params;
|
||||
|
||||
namespace base {
|
||||
class RefCountedBytes;
|
||||
class RefCountedMemory;
|
||||
}
|
||||
|
||||
namespace content {
|
||||
@ -74,6 +74,15 @@ class CefPrintViewManagerBase : public content::NotificationObserver,
|
||||
// Cancels the print job.
|
||||
void NavigationStopped() override;
|
||||
|
||||
// Creates a new empty print job. It has no settings loaded. If there is
|
||||
// currently a print job, safely disconnect from it. Returns false if it is
|
||||
// impossible to safely disconnect from the current print job or it is
|
||||
// impossible to create a new print job.
|
||||
virtual bool CreateNewPrintJob(PrintJobWorkerOwner* job);
|
||||
|
||||
// Manages the low-level talk to the printer.
|
||||
scoped_refptr<PrintJob> print_job_;
|
||||
|
||||
private:
|
||||
// content::NotificationObserver implementation.
|
||||
void Observe(int type,
|
||||
@ -110,7 +119,7 @@ class CefPrintViewManagerBase : public content::NotificationObserver,
|
||||
// Starts printing |document| with the given |print_data|. This method assumes
|
||||
// |print_data| contains valid data.
|
||||
void PrintDocument(PrintedDocument* document,
|
||||
const scoped_refptr<base::RefCountedBytes>& print_data,
|
||||
const scoped_refptr<base::RefCountedMemory>& print_data,
|
||||
const gfx::Size& page_size,
|
||||
const gfx::Rect& content_area,
|
||||
const gfx::Point& offsets);
|
||||
@ -122,12 +131,6 @@ class CefPrintViewManagerBase : public content::NotificationObserver,
|
||||
// RenderAllMissingPagesNow().
|
||||
void ShouldQuitFromInnerMessageLoop();
|
||||
|
||||
// Creates a new empty print job. It has no settings loaded. If there is
|
||||
// currently a print job, safely disconnect from it. Returns false if it is
|
||||
// impossible to safely disconnect from the current print job or it is
|
||||
// impossible to create a new print job.
|
||||
bool CreateNewPrintJob(PrintJobWorkerOwner* job);
|
||||
|
||||
// Makes sure the current print_job_ has all its data before continuing, and
|
||||
// disconnect from it.
|
||||
void DisconnectFromCurrentPrintJob();
|
||||
@ -163,9 +166,6 @@ class CefPrintViewManagerBase : public content::NotificationObserver,
|
||||
// The current RFH that is printing with a system printing dialog.
|
||||
content::RenderFrameHost* printing_rfh_;
|
||||
|
||||
// Manages the low-level talk to the printer.
|
||||
scoped_refptr<PrintJob> print_job_;
|
||||
|
||||
// Indication of success of the print job.
|
||||
bool printing_succeeded_;
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/child_process_host.h"
|
||||
#include "printing/features/features.h"
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#include "libcef/browser/printing/print_dialog_linux.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "components/keyed_service/core/keyed_service_shutdown_notifier.h"
|
||||
#include "components/prefs/pref_member.h"
|
||||
#include "content/public/browser/browser_message_filter.h"
|
||||
#include "printing/features/features.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
|
||||
struct PrintHostMsg_ScriptedPrint_Params;
|
||||
class Profile;
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/process/launch.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/child_process_launcher_utils.h"
|
||||
|
||||
bool CefLaunchProcess(CefRefPtr<CefCommandLine> command_line) {
|
||||
if (!command_line.get()) {
|
||||
@ -15,8 +15,7 @@ bool CefLaunchProcess(CefRefPtr<CefCommandLine> command_line) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!content::BrowserThread::CurrentlyOn(
|
||||
content::BrowserThread::PROCESS_LAUNCHER)) {
|
||||
if (!content::CurrentlyOnProcessLauncherTaskRunner()) {
|
||||
NOTREACHED() << "called on invalid thread";
|
||||
return false;
|
||||
}
|
||||
|
@ -30,65 +30,10 @@
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
|
||||
namespace {
|
||||
|
||||
void SendExecuteMimeTypeHandlerEvent(
|
||||
std::unique_ptr<content::StreamInfo> stream,
|
||||
int64_t expected_content_size,
|
||||
const std::string& extension_id,
|
||||
const std::string& view_id,
|
||||
bool embedded,
|
||||
int frame_tree_node_id,
|
||||
int render_process_id,
|
||||
int render_frame_id) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
content::WebContents* web_contents = nullptr;
|
||||
if (frame_tree_node_id != -1) {
|
||||
web_contents =
|
||||
content::WebContents::FromFrameTreeNodeId(frame_tree_node_id);
|
||||
} else {
|
||||
web_contents = content::WebContents::FromRenderFrameHost(
|
||||
content::RenderFrameHost::FromID(render_process_id, render_frame_id));
|
||||
}
|
||||
if (!web_contents)
|
||||
return;
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
CefBrowserHostImpl::GetBrowserForContents(web_contents);
|
||||
if (!browser.get())
|
||||
return;
|
||||
|
||||
content::BrowserContext* browser_context = web_contents->GetBrowserContext();
|
||||
|
||||
extensions::StreamsPrivateAPI* streams_private =
|
||||
extensions::StreamsPrivateAPI::Get(browser_context);
|
||||
if (!streams_private)
|
||||
return;
|
||||
|
||||
streams_private->ExecuteMimeTypeHandler(
|
||||
extension_id, std::move(stream), view_id, expected_content_size, embedded,
|
||||
frame_tree_node_id, render_process_id, render_frame_id);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
CefResourceDispatcherHostDelegate::CefResourceDispatcherHostDelegate() {}
|
||||
|
||||
CefResourceDispatcherHostDelegate::~CefResourceDispatcherHostDelegate() {}
|
||||
|
||||
bool CefResourceDispatcherHostDelegate::HandleExternalProtocol(
|
||||
const GURL& url,
|
||||
content::ResourceRequestInfo* info) {
|
||||
CEF_POST_TASK(
|
||||
CEF_UIT,
|
||||
base::Bind(base::IgnoreResult(&CefResourceDispatcherHostDelegate::
|
||||
HandleExternalProtocolOnUIThread),
|
||||
base::Unretained(this), url,
|
||||
info->GetWebContentsGetterForRequest()));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Implementation based on
|
||||
// ChromeResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream.
|
||||
bool CefResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
|
||||
@ -150,12 +95,14 @@ void CefResourceDispatcherHostDelegate::OnStreamCreated(
|
||||
stream_target_info_.find(request);
|
||||
CHECK(ix != stream_target_info_.end());
|
||||
bool embedded = info->GetResourceType() != content::RESOURCE_TYPE_MAIN_FRAME;
|
||||
CEF_POST_TASK(
|
||||
CEF_UIT,
|
||||
base::Bind(&SendExecuteMimeTypeHandlerEvent, base::Passed(&stream),
|
||||
request->GetExpectedContentSize(), ix->second.extension_id,
|
||||
ix->second.view_id, embedded, info->GetFrameTreeNodeId(),
|
||||
info->GetChildID(), info->GetRenderFrameID()));
|
||||
content::BrowserThread::PostTask(
|
||||
content::BrowserThread::UI, FROM_HERE,
|
||||
base::BindOnce(
|
||||
&extensions::StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent,
|
||||
request->GetExpectedContentSize(), ix->second.extension_id,
|
||||
ix->second.view_id, embedded, info->GetFrameTreeNodeId(),
|
||||
info->GetChildID(), info->GetRenderFrameID(), std::move(stream),
|
||||
nullptr /* transferrable_loader */, GURL()));
|
||||
stream_target_info_.erase(request);
|
||||
}
|
||||
|
||||
@ -178,17 +125,3 @@ void CefResourceDispatcherHostDelegate::OnRequestRedirected(
|
||||
response->head.headers->AddHeader("Access-Control-Allow-Credentials: true");
|
||||
}
|
||||
}
|
||||
|
||||
void CefResourceDispatcherHostDelegate::HandleExternalProtocolOnUIThread(
|
||||
const GURL& url,
|
||||
const content::ResourceRequestInfo::WebContentsGetter&
|
||||
web_contents_getter) {
|
||||
CEF_REQUIRE_UIT();
|
||||
content::WebContents* web_contents = web_contents_getter.Run();
|
||||
if (web_contents) {
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
CefBrowserHostImpl::GetBrowserForContents(web_contents);
|
||||
if (browser.get())
|
||||
browser->HandleExternalProtocol(url);
|
||||
}
|
||||
}
|
||||
|
@ -21,8 +21,6 @@ class CefResourceDispatcherHostDelegate
|
||||
~CefResourceDispatcherHostDelegate() override;
|
||||
|
||||
// ResourceDispatcherHostDelegate methods.
|
||||
bool HandleExternalProtocol(const GURL& url,
|
||||
content::ResourceRequestInfo* info) override;
|
||||
bool ShouldInterceptResourceAsStream(net::URLRequest* request,
|
||||
const std::string& mime_type,
|
||||
GURL* origin,
|
||||
|
@ -28,101 +28,6 @@ using content::BrowserThread;
|
||||
using content::SpeechRecognitionManager;
|
||||
using content::WebContents;
|
||||
|
||||
// Simple utility to get notified when a WebContents is closed or crashes.
|
||||
// Both the callback site and the callback thread are passed by the caller in
|
||||
// the constructor. There is no restriction on the constructor, however this
|
||||
// class must be destroyed on the UI thread, due to the NotificationRegistrar
|
||||
// dependency.
|
||||
class CefSpeechRecognitionManagerDelegate::WebContentsWatcher
|
||||
: public base::RefCountedThreadSafe<WebContentsWatcher>,
|
||||
public content::NotificationObserver {
|
||||
public:
|
||||
typedef base::Callback<void(int render_process_id, int render_view_id)>
|
||||
WebContentsClosedCallback;
|
||||
|
||||
WebContentsWatcher(WebContentsClosedCallback web_contents_closed_callback,
|
||||
BrowserThread::ID callback_thread)
|
||||
: web_contents_closed_callback_(web_contents_closed_callback),
|
||||
callback_thread_(callback_thread) {}
|
||||
|
||||
// Starts monitoring the WebContents corresponding to the given
|
||||
// |render_process_id|, |render_view_id| pair, invoking
|
||||
// |web_contents_closed_callback_| if closed/unloaded.
|
||||
void Watch(int render_process_id, int render_view_id) {
|
||||
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
|
||||
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
|
||||
base::Bind(&WebContentsWatcher::Watch, this,
|
||||
render_process_id, render_view_id));
|
||||
return;
|
||||
}
|
||||
|
||||
WebContents* web_contents = NULL;
|
||||
content::RenderViewHost* render_view_host =
|
||||
content::RenderViewHost::FromID(render_process_id, render_view_id);
|
||||
if (render_view_host)
|
||||
web_contents = WebContents::FromRenderViewHost(render_view_host);
|
||||
DCHECK(web_contents);
|
||||
|
||||
// Avoid multiple registrations on |registrar_| for the same |web_contents|.
|
||||
if (registered_web_contents_.find(web_contents) !=
|
||||
registered_web_contents_.end()) {
|
||||
return;
|
||||
}
|
||||
registered_web_contents_.insert(web_contents);
|
||||
|
||||
// Lazy initialize the registrar.
|
||||
if (!registrar_.get())
|
||||
registrar_.reset(new content::NotificationRegistrar());
|
||||
|
||||
registrar_->Add(this, content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
|
||||
content::Source<WebContents>(web_contents));
|
||||
}
|
||||
|
||||
// content::NotificationObserver implementation.
|
||||
void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) override {
|
||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||
DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type);
|
||||
|
||||
WebContents* web_contents = content::Source<WebContents>(source).ptr();
|
||||
int render_process_id =
|
||||
web_contents->GetRenderViewHost()->GetProcess()->GetID();
|
||||
int render_view_id = web_contents->GetRenderViewHost()->GetRoutingID();
|
||||
|
||||
registrar_->Remove(this, content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
|
||||
content::Source<WebContents>(web_contents));
|
||||
registered_web_contents_.erase(web_contents);
|
||||
|
||||
BrowserThread::PostTask(callback_thread_, FROM_HERE,
|
||||
base::Bind(web_contents_closed_callback_,
|
||||
render_process_id, render_view_id));
|
||||
}
|
||||
|
||||
private:
|
||||
friend class base::RefCountedThreadSafe<WebContentsWatcher>;
|
||||
|
||||
~WebContentsWatcher() override {
|
||||
// Must be destroyed on the UI thread due to |registrar_| non thread-safety.
|
||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||
}
|
||||
|
||||
// Lazy-initialized and used on the UI thread to handle web contents
|
||||
// notifications (tab closing).
|
||||
std::unique_ptr<content::NotificationRegistrar> registrar_;
|
||||
|
||||
// Keeps track of which WebContent(s) have been registered, in order to avoid
|
||||
// double registrations on |registrar_|
|
||||
std::set<content::WebContents*> registered_web_contents_;
|
||||
|
||||
// Callback used to notify, on the thread specified by |callback_thread_| the
|
||||
// closure of a registered tab.
|
||||
WebContentsClosedCallback web_contents_closed_callback_;
|
||||
content::BrowserThread::ID callback_thread_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(WebContentsWatcher);
|
||||
};
|
||||
|
||||
CefSpeechRecognitionManagerDelegate ::CefSpeechRecognitionManagerDelegate() {
|
||||
const base::CommandLine* command_line =
|
||||
base::CommandLine::ForCurrentProcess();
|
||||
@ -132,37 +37,7 @@ CefSpeechRecognitionManagerDelegate ::CefSpeechRecognitionManagerDelegate() {
|
||||
|
||||
CefSpeechRecognitionManagerDelegate ::~CefSpeechRecognitionManagerDelegate() {}
|
||||
|
||||
void CefSpeechRecognitionManagerDelegate::WebContentsClosedCallback(
|
||||
int render_process_id,
|
||||
int render_view_id) {
|
||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
||||
|
||||
SpeechRecognitionManager* manager = SpeechRecognitionManager::GetInstance();
|
||||
// |manager| becomes NULL if a browser shutdown happens between the post of
|
||||
// this task (from the UI thread) and this call (on the IO thread). In this
|
||||
// case we just return.
|
||||
if (!manager)
|
||||
return;
|
||||
|
||||
manager->AbortAllSessionsForRenderView(render_process_id, render_view_id);
|
||||
}
|
||||
|
||||
void CefSpeechRecognitionManagerDelegate::OnRecognitionStart(int session_id) {
|
||||
const content::SpeechRecognitionSessionContext& context =
|
||||
SpeechRecognitionManager::GetInstance()->GetSessionContext(session_id);
|
||||
|
||||
// Register callback to auto abort session on tab closure.
|
||||
// |web_contents_watcher_| is lazyly istantiated on the first call.
|
||||
if (!web_contents_watcher_.get()) {
|
||||
web_contents_watcher_ = new WebContentsWatcher(
|
||||
base::Bind(
|
||||
&CefSpeechRecognitionManagerDelegate::WebContentsClosedCallback,
|
||||
base::Unretained(this)),
|
||||
BrowserThread::IO);
|
||||
}
|
||||
web_contents_watcher_->Watch(context.render_process_id,
|
||||
context.render_view_id);
|
||||
}
|
||||
void CefSpeechRecognitionManagerDelegate::OnRecognitionStart(int session_id) {}
|
||||
|
||||
void CefSpeechRecognitionManagerDelegate::OnAudioStart(int session_id) {}
|
||||
|
||||
|
@ -48,13 +48,6 @@ class CefSpeechRecognitionManagerDelegate
|
||||
bool FilterProfanities(int render_process_id) override;
|
||||
|
||||
private:
|
||||
class WebContentsWatcher;
|
||||
|
||||
// Callback called by |web_contents_watcher_| on the IO thread to signal
|
||||
// web contents closure.
|
||||
void WebContentsClosedCallback(int render_process_id, int render_view_id);
|
||||
|
||||
scoped_refptr<WebContentsWatcher> web_contents_watcher_;
|
||||
bool filter_profanities_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefSpeechRecognitionManagerDelegate);
|
||||
|
@ -30,11 +30,16 @@ network::mojom::NetworkContext* CefStoragePartitionProxy::GetNetworkContext() {
|
||||
return parent_->GetNetworkContext();
|
||||
}
|
||||
|
||||
scoped_refptr<content::SharedURLLoaderFactory>
|
||||
scoped_refptr<network::SharedURLLoaderFactory>
|
||||
CefStoragePartitionProxy::GetURLLoaderFactoryForBrowserProcess() {
|
||||
return parent_->GetURLLoaderFactoryForBrowserProcess();
|
||||
}
|
||||
|
||||
std::unique_ptr<network::SharedURLLoaderFactoryInfo>
|
||||
CefStoragePartitionProxy::GetURLLoaderFactoryForBrowserProcessIOThread() {
|
||||
return parent_->GetURLLoaderFactoryForBrowserProcessIOThread();
|
||||
}
|
||||
|
||||
network::mojom::CookieManager*
|
||||
CefStoragePartitionProxy::GetCookieManagerForBrowserProcess() {
|
||||
return parent_->GetCookieManagerForBrowserProcess();
|
||||
@ -101,6 +106,10 @@ CefStoragePartitionProxy::GetPlatformNotificationContext() {
|
||||
return parent_->GetPlatformNotificationContext();
|
||||
}
|
||||
|
||||
content::WebPackageContext* CefStoragePartitionProxy::GetWebPackageContext() {
|
||||
return parent_->GetWebPackageContext();
|
||||
}
|
||||
|
||||
void CefStoragePartitionProxy::ClearDataForOrigin(
|
||||
uint32_t remove_mask,
|
||||
uint32_t quota_storage_remove_mask,
|
||||
|
@ -25,8 +25,10 @@ class CefStoragePartitionProxy : public content::StoragePartition {
|
||||
net::URLRequestContextGetter* GetURLRequestContext() override;
|
||||
net::URLRequestContextGetter* GetMediaURLRequestContext() override;
|
||||
network::mojom::NetworkContext* GetNetworkContext() override;
|
||||
scoped_refptr<content::SharedURLLoaderFactory>
|
||||
scoped_refptr<network::SharedURLLoaderFactory>
|
||||
GetURLLoaderFactoryForBrowserProcess() override;
|
||||
std::unique_ptr<network::SharedURLLoaderFactoryInfo>
|
||||
GetURLLoaderFactoryForBrowserProcessIOThread() override;
|
||||
network::mojom::CookieManager* GetCookieManagerForBrowserProcess() override;
|
||||
storage::QuotaManager* GetQuotaManager() override;
|
||||
content::AppCacheService* GetAppCacheService() override;
|
||||
@ -43,6 +45,7 @@ class CefStoragePartitionProxy : public content::StoragePartition {
|
||||
content::ZoomLevelDelegate* GetZoomLevelDelegate() override;
|
||||
content::PlatformNotificationContext* GetPlatformNotificationContext()
|
||||
override;
|
||||
content::WebPackageContext* GetWebPackageContext() override;
|
||||
void ClearDataForOrigin(uint32_t remove_mask,
|
||||
uint32_t quota_storage_remove_mask,
|
||||
const GURL& storage_origin) override;
|
||||
|
@ -9,38 +9,6 @@
|
||||
|
||||
using namespace crashpad;
|
||||
|
||||
namespace {
|
||||
|
||||
// Calls CrashReportDatabase::RecordUploadAttempt() with |successful| set to
|
||||
// false upon destruction unless disarmed by calling Fire() or Disarm(). Fire()
|
||||
// triggers an immediate call. Armed upon construction.
|
||||
class CallRecordUploadAttempt {
|
||||
public:
|
||||
CallRecordUploadAttempt(CrashReportDatabase* database,
|
||||
const CrashReportDatabase::Report* report)
|
||||
: database_(database), report_(report) {}
|
||||
|
||||
~CallRecordUploadAttempt() { Fire(); }
|
||||
|
||||
void Fire() {
|
||||
if (report_) {
|
||||
database_->RecordUploadAttempt(report_, false, std::string());
|
||||
}
|
||||
|
||||
Disarm();
|
||||
}
|
||||
|
||||
void Disarm() { report_ = nullptr; }
|
||||
|
||||
private:
|
||||
CrashReportDatabase* database_; // weak
|
||||
const CrashReportDatabase::Report* report_; // weak
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CallRecordUploadAttempt);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
CefCrashReportUploadThread::CefCrashReportUploadThread(
|
||||
CrashReportDatabase* database,
|
||||
const std::string& url,
|
||||
@ -109,7 +77,7 @@ void CefCrashReportUploadThread::ProcessPendingReport(
|
||||
return;
|
||||
}
|
||||
|
||||
const CrashReportDatabase::Report* upload_report;
|
||||
std::unique_ptr<const CrashReportDatabase::UploadReport> upload_report;
|
||||
CrashReportDatabase::OperationStatus status =
|
||||
database_->GetReportForUploading(report.uuid, &upload_report);
|
||||
switch (status) {
|
||||
@ -133,22 +101,19 @@ void CefCrashReportUploadThread::ProcessPendingReport(
|
||||
return;
|
||||
}
|
||||
|
||||
CallRecordUploadAttempt call_record_upload_attempt(database_, upload_report);
|
||||
|
||||
std::string response_body;
|
||||
UploadResult upload_result = UploadReport(upload_report, &response_body);
|
||||
UploadResult upload_result =
|
||||
UploadReport(upload_report.get(), &response_body);
|
||||
switch (upload_result) {
|
||||
case UploadResult::kSuccess:
|
||||
// The upload completed successfully.
|
||||
call_record_upload_attempt.Disarm();
|
||||
database_->RecordUploadAttempt(upload_report, true, response_body);
|
||||
database_->RecordUploadComplete(std::move(upload_report), response_body);
|
||||
if (MaxUploadsEnabled())
|
||||
recent_upload_ct_++;
|
||||
ResetBackoff();
|
||||
break;
|
||||
case UploadResult::kPermanentFailure:
|
||||
// The upload should never be retried.
|
||||
call_record_upload_attempt.Fire();
|
||||
database_->SkipReportUpload(report.uuid,
|
||||
Metrics::CrashSkippedReason::kUploadFailed);
|
||||
break;
|
||||
|
@ -204,17 +204,21 @@ void CefContentClient::AddPepperPlugins(
|
||||
ComputeBuiltInPlugins(plugins);
|
||||
AddPepperFlashFromCommandLine(plugins);
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
|
||||
CefWidevineLoader::AddPepperPlugins(plugins);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
content::PepperPluginInfo plugin;
|
||||
if (GetSystemPepperFlash(&plugin))
|
||||
plugins->push_back(plugin);
|
||||
}
|
||||
|
||||
void CefContentClient::AddContentDecryptionModules(
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
|
||||
#if defined(OS_LINUX)
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
|
||||
CefWidevineLoader::AddContentDecryptionModules(cdms, cdm_host_file_paths);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void CefContentClient::AddAdditionalSchemes(Schemes* schemes) {
|
||||
DCHECK(!scheme_info_list_locked_);
|
||||
|
||||
|
@ -33,6 +33,9 @@ class CefContentClient : public content::ContentClient,
|
||||
// content::ContentClient methods.
|
||||
void AddPepperPlugins(
|
||||
std::vector<content::PepperPluginInfo>* plugins) override;
|
||||
void AddContentDecryptionModules(
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
||||
void AddAdditionalSchemes(Schemes* schemes) override;
|
||||
std::string GetProduct() const override;
|
||||
std::string GetChromeProduct() const override;
|
||||
|
@ -556,7 +556,7 @@ void CefCrashReporterClient::InitializeCrashReportingForProcess() {
|
||||
if (embedded_handler) {
|
||||
crash_reporter::InitializeCrashpadWithEmbeddedHandler(
|
||||
process_type.empty(), install_static::UTF16ToUTF8(process_type),
|
||||
std::string());
|
||||
std::string(), base::FilePath());
|
||||
} else {
|
||||
crash_reporter::InitializeCrashpad(
|
||||
process_type.empty(), install_static::UTF16ToUTF8(process_type));
|
||||
@ -603,6 +603,12 @@ bool CefCrashReporterClient::GetCrashMetricsLocation(
|
||||
|
||||
void CefCrashReporterClient::GetProductNameAndVersion(const char** product_name,
|
||||
const char** version) {
|
||||
GetProductNameAndVersion(product_name, version, nullptr);
|
||||
}
|
||||
|
||||
void CefCrashReporterClient::GetProductNameAndVersion(const char** product_name,
|
||||
const char** version,
|
||||
const char** channel) {
|
||||
*product_name = product_name_.c_str();
|
||||
*version = product_version_.c_str();
|
||||
}
|
||||
|
@ -53,6 +53,9 @@ class CefCrashReporterClient : public crash_reporter::CrashReporterClient {
|
||||
#elif defined(OS_POSIX)
|
||||
void GetProductNameAndVersion(const char** product_name,
|
||||
const char** version) override;
|
||||
void GetProductNameAndVersion(const char** product_name,
|
||||
const char** version,
|
||||
const char** channel) override;
|
||||
#if !defined(OS_MACOSX)
|
||||
base::FilePath GetReporterLogFilename() override;
|
||||
bool EnableBreakpadForProcess(const std::string& process_type) override;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/main_function_params.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "ipc/ipc_features.h"
|
||||
#include "ipc/ipc_buildflags.h"
|
||||
#include "pdf/pdf_ppapi.h"
|
||||
#include "ui/base/layout.h"
|
||||
#include "ui/base/material_design/material_design_controller.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "net/net_features.h"
|
||||
#include "net/net_buildflags.h"
|
||||
#include "url/url_constants.h"
|
||||
|
||||
namespace scheme {
|
||||
|
@ -35,12 +35,12 @@
|
||||
#include "net/url_request/url_fetcher.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLError.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLRequest.h"
|
||||
#include "third_party/WebKit/public/platform/modules/fetch/fetch_api_request.mojom-shared.h"
|
||||
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
|
||||
#include "third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom-shared.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/platform/web_url_error.h"
|
||||
#include "third_party/blink/public/platform/web_url_request.h"
|
||||
#include "third_party/blink/public/web/web_security_policy.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
#include "include/cef_request.h"
|
||||
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "third_party/WebKit/public/platform/WebHTTPBody.h"
|
||||
#include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
|
||||
#include "third_party/blink/public/platform/web_http_body.h"
|
||||
#include "third_party/blink/public/platform/web_referrer_policy.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
namespace navigation_interception {
|
||||
|
@ -11,10 +11,10 @@
|
||||
#include "net/http/http_request_headers.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLResponse.h"
|
||||
#include "third_party/blink/public/platform/web_http_header_visitor.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/platform/web_url_response.h"
|
||||
|
||||
#define CHECK_READONLY_RETURN_VOID() \
|
||||
if (read_only_) { \
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/child_process_launcher_utils.h"
|
||||
|
||||
using content::BrowserThread;
|
||||
|
||||
@ -73,6 +74,8 @@ scoped_refptr<base::SingleThreadTaskRunner> CefTaskRunnerImpl::GetTaskRunner(
|
||||
return client->user_visible_task_runner();
|
||||
case TID_FILE_USER_BLOCKING:
|
||||
return client->user_blocking_task_runner();
|
||||
case TID_PROCESS_LAUNCHER:
|
||||
return content::GetProcessLauncherTaskRunner();
|
||||
case TID_IO:
|
||||
id = BrowserThread::IO;
|
||||
break;
|
||||
@ -81,7 +84,7 @@ scoped_refptr<base::SingleThreadTaskRunner> CefTaskRunnerImpl::GetTaskRunner(
|
||||
};
|
||||
|
||||
if (id >= 0 &&
|
||||
BrowserThread::IsMessageLoopValid(static_cast<BrowserThread::ID>(id))) {
|
||||
BrowserThread::IsThreadInitialized(static_cast<BrowserThread::ID>(id))) {
|
||||
return BrowserThread::GetTaskRunnerForThread(
|
||||
static_cast<BrowserThread::ID>(id));
|
||||
}
|
||||
@ -98,7 +101,7 @@ CefTaskRunnerImpl::GetCurrentTaskRunner() {
|
||||
// GetTaskRunner(). Otherwise BelongsToThread() will return incorrect results.
|
||||
BrowserThread::ID current_id;
|
||||
if (BrowserThread::GetCurrentThreadIdentifier(¤t_id) &&
|
||||
BrowserThread::IsMessageLoopValid(current_id)) {
|
||||
BrowserThread::IsThreadInitialized(current_id)) {
|
||||
task_runner = BrowserThread::GetTaskRunnerForThread(current_id);
|
||||
}
|
||||
|
||||
|
@ -19,11 +19,11 @@
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/common/widevine_cdm_constants.h"
|
||||
#include "content/browser/plugin_service_impl.h"
|
||||
#include "content/public/browser/cdm_registry.h"
|
||||
#include "content/public/common/cdm_info.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "media/cdm/cdm_host_file.h"
|
||||
#include "media/cdm/supported_cdm_versions.h"
|
||||
|
||||
namespace {
|
||||
@ -174,31 +174,9 @@ bool IsCompatibleWithChrome(const base::DictionaryValue& manifest,
|
||||
error_message);
|
||||
}
|
||||
|
||||
// Populate the PepperPluginInfo structure.
|
||||
void GetPluginInfo(const base::FilePath& cdm_adapter_path,
|
||||
const base::FilePath& cdm_path,
|
||||
const std::string& cdm_version,
|
||||
const std::string& cdm_codecs,
|
||||
bool supports_persistent_license,
|
||||
content::PepperPluginInfo* widevine_cdm) {
|
||||
widevine_cdm->is_out_of_process = true;
|
||||
widevine_cdm->path = cdm_adapter_path;
|
||||
widevine_cdm->name = kWidevineCdmDisplayName;
|
||||
widevine_cdm->description =
|
||||
kWidevineCdmDescription + std::string(" (version: ") + cdm_version + ")";
|
||||
widevine_cdm->version = cdm_version;
|
||||
content::WebPluginMimeType widevine_cdm_mime_type(
|
||||
kWidevineCdmPluginMimeType, kWidevineCdmPluginExtension,
|
||||
kWidevineCdmPluginMimeTypeDescription);
|
||||
|
||||
widevine_cdm->mime_types.push_back(widevine_cdm_mime_type);
|
||||
widevine_cdm->permissions = kWidevineCdmPluginPermissions;
|
||||
}
|
||||
|
||||
// Verify and load the contents of |base_path|.
|
||||
cef_cdm_registration_error_t LoadWidevineCdmInfo(
|
||||
const base::FilePath& base_path,
|
||||
base::FilePath* cdm_adapter_path,
|
||||
base::FilePath* cdm_path,
|
||||
std::string* cdm_version,
|
||||
std::string* cdm_codecs,
|
||||
@ -206,13 +184,6 @@ cef_cdm_registration_error_t LoadWidevineCdmInfo(
|
||||
std::string* error_message) {
|
||||
std::stringstream ss;
|
||||
|
||||
*cdm_adapter_path = base_path.AppendASCII(kWidevineCdmAdapterFileName);
|
||||
if (!base::PathExists(*cdm_adapter_path)) {
|
||||
ss << "Missing adapter file " << cdm_adapter_path->value();
|
||||
*error_message = ss.str();
|
||||
return CEF_CDM_REGISTRATION_ERROR_INCORRECT_CONTENTS;
|
||||
}
|
||||
|
||||
*cdm_path = base_path.AppendASCII(
|
||||
base::GetNativeLibraryName(kWidevineCdmLibraryName));
|
||||
if (!base::PathExists(*cdm_path)) {
|
||||
@ -286,33 +257,28 @@ std::vector<media::VideoCodec> ConvertCodecsString(const std::string& codecs) {
|
||||
return supported_video_codecs;
|
||||
}
|
||||
|
||||
void RegisterWidevineCdmOnUIThread(const base::FilePath& cdm_adapter_path,
|
||||
const base::FilePath& cdm_path,
|
||||
content::CdmInfo MakeCdmInfo(const base::FilePath& cdm_path,
|
||||
const std::string& cdm_version,
|
||||
const std::string& cdm_codecs,
|
||||
bool supports_persistent_license) {
|
||||
std::vector<media::VideoCodec> supported_video_codecs =
|
||||
ConvertCodecsString(cdm_codecs);
|
||||
return content::CdmInfo(
|
||||
kWidevineCdmDisplayName, kWidevineCdmGuid, base::Version(cdm_version),
|
||||
cdm_path, kWidevineCdmFileSystemId, supported_video_codecs,
|
||||
supports_persistent_license, kWidevineKeySystem, false);
|
||||
}
|
||||
|
||||
void RegisterWidevineCdmOnUIThread(const base::FilePath& cdm_path,
|
||||
const std::string& cdm_version,
|
||||
const std::string& cdm_codecs,
|
||||
bool supports_persistent_license,
|
||||
CefRefPtr<CefRegisterCdmCallback> callback) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
content::PepperPluginInfo widevine_cdm;
|
||||
GetPluginInfo(cdm_adapter_path, cdm_path, cdm_version, cdm_codecs,
|
||||
supports_persistent_license, &widevine_cdm);
|
||||
|
||||
// true = Add to beginning of list to override any existing registrations.
|
||||
content::PluginService::GetInstance()->RegisterInternalPlugin(
|
||||
widevine_cdm.ToWebPluginInfo(), true);
|
||||
// Tell the browser to refresh the plugin list. Then tell all renderers to
|
||||
// update their plugin list caches.
|
||||
content::PluginService::GetInstance()->RefreshPlugins();
|
||||
content::PluginService::GetInstance()->PurgePluginListCache(NULL, false);
|
||||
|
||||
// Also register Widevine with the CdmRegistry.
|
||||
std::vector<media::VideoCodec> supported_video_codecs =
|
||||
ConvertCodecsString(cdm_codecs);
|
||||
content::CdmRegistry::GetInstance()->RegisterCdm(content::CdmInfo(
|
||||
kWidevineCdmDisplayName, kWidevineCdmGuid, base::Version(cdm_version),
|
||||
cdm_path, kWidevineCdmFileSystemId, supported_video_codecs,
|
||||
supports_persistent_license, kWidevineKeySystem, false));
|
||||
// Register Widevine with the CdmRegistry.
|
||||
content::CdmRegistry::GetInstance()->RegisterCdm(MakeCdmInfo(
|
||||
cdm_path, cdm_version, cdm_codecs, supports_persistent_license));
|
||||
|
||||
DeliverWidevineCdmCallback(CEF_CDM_REGISTRATION_ERROR_NONE, std::string(),
|
||||
callback);
|
||||
@ -323,15 +289,14 @@ void LoadWidevineCdmInfoOnBlockingThread(
|
||||
CefRefPtr<CefRegisterCdmCallback> callback) {
|
||||
CEF_REQUIRE_BLOCKING();
|
||||
|
||||
base::FilePath cdm_adapter_path;
|
||||
base::FilePath cdm_path;
|
||||
std::string cdm_version;
|
||||
std::string cdm_codecs;
|
||||
bool supports_persistent_license;
|
||||
std::string error_message;
|
||||
cef_cdm_registration_error_t result = LoadWidevineCdmInfo(
|
||||
base_path, &cdm_adapter_path, &cdm_path, &cdm_version, &cdm_codecs,
|
||||
&supports_persistent_license, &error_message);
|
||||
cef_cdm_registration_error_t result =
|
||||
LoadWidevineCdmInfo(base_path, &cdm_path, &cdm_version, &cdm_codecs,
|
||||
&supports_persistent_license, &error_message);
|
||||
if (result != CEF_CDM_REGISTRATION_ERROR_NONE) {
|
||||
CEF_POST_TASK(CEF_UIT, base::Bind(DeliverWidevineCdmCallback, result,
|
||||
error_message, callback));
|
||||
@ -340,9 +305,8 @@ void LoadWidevineCdmInfoOnBlockingThread(
|
||||
|
||||
// Continue execution on the UI thread.
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::Bind(RegisterWidevineCdmOnUIThread, cdm_adapter_path,
|
||||
cdm_path, cdm_version, cdm_codecs,
|
||||
supports_persistent_license, callback));
|
||||
base::Bind(RegisterWidevineCdmOnUIThread, cdm_path, cdm_version,
|
||||
cdm_codecs, supports_persistent_license, callback));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@ -379,8 +343,9 @@ void CefWidevineLoader::OnContextInitialized() {
|
||||
#if defined(OS_LINUX)
|
||||
|
||||
// static
|
||||
void CefWidevineLoader::AddPepperPlugins(
|
||||
std::vector<content::PepperPluginInfo>* plugins) {
|
||||
void CefWidevineLoader::AddContentDecryptionModules(
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
|
||||
const base::CommandLine& command_line =
|
||||
*base::CommandLine::ForCurrentProcess();
|
||||
|
||||
@ -409,18 +374,16 @@ void CefWidevineLoader::AddPepperPlugins(
|
||||
std::string cdm_codecs;
|
||||
bool supports_persistent_license;
|
||||
std::string error_message;
|
||||
cef_cdm_registration_error_t result = LoadWidevineCdmInfo(
|
||||
base_path, &cdm_adapter_path, &cdm_path, &cdm_version, &cdm_codecs,
|
||||
&supports_persistent_license, &error_message);
|
||||
cef_cdm_registration_error_t result =
|
||||
LoadWidevineCdmInfo(base_path, &cdm_path, &cdm_version, &cdm_codecs,
|
||||
&supports_persistent_license, &error_message);
|
||||
if (result != CEF_CDM_REGISTRATION_ERROR_NONE) {
|
||||
LOG(ERROR) << "Widevine CDM registration failed; " << error_message;
|
||||
return;
|
||||
}
|
||||
|
||||
content::PepperPluginInfo widevine_cdm;
|
||||
GetPluginInfo(cdm_adapter_path, cdm_path, cdm_version, cdm_codecs,
|
||||
supports_persistent_license, &widevine_cdm);
|
||||
plugins->push_back(widevine_cdm);
|
||||
cdms->push_back(MakeCdmInfo(cdm_path, cdm_version, cdm_codecs,
|
||||
supports_persistent_license));
|
||||
}
|
||||
|
||||
#endif // defined(OS_LINUX)
|
||||
|
@ -19,7 +19,11 @@
|
||||
#include "base/lazy_instance.h"
|
||||
|
||||
namespace content {
|
||||
struct PepperPluginInfo;
|
||||
struct CdmInfo;
|
||||
}
|
||||
|
||||
namespace media {
|
||||
struct CdmHostFilePath;
|
||||
}
|
||||
|
||||
class CefWidevineLoader {
|
||||
@ -38,10 +42,12 @@ class CefWidevineLoader {
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
// The zygote process which is used when the sandbox is enabled on Linux
|
||||
// requires early loading of pepper plugins. Other processes will receive
|
||||
// requires early loading of CDM modules. Other processes will receive
|
||||
// load notification in the usual way.
|
||||
// Called from CefContentClient::AddPepperPlugins.
|
||||
static void AddPepperPlugins(std::vector<content::PepperPluginInfo>* plugins);
|
||||
// Called from CefContentClient::AddContentDecryptionModules.
|
||||
static void AddContentDecryptionModules(
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths);
|
||||
|
||||
const base::FilePath& path() { return path_; }
|
||||
#endif
|
||||
|
@ -3,38 +3,39 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLResponse.h"
|
||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||
#include "third_party/WebKit/public/web/WebElement.h"
|
||||
#include "third_party/WebKit/public/web/WebNode.h"
|
||||
#include "third_party/WebKit/public/web/WebViewClient.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url_response.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
#include "third_party/blink/public/web/web_node.h"
|
||||
#include "third_party/blink/public/web/web_view_client.h"
|
||||
|
||||
#include "third_party/WebKit/Source/bindings/core/v8/ScriptController.h"
|
||||
#include "third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.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/exported/WebViewImpl.h"
|
||||
#include "third_party/WebKit/Source/core/frame/LocalFrame.h"
|
||||
#include "third_party/WebKit/Source/core/frame/Settings.h"
|
||||
#include "third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h"
|
||||
#include "third_party/WebKit/Source/platform/bindings/ScriptForbiddenScope.h"
|
||||
#include "third_party/WebKit/Source/platform/bindings/V8Binding.h"
|
||||
#include "third_party/WebKit/Source/platform/loader/fetch/ResourceResponse.h"
|
||||
#include "third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/script_source_code.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
|
||||
#include "third_party/blink/renderer/core/dom/document.h"
|
||||
#include "third_party/blink/renderer/core/dom/element.h"
|
||||
#include "third_party/blink/renderer/core/dom/node.h"
|
||||
#include "third_party/blink/renderer/core/editing/serializers/serialization.h"
|
||||
#include "third_party/blink/renderer/core/exported/web_view_impl.h"
|
||||
#include "third_party/blink/renderer/core/frame/local_frame.h"
|
||||
#include "third_party/blink/renderer/core/frame/settings.h"
|
||||
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
|
||||
#include "third_party/blink/renderer/platform/bindings/script_forbidden_scope.h"
|
||||
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
|
||||
#include "third_party/blink/renderer/platform/loader/fetch/resource_response.h"
|
||||
#include "third_party/blink/renderer/platform/weborigin/scheme_registry.h"
|
||||
MSVC_POP_WARNING();
|
||||
#undef LOG
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
namespace webkit_glue {
|
||||
namespace blink_glue {
|
||||
|
||||
const int64_t kInvalidFrameId = -1;
|
||||
|
||||
@ -229,4 +230,4 @@ bool ResponseWasCached(const blink::WebURLResponse& response) {
|
||||
return response.ToResourceResponse().WasCached();
|
||||
}
|
||||
|
||||
} // namespace webkit_glue
|
||||
} // namespace blink_glue
|
@ -3,8 +3,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
||||
#define CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
||||
#ifndef CEF_LIBCEF_RENDERER_BLINK_GLUE_H_
|
||||
#define CEF_LIBCEF_RENDERER_BLINK_GLUE_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@ -13,8 +13,8 @@
|
||||
|
||||
#include "include/internal/cef_types.h"
|
||||
|
||||
#include "third_party/WebKit/Source/platform/loader/fetch/AccessControlStatus.h"
|
||||
#include "third_party/WebKit/public/platform/WebCommon.h"
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/renderer/platform/loader/fetch/access_control_status.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
namespace blink {
|
||||
@ -26,7 +26,7 @@ class WebURLResponse;
|
||||
class WebView;
|
||||
} // namespace blink
|
||||
|
||||
namespace webkit_glue {
|
||||
namespace blink_glue {
|
||||
|
||||
BLINK_EXPORT extern const int64_t kInvalidFrameId;
|
||||
|
||||
@ -84,6 +84,6 @@ class BLINK_EXPORT CefScriptForbiddenScope final {
|
||||
|
||||
BLINK_EXPORT bool ResponseWasCached(const blink::WebURLResponse& response);
|
||||
|
||||
} // namespace webkit_glue
|
||||
} // namespace blink_glue
|
||||
|
||||
#endif // CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
||||
#endif // CEF_LIBCEF_RENDERER_BLINK_GLUE_H_
|
@ -13,11 +13,11 @@
|
||||
#include "libcef/common/process_message_impl.h"
|
||||
#include "libcef/common/request_impl.h"
|
||||
#include "libcef/common/response_manager.h"
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
#include "libcef/renderer/content_renderer_client.h"
|
||||
#include "libcef/renderer/dom_document_impl.h"
|
||||
#include "libcef/renderer/render_frame_util.h"
|
||||
#include "libcef/renderer/thread_util.h"
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@ -26,18 +26,18 @@
|
||||
#include "content/public/renderer/navigation_state.h"
|
||||
#include "content/public/renderer/render_view.h"
|
||||
#include "content/renderer/navigation_state_impl.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLError.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLResponse.h"
|
||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||
#include "third_party/WebKit/public/web/WebFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebFrameContentDumper.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebNode.h"
|
||||
#include "third_party/WebKit/public/web/WebScriptSource.h"
|
||||
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
|
||||
#include "third_party/WebKit/public/web/WebView.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/platform/web_url_error.h"
|
||||
#include "third_party/blink/public/platform/web_url_response.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_frame.h"
|
||||
#include "third_party/blink/public/web/web_frame_content_dumper.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/public/web/web_node.h"
|
||||
#include "third_party/blink/public/web/web_script_source.h"
|
||||
#include "third_party/blink/public/web/web_security_policy.h"
|
||||
#include "third_party/blink/public/web/web_view.h"
|
||||
|
||||
using blink::WebFrame;
|
||||
using blink::WebLocalFrame;
|
||||
@ -72,25 +72,25 @@ CefRefPtr<CefBrowserHost> CefBrowserImpl::GetHost() {
|
||||
bool CefBrowserImpl::CanGoBack() {
|
||||
CEF_REQUIRE_RT_RETURN(false);
|
||||
|
||||
return webkit_glue::CanGoBack(render_view()->GetWebView());
|
||||
return blink_glue::CanGoBack(render_view()->GetWebView());
|
||||
}
|
||||
|
||||
void CefBrowserImpl::GoBack() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
|
||||
webkit_glue::GoBack(render_view()->GetWebView());
|
||||
blink_glue::GoBack(render_view()->GetWebView());
|
||||
}
|
||||
|
||||
bool CefBrowserImpl::CanGoForward() {
|
||||
CEF_REQUIRE_RT_RETURN(false);
|
||||
|
||||
return webkit_glue::CanGoForward(render_view()->GetWebView());
|
||||
return blink_glue::CanGoForward(render_view()->GetWebView());
|
||||
}
|
||||
|
||||
void CefBrowserImpl::GoForward() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
|
||||
webkit_glue::GoForward(render_view()->GetWebView());
|
||||
blink_glue::GoForward(render_view()->GetWebView());
|
||||
}
|
||||
|
||||
bool CefBrowserImpl::IsLoading() {
|
||||
@ -349,11 +349,11 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
||||
frames_.insert(std::make_pair(frame_id, framePtr));
|
||||
|
||||
const int64_t parent_id = frame->Parent() == NULL
|
||||
? webkit_glue::kInvalidFrameId
|
||||
? blink_glue::kInvalidFrameId
|
||||
: frame->Parent()->IsWebLocalFrame()
|
||||
? render_frame_util::GetIdentifier(
|
||||
frame->Parent()->ToWebLocalFrame())
|
||||
: webkit_glue::kInvalidFrameId;
|
||||
: blink_glue::kInvalidFrameId;
|
||||
const base::string16& name =
|
||||
base::UTF8ToUTF16(render_frame_util::GetName(frame));
|
||||
|
||||
@ -364,7 +364,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
||||
}
|
||||
|
||||
CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(int64_t frame_id) {
|
||||
if (frame_id == webkit_glue::kInvalidFrameId) {
|
||||
if (frame_id == blink_glue::kInvalidFrameId) {
|
||||
if (render_view()->GetWebView()) {
|
||||
WebFrame* main_frame = render_view()->GetWebView()->MainFrame();
|
||||
if (main_frame && main_frame->IsWebLocalFrame()) {
|
||||
@ -607,7 +607,7 @@ void CefBrowserImpl::OnRequest(const Cef_Request_Params& params) {
|
||||
blink::WebFrameContentDumper::DumpAsMarkup(web_frame).Utf8();
|
||||
success = true;
|
||||
} else if (base::LowerCaseEqualsASCII(command, "gettext")) {
|
||||
response = webkit_glue::DumpDocumentText(web_frame);
|
||||
response = blink_glue::DumpDocumentText(web_frame);
|
||||
success = true;
|
||||
} else if (web_frame->ExecuteCommand(
|
||||
blink::WebString::FromUTF8(command))) {
|
||||
@ -667,8 +667,8 @@ void CefBrowserImpl::OnLoadingStateChange(bool isLoading) {
|
||||
CefRefPtr<CefLoadHandler> load_handler = handler->GetLoadHandler();
|
||||
if (load_handler.get()) {
|
||||
WebView* web_view = render_view()->GetWebView();
|
||||
const bool canGoBack = webkit_glue::CanGoBack(web_view);
|
||||
const bool canGoForward = webkit_glue::CanGoForward(web_view);
|
||||
const bool canGoBack = blink_glue::CanGoBack(web_view);
|
||||
const bool canGoForward = blink_glue::CanGoForward(web_view);
|
||||
|
||||
load_handler->OnLoadingStateChange(this, isLoading, canGoBack,
|
||||
canGoForward);
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "libcef/common/extensions/extensions_util.h"
|
||||
#include "libcef/common/request_impl.h"
|
||||
#include "libcef/common/values_impl.h"
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
#include "libcef/renderer/browser_impl.h"
|
||||
#include "libcef/renderer/extensions/extensions_renderer_client.h"
|
||||
#include "libcef/renderer/extensions/print_render_frame_helper_delegate.h"
|
||||
@ -31,7 +32,6 @@
|
||||
#include "libcef/renderer/render_thread_observer.h"
|
||||
#include "libcef/renderer/thread_util.h"
|
||||
#include "libcef/renderer/v8_impl.h"
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/macros.h"
|
||||
@ -78,21 +78,21 @@
|
||||
#include "services/service_manager/public/cpp/connector.h"
|
||||
#include "services/service_manager/public/cpp/interface_provider.h"
|
||||
#include "services/service_manager/public/cpp/service_context.h"
|
||||
#include "third_party/WebKit/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/WebKit/public/platform/Platform.h"
|
||||
#include "third_party/WebKit/public/platform/URLConversion.h"
|
||||
#include "third_party/WebKit/public/platform/WebPrerenderingSupport.h"
|
||||
#include "third_party/WebKit/public/platform/WebRuntimeFeatures.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/public/platform/scheduler/renderer_process_type.h"
|
||||
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
|
||||
#include "third_party/WebKit/public/web/WebElement.h"
|
||||
#include "third_party/WebKit/public/web/WebFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebPrerendererClient.h"
|
||||
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
|
||||
#include "third_party/WebKit/public/web/WebView.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/blink/public/platform/platform.h"
|
||||
#include "third_party/blink/public/platform/scheduler/renderer_process_type.h"
|
||||
#include "third_party/blink/public/platform/url_conversion.h"
|
||||
#include "third_party/blink/public/platform/web_prerendering_support.h"
|
||||
#include "third_party/blink/public/platform/web_runtime_features.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/web/web_console_message.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
#include "third_party/blink/public/web/web_frame.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/public/web/web_prerenderer_client.h"
|
||||
#include "third_party/blink/public/web/web_security_policy.h"
|
||||
#include "third_party/blink/public/web/web_view.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
@ -258,11 +258,11 @@ void CefContentRendererClient::WebKitInitialized() {
|
||||
const blink::WebString& scheme =
|
||||
blink::WebString::FromUTF8(info.scheme_name);
|
||||
if (info.is_local)
|
||||
webkit_glue::RegisterURLSchemeAsLocal(scheme);
|
||||
blink_glue::RegisterURLSchemeAsLocal(scheme);
|
||||
if (info.is_display_isolated)
|
||||
blink::WebSecurityPolicy::RegisterURLSchemeAsDisplayIsolated(scheme);
|
||||
if (info.is_secure)
|
||||
webkit_glue::RegisterURLSchemeAsSecure(scheme);
|
||||
blink_glue::RegisterURLSchemeAsSecure(scheme);
|
||||
}
|
||||
}
|
||||
|
||||
@ -511,17 +511,20 @@ bool CefContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CefContentRendererClient::WillSendRequest(
|
||||
void CefContentRendererClient::WillSendRequest(
|
||||
blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
const blink::WebURL& url,
|
||||
GURL* new_url) {
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies) {
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
return extensions_renderer_client_->WillSendRequest(frame, transition_type,
|
||||
url, new_url);
|
||||
extensions_renderer_client_->WillSendRequest(frame, transition_type, url,
|
||||
initiator_origin, new_url,
|
||||
attach_same_site_cookies);
|
||||
if (!new_url->is_empty())
|
||||
return;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned long long CefContentRendererClient::VisitedLinkHash(
|
||||
@ -535,14 +538,21 @@ bool CefContentRendererClient::IsLinkVisited(unsigned long long link_hash) {
|
||||
return observer_->visited_link_slave()->IsVisited(link_hash);
|
||||
}
|
||||
|
||||
bool CefContentRendererClient::IsOriginIsolatedPepperPlugin(
|
||||
const base::FilePath& plugin_path) {
|
||||
return plugin_path ==
|
||||
base::FilePath::FromUTF8Unsafe(CefContentClient::kPDFPluginPath);
|
||||
}
|
||||
|
||||
content::BrowserPluginDelegate*
|
||||
CefContentRendererClient::CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) {
|
||||
DCHECK(extensions::ExtensionsEnabled());
|
||||
return extensions::CefExtensionsRendererClient::CreateBrowserPluginDelegate(
|
||||
render_frame, mime_type, original_url);
|
||||
render_frame, info, mime_type, original_url);
|
||||
}
|
||||
|
||||
void CefContentRendererClient::AddSupportedKeySystems(
|
||||
|
@ -114,15 +114,19 @@ class CefContentRendererClient : public content::ContentRendererClient,
|
||||
bool is_initial_navigation,
|
||||
bool is_server_redirect,
|
||||
bool* send_referrer) override;
|
||||
bool WillSendRequest(blink::WebLocalFrame* frame,
|
||||
void WillSendRequest(blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
const blink::WebURL& url,
|
||||
GURL* new_url) override;
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies) override;
|
||||
unsigned long long VisitedLinkHash(const char* canonical_url,
|
||||
size_t length) override;
|
||||
bool IsLinkVisited(unsigned long long link_hash) override;
|
||||
bool IsOriginIsolatedPepperPlugin(const base::FilePath& plugin_path) override;
|
||||
content::BrowserPluginDelegate* CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) override;
|
||||
void AddSupportedKeySystems(
|
||||
|
@ -7,13 +7,13 @@
|
||||
#include "libcef/renderer/thread_util.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||
#include "third_party/WebKit/public/web/WebElement.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebNode.h"
|
||||
#include "third_party/WebKit/public/web/WebRange.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/public/web/web_node.h"
|
||||
#include "third_party/blink/public/web/web_range.h"
|
||||
|
||||
using blink::WebDocument;
|
||||
using blink::WebElement;
|
||||
|
@ -5,22 +5,22 @@
|
||||
#include "libcef/renderer/dom_node_impl.h"
|
||||
|
||||
#include "libcef/common/tracker.h"
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
#include "libcef/renderer/browser_impl.h"
|
||||
#include "libcef/renderer/dom_document_impl.h"
|
||||
#include "libcef/renderer/thread_util.h"
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/web/WebDOMEvent.h"
|
||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||
#include "third_party/WebKit/public/web/WebElement.h"
|
||||
#include "third_party/WebKit/public/web/WebFormControlElement.h"
|
||||
#include "third_party/WebKit/public/web/WebInputElement.h"
|
||||
#include "third_party/WebKit/public/web/WebNode.h"
|
||||
#include "third_party/WebKit/public/web/WebSelectElement.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_dom_event.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
#include "third_party/blink/public/web/web_form_control_element.h"
|
||||
#include "third_party/blink/public/web/web_input_element.h"
|
||||
#include "third_party/blink/public/web/web_node.h"
|
||||
#include "third_party/blink/public/web/web_select_element.h"
|
||||
|
||||
using blink::WebDocument;
|
||||
using blink::WebDOMEvent;
|
||||
@ -48,7 +48,7 @@ CefDOMNodeImpl::Type CefDOMNodeImpl::GetType() {
|
||||
if (!VerifyContext())
|
||||
return DOM_NODE_TYPE_UNSUPPORTED;
|
||||
|
||||
return webkit_glue::GetNodeType(node_);
|
||||
return blink_glue::GetNodeType(node_);
|
||||
}
|
||||
|
||||
bool CefDOMNodeImpl::IsText() {
|
||||
@ -75,7 +75,7 @@ bool CefDOMNodeImpl::IsEditable() {
|
||||
|
||||
if (node_.IsElementNode()) {
|
||||
const WebElement& element = node_.ToConst<WebElement>();
|
||||
if (webkit_glue::IsTextControlElement(element))
|
||||
if (blink_glue::IsTextControlElement(element))
|
||||
return true;
|
||||
|
||||
// Also return true if it has an ARIA role of 'textbox'.
|
||||
@ -143,7 +143,7 @@ CefString CefDOMNodeImpl::GetName() {
|
||||
if (!VerifyContext())
|
||||
return str;
|
||||
|
||||
const WebString& name = webkit_glue::GetNodeName(node_);
|
||||
const WebString& name = blink_glue::GetNodeName(node_);
|
||||
if (!name.IsNull())
|
||||
str = name.Utf16();
|
||||
|
||||
@ -196,8 +196,8 @@ bool CefDOMNodeImpl::SetValue(const CefString& value) {
|
||||
if (node_.IsElementNode())
|
||||
return false;
|
||||
|
||||
return webkit_glue::SetNodeValue(node_,
|
||||
WebString::FromUTF16(value.ToString16()));
|
||||
return blink_glue::SetNodeValue(node_,
|
||||
WebString::FromUTF16(value.ToString16()));
|
||||
}
|
||||
|
||||
CefString CefDOMNodeImpl::GetAsMarkup() {
|
||||
@ -205,7 +205,7 @@ CefString CefDOMNodeImpl::GetAsMarkup() {
|
||||
if (!VerifyContext())
|
||||
return str;
|
||||
|
||||
const WebString& markup = webkit_glue::CreateNodeMarkup(node_);
|
||||
const WebString& markup = blink_glue::CreateNodeMarkup(node_);
|
||||
if (!markup.IsNull())
|
||||
str = markup.Utf16();
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_dom.h"
|
||||
#include "third_party/WebKit/public/web/WebNode.h"
|
||||
#include "third_party/blink/public/web/web_node.h"
|
||||
|
||||
class CefDOMDocumentImpl;
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "content/public/renderer/render_frame.h"
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/common/permissions/permissions_data.h"
|
||||
#include "extensions/common/switches.h"
|
||||
#include "extensions/renderer/dispatcher.h"
|
||||
#include "extensions/renderer/extension_frame_helper.h"
|
||||
@ -26,9 +27,9 @@
|
||||
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h"
|
||||
#include "extensions/renderer/renderer_extension_registry.h"
|
||||
#include "extensions/renderer/script_context.h"
|
||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebPluginParams.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/public/web/web_plugin_params.h"
|
||||
|
||||
namespace extensions {
|
||||
|
||||
@ -162,21 +163,42 @@ bool CefExtensionsRendererClient::OverrideCreatePlugin(
|
||||
return !guest_view_api_available;
|
||||
}
|
||||
|
||||
bool CefExtensionsRendererClient::WillSendRequest(
|
||||
void CefExtensionsRendererClient::WillSendRequest(
|
||||
blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
const blink::WebURL& url,
|
||||
GURL* new_url) {
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies) {
|
||||
if (initiator_origin &&
|
||||
initiator_origin->scheme() == extensions::kExtensionScheme) {
|
||||
const extensions::RendererExtensionRegistry* extension_registry =
|
||||
extensions::RendererExtensionRegistry::Get();
|
||||
const Extension* extension =
|
||||
extension_registry->GetByID(initiator_origin->host());
|
||||
if (extension) {
|
||||
int tab_id = extensions::ExtensionFrameHelper::Get(
|
||||
content::RenderFrame::FromWebFrame(frame))
|
||||
->tab_id();
|
||||
GURL request_url(url);
|
||||
if (extension->permissions_data()->GetPageAccess(extension, request_url,
|
||||
tab_id, nullptr) ==
|
||||
extensions::PermissionsData::ACCESS_ALLOWED ||
|
||||
extension->permissions_data()->GetContentScriptAccess(
|
||||
extension, request_url, tab_id, nullptr) ==
|
||||
extensions::PermissionsData::ACCESS_ALLOWED) {
|
||||
*attach_same_site_cookies = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check whether the request should be allowed. If not allowed, we reset the
|
||||
// URL to something invalid to prevent the request and cause an error.
|
||||
if (url.ProtocolIs(extensions::kExtensionScheme) &&
|
||||
!resource_request_policy_->CanRequestResource(GURL(url), frame,
|
||||
transition_type)) {
|
||||
*new_url = GURL(chrome::kExtensionInvalidRequestURL);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefExtensionsRendererClient::RunScriptsAtDocumentStart(
|
||||
@ -250,11 +272,12 @@ bool CefExtensionsRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
||||
content::BrowserPluginDelegate*
|
||||
CefExtensionsRendererClient::CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url) {
|
||||
if (mime_type == content::kBrowserPluginMimeType)
|
||||
return new extensions::ExtensionsGuestViewContainer(render_frame);
|
||||
return new extensions::MimeHandlerViewContainer(render_frame, mime_type,
|
||||
return new extensions::MimeHandlerViewContainer(render_frame, info, mime_type,
|
||||
original_url);
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,13 @@ class WebURL;
|
||||
namespace content {
|
||||
class BrowserPluginDelegate;
|
||||
class RenderFrame;
|
||||
struct WebPluginInfo;
|
||||
} // namespace content
|
||||
|
||||
namespace url {
|
||||
class Origin;
|
||||
}
|
||||
|
||||
namespace extensions {
|
||||
|
||||
class Dispatcher;
|
||||
@ -53,10 +58,12 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient {
|
||||
service_manager::BinderRegistry* registry);
|
||||
bool OverrideCreatePlugin(content::RenderFrame* render_frame,
|
||||
const blink::WebPluginParams& params);
|
||||
bool WillSendRequest(blink::WebLocalFrame* frame,
|
||||
void WillSendRequest(blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
const blink::WebURL& url,
|
||||
GURL* new_url);
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies);
|
||||
void RunScriptsAtDocumentStart(content::RenderFrame* render_frame);
|
||||
void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame);
|
||||
void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame);
|
||||
@ -69,6 +76,7 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient {
|
||||
bool* send_referrer);
|
||||
static content::BrowserPluginDelegate* CreateBrowserPluginDelegate(
|
||||
content::RenderFrame* render_frame,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& mime_type,
|
||||
const GURL& original_url);
|
||||
|
||||
|
@ -12,9 +12,9 @@
|
||||
#include "content/public/renderer/render_view.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h"
|
||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||
#include "third_party/WebKit/public/web/WebElement.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
|
||||
namespace extensions {
|
||||
|
||||
|
@ -15,22 +15,22 @@
|
||||
#include "libcef/common/cef_messages.h"
|
||||
#include "libcef/common/net/http_header_utils.h"
|
||||
#include "libcef/common/request_impl.h"
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
#include "libcef/renderer/browser_impl.h"
|
||||
#include "libcef/renderer/dom_document_impl.h"
|
||||
#include "libcef/renderer/render_frame_util.h"
|
||||
#include "libcef/renderer/thread_util.h"
|
||||
#include "libcef/renderer/v8_impl.h"
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
|
||||
#include "third_party/WebKit/public/platform/WebData.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||
#include "third_party/WebKit/public/web/WebFrameContentDumper.h"
|
||||
#include "third_party/WebKit/public/web/WebKit.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebScriptSource.h"
|
||||
#include "third_party/WebKit/public/web/WebView.h"
|
||||
#include "third_party/blink/public/platform/web_data.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/web/blink.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_frame_content_dumper.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/public/web/web_script_source.h"
|
||||
#include "third_party/blink/public/web/web_view.h"
|
||||
|
||||
using blink::WebString;
|
||||
|
||||
@ -92,7 +92,7 @@ void CefFrameImpl::GetText(CefRefPtr<CefStringVisitor> visitor) {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
|
||||
if (frame_) {
|
||||
const CefString& content = webkit_glue::DumpDocumentText(frame_);
|
||||
const CefString& content = blink_glue::DumpDocumentText(frame_);
|
||||
visitor->Visit(content);
|
||||
}
|
||||
}
|
||||
|
@ -14,13 +14,13 @@
|
||||
|
||||
#include "libcef/common/cef_messages.h"
|
||||
#include "libcef/common/content_client.h"
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
#include "libcef/renderer/content_renderer_client.h"
|
||||
#include "libcef/renderer/v8_impl.h"
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
|
||||
#include "content/public/renderer/render_frame.h"
|
||||
#include "third_party/WebKit/public/web/WebKit.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/blink/public/web/blink.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
|
||||
CefRenderFrameObserver::CefRenderFrameObserver(
|
||||
content::RenderFrame* render_frame)
|
||||
@ -138,7 +138,7 @@ void CefRenderFrameObserver::WillReleaseScriptContext(
|
||||
// The released context should not be used for script execution.
|
||||
// Depending on how the context is released this may or may not already
|
||||
// be set.
|
||||
webkit_glue::CefScriptForbiddenScope forbidScript;
|
||||
blink_glue::CefScriptForbiddenScope forbidScript;
|
||||
|
||||
CefRefPtr<CefV8Context> contextPtr(
|
||||
new CefV8ContextImpl(isolate, context));
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
#include "libcef/renderer/render_frame_util.h"
|
||||
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "content/renderer/render_frame_impl.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
|
||||
namespace render_frame_util {
|
||||
|
||||
@ -21,7 +21,7 @@ int64_t GetIdentifier(blink::WebLocalFrame* frame) {
|
||||
DCHECK(render_frame);
|
||||
if (render_frame)
|
||||
return render_frame->GetRoutingID();
|
||||
return webkit_glue::kInvalidFrameId;
|
||||
return blink_glue::kInvalidFrameId;
|
||||
}
|
||||
|
||||
std::string GetName(blink::WebLocalFrame* frame) {
|
||||
|
@ -12,8 +12,8 @@
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "chrome/common/render_messages.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/web/web_security_policy.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/url_util.h"
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
#include "net/base/net_module.h"
|
||||
#include "services/service_manager/public/cpp/binder_registry.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/web/web_security_policy.h"
|
||||
|
||||
bool CefRenderThreadObserver::is_incognito_process_ = false;
|
||||
|
||||
|
@ -9,19 +9,19 @@
|
||||
#include "libcef/common/request_impl.h"
|
||||
#include "libcef/common/response_impl.h"
|
||||
#include "libcef/common/task_runner_impl.h"
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
#include "libcef/renderer/content_renderer_client.h"
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLError.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLLoader.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLLoaderFactory.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLRequest.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLResponse.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
#include "third_party/blink/public/platform/web_url_error.h"
|
||||
#include "third_party/blink/public/platform/web_url_loader.h"
|
||||
#include "third_party/blink/public/platform/web_url_loader_client.h"
|
||||
#include "third_party/blink/public/platform/web_url_loader_factory.h"
|
||||
#include "third_party/blink/public/platform/web_url_request.h"
|
||||
#include "third_party/blink/public/platform/web_url_response.h"
|
||||
|
||||
using blink::WebReferrerPolicy;
|
||||
using blink::WebString;
|
||||
@ -139,7 +139,7 @@ class CefRenderURLRequest::Context
|
||||
const WebURLResponse& response) {
|
||||
DCHECK(CalledOnValidThread());
|
||||
|
||||
response_was_cached_ = webkit_glue::ResponseWasCached(response);
|
||||
response_was_cached_ = blink_glue::ResponseWasCached(response);
|
||||
response_ = CefResponse::Create();
|
||||
CefResponseImpl* responseImpl =
|
||||
static_cast<CefResponseImpl*>(response_.get());
|
||||
@ -160,7 +160,7 @@ class CefRenderURLRequest::Context
|
||||
void OnResponse(const WebURLResponse& response) {
|
||||
DCHECK(CalledOnValidThread());
|
||||
|
||||
response_was_cached_ = webkit_glue::ResponseWasCached(response);
|
||||
response_was_cached_ = blink_glue::ResponseWasCached(response);
|
||||
response_ = CefResponse::Create();
|
||||
CefResponseImpl* responseImpl =
|
||||
static_cast<CefResponseImpl*>(response_.get());
|
||||
|
@ -24,18 +24,18 @@
|
||||
#include "libcef/common/content_client.h"
|
||||
#include "libcef/common/task_runner_impl.h"
|
||||
#include "libcef/common/tracker.h"
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
#include "libcef/renderer/browser_impl.h"
|
||||
#include "libcef/renderer/render_frame_util.h"
|
||||
#include "libcef/renderer/thread_util.h"
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/threading/thread_local.h"
|
||||
#include "third_party/WebKit/public/web/WebFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebKit.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/blink/public/web/blink.h"
|
||||
#include "third_party/blink/public/web/web_frame.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
namespace {
|
||||
@ -625,9 +625,9 @@ void AccessorNameSetterCallbackImpl(
|
||||
}
|
||||
|
||||
// Two helper functions for V8 Interceptor callbacks.
|
||||
CefString PropertyToIndex(v8::Local<v8::String> str) {
|
||||
CefString PropertyToIndex(v8::Local<v8::Name> property) {
|
||||
CefString name;
|
||||
GetCefString(str, name);
|
||||
GetCefString(property.As<v8::String>(), name);
|
||||
return name;
|
||||
}
|
||||
|
||||
@ -636,7 +636,7 @@ int PropertyToIndex(uint32_t index) {
|
||||
}
|
||||
|
||||
// V8 Interceptor callbacks.
|
||||
// T == v8::Local<v8::String> for named property handlers and
|
||||
// T == v8::Local<v8::Name> for named property handlers and
|
||||
// T == uint32_t for indexed property handlers
|
||||
template <typename T>
|
||||
void InterceptorGetterCallbackImpl(
|
||||
@ -994,7 +994,7 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() {
|
||||
CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
|
||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(NULL);
|
||||
|
||||
if (webkit_glue::IsScriptForbidden())
|
||||
if (blink_glue::IsScriptForbidden())
|
||||
return nullptr;
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
@ -1007,7 +1007,7 @@ CefRefPtr<CefV8Value> CefV8ContextImpl::GetGlobal() {
|
||||
bool CefV8ContextImpl::Enter() {
|
||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
|
||||
|
||||
if (webkit_glue::IsScriptForbidden())
|
||||
if (blink_glue::IsScriptForbidden())
|
||||
return false;
|
||||
|
||||
v8::Isolate* isolate = handle_->isolate();
|
||||
@ -1028,7 +1028,7 @@ bool CefV8ContextImpl::Enter() {
|
||||
bool CefV8ContextImpl::Exit() {
|
||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
|
||||
|
||||
if (webkit_glue::IsScriptForbidden())
|
||||
if (blink_glue::IsScriptForbidden())
|
||||
return false;
|
||||
|
||||
if (enter_count_ <= 0) {
|
||||
@ -1070,7 +1070,7 @@ bool CefV8ContextImpl::Eval(const CefString& code,
|
||||
|
||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(false);
|
||||
|
||||
if (webkit_glue::IsScriptForbidden())
|
||||
if (blink_glue::IsScriptForbidden())
|
||||
return false;
|
||||
|
||||
if (code.empty()) {
|
||||
@ -1091,10 +1091,9 @@ bool CefV8ContextImpl::Eval(const CefString& code,
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
|
||||
v8::MaybeLocal<v8::Value> func_rv =
|
||||
webkit_glue::ExecuteV8ScriptAndReturnValue(
|
||||
source, source_url, start_line, context, isolate, try_catch,
|
||||
blink::AccessControlStatus::kNotSharableCrossOrigin);
|
||||
v8::MaybeLocal<v8::Value> func_rv = blink_glue::ExecuteV8ScriptAndReturnValue(
|
||||
source, source_url, start_line, context, isolate, try_catch,
|
||||
blink::AccessControlStatus::kNotSharableCrossOrigin);
|
||||
|
||||
if (try_catch.HasCaught()) {
|
||||
exception = new CefV8ExceptionImpl(context, try_catch.Message());
|
||||
@ -1115,7 +1114,7 @@ v8::Local<v8::Context> CefV8ContextImpl::GetV8Context() {
|
||||
blink::WebLocalFrame* CefV8ContextImpl::GetWebFrame() {
|
||||
CEF_REQUIRE_RT();
|
||||
|
||||
if (webkit_glue::IsScriptForbidden())
|
||||
if (blink_glue::IsScriptForbidden())
|
||||
return nullptr;
|
||||
|
||||
v8::HandleScope handle_scope(handle_->isolate());
|
||||
@ -1325,9 +1324,11 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
|
||||
v8::Local<v8::Object> obj;
|
||||
if (interceptor.get()) {
|
||||
v8::Local<v8::ObjectTemplate> tmpl = v8::ObjectTemplate::New(isolate);
|
||||
tmpl->SetNamedPropertyHandler(
|
||||
InterceptorGetterCallbackImpl<v8::Local<v8::String>>,
|
||||
InterceptorSetterCallbackImpl<v8::Local<v8::String>>);
|
||||
tmpl->SetHandler(v8::NamedPropertyHandlerConfiguration(
|
||||
InterceptorGetterCallbackImpl<v8::Local<v8::Name>>,
|
||||
InterceptorSetterCallbackImpl<v8::Local<v8::Name>>, nullptr, nullptr,
|
||||
nullptr, v8::Local<v8::Value>(),
|
||||
v8::PropertyHandlerFlags::kOnlyInterceptStrings));
|
||||
|
||||
tmpl->SetIndexedPropertyHandler(InterceptorGetterCallbackImpl<uint32_t>,
|
||||
InterceptorSetterCallbackImpl<uint32_t>);
|
||||
@ -2374,7 +2375,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
|
||||
v8::MaybeLocal<v8::Value> func_rv = webkit_glue::CallV8Function(
|
||||
v8::MaybeLocal<v8::Value> func_rv = blink_glue::CallV8Function(
|
||||
context_local, func, recv, argc, argv, handle_->isolate());
|
||||
|
||||
if (!HasCaught(context_local, try_catch) && !func_rv.IsEmpty()) {
|
||||
|
@ -328,6 +328,8 @@ patches = [
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2256
|
||||
#
|
||||
# Linux: Fix GTK2 compile errors.
|
||||
#
|
||||
# Linux: Fix "undefined symbol: ErrHandler" runtime error.
|
||||
'name': 'linux_build',
|
||||
},
|
||||
{
|
||||
@ -336,6 +338,8 @@ patches = [
|
||||
# WebContents.
|
||||
# (b) Always create ProcessManager using CEF's BrowserContextImpl.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/1947
|
||||
#
|
||||
# Don't initialize PrerenderContents object in StreamsPrivateAPI.
|
||||
'name': 'extensions_1947',
|
||||
},
|
||||
{
|
||||
@ -358,9 +362,4 @@ patches = [
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2398
|
||||
'name': 'mac_gpu_2398',
|
||||
},
|
||||
{
|
||||
# Windows: Resolve conflict between base::StrCat and Win32 StrCat.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=817738
|
||||
'name': 'win_strcat_817738',
|
||||
},
|
||||
]
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
index dad7599ed999..c8daf2ba58c8 100644
|
||||
index 091f34477c01..44002b362be7 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
@@ -52,11 +52,13 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
|
||||
@@ -55,11 +55,13 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
|
||||
|
||||
// These will not return nullptr until Destroy is called.
|
||||
DelegatedFrameHost* GetDelegatedFrameHost();
|
||||
@ -17,10 +17,10 @@ index dad7599ed999..c8daf2ba58c8 100644
|
||||
void DidCreateNewRendererCompositorFrameSink(
|
||||
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
index 07d42e680951..46699b959d2d 100644
|
||||
index fac719b0bb6f..0672d1445f39 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
@@ -215,6 +215,12 @@ void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
|
||||
@@ -208,6 +208,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
||||
g_spare_recyclable_compositors.Get().clear();
|
||||
}
|
||||
|
||||
@ -33,22 +33,11 @@ index 07d42e680951..46699b959d2d 100644
|
||||
gfx::AcceleratedWidget BrowserCompositorMac::GetAcceleratedWidget() {
|
||||
if (recyclable_compositor_) {
|
||||
return recyclable_compositor_->accelerated_widget_mac()
|
||||
@@ -268,7 +274,9 @@ void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
|
||||
accelerated_widget_mac_ns_view_->AcceleratedWidgetGetNSView();
|
||||
display::Display new_display =
|
||||
display::Screen::GetScreen()->GetDisplayNearestView(ns_view);
|
||||
- gfx::Size new_size_dip([ns_view bounds].size);
|
||||
+ // TODO(cef): Get display info from callbacks. |ns_view| will be nullptr.
|
||||
+ gfx::Size new_size_dip(ns_view ? gfx::Size([ns_view bounds].size) :
|
||||
+ root_layer_->bounds().size());
|
||||
if (new_size_dip == dfh_size_dip_ && new_display == dfh_display_)
|
||||
return false;
|
||||
|
||||
diff --git ui/accelerated_widget_mac/accelerated_widget_mac.mm ui/accelerated_widget_mac/accelerated_widget_mac.mm
|
||||
index 8306398431d9..5ab4fef9ac0f 100644
|
||||
--- ui/accelerated_widget_mac/accelerated_widget_mac.mm
|
||||
+++ ui/accelerated_widget_mac/accelerated_widget_mac.mm
|
||||
@@ -71,6 +71,10 @@ - (void)setContentsChanged;
|
||||
@@ -71,6 +71,10 @@ void AcceleratedWidgetMac::SetNSView(AcceleratedWidgetMacNSView* view) {
|
||||
DCHECK(view && !view_);
|
||||
view_ = view;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
index 593f46130e32..5f7d2fe7355d 100644
|
||||
index 15994d5dada4..e19eca0c4369 100644
|
||||
--- content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
+++ content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
@@ -322,8 +322,11 @@ void BrowserPluginGuest::InitInternal(
|
||||
@@ -315,8 +315,11 @@ void BrowserPluginGuest::InitInternal(
|
||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ index 593f46130e32..5f7d2fe7355d 100644
|
||||
|
||||
// Once a BrowserPluginGuest has an embedder WebContents, it's considered to
|
||||
// be attached.
|
||||
@@ -806,10 +809,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
@@ -799,10 +802,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
|
||||
web_contents_view->CreateViewForWidget(
|
||||
@ -37,10 +37,10 @@ index 593f46130e32..5f7d2fe7355d 100644
|
||||
|
||||
attached_ = true;
|
||||
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
|
||||
index 7c83d2a63b2c..070982ea2298 100644
|
||||
index af9c604d5785..81d3071b0f3d 100644
|
||||
--- content/browser/frame_host/interstitial_page_impl.cc
|
||||
+++ content/browser/frame_host/interstitial_page_impl.cc
|
||||
@@ -614,7 +614,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||
@@ -618,7 +618,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||
WebContentsView* wcv =
|
||||
static_cast<WebContentsImpl*>(web_contents())->GetView();
|
||||
RenderWidgetHostViewBase* view =
|
||||
@ -79,7 +79,7 @@ index cf8c74f4c744..b8cefb4b154b 100644
|
||||
// Creates a new View that holds a popup and receives messages for it.
|
||||
virtual RenderWidgetHostViewBase* CreateViewForPopupWidget(
|
||||
diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc
|
||||
index 13d687ea411e..f16415faa23f 100644
|
||||
index 3aea2d29dc40..65ab77f7ddf5 100644
|
||||
--- content/browser/web_contents/web_contents_view_aura.cc
|
||||
+++ content/browser/web_contents/web_contents_view_aura.cc
|
||||
@@ -781,7 +781,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
|
||||
@ -101,7 +101,7 @@ index 13d687ea411e..f16415faa23f 100644
|
||||
g_create_render_widget_host_view
|
||||
? g_create_render_widget_host_view(render_widget_host,
|
||||
diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h
|
||||
index 2371c819e665..40fa46097de1 100644
|
||||
index 82807c7f77fd..60bd9ceaf9ee 100644
|
||||
--- content/browser/web_contents/web_contents_view_aura.h
|
||||
+++ content/browser/web_contents/web_contents_view_aura.h
|
||||
@@ -114,7 +114,7 @@ class CONTENT_EXPORT WebContentsViewAura
|
||||
@ -266,10 +266,10 @@ index d05dd5421458..fa13775f0512 100644
|
||||
// a BrowserPlugin even when we are using cross process frames for guests. It
|
||||
// should be removed after resolving https://crbug.com/642826).
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index 6f2b56d0cd90..ec6f15c0a789 100644
|
||||
index 6861814915c2..766090cd3b06 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -174,6 +174,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
@@ -192,6 +192,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
WebContents::CreateParams params(browser_context(),
|
||||
guest_site_instance.get());
|
||||
params.guest_delegate = this;
|
||||
@ -278,7 +278,7 @@ index 6f2b56d0cd90..ec6f15c0a789 100644
|
||||
callback.Run(WebContents::Create(params));
|
||||
|
||||
registry_.AddInterface(
|
||||
@@ -199,6 +201,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
|
||||
@@ -225,6 +227,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -298,10 +298,10 @@ index 6f2b56d0cd90..ec6f15c0a789 100644
|
||||
WebContents* source,
|
||||
const content::OpenURLParams& params) {
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
index df25eca4aeae..3072be6a9ca5 100644
|
||||
index 2bc53e063aae..9814b40f84ea 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
@@ -89,6 +89,10 @@ class MimeHandlerViewGuest :
|
||||
@@ -108,6 +108,10 @@ class MimeHandlerViewGuest :
|
||||
bool ZoomPropagatesFromEmbedderToGuest() const final;
|
||||
bool ShouldDestroyOnDetach() const final;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
|
||||
index ac49d3b83913..69696c72d0f3 100644
|
||||
index ac64f5c5cd14..d926502a78a0 100644
|
||||
--- chrome/browser/BUILD.gn
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -8,6 +8,7 @@ import("//build/config/features.gni")
|
||||
@ -10,7 +10,7 @@ index ac49d3b83913..69696c72d0f3 100644
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/feature_engagement/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
@@ -1591,6 +1592,7 @@ jumbo_split_static_library("browser") {
|
||||
@@ -1581,6 +1582,7 @@ jumbo_split_static_library("browser") {
|
||||
"//base:i18n",
|
||||
"//base/allocator:buildflags",
|
||||
"//cc",
|
||||
@ -18,7 +18,7 @@ index ac49d3b83913..69696c72d0f3 100644
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -1845,6 +1847,10 @@ jumbo_split_static_library("browser") {
|
||||
@@ -1835,6 +1837,10 @@ jumbo_split_static_library("browser") {
|
||||
"//ui/web_dialogs",
|
||||
]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
index 2e8e68563c3c..54a1834c6055 100644
|
||||
index 07ebea6a6ebf..d60387aa4cdf 100644
|
||||
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
@ -12,7 +12,7 @@ index 2e8e68563c3c..54a1834c6055 100644
|
||||
#include "chrome/common/chrome_features.h"
|
||||
@@ -16,6 +17,10 @@
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "extensions/features/features.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+#include "cef/libcef/common/extensions/extensions_util.h"
|
||||
|
@ -71,10 +71,10 @@ index e8e76ce5b954..1dd338dd0142 100644
|
||||
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
|
||||
content::BrowserContext* context);
|
||||
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
|
||||
index 06cc4ca5c59c..a610360829d8 100644
|
||||
index 7675240b2556..08f621236038 100644
|
||||
--- chrome/browser/profiles/profile_manager.cc
|
||||
+++ chrome/browser/profiles/profile_manager.cc
|
||||
@@ -377,7 +377,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
@@ -378,7 +378,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
|
||||
content::NotificationService::AllSources());
|
||||
|
||||
@ -84,10 +84,10 @@ index 06cc4ca5c59c..a610360829d8 100644
|
||||
this));
|
||||
}
|
||||
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
|
||||
index 95d20f01a062..96834378f487 100644
|
||||
index 9a0d8dd4c3e6..6cfbfd1ddc8d 100644
|
||||
--- chrome/browser/profiles/profile_manager.h
|
||||
+++ chrome/browser/profiles/profile_manager.h
|
||||
@@ -93,7 +93,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -94,7 +94,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
// acceptable. Returns null if creation of the new profile fails.
|
||||
// TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then
|
||||
// make this method private.
|
||||
@ -96,7 +96,7 @@ index 95d20f01a062..96834378f487 100644
|
||||
|
||||
// Returns total number of profiles available on this machine.
|
||||
size_t GetNumberOfProfiles();
|
||||
@@ -124,7 +124,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -125,7 +125,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
|
||||
// Returns true if the profile pointer is known to point to an existing
|
||||
// profile.
|
||||
@ -105,7 +105,7 @@ index 95d20f01a062..96834378f487 100644
|
||||
|
||||
// Returns the directory where the first created profile is stored,
|
||||
// relative to the user data directory currently in use.
|
||||
@@ -133,7 +133,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -134,7 +134,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
// Get the Profile last used (the Profile to which owns the most recently
|
||||
// focused window) with this Chrome build. If no signed profile has been
|
||||
// stored in Local State, hand back the Default profile.
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
index ab3fd0de9e07..298db88e685f 100644
|
||||
index 484e07af5a98..0e62e20095c7 100644
|
||||
--- chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
+++ chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "base/task_runner_util.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "build/build_config.h"
|
||||
@ -10,7 +10,7 @@ index ab3fd0de9e07..298db88e685f 100644
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
|
||||
@@ -55,6 +56,11 @@
|
||||
@@ -53,6 +54,11 @@
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
|
||||
@ -22,7 +22,7 @@ index ab3fd0de9e07..298db88e685f 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "components/guest_view/browser/guest_view_base.h"
|
||||
#include "extensions/browser/extension_registry.h"
|
||||
@@ -76,12 +82,10 @@ namespace {
|
||||
@@ -74,12 +80,10 @@ namespace {
|
||||
class PluginInfoHostImplShutdownNotifierFactory
|
||||
: public BrowserContextKeyedServiceShutdownNotifierFactory {
|
||||
public:
|
||||
@ -37,7 +37,7 @@ index ab3fd0de9e07..298db88e685f 100644
|
||||
PluginInfoHostImplShutdownNotifierFactory>;
|
||||
|
||||
PluginInfoHostImplShutdownNotifierFactory()
|
||||
@@ -93,6 +97,16 @@ class PluginInfoHostImplShutdownNotifierFactory
|
||||
@@ -91,6 +95,16 @@ class PluginInfoHostImplShutdownNotifierFactory
|
||||
DISALLOW_COPY_AND_ASSIGN(PluginInfoHostImplShutdownNotifierFactory);
|
||||
};
|
||||
|
||||
@ -54,7 +54,7 @@ index ab3fd0de9e07..298db88e685f 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
// Returns whether a request from a plugin to load |resource| from a renderer
|
||||
// with process id |process_id| is a request for an internal resource by an app
|
||||
@@ -101,6 +115,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
@@ -99,6 +113,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
extensions::ExtensionRegistry* extension_registry,
|
||||
int process_id,
|
||||
const GURL& resource) {
|
||||
@ -64,7 +64,7 @@ index ab3fd0de9e07..298db88e685f 100644
|
||||
extensions::WebViewRendererState* renderer_state =
|
||||
extensions::WebViewRendererState::GetInstance();
|
||||
std::string partition_id;
|
||||
@@ -130,12 +147,16 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
@@ -128,12 +145,16 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile)
|
||||
: render_process_id_(render_process_id),
|
||||
resource_context_(profile->GetResourceContext()),
|
||||
@ -84,7 +84,7 @@ index ab3fd0de9e07..298db88e685f 100644
|
||||
allow_outdated_plugins_.Init(prefs::kPluginsAllowOutdated,
|
||||
profile->GetPrefs());
|
||||
allow_outdated_plugins_.MoveToThread(
|
||||
@@ -234,6 +255,7 @@ void PluginInfoHostImpl::PluginsLoaded(
|
||||
@@ -232,6 +253,7 @@ void PluginInfoHostImpl::PluginsLoaded(
|
||||
plugin_metadata->identifier(), &output->status);
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ index ab3fd0de9e07..298db88e685f 100644
|
||||
if (output->status == chrome::mojom::PluginStatus::kNotFound) {
|
||||
// Check to see if the component updater can fetch an implementation.
|
||||
base::PostTaskAndReplyWithResult(
|
||||
@@ -245,7 +267,9 @@ void PluginInfoHostImpl::PluginsLoaded(
|
||||
@@ -243,7 +265,9 @@ void PluginInfoHostImpl::PluginsLoaded(
|
||||
base::BindOnce(&PluginInfoHostImpl::ComponentPluginLookupDone, this,
|
||||
params, std::move(output), std::move(callback),
|
||||
std::move(plugin_metadata)));
|
||||
@ -103,7 +103,7 @@ index ab3fd0de9e07..298db88e685f 100644
|
||||
GetPluginInfoFinish(params, std::move(output), std::move(callback),
|
||||
std::move(plugin_metadata));
|
||||
}
|
||||
@@ -258,6 +282,14 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
|
||||
@@ -256,6 +280,14 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
|
||||
PluginMetadata::SecurityStatus security_status,
|
||||
const std::string& plugin_identifier,
|
||||
chrome::mojom::PluginStatus* status) const {
|
||||
@ -118,7 +118,7 @@ index ab3fd0de9e07..298db88e685f 100644
|
||||
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
|
||||
*status = chrome::mojom::PluginStatus::kAllowed;
|
||||
return;
|
||||
@@ -382,16 +414,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
|
||||
@@ -380,16 +412,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -157,10 +157,10 @@ index ab3fd0de9e07..298db88e685f 100644
|
||||
// If we broke out of the loop, we have found an enabled plugin.
|
||||
bool enabled = i < matching_plugins.size();
|
||||
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
|
||||
index 700886c6ce89..8a47ec9f91a3 100644
|
||||
index 1cd2e64b9eb9..a46e40fb1e25 100644
|
||||
--- chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -774,6 +774,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -770,6 +770,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
|
||||
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
|
||||
status == chrome::mojom::PluginStatus::kBlocked) &&
|
||||
@ -168,7 +168,7 @@ index 700886c6ce89..8a47ec9f91a3 100644
|
||||
observer->IsPluginTemporarilyAllowed(identifier)) {
|
||||
status = chrome::mojom::PluginStatus::kAllowed;
|
||||
}
|
||||
@@ -961,7 +962,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -957,7 +958,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
&plugin_auth_host);
|
||||
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
|
||||
@ -178,7 +178,7 @@ index 700886c6ce89..8a47ec9f91a3 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlocked: {
|
||||
@@ -970,7 +972,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -966,7 +968,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
|
||||
placeholder->AllowLoading();
|
||||
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
|
||||
@ -188,7 +188,7 @@ index 700886c6ce89..8a47ec9f91a3 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
|
||||
@@ -980,7 +983,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -976,7 +979,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
group_name));
|
||||
RenderThread::Get()->RecordAction(
|
||||
UserMetricsAction("Plugin_BlockedByPolicy"));
|
||||
@ -198,7 +198,7 @@ index 700886c6ce89..8a47ec9f91a3 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
|
||||
@@ -988,7 +992,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -984,7 +988,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
IDR_BLOCKED_PLUGIN_HTML,
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
|
||||
group_name));
|
||||
@ -209,7 +209,7 @@ index 700886c6ce89..8a47ec9f91a3 100644
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kComponentUpdateRequired: {
|
||||
diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
||||
index 6bc73727e61b..4f84ab989060 100644
|
||||
index 7052b1d68246..ba05a591ebf5 100644
|
||||
--- chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
||||
+++ chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
||||
@@ -350,8 +350,11 @@ void ChromePluginPlaceholder::OnBlockedContent(
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
|
||||
index 1ec9a536a378..8ab180c18d8e 100644
|
||||
index 0903a4520939..be719c54f671 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -3,6 +3,7 @@
|
||||
@ -9,8 +9,8 @@ index 1ec9a536a378..8ab180c18d8e 100644
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//components/spellcheck/spellcheck_build_features.gni")
|
||||
@@ -106,6 +107,7 @@ static_library("renderer") {
|
||||
import("//components/offline_pages/buildflags/features.gni")
|
||||
@@ -109,6 +110,7 @@ static_library("renderer") {
|
||||
defines = []
|
||||
|
||||
deps = [
|
||||
@ -18,7 +18,7 @@ index 1ec9a536a378..8ab180c18d8e 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -166,6 +168,10 @@ static_library("renderer") {
|
||||
@@ -169,6 +171,10 @@ static_library("renderer") {
|
||||
|
||||
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
|
||||
index 750df2f7fbbe..5b46bb127102 100644
|
||||
index d15599593511..0f37d5933391 100644
|
||||
--- chrome/common/chrome_content_client.cc
|
||||
+++ chrome/common/chrome_content_client.cc
|
||||
@@ -91,7 +91,8 @@
|
||||
@@ -92,7 +92,8 @@
|
||||
|
||||
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
|
||||
#include "media/cdm/cdm_paths.h" // nogncheck
|
||||
@ -10,5 +10,26 @@ index 750df2f7fbbe..5b46bb127102 100644
|
||||
+#if defined(WIDEVINE_CDM_AVAILABLE) && !defined(WIDEVINE_CDM_IS_COMPONENT) && \
|
||||
+ defined(WIDEVINE_CDM_VERSION_STRING)
|
||||
#define WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT
|
||||
#include "chrome/common/widevine_cdm_constants.h"
|
||||
#endif
|
||||
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
|
||||
diff --git third_party/widevine/cdm/BUILD.gn third_party/widevine/cdm/BUILD.gn
|
||||
index 55b471ea..6dac055 100644
|
||||
--- third_party/widevine/cdm/BUILD.gn
|
||||
+++ third_party/widevine/cdm/BUILD.gn
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/features.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//media/cdm/library_cdm/cdm_paths.gni")
|
||||
import("//media/media_options.gni")
|
||||
import("//third_party/widevine/cdm/widevine.gni")
|
||||
@@ -11,7 +12,7 @@ import("//third_party/widevine/cdm/widevine.gni")
|
||||
# Internal Cast builds set enable_widevine=true to bring in Widevine support.
|
||||
# TODO(xhwang): Support component updated CDM on other platforms and remove this
|
||||
# assert.
|
||||
-assert(!enable_widevine || is_win || is_mac || is_chromecast,
|
||||
+assert(!enable_widevine || is_win || is_mac || is_chromecast || enable_cef,
|
||||
"Component updated CDM only supported on Windows and Mac for now.")
|
||||
|
||||
widevine_arch = current_cpu
|
||||
|
@ -12,24 +12,24 @@ index 4393a8fac233..860715e86900 100644
|
||||
public:
|
||||
explicit ContentServiceManagerMainDelegate(const ContentMainParams& params);
|
||||
~ContentServiceManagerMainDelegate() override;
|
||||
diff --git third_party/WebKit/Source/controller/BUILD.gn third_party/WebKit/Source/controller/BUILD.gn
|
||||
index 67afa8b0bcef..20591788d173 100644
|
||||
--- third_party/WebKit/Source/controller/BUILD.gn
|
||||
+++ third_party/WebKit/Source/controller/BUILD.gn
|
||||
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
|
||||
index 5726fbac54bf..46fd0b2bd568 100644
|
||||
--- third_party/blink/renderer/controller/BUILD.gn
|
||||
+++ third_party/blink/renderer/controller/BUILD.gn
|
||||
@@ -25,6 +25,7 @@ component("controller") {
|
||||
|
||||
configs += [
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
+ "//cef/libcef/features:config",
|
||||
"//third_party/WebKit/Source:config",
|
||||
"//third_party/WebKit/Source:inside_blink",
|
||||
"//third_party/WebKit/Source:non_test_config",
|
||||
"//third_party/blink/renderer:config",
|
||||
"//third_party/blink/renderer:inside_blink",
|
||||
"//third_party/blink/renderer:non_test_config",
|
||||
@@ -41,6 +42,8 @@ component("controller") {
|
||||
"DevToolsFrontendImpl.h",
|
||||
"OomInterventionImpl.cpp",
|
||||
"OomInterventionImpl.h",
|
||||
+ "//cef/libcef/renderer/webkit_glue.cc",
|
||||
+ "//cef/libcef/renderer/webkit_glue.h",
|
||||
"dev_tools_frontend_impl.h",
|
||||
"oom_intervention_impl.cc",
|
||||
"oom_intervention_impl.h",
|
||||
+ "//cef/libcef/renderer/blink_glue.cc",
|
||||
+ "//cef/libcef/renderer/blink_glue.h",
|
||||
]
|
||||
|
||||
if (is_mac) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
|
||||
index b40de2a2910a..da20699a5d64 100644
|
||||
index 7b9fc4114c52..bdbbf93f6f0d 100644
|
||||
--- content/browser/compositor/gpu_process_transport_factory.cc
|
||||
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
||||
@@ -492,9 +492,19 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
@@ -495,9 +495,19 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
// surfaces as they are not following the correct mode.
|
||||
DisableGpuCompositing(compositor.get());
|
||||
}
|
||||
@ -18,13 +18,13 @@ index b40de2a2910a..da20699a5d64 100644
|
||||
+
|
||||
display_output_surface =
|
||||
std::make_unique<SoftwareBrowserCompositorOutputSurface>(
|
||||
- CreateSoftwareOutputDevice(compositor->widget()), vsync_callback,
|
||||
+ std::move(output_device), vsync_callback,
|
||||
compositor->task_runner());
|
||||
- CreateSoftwareOutputDevice(compositor->widget()),
|
||||
+ std::move(output_device),
|
||||
std::move(vsync_callback), compositor->task_runner());
|
||||
} else {
|
||||
DCHECK(context_provider);
|
||||
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
|
||||
index 78b361460638..bbde6e19916d 100644
|
||||
index a6a0cb9df028..478f11e0d925 100644
|
||||
--- ui/compositor/compositor.h
|
||||
+++ ui/compositor/compositor.h
|
||||
@@ -24,6 +24,7 @@
|
||||
@ -63,7 +63,7 @@ index 78b361460638..bbde6e19916d 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
|
||||
@@ -441,6 +456,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -442,6 +457,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
ui::ContextFactory* context_factory_;
|
||||
ui::ContextFactoryPrivate* context_factory_private_;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
|
||||
index 03ca8ad55078..0899131ab154 100644
|
||||
index cbc50ff93650..c91171abf5b0 100644
|
||||
--- chrome/browser/download/download_target_determiner.cc
|
||||
+++ chrome/browser/download/download_target_determiner.cc
|
||||
@@ -540,8 +540,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
|
||||
@@ -571,8 +571,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
|
||||
content::PluginService* plugin_service =
|
||||
content::PluginService::GetInstance();
|
||||
bool plugin_found = plugin_service->GetPluginInfo(
|
||||
@ -14,10 +14,10 @@ index 03ca8ad55078..0899131ab154 100644
|
||||
// The GetPlugins call causes the plugin list to be refreshed. Once that's
|
||||
// done we can retry the GetPluginInfo call. We break out of this cycle
|
||||
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
index 8e6ef99239ab..24ceaf229702 100644
|
||||
index e47d5ea63e5a..f2d21e4cefe4 100644
|
||||
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
@@ -178,6 +178,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
|
||||
@@ -177,6 +177,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
|
||||
int render_frame_id,
|
||||
const void* context,
|
||||
const GURL& plugin_content_url,
|
||||
@ -38,7 +38,7 @@ index 133145db74bf..021ab307ee2a 100644
|
||||
content::WebPluginInfo* plugin) override;
|
||||
|
||||
diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
|
||||
index 3b0948c90a00..f0fb3b5d9d55 100644
|
||||
index d05027d09165..d3f57f6d96d7 100644
|
||||
--- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
|
||||
+++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
|
||||
@@ -53,7 +53,7 @@ PDFIFrameNavigationThrottle::MaybeCreateThrottleFor(
|
||||
@ -51,7 +51,7 @@ index 3b0948c90a00..f0fb3b5d9d55 100644
|
||||
return nullptr;
|
||||
}
|
||||
diff --git chrome/browser/ui/cocoa/drag_util.mm chrome/browser/ui/cocoa/drag_util.mm
|
||||
index b1a49f718226..cb56c9fd4765 100644
|
||||
index 569e6112d86b..41599944688a 100644
|
||||
--- chrome/browser/ui/cocoa/drag_util.mm
|
||||
+++ chrome/browser/ui/cocoa/drag_util.mm
|
||||
@@ -51,7 +51,7 @@ BOOL IsSupportedFileURL(Profile* profile, const GURL& url) {
|
||||
@ -64,7 +64,7 @@ index b1a49f718226..cb56c9fd4765 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
index f4eb41e948bb..7e47a184d8c0 100644
|
||||
index dfbad402f1ea..7a332ea67611 100644
|
||||
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
@@ -601,6 +601,6 @@ void BrowserTabStripController::OnFindURLMimeTypeCompleted(
|
||||
@ -76,10 +76,10 @@ index f4eb41e948bb..7e47a184d8c0 100644
|
||||
mime_type, false, NULL, &plugin, NULL));
|
||||
}
|
||||
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
|
||||
index 2986bf0e340e..6ef8486960ce 100644
|
||||
index 0c0c4cbb9efe..4703ce943367 100644
|
||||
--- content/browser/frame_host/navigation_handle_impl.cc
|
||||
+++ content/browser/frame_host/navigation_handle_impl.cc
|
||||
@@ -368,12 +368,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
|
||||
@@ -382,12 +382,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
|
||||
}
|
||||
|
||||
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
|
||||
@ -93,10 +93,10 @@ index 2986bf0e340e..6ef8486960ce 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc
|
||||
index 1f566ef1f437..cffef1c8a2f2 100644
|
||||
index f47a05e199ef..3010f016c035 100644
|
||||
--- content/browser/frame_host/render_frame_host_impl.cc
|
||||
+++ content/browser/frame_host/render_frame_host_impl.cc
|
||||
@@ -1527,6 +1527,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
||||
@@ -1552,6 +1552,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
||||
if (GetNavigationHandle()) {
|
||||
GetNavigationHandle()->set_net_error_code(
|
||||
static_cast<net::Error>(params.error_code));
|
||||
@ -104,7 +104,7 @@ index 1f566ef1f437..cffef1c8a2f2 100644
|
||||
}
|
||||
|
||||
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
|
||||
@@ -3269,9 +3270,9 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
|
||||
@@ -3309,9 +3310,9 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
|
||||
&QuotaDispatcherHost::CreateForFrame, GetProcess(), routing_id_));
|
||||
|
||||
if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
|
||||
@ -117,7 +117,7 @@ index 1f566ef1f437..cffef1c8a2f2 100644
|
||||
// TODO(https://crbug.com/813479): Investigate why we need to explicitly
|
||||
// specify task runner for BrowserThread::IO here.
|
||||
// Bind calls to the BindRegistry should come on to the IO thread by
|
||||
@@ -3545,9 +3546,9 @@ void RenderFrameHostImpl::CommitNavigation(
|
||||
@@ -3588,9 +3589,9 @@ void RenderFrameHostImpl::CommitNavigation(
|
||||
// however only do this for cross-document navigations, because the
|
||||
// alternative would be redundant effort.
|
||||
network::mojom::URLLoaderFactoryPtrInfo default_factory_info;
|
||||
@ -130,10 +130,10 @@ index 1f566ef1f437..cffef1c8a2f2 100644
|
||||
if (subresource_loader_params &&
|
||||
subresource_loader_params->loader_factory_info.is_valid()) {
|
||||
// If the caller has supplied a default URLLoaderFactory override (for
|
||||
@@ -4162,8 +4163,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve(
|
||||
auto* context = GetSiteInstance()->GetBrowserContext();
|
||||
GetContentClient()->browser()->WillCreateURLLoaderFactory(
|
||||
this, false /* is_navigation */, &default_factory_request);
|
||||
@@ -4218,8 +4219,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve(
|
||||
// Keep DevTools proxy lasy, i.e. closest to the network.
|
||||
RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory(
|
||||
this, false, &default_factory_request);
|
||||
- StoragePartitionImpl* storage_partition = static_cast<StoragePartitionImpl*>(
|
||||
- BrowserContext::GetStoragePartition(context, GetSiteInstance()));
|
||||
+ StoragePartition* storage_partition =
|
||||
@ -142,10 +142,10 @@ index 1f566ef1f437..cffef1c8a2f2 100644
|
||||
storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
|
||||
std::move(default_factory_request), GetProcess()->GetID());
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
|
||||
index b3653373a51f..6db0652284ec 100644
|
||||
index 80fd7cf89578..8e965cd18a47 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.cc
|
||||
+++ content/browser/frame_host/render_frame_message_filter.cc
|
||||
@@ -546,6 +546,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
|
||||
@@ -552,6 +552,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
|
||||
|
||||
void RenderFrameMessageFilter::OnGetPlugins(
|
||||
bool refresh,
|
||||
@ -153,7 +153,7 @@ index b3653373a51f..6db0652284ec 100644
|
||||
const url::Origin& main_frame_origin,
|
||||
IPC::Message* reply_msg) {
|
||||
// Don't refresh if the specified threshold has not been passed. Note that
|
||||
@@ -567,18 +568,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
|
||||
@@ -573,18 +574,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
|
||||
|
||||
PluginServiceImpl::GetInstance()->GetPlugins(
|
||||
base::BindOnce(&RenderFrameMessageFilter::GetPluginsCallback, this,
|
||||
@ -175,7 +175,7 @@ index b3653373a51f..6db0652284ec 100644
|
||||
int routing_id = MSG_ROUTING_NONE;
|
||||
// In this loop, copy the WebPluginInfo (and do not use a reference) because
|
||||
// the filter might mutate it.
|
||||
@@ -587,7 +589,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
|
||||
@@ -593,7 +595,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
|
||||
if (!filter ||
|
||||
filter->IsPluginAvailable(child_process_id, routing_id,
|
||||
resource_context_, main_frame_origin.GetURL(),
|
||||
@ -184,7 +184,7 @@ index b3653373a51f..6db0652284ec 100644
|
||||
plugins.push_back(plugin);
|
||||
}
|
||||
}
|
||||
@@ -599,6 +601,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
|
||||
@@ -605,6 +607,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
|
||||
void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
@ -192,7 +192,7 @@ index b3653373a51f..6db0652284ec 100644
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool* found,
|
||||
@@ -607,8 +610,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
@@ -613,8 +616,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
bool allow_wildcard = true;
|
||||
*found = plugin_service_->GetPluginInfo(
|
||||
render_process_id_, render_frame_id, resource_context_, url,
|
||||
@ -204,10 +204,10 @@ index b3653373a51f..6db0652284ec 100644
|
||||
|
||||
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h
|
||||
index db9398a07607..ce062d8a9ccd 100644
|
||||
index 871e11f61274..5b1009ab7ec6 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.h
|
||||
+++ content/browser/frame_host/render_frame_message_filter.h
|
||||
@@ -136,13 +136,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter
|
||||
@@ -139,13 +139,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter
|
||||
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
void OnGetPlugins(bool refresh,
|
||||
@ -225,7 +225,7 @@ index db9398a07607..ce062d8a9ccd 100644
|
||||
const std::string& mime_type,
|
||||
bool* found,
|
||||
diff --git content/browser/loader/mime_sniffing_resource_handler.cc content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
index a9322bc8b5d7..0b3bfef2237b 100644
|
||||
index 577f62b57ff2..3847f8ec616a 100644
|
||||
--- content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
+++ content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
@@ -494,8 +494,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
|
||||
@ -240,10 +240,10 @@ index a9322bc8b5d7..0b3bfef2237b 100644
|
||||
if (stale) {
|
||||
// Refresh the plugins asynchronously.
|
||||
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
|
||||
index 130f4d8e92e8..bade33e04c2e 100644
|
||||
index dcdae19642b5..f1b3c8166ce9 100644
|
||||
--- content/browser/plugin_service_impl.cc
|
||||
+++ content/browser/plugin_service_impl.cc
|
||||
@@ -262,6 +262,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
@@ -286,6 +286,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
int render_frame_id,
|
||||
ResourceContext* context,
|
||||
const GURL& url,
|
||||
@ -251,7 +251,7 @@ index 130f4d8e92e8..bade33e04c2e 100644
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
@@ -278,7 +279,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
@@ -302,7 +303,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
for (size_t i = 0; i < plugins.size(); ++i) {
|
||||
if (!filter_ ||
|
||||
filter_->IsPluginAvailable(render_process_id, render_frame_id, context,
|
||||
@ -262,10 +262,10 @@ index 130f4d8e92e8..bade33e04c2e 100644
|
||||
if (actual_mime_type)
|
||||
*actual_mime_type = mime_types[i];
|
||||
diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h
|
||||
index e6de4ca6c8b3..18eea4948e43 100644
|
||||
index 4e11056a3dc9..973ad50975e1 100644
|
||||
--- content/browser/plugin_service_impl.h
|
||||
+++ content/browser/plugin_service_impl.h
|
||||
@@ -63,6 +63,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
|
||||
@@ -65,6 +65,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
|
||||
int render_frame_id,
|
||||
ResourceContext* context,
|
||||
const GURL& url,
|
||||
@ -274,10 +274,10 @@ index e6de4ca6c8b3..18eea4948e43 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/common/frame_messages.h content/common/frame_messages.h
|
||||
index 8e482fa78e3a..99b8e486e88f 100644
|
||||
index 7ee98ee35116..63082b5a8132 100644
|
||||
--- content/common/frame_messages.h
|
||||
+++ content/common/frame_messages.h
|
||||
@@ -1362,8 +1362,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
@@ -1387,8 +1387,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
|
||||
// Used to get the list of plugins. |main_frame_origin| is used to handle
|
||||
// exceptions for plugin content settings.
|
||||
@ -288,7 +288,7 @@ index 8e482fa78e3a..99b8e486e88f 100644
|
||||
url::Origin /* main_frame_origin */,
|
||||
std::vector<content::WebPluginInfo> /* plugins */)
|
||||
|
||||
@@ -1371,9 +1372,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
|
||||
@@ -1396,9 +1397,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
|
||||
// type. If there is no matching plugin, |found| is false.
|
||||
// |actual_mime_type| is the actual mime type supported by the
|
||||
// found plugin.
|
||||
@ -301,7 +301,7 @@ index 8e482fa78e3a..99b8e486e88f 100644
|
||||
std::string /* mime_type */,
|
||||
bool /* found */,
|
||||
diff --git content/ppapi_plugin/ppapi_blink_platform_impl.cc content/ppapi_plugin/ppapi_blink_platform_impl.cc
|
||||
index bf3c786b5093..ea8f85700e86 100644
|
||||
index a6e5823a51d7..397bb78e41fb 100644
|
||||
--- content/ppapi_plugin/ppapi_blink_platform_impl.cc
|
||||
+++ content/ppapi_plugin/ppapi_blink_platform_impl.cc
|
||||
@@ -199,6 +199,7 @@ blink::WebThemeEngine* PpapiBlinkPlatformImpl::ThemeEngine() {
|
||||
@ -325,10 +325,10 @@ index 8a58a2ae1e2f..21b18ff2eba7 100644
|
||||
blink::WebPluginListBuilder*) override;
|
||||
blink::WebData GetDataResource(const char* name) override;
|
||||
diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h
|
||||
index ac05c13b1df8..762262bff01a 100644
|
||||
index 27021d64244d..60f1ec1845d9 100644
|
||||
--- content/public/browser/plugin_service.h
|
||||
+++ content/public/browser/plugin_service.h
|
||||
@@ -74,6 +74,7 @@ class PluginService {
|
||||
@@ -73,6 +73,7 @@ class CONTENT_EXPORT PluginService {
|
||||
int render_frame_id,
|
||||
ResourceContext* context,
|
||||
const GURL& url,
|
||||
@ -349,10 +349,10 @@ index 3b610b1f554e..7c439e060779 100644
|
||||
WebPluginInfo* plugin) = 0;
|
||||
|
||||
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
|
||||
index 34aed4fd3565..364f042ee903 100644
|
||||
index a68f00aec37a..696f9efab95d 100644
|
||||
--- content/public/renderer/content_renderer_client.h
|
||||
+++ content/public/renderer/content_renderer_client.h
|
||||
@@ -74,6 +74,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -77,6 +77,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// Notifies us that the RenderThread has been created.
|
||||
virtual void RenderThreadStarted() {}
|
||||
|
||||
@ -362,7 +362,7 @@ index 34aed4fd3565..364f042ee903 100644
|
||||
// Notifies that a new RenderFrame has been created.
|
||||
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
|
||||
|
||||
@@ -333,6 +336,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -356,6 +359,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// This method may invalidate the frame.
|
||||
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
|
||||
|
||||
@ -374,12 +374,12 @@ index 34aed4fd3565..364f042ee903 100644
|
||||
// started.
|
||||
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
|
||||
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
|
||||
index aa77b86eee98..097d26a80aa9 100644
|
||||
index 74a031ad10c3..3b3f9e292f4b 100644
|
||||
--- content/public/renderer/render_frame_observer.h
|
||||
+++ content/public/renderer/render_frame_observer.h
|
||||
@@ -121,6 +121,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
// load. This is used for UseCounter feature metrics.
|
||||
virtual void DidObserveNewFeatureUsage(blink::mojom::WebFeature feature) {}
|
||||
@@ -123,6 +123,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
virtual void DidObserveNewCssPropertyUsage(int css_property,
|
||||
bool is_animated) {}
|
||||
|
||||
+ // Called when this frame gains focus.
|
||||
+ virtual void FrameFocused() {}
|
||||
@ -388,10 +388,10 @@ index aa77b86eee98..097d26a80aa9 100644
|
||||
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
|
||||
|
||||
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
|
||||
index 259d31191208..890ec89bbaee 100644
|
||||
index fede37b7301b..6bda5cfdbcd1 100644
|
||||
--- content/renderer/render_frame_impl.cc
|
||||
+++ content/renderer/render_frame_impl.cc
|
||||
@@ -3447,7 +3447,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
@@ -3486,7 +3486,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
std::string mime_type;
|
||||
bool found = false;
|
||||
Send(new FrameHostMsg_GetPluginInfo(
|
||||
@ -401,7 +401,7 @@ index 259d31191208..890ec89bbaee 100644
|
||||
params.mime_type.Utf8(), &found, &info, &mime_type));
|
||||
if (!found)
|
||||
return nullptr;
|
||||
@@ -3808,6 +3809,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
|
||||
@@ -3847,6 +3848,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
|
||||
|
||||
void RenderFrameImpl::FrameFocused() {
|
||||
Send(new FrameHostMsg_FrameFocused(routing_id_));
|
||||
@ -411,10 +411,10 @@ index 259d31191208..890ec89bbaee 100644
|
||||
|
||||
void RenderFrameImpl::WillCommitProvisionalLoad() {
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index 81d3f80db8ef..1e349f80ed23 100644
|
||||
index 089bc9a31881..7c938b4d3c8d 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -925,6 +925,8 @@ void RenderThreadImpl::Init(
|
||||
@@ -942,6 +942,8 @@ void RenderThreadImpl::Init(
|
||||
|
||||
StartServiceManagerConnection();
|
||||
|
||||
@ -424,10 +424,10 @@ index 81d3f80db8ef..1e349f80ed23 100644
|
||||
base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest,
|
||||
base::Unretained(this)));
|
||||
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
|
||||
index 0affacaa0294..8c08aad965a2 100644
|
||||
index 58008cefd4be..c933ed29f304 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -849,6 +849,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
|
||||
@@ -842,6 +842,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
|
||||
|
||||
void RendererBlinkPlatformImpl::GetPluginList(
|
||||
bool refresh,
|
||||
@ -435,7 +435,7 @@ index 0affacaa0294..8c08aad965a2 100644
|
||||
const blink::WebSecurityOrigin& mainFrameOrigin,
|
||||
blink::WebPluginListBuilder* builder) {
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
@@ -856,7 +857,8 @@ void RendererBlinkPlatformImpl::GetPluginList(
|
||||
@@ -849,7 +850,8 @@ void RendererBlinkPlatformImpl::GetPluginList(
|
||||
if (!plugin_refresh_allowed_)
|
||||
refresh = false;
|
||||
RenderThread::Get()->Send(
|
||||
@ -445,7 +445,7 @@ index 0affacaa0294..8c08aad965a2 100644
|
||||
for (const WebPluginInfo& plugin : plugins) {
|
||||
builder->AddPlugin(WebString::FromUTF16(plugin.name),
|
||||
WebString::FromUTF16(plugin.desc),
|
||||
@@ -1417,6 +1419,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() {
|
||||
@@ -1416,6 +1418,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() {
|
||||
base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory();
|
||||
}
|
||||
|
||||
@ -461,10 +461,10 @@ index 0affacaa0294..8c08aad965a2 100644
|
||||
if (!web_database_host_) {
|
||||
web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create(
|
||||
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
|
||||
index e8a4578009d1..780d8b29acb2 100644
|
||||
index 611b6b70f3cb..98e858e6bd93 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -128,6 +128,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -126,6 +126,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
viz::FrameSinkId GenerateFrameSinkId() override;
|
||||
|
||||
void GetPluginList(bool refresh,
|
||||
@ -507,7 +507,7 @@ index 7767a620a9fd..8a95377f5f3b 100644
|
||||
WebPluginInfo* plugin) override;
|
||||
|
||||
diff --git content/test/fake_plugin_service.cc content/test/fake_plugin_service.cc
|
||||
index 6746b9f16e7e..8634ada48d57 100644
|
||||
index dfc1e111ac10..23106007a32e 100644
|
||||
--- content/test/fake_plugin_service.cc
|
||||
+++ content/test/fake_plugin_service.cc
|
||||
@@ -29,6 +29,7 @@ bool FakePluginService::GetPluginInfo(int render_process_id,
|
||||
@ -519,7 +519,7 @@ index 6746b9f16e7e..8634ada48d57 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/test/fake_plugin_service.h content/test/fake_plugin_service.h
|
||||
index db23a83ed079..57a4c536118c 100644
|
||||
index 84bed37848d9..1a66c0757437 100644
|
||||
--- content/test/fake_plugin_service.h
|
||||
+++ content/test/fake_plugin_service.h
|
||||
@@ -30,6 +30,7 @@ class FakePluginService : public PluginService {
|
||||
@ -531,10 +531,10 @@ index db23a83ed079..57a4c536118c 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/test/test_blink_web_unit_test_support.cc content/test/test_blink_web_unit_test_support.cc
|
||||
index 25182fdb0928..9cc19c4016d3 100644
|
||||
index c58ced83f5a3..b59123565abd 100644
|
||||
--- content/test/test_blink_web_unit_test_support.cc
|
||||
+++ content/test/test_blink_web_unit_test_support.cc
|
||||
@@ -324,6 +324,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
|
||||
@@ -325,6 +325,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
|
||||
|
||||
void TestBlinkWebUnitTestSupport::GetPluginList(
|
||||
bool refresh,
|
||||
@ -543,11 +543,11 @@ index 25182fdb0928..9cc19c4016d3 100644
|
||||
blink::WebPluginListBuilder* builder) {
|
||||
builder->AddPlugin("pdf", "pdf", "pdf-files");
|
||||
diff --git content/test/test_blink_web_unit_test_support.h content/test/test_blink_web_unit_test_support.h
|
||||
index d8ad7b6e4435..5eda4bc3c2d5 100644
|
||||
index 06ddd5b7b28f..c3371fecff87 100644
|
||||
--- content/test/test_blink_web_unit_test_support.h
|
||||
+++ content/test/test_blink_web_unit_test_support.h
|
||||
@@ -72,6 +72,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {
|
||||
const blink::WebSize& size) override;
|
||||
@@ -73,6 +73,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {
|
||||
viz::ResourceFormat format) override;
|
||||
|
||||
void GetPluginList(bool refresh,
|
||||
+ bool is_main_frame,
|
||||
|
@ -45,7 +45,7 @@ index bcf172e645a2..a46141ea43e0 100644
|
||||
// Sets the kNumSwitches key and the set of keys named using kSwitchFormat based
|
||||
// on the given |command_line|.
|
||||
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
|
||||
index 08dc1ddba75a..e2bc7c365980 100644
|
||||
index e66f49a470f8..f2b725efb6fd 100644
|
||||
--- chrome_elf/BUILD.gn
|
||||
+++ chrome_elf/BUILD.gn
|
||||
@@ -7,6 +7,7 @@
|
||||
@ -56,7 +56,7 @@ index 08dc1ddba75a..e2bc7c365980 100644
|
||||
import("//chrome/process_version_rc_template.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -186,9 +187,6 @@ static_library("blacklist") {
|
||||
@@ -196,9 +197,6 @@ static_library("blacklist") {
|
||||
|
||||
static_library("crash") {
|
||||
sources = [
|
||||
@ -66,7 +66,7 @@ index 08dc1ddba75a..e2bc7c365980 100644
|
||||
"crash/crash_helper.cc",
|
||||
"crash/crash_helper.h",
|
||||
]
|
||||
@@ -196,6 +194,7 @@ static_library("crash") {
|
||||
@@ -206,6 +204,7 @@ static_library("crash") {
|
||||
":hook_util",
|
||||
"//base", # This needs to go. DEP of app, crash_keys, client.
|
||||
"//base:base_static", # pe_image
|
||||
@ -74,7 +74,7 @@ index 08dc1ddba75a..e2bc7c365980 100644
|
||||
"//chrome/install_static:install_static_util",
|
||||
"//components/crash/content/app",
|
||||
"//components/crash/core/common", # crash_keys
|
||||
@@ -203,6 +202,17 @@ static_library("crash") {
|
||||
@@ -213,6 +212,17 @@ static_library("crash") {
|
||||
"//content/public/common:result_codes",
|
||||
"//third_party/crashpad/crashpad/client", # DumpWithoutCrash
|
||||
]
|
||||
@ -93,7 +93,7 @@ index 08dc1ddba75a..e2bc7c365980 100644
|
||||
|
||||
static_library("hook_util") {
|
||||
diff --git chrome_elf/crash/crash_helper.cc chrome_elf/crash/crash_helper.cc
|
||||
index e8e27dc4ebd7..7cb2149ec41d 100644
|
||||
index fdc51ab22807..cb0a99dd190c 100644
|
||||
--- chrome_elf/crash/crash_helper.cc
|
||||
+++ chrome_elf/crash/crash_helper.cc
|
||||
@@ -11,12 +11,17 @@
|
||||
@ -127,7 +127,7 @@ index e8e27dc4ebd7..7cb2149ec41d 100644
|
||||
g_crash_helper_enabled = true;
|
||||
return true;
|
||||
diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc
|
||||
index 460f7ac4defa..1c1b11f87e91 100644
|
||||
index 1dde47fb6bba..8b96a022abf0 100644
|
||||
--- components/crash/content/app/breakpad_linux.cc
|
||||
+++ components/crash/content/app/breakpad_linux.cc
|
||||
@@ -28,6 +28,7 @@
|
||||
@ -146,7 +146,7 @@ index 460f7ac4defa..1c1b11f87e91 100644
|
||||
#endif
|
||||
|
||||
bool g_is_crash_reporter_enabled = false;
|
||||
@@ -689,7 +691,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
@@ -686,7 +688,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
info.process_type_length = 7;
|
||||
info.distro = base::g_linux_distro;
|
||||
info.distro_length = my_strlen(base::g_linux_distro);
|
||||
@ -155,7 +155,7 @@ index 460f7ac4defa..1c1b11f87e91 100644
|
||||
info.process_start_time = g_process_start_time;
|
||||
info.oom_size = base::g_oom_size;
|
||||
info.pid = g_pid;
|
||||
@@ -1345,7 +1347,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
@@ -1342,7 +1344,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
header_content_encoding,
|
||||
header_content_type,
|
||||
post_file,
|
||||
@ -164,7 +164,7 @@ index 460f7ac4defa..1c1b11f87e91 100644
|
||||
"--timeout=10", // Set a timeout so we don't hang forever.
|
||||
"--tries=1", // Don't retry if the upload fails.
|
||||
"-O", // Output reply to the file descriptor path.
|
||||
@@ -1685,10 +1687,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1682,10 +1684,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version);
|
||||
|
||||
writer.AddBoundary();
|
||||
@ -186,7 +186,7 @@ index 460f7ac4defa..1c1b11f87e91 100644
|
||||
if (info.pid > 0) {
|
||||
char pid_value_buf[kUint64StringSize];
|
||||
uint64_t pid_value_len = my_uint64_len(info.pid);
|
||||
@@ -1793,10 +1804,20 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1803,10 +1814,20 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
crash_reporter::internal::TransitionalCrashKeyStorage;
|
||||
CrashKeyStorage::Iterator crash_key_iterator(*info.crash_keys);
|
||||
const CrashKeyStorage::Entry* entry;
|
||||
@ -208,7 +208,7 @@ index 460f7ac4defa..1c1b11f87e91 100644
|
||||
writer.AddBoundary();
|
||||
writer.Flush();
|
||||
}
|
||||
@@ -2006,6 +2027,17 @@ void SetChannelCrashKey(const std::string& channel) {
|
||||
@@ -2016,6 +2037,17 @@ void SetChannelCrashKey(const std::string& channel) {
|
||||
channel_key.Set(channel);
|
||||
}
|
||||
|
||||
@ -241,10 +241,10 @@ index 9ee85554812c..7af55ddda8fe 100644
|
||||
extern void InitCrashKeysForTesting();
|
||||
|
||||
diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc
|
||||
index a37619c815e3..e13a0f7ade86 100644
|
||||
index 4ec26a2a487a..0eba6a25009c 100644
|
||||
--- components/crash/content/app/crash_reporter_client.cc
|
||||
+++ components/crash/content/app/crash_reporter_client.cc
|
||||
@@ -88,11 +88,12 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
|
||||
@@ -88,7 +88,7 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -253,12 +253,15 @@ index a37619c815e3..e13a0f7ade86 100644
|
||||
void CrashReporterClient::GetProductNameAndVersion(const char** product_name,
|
||||
const char** version) {
|
||||
}
|
||||
@@ -97,6 +97,7 @@ void CrashReporterClient::GetProductNameAndVersion(const char** product_name,
|
||||
const char** version,
|
||||
const char** channel) {}
|
||||
|
||||
+#if !defined(OS_MACOSX)
|
||||
base::FilePath CrashReporterClient::GetReporterLogFilename() {
|
||||
return base::FilePath();
|
||||
}
|
||||
@@ -101,6 +102,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename) {
|
||||
@@ -105,6 +106,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
@ -266,9 +269,9 @@ index a37619c815e3..e13a0f7ade86 100644
|
||||
|
||||
#if defined(OS_WIN)
|
||||
bool CrashReporterClient::GetCrashDumpLocation(base::string16* crash_dir) {
|
||||
@@ -145,6 +147,32 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
@@ -147,6 +149,32 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
+bool CrashReporterClient::EnableBreakpadForProcess(
|
||||
+ const std::string& process_type) {
|
||||
@ -300,8 +303,8 @@ index a37619c815e3..e13a0f7ade86 100644
|
||||
int CrashReporterClient::GetAndroidMinidumpDescriptor() {
|
||||
return 0;
|
||||
@@ -175,9 +203,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
-bool CrashReporterClient::EnableBreakpadForProcess(
|
||||
- const std::string& process_type) {
|
||||
@ -315,7 +318,7 @@ index a37619c815e3..e13a0f7ade86 100644
|
||||
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h
|
||||
index 75d3d6d93873..aa86f45c9746 100644
|
||||
index 94cdee55b87c..4612a6a6461a 100644
|
||||
--- components/crash/content/app/crash_reporter_client.h
|
||||
+++ components/crash/content/app/crash_reporter_client.h
|
||||
@@ -5,7 +5,9 @@
|
||||
@ -328,7 +331,7 @@ index 75d3d6d93873..aa86f45c9746 100644
|
||||
|
||||
#include "base/strings/string16.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -91,12 +93,13 @@ class CrashReporterClient {
|
||||
@@ -91,7 +93,7 @@ class CrashReporterClient {
|
||||
virtual int GetResultCodeRespawnFailed();
|
||||
#endif
|
||||
|
||||
@ -336,14 +339,16 @@ index 75d3d6d93873..aa86f45c9746 100644
|
||||
+#if defined(OS_POSIX) && !defined(OS_IOS)
|
||||
// Returns a textual description of the product type and version to include
|
||||
// in the crash report. Neither out parameter should be set to NULL.
|
||||
virtual void GetProductNameAndVersion(const char** product_name,
|
||||
const char** version);
|
||||
// TODO(jperaza): Remove the 2-parameter overload of this method once all
|
||||
@@ -102,6 +104,7 @@ class CrashReporterClient {
|
||||
const char** version,
|
||||
const char** channel);
|
||||
|
||||
+#if !defined(OS_MACOSX)
|
||||
virtual base::FilePath GetReporterLogFilename();
|
||||
|
||||
// Custom crash minidump handler after the minidump is generated.
|
||||
@@ -105,6 +108,7 @@ class CrashReporterClient {
|
||||
@@ -110,6 +113,7 @@ class CrashReporterClient {
|
||||
// WARNING: this handler runs in a compromised context. It may not call into
|
||||
// libc nor allocate memory normally.
|
||||
virtual bool HandleCrashDump(const char* crashdump_filename);
|
||||
@ -351,7 +356,7 @@ index 75d3d6d93873..aa86f45c9746 100644
|
||||
#endif
|
||||
|
||||
// The location where minidump files should be written. Returns true if
|
||||
@@ -180,6 +184,30 @@ class CrashReporterClient {
|
||||
@@ -181,6 +185,30 @@ class CrashReporterClient {
|
||||
|
||||
// Returns true if breakpad should run in the given process type.
|
||||
virtual bool EnableBreakpadForProcess(const std::string& process_type);
|
||||
@ -383,10 +388,10 @@ index 75d3d6d93873..aa86f45c9746 100644
|
||||
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/content/app/crashpad.cc components/crash/content/app/crashpad.cc
|
||||
index 36ff7c219ad5..241156316efc 100644
|
||||
index a5f6b2e6f423..b3892d3743ff 100644
|
||||
--- components/crash/content/app/crashpad.cc
|
||||
+++ components/crash/content/app/crashpad.cc
|
||||
@@ -142,7 +142,8 @@ void InitializeCrashpadImpl(bool initial_client,
|
||||
@@ -147,7 +147,8 @@ void InitializeCrashpadImpl(bool initial_client,
|
||||
// fallback. Forwarding is turned off for debug-mode builds even for the
|
||||
// browser process, because the system's crash reporter can take a very long
|
||||
// time to chew on symbols.
|
||||
@ -397,7 +402,7 @@ index 36ff7c219ad5..241156316efc 100644
|
||||
->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled);
|
||||
}
|
||||
diff --git components/crash/content/app/crashpad_mac.mm components/crash/content/app/crashpad_mac.mm
|
||||
index 6508c2a06760..f51ce5a17e63 100644
|
||||
index eb82f44053ce..daf2c722837c 100644
|
||||
--- components/crash/content/app/crashpad_mac.mm
|
||||
+++ components/crash/content/app/crashpad_mac.mm
|
||||
@@ -16,11 +16,14 @@
|
||||
@ -415,7 +420,7 @@ index 6508c2a06760..f51ce5a17e63 100644
|
||||
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
|
||||
#include "third_party/crashpad/crashpad/client/crashpad_client.h"
|
||||
#include "third_party/crashpad/crashpad/client/crashpad_info.h"
|
||||
@@ -41,9 +44,10 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -42,9 +45,10 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
|
||||
if (initial_client) {
|
||||
@autoreleasepool {
|
||||
@ -429,7 +434,7 @@ index 6508c2a06760..f51ce5a17e63 100644
|
||||
|
||||
// Is there a way to recover if this fails?
|
||||
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
||||
@@ -55,16 +59,27 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -56,16 +60,27 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
// crash server won't have symbols for any other build types.
|
||||
std::string url = "https://clients2.google.com/cr/report";
|
||||
#else
|
||||
@ -462,7 +467,7 @@ index 6508c2a06760..f51ce5a17e63 100644
|
||||
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
// Empty means stable.
|
||||
@@ -80,12 +95,16 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -81,12 +96,16 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
process_annotations["channel"] = "";
|
||||
}
|
||||
|
||||
@ -484,7 +489,7 @@ index 6508c2a06760..f51ce5a17e63 100644
|
||||
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
@@ -107,6 +126,12 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -108,6 +127,12 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
"--reset-own-crash-exception-port-to-system-default");
|
||||
}
|
||||
|
||||
@ -498,7 +503,7 @@ index 6508c2a06760..f51ce5a17e63 100644
|
||||
handler_path, database_path, metrics_path, url, process_annotations,
|
||||
arguments, true, false);
|
||||
diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc
|
||||
index a5d1afc409f4..dc9917f7eca9 100644
|
||||
index 8b0edef1b594..22555bb9dc77 100644
|
||||
--- components/crash/content/app/crashpad_win.cc
|
||||
+++ components/crash/content/app/crashpad_win.cc
|
||||
@@ -34,8 +34,8 @@ void GetPlatformCrashpadAnnotations(
|
||||
@ -524,7 +529,7 @@ index a5d1afc409f4..dc9917f7eca9 100644
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -62,7 +62,9 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -62,7 +62,9 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
base::FilePath metrics_path; // Only valid in the browser process.
|
||||
|
||||
const char kPipeNameVar[] = "CHROME_CRASHPAD_PIPE_NAME";
|
||||
@ -534,7 +539,7 @@ index a5d1afc409f4..dc9917f7eca9 100644
|
||||
std::unique_ptr<base::Environment> env(base::Environment::Create());
|
||||
if (initial_client) {
|
||||
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
||||
@@ -82,13 +84,13 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -82,13 +84,13 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
std::string url = "https://clients2.google.com/cr/report";
|
||||
@ -549,9 +554,9 @@ index a5d1afc409f4..dc9917f7eca9 100644
|
||||
+ std::string url = crash_reporter_client->GetCrashServerURL();
|
||||
+#endif
|
||||
|
||||
wchar_t exe_file_path[MAX_PATH] = {};
|
||||
CHECK(
|
||||
@@ -103,13 +105,14 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
base::FilePath exe_file(exe_path);
|
||||
if (exe_file.empty()) {
|
||||
@@ -106,13 +108,14 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
crashpad::TriState::kEnabled, kIndirectMemoryLimit);
|
||||
}
|
||||
|
||||
@ -571,7 +576,7 @@ index a5d1afc409f4..dc9917f7eca9 100644
|
||||
if (!user_data_dir.empty()) {
|
||||
start_arguments.push_back(std::string("--user-data-dir=") +
|
||||
user_data_dir);
|
||||
@@ -120,9 +123,12 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -123,9 +126,12 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
start_arguments.push_back("/prefetch:7");
|
||||
} else {
|
||||
base::FilePath exe_dir = exe_file.DirName();
|
||||
@ -586,10 +591,10 @@ index a5d1afc409f4..dc9917f7eca9 100644
|
||||
|
||||
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
|
||||
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
|
||||
index 46954327b9c7..62a7ce8d4e46 100644
|
||||
index f66e16a2ebc2..23118ffbeb4b 100644
|
||||
--- content/browser/frame_host/debug_urls.cc
|
||||
+++ content/browser/frame_host/debug_urls.cc
|
||||
@@ -139,7 +139,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
||||
@@ -129,7 +129,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
||||
cc::switches::kEnableGpuBenchmarking) &&
|
||||
(PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_TYPED));
|
||||
|
||||
|
@ -40,10 +40,10 @@ index 6dac5f3002b3..34f5ee111d3d 100644
|
||||
virtual ~PruneCondition() {}
|
||||
|
||||
diff --git third_party/crashpad/crashpad/client/settings.cc third_party/crashpad/crashpad/client/settings.cc
|
||||
index 15d16f2e0928..5e8eadfd3ad1 100644
|
||||
index 20bd2581cd97..16d63af65e2f 100644
|
||||
--- third_party/crashpad/crashpad/client/settings.cc
|
||||
+++ third_party/crashpad/crashpad/client/settings.cc
|
||||
@@ -38,7 +38,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) {
|
||||
@@ -85,7 +85,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) {
|
||||
|
||||
struct Settings::Data {
|
||||
static const uint32_t kSettingsMagic = 'CPds';
|
||||
@ -52,7 +52,7 @@ index 15d16f2e0928..5e8eadfd3ad1 100644
|
||||
|
||||
enum Options : uint32_t {
|
||||
kUploadsEnabled = 1 << 0,
|
||||
@@ -49,6 +49,9 @@ struct Settings::Data {
|
||||
@@ -96,6 +96,9 @@ struct Settings::Data {
|
||||
options(0),
|
||||
padding_0(0),
|
||||
last_upload_attempt_time(0),
|
||||
@ -62,7 +62,7 @@ index 15d16f2e0928..5e8eadfd3ad1 100644
|
||||
client_id() {}
|
||||
|
||||
uint32_t magic;
|
||||
@@ -56,6 +59,9 @@ struct Settings::Data {
|
||||
@@ -103,6 +106,9 @@ struct Settings::Data {
|
||||
uint32_t options;
|
||||
uint32_t padding_0;
|
||||
int64_t last_upload_attempt_time; // time_t
|
||||
@ -72,7 +72,7 @@ index 15d16f2e0928..5e8eadfd3ad1 100644
|
||||
UUID client_id;
|
||||
};
|
||||
|
||||
@@ -141,6 +147,56 @@ bool Settings::SetLastUploadAttemptTime(time_t time) {
|
||||
@@ -186,6 +192,56 @@ bool Settings::SetLastUploadAttemptTime(time_t time) {
|
||||
return WriteSettings(handle.get(), settings);
|
||||
}
|
||||
|
||||
@ -130,10 +130,10 @@ index 15d16f2e0928..5e8eadfd3ad1 100644
|
||||
Settings::ScopedLockedFileHandle Settings::MakeScopedLockedFileHandle(
|
||||
FileHandle file,
|
||||
diff --git third_party/crashpad/crashpad/client/settings.h third_party/crashpad/crashpad/client/settings.h
|
||||
index b64f74fbaf28..0c3c22e215b6 100644
|
||||
index a2b0c74636f4..01370fdc20d9 100644
|
||||
--- third_party/crashpad/crashpad/client/settings.h
|
||||
+++ third_party/crashpad/crashpad/client/settings.h
|
||||
@@ -102,6 +102,11 @@ class Settings {
|
||||
@@ -111,6 +111,11 @@ class Settings {
|
||||
//! error logged.
|
||||
bool SetLastUploadAttemptTime(time_t time);
|
||||
|
||||
@ -146,7 +146,7 @@ index b64f74fbaf28..0c3c22e215b6 100644
|
||||
struct Data;
|
||||
|
||||
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
index 9c337697b605..b1fbd1de6074 100644
|
||||
index 78a4b092d8a8..c2d3acfab889 100644
|
||||
--- third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
+++ third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
@@ -12,6 +12,7 @@
|
||||
@ -179,20 +179,20 @@ index 9c337697b605..b1fbd1de6074 100644
|
||||
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
|
||||
}
|
||||
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
index 7505524b693b..4f8ceaa43bd6 100644
|
||||
index 715c533a2756..6f19e2ebc234 100644
|
||||
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
@@ -302,6 +302,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
|
||||
if (minidump_process_snapshot.Initialize(&minidump_file_reader)) {
|
||||
@@ -264,6 +264,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
|
||||
if (minidump_process_snapshot.Initialize(reader)) {
|
||||
parameters =
|
||||
BreakpadHTTPFormParametersFromMinidump(&minidump_process_snapshot);
|
||||
+ if (!parameters.empty())
|
||||
+ parameters = FilterParameters(parameters);
|
||||
}
|
||||
|
||||
if (!minidump_file_reader.SeekSet(start_offset)) {
|
||||
if (!reader->SeekSet(start_offset)) {
|
||||
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.h third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
|
||||
index cdd1502b7e2f..cb8450a892ba 100644
|
||||
index 2ec1147d2620..8ff9a72e0bd7 100644
|
||||
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
|
||||
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
|
||||
@@ -15,6 +15,7 @@
|
||||
@ -203,16 +203,16 @@ index cdd1502b7e2f..cb8450a892ba 100644
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
@@ -99,7 +100,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
||||
//! This method may be called from any thread.
|
||||
void ReportPending(const UUID& report_uuid);
|
||||
@@ -103,7 +104,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
||||
//! It is expected to only be called from the same thread that called Start().
|
||||
void Stop() override;
|
||||
|
||||
- private:
|
||||
+ protected:
|
||||
//! \brief The result code from UploadReport().
|
||||
enum class UploadResult {
|
||||
//! \brief The crash report was uploaded successfully.
|
||||
@@ -127,7 +128,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
||||
@@ -131,7 +132,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
||||
//! object was constructed with \a watch_pending_reports, it will also scan
|
||||
//! the crash report database for other pending reports, and process those as
|
||||
//! well.
|
||||
@ -221,7 +221,7 @@ index cdd1502b7e2f..cb8450a892ba 100644
|
||||
|
||||
//! \brief Processes a single pending report from the database.
|
||||
//!
|
||||
@@ -141,7 +142,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
||||
@@ -145,7 +146,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
||||
//! remain in the “pending” state. If the upload fails and no more retries are
|
||||
//! desired, or report upload is disabled, it will be marked as “completed” in
|
||||
//! the database without ever having been uploaded.
|
||||
@ -230,8 +230,8 @@ index cdd1502b7e2f..cb8450a892ba 100644
|
||||
|
||||
//! \brief Attempts to upload a crash report.
|
||||
//!
|
||||
@@ -158,6 +159,11 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
||||
UploadResult UploadReport(const CrashReportDatabase::Report* report,
|
||||
@@ -162,6 +163,11 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
||||
UploadResult UploadReport(const CrashReportDatabase::UploadReport* report,
|
||||
std::string* response_body);
|
||||
|
||||
+ using ParameterMap = std::map<std::string, std::string>;
|
||||
@ -243,12 +243,12 @@ index cdd1502b7e2f..cb8450a892ba 100644
|
||||
//! \brief Calls ProcessPendingReports() in response to ReportPending() having
|
||||
//! been called on any thread, as well as periodically on a timer.
|
||||
diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
index f175fddf6084..d6285bbf28bf 100644
|
||||
index dd7adf6503fd..4ae51a58aa6e 100644
|
||||
--- third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
+++ third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
@@ -35,8 +35,10 @@
|
||||
#include "base/metrics/persistent_histogram_allocator.h"
|
||||
@@ -36,8 +36,10 @@
|
||||
#include "base/scoped_generic.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
+#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
@ -257,8 +257,8 @@ index f175fddf6084..d6285bbf28bf 100644
|
||||
#include "client/crash_report_database.h"
|
||||
#include "client/crashpad_client.h"
|
||||
#include "client/crashpad_info.h"
|
||||
@@ -79,6 +81,10 @@
|
||||
#include "handler/fuchsia/exception_handler_server.h"
|
||||
@@ -90,6 +92,10 @@
|
||||
#include "handler/linux/exception_handler_server.h"
|
||||
#endif // OS_MACOSX
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
@ -268,7 +268,7 @@ index f175fddf6084..d6285bbf28bf 100644
|
||||
namespace crashpad {
|
||||
|
||||
namespace {
|
||||
@@ -154,6 +160,9 @@ struct Options {
|
||||
@@ -173,6 +179,9 @@ struct Options {
|
||||
bool periodic_tasks;
|
||||
bool rate_limit;
|
||||
bool upload_gzip;
|
||||
@ -278,9 +278,9 @@ index f175fddf6084..d6285bbf28bf 100644
|
||||
};
|
||||
|
||||
// Splits |key_value| on '=' and inserts the resulting key and value into |map|.
|
||||
@@ -451,6 +460,9 @@ int HandlerMain(int argc,
|
||||
kOptionResetOwnCrashExceptionPortToSystemDefault,
|
||||
#endif // OS_MACOSX
|
||||
@@ -532,6 +541,9 @@ int HandlerMain(int argc,
|
||||
kOptionInitialClientFD,
|
||||
#endif
|
||||
kOptionURL,
|
||||
+ kOptionMaxUploads,
|
||||
+ kOptionMaxDatabaseSize,
|
||||
@ -288,7 +288,7 @@ index f175fddf6084..d6285bbf28bf 100644
|
||||
|
||||
// Standard options.
|
||||
kOptionHelp = -2,
|
||||
@@ -501,6 +513,9 @@ int HandlerMain(int argc,
|
||||
@@ -589,6 +601,9 @@ int HandlerMain(int argc,
|
||||
{"url", required_argument, nullptr, kOptionURL},
|
||||
{"help", no_argument, nullptr, kOptionHelp},
|
||||
{"version", no_argument, nullptr, kOptionVersion},
|
||||
@ -298,7 +298,7 @@ index f175fddf6084..d6285bbf28bf 100644
|
||||
{nullptr, 0, nullptr, 0},
|
||||
};
|
||||
|
||||
@@ -605,6 +620,27 @@ int HandlerMain(int argc,
|
||||
@@ -714,6 +729,27 @@ int HandlerMain(int argc,
|
||||
options.url = optarg;
|
||||
break;
|
||||
}
|
||||
@ -326,28 +326,28 @@ index f175fddf6084..d6285bbf28bf 100644
|
||||
case kOptionHelp: {
|
||||
Usage(me);
|
||||
MetricsRecordExit(Metrics::LifetimeMilestone::kExitedEarly);
|
||||
@@ -772,15 +808,23 @@ int HandlerMain(int argc,
|
||||
upload_thread_options.rate_limit = options.rate_limit;
|
||||
upload_thread_options.upload_gzip = options.upload_gzip;
|
||||
upload_thread_options.watch_pending_reports = options.periodic_tasks;
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ CefCrashReportUploadThread upload_thread(database.get(),
|
||||
+ options.url,
|
||||
+ upload_thread_options,
|
||||
+ options.max_uploads);
|
||||
+#else
|
||||
CrashReportUploadThread upload_thread(database.get(),
|
||||
options.url,
|
||||
upload_thread_options);
|
||||
+#endif
|
||||
upload_thread.Start();
|
||||
@@ -822,8 +858,14 @@ int HandlerMain(int argc,
|
||||
upload_thread_options.upload_gzip = options.upload_gzip;
|
||||
upload_thread_options.watch_pending_reports = options.periodic_tasks;
|
||||
|
||||
std::unique_ptr<PruneCrashReportThread> prune_thread;
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ upload_thread.Reset(new CefCrashReportUploadThread(
|
||||
+ database.get(), options.url, upload_thread_options,
|
||||
+ options.max_uploads));
|
||||
+#else
|
||||
upload_thread.Reset(new CrashReportUploadThread(
|
||||
database.get(), options.url, upload_thread_options));
|
||||
+#endif
|
||||
upload_thread.Get()->Start();
|
||||
}
|
||||
|
||||
@@ -844,7 +886,8 @@ int HandlerMain(int argc,
|
||||
ScopedStoppable prune_thread;
|
||||
if (options.periodic_tasks) {
|
||||
prune_thread.reset(new PruneCrashReportThread(
|
||||
prune_thread.Reset(new PruneCrashReportThread(
|
||||
- database.get(), PruneCondition::GetDefault()));
|
||||
+ database.get(), PruneCondition::GetDefault(options.max_database_size,
|
||||
+ options.max_database_age)));
|
||||
prune_thread->Start();
|
||||
prune_thread.Get()->Start();
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
|
||||
index 1a93ba92a9e0..2c4b116d25ea 100644
|
||||
index cae7c566146e..95b4c23c53c9 100644
|
||||
--- content/browser/devtools/devtools_http_handler.cc
|
||||
+++ content/browser/devtools/devtools_http_handler.cc
|
||||
@@ -543,7 +543,7 @@ void DevToolsHttpHandler::OnJsonRequest(
|
||||
@@ -564,7 +564,7 @@ void DevToolsHttpHandler::OnJsonRequest(
|
||||
version.SetString("Protocol-Version",
|
||||
DevToolsAgentHost::GetProtocolVersion());
|
||||
version.SetString("WebKit-Version", GetWebKitVersion());
|
||||
|
@ -1,8 +1,36 @@
|
||||
diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
index 53c7404ef1f9..ac33df7cfe0e 100644
|
||||
--- chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
+++ chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/values.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/extensions/extension_tab_util.h"
|
||||
#include "chrome/browser/prerender/prerender_contents.h"
|
||||
#include "chrome/common/extensions/api/streams_private.h"
|
||||
@@ -79,6 +80,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
|
||||
if (!web_contents)
|
||||
return;
|
||||
|
||||
+#if !BUILDFLAG(ENABLE_CEF)
|
||||
// If the request was for a prerender, abort the prerender and do not
|
||||
// continue. This is because plugins cancel prerender, see
|
||||
// http://crbug.com/343590.
|
||||
@@ -88,6 +90,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
|
||||
prerender_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD);
|
||||
return;
|
||||
}
|
||||
+#endif // !BUILDFLAG(ENABLE_CEF)
|
||||
|
||||
auto* browser_context = web_contents->GetBrowserContext();
|
||||
StreamsPrivateAPI* streams_private = GetStreamsPrivateAPI(browser_context);
|
||||
diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc
|
||||
index d7342d69dd8e..33d538952375 100644
|
||||
index 33678d6f3cbf..e16bd447aea2 100644
|
||||
--- content/browser/frame_host/render_frame_host_manager.cc
|
||||
+++ content/browser/frame_host/render_frame_host_manager.cc
|
||||
@@ -891,10 +891,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
|
||||
@@ -898,10 +898,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
|
||||
// TODO(alexmos): This check should've been enforced earlier in the
|
||||
// navigation, in chrome::Navigate(). Verify this, and then convert this to
|
||||
// a CHECK and remove the fallback.
|
||||
@ -18,7 +46,7 @@ index d7342d69dd8e..33d538952375 100644
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1033,7 +1034,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
|
||||
@@ -1041,7 +1042,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
|
||||
|
||||
// Double-check that the new SiteInstance is associated with the right
|
||||
// BrowserContext.
|
||||
@ -29,10 +57,10 @@ index d7342d69dd8e..33d538952375 100644
|
||||
// If |new_instance| is a new SiteInstance for a subframe that requires a
|
||||
// dedicated process, set its process reuse policy so that such subframes are
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index 5373ee07b5cd..2558e590ba7c 100644
|
||||
index a9818834fec3..d21e360bea01 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -354,6 +354,13 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -366,6 +366,13 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const GURL& current_url,
|
||||
const GURL& new_url);
|
||||
|
||||
@ -47,7 +75,7 @@ index 5373ee07b5cd..2558e590ba7c 100644
|
||||
// current SiteInstance, if it does not yet have a site.
|
||||
virtual bool ShouldAssignSiteForURL(const GURL& url);
|
||||
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
|
||||
index d60c12116dcc..70d376348c46 100644
|
||||
index a5a821840124..a2a8a0d63272 100644
|
||||
--- extensions/browser/extension_host.cc
|
||||
+++ extensions/browser/extension_host.cc
|
||||
@@ -68,11 +68,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
|
||||
@ -117,7 +145,7 @@ index d60c12116dcc..70d376348c46 100644
|
||||
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
|
||||
|
||||
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
|
||||
index 34812c083bf5..1ccfaf6e1c45 100644
|
||||
index c93e3a48c7ee..ff6e2dbbca56 100644
|
||||
--- extensions/browser/extension_host.h
|
||||
+++ extensions/browser/extension_host.h
|
||||
@@ -51,13 +51,19 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git .gn .gn
|
||||
index 50a8a2fe9f1e..719adff0da9b 100644
|
||||
index 2bcaabc1330e..6e6cbb542a59 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -241,6 +241,8 @@ exec_script_whitelist =
|
||||
@@ -244,6 +244,8 @@ exec_script_whitelist =
|
||||
# in the Chromium repo outside of //build.
|
||||
"//build_overrides/build.gni",
|
||||
|
||||
@ -12,10 +12,10 @@ index 50a8a2fe9f1e..719adff0da9b 100644
|
||||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 161519ebfeac..c034f54603e8 100644
|
||||
index acd17275a438..52ea2a4654b0 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -190,6 +190,7 @@ group("gn_all") {
|
||||
@@ -192,6 +192,7 @@ group("gn_all") {
|
||||
|
||||
if (!is_ios && !is_fuchsia) {
|
||||
deps += [
|
||||
@ -56,10 +56,10 @@ index 982fbe8d3f0d..e757be4688f1 100644
|
||||
+ "studio path")
|
||||
}
|
||||
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
|
||||
index a1d2ea4b2394..50514a54e64f 100644
|
||||
index fce62521a385..73fa49852fd6 100644
|
||||
--- build/toolchain/win/setup_toolchain.py
|
||||
+++ build/toolchain/win/setup_toolchain.py
|
||||
@@ -132,19 +132,22 @@ def _LoadToolchainEnv(cpu, sdk_dir):
|
||||
@@ -134,26 +134,29 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store):
|
||||
# variable.
|
||||
if 'VSINSTALLDIR' in os.environ:
|
||||
del os.environ['VSINSTALLDIR']
|
||||
@ -70,21 +70,35 @@ index a1d2ea4b2394..50514a54e64f 100644
|
||||
- raise Exception('%s is missing - make sure VC++ tools are installed.' %
|
||||
- script_path)
|
||||
- script_path = other_path
|
||||
- cpu_arg = "amd64"
|
||||
- if (cpu != 'x64'):
|
||||
- # x64 is default target CPU thus any other CPU requires a target set
|
||||
- cpu_arg += '_' + cpu
|
||||
- args = [script_path, cpu_arg]
|
||||
- # Store target must come before any SDK version declaration
|
||||
- if (target_store):
|
||||
- args.append(['store'])
|
||||
- # Chromium requires the 10.0.15063.468 SDK - previous versions don't have
|
||||
- # all of the required declarations and 10.0.16299.0 has some
|
||||
- # incompatibilities (crbug.com/773476).
|
||||
- args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64',
|
||||
- '10.0.15063.0']
|
||||
- args.append('10.0.15063.0')
|
||||
- variables = _LoadEnvFromBat(args)
|
||||
+ script_path = os.path.normpath(os.path.join(
|
||||
+ os.environ['GYP_MSVS_OVERRIDE_PATH'],
|
||||
+ 'VC/Auxiliary/Build/vcvarsall.bat'))
|
||||
+ if os.path.exists(script_path):
|
||||
+ cpu_arg = "amd64"
|
||||
+ if (cpu != 'x64'):
|
||||
+ # x64 is default target CPU thus any other CPU requires a target set
|
||||
+ cpu_arg += '_' + cpu
|
||||
+ args = [script_path, cpu_arg]
|
||||
+ # Store target must come before any SDK version declaration
|
||||
+ if (target_store):
|
||||
+ args.append(['store'])
|
||||
+ # Chromium requires the 10.0.15063.468 SDK - previous versions don't have
|
||||
+ # all of the required declarations and 10.0.16299.0 has some
|
||||
+ # incompatibilities (crbug.com/773476).
|
||||
+ args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64',
|
||||
+ '10.0.15063.0']
|
||||
+ args.append('10.0.15063.0')
|
||||
+ variables = _LoadEnvFromBat(args)
|
||||
+ else:
|
||||
+ variables = []
|
||||
@ -96,7 +110,7 @@ index a1d2ea4b2394..50514a54e64f 100644
|
||||
|
||||
|
||||
diff --git build/vs_toolchain.py build/vs_toolchain.py
|
||||
index 5f9541e4556f..c1144b30f237 100755
|
||||
index 6060415bda86..1cc1eaae0a1d 100755
|
||||
--- build/vs_toolchain.py
|
||||
+++ build/vs_toolchain.py
|
||||
@@ -81,11 +81,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||
@ -119,10 +133,10 @@ index 5f9541e4556f..c1144b30f237 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/chrome_paks.gni chrome/chrome_paks.gni
|
||||
index 94c5f759a0dd..a166b6302eeb 100644
|
||||
index 6d412994ffd8..575536f80166 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -253,7 +253,7 @@ template("chrome_paks") {
|
||||
@@ -257,7 +257,7 @@ template("chrome_paks") {
|
||||
}
|
||||
|
||||
input_locales = locales
|
||||
@ -132,10 +146,10 @@ index 94c5f759a0dd..a166b6302eeb 100644
|
||||
if (is_mac) {
|
||||
output_locales = locales_as_mac_outputs
|
||||
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
|
||||
index 3ed598db3989..b23170bc4591 100644
|
||||
index c365088b90b7..29c28300979e 100644
|
||||
--- chrome/installer/mini_installer/BUILD.gn
|
||||
+++ chrome/installer/mini_installer/BUILD.gn
|
||||
@@ -143,7 +143,7 @@ template("generate_mini_installer") {
|
||||
@@ -133,7 +133,7 @@ template("generate_mini_installer") {
|
||||
inputs = [
|
||||
"$chrome_dll_file",
|
||||
"$root_out_dir/chrome.exe",
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids
|
||||
index 499d041b08c0..b036897264f7 100644
|
||||
index 3539e7ce5ab4..53a318e3cf14 100644
|
||||
--- tools/gritsettings/resource_ids
|
||||
+++ tools/gritsettings/resource_ids
|
||||
@@ -396,4 +396,11 @@
|
||||
@@ -408,4 +408,11 @@
|
||||
# Please read the header and find the right section above instead.
|
||||
|
||||
# Resource ids starting at 31000 are reserved for projects built on Chromium.
|
||||
|
@ -1,15 +1,15 @@
|
||||
diff --git ui/base/ime/input_method_win.cc ui/base/ime/input_method_win.cc
|
||||
index 06f8831222dd..68297ba47dd3 100644
|
||||
--- ui/base/ime/input_method_win.cc
|
||||
+++ ui/base/ime/input_method_win.cc
|
||||
@@ -685,8 +685,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
|
||||
diff --git ui/base/ime/input_method_win_base.cc ui/base/ime/input_method_win_base.cc
|
||||
index 0e89451afb3b..1a0bdac93c1b 100644
|
||||
--- ui/base/ime/input_method_win_base.cc
|
||||
+++ ui/base/ime/input_method_win_base.cc
|
||||
@@ -53,8 +53,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const {
|
||||
// receiving keyboard input as long as it is an active window. This works well
|
||||
// even when the |attached_window_handle| becomes active but has not received
|
||||
// WM_FOCUS yet.
|
||||
+ // With CEF |toplevel_window_handle_| may be a child window.
|
||||
return toplevel_window_handle_ &&
|
||||
- GetActiveWindow() == toplevel_window_handle_;
|
||||
+ GetActiveWindow() == ::GetAncestor(toplevel_window_handle_, GA_ROOT);
|
||||
- GetActiveWindow() == toplevel_window_handle_;
|
||||
+ GetActiveWindow() == ::GetAncestor(toplevel_window_handle_, GA_ROOT);
|
||||
}
|
||||
|
||||
ui::EventDispatchDetails InputMethodWin::DispatchFabricatedKeyEvent(
|
||||
LRESULT InputMethodWinBase::OnChar(HWND window_handle,
|
||||
|
@ -1,14 +1,14 @@
|
||||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index 9a10137aa405..6dd8033a0b33 100644
|
||||
index 461e62da2d50..7cd9237c03ca 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -137,7 +137,7 @@ declare_args() {
|
||||
is_posix && !using_sanitizer && !(is_android && use_order_profiling) &&
|
||||
((use_lld && !is_nacl) ||
|
||||
(use_gold &&
|
||||
- ((!is_android && linux_use_bundled_binutils) || is_chromeos ||
|
||||
+ ((!is_android && linux_use_bundled_binutils && current_cpu != "x86") || is_chromeos ||
|
||||
!(current_cpu == "x86" || current_cpu == "x64"))))
|
||||
@@ -149,7 +149,7 @@ declare_args() {
|
||||
!(is_android && use_order_profiling) &&
|
||||
((use_lld && !is_nacl) ||
|
||||
(use_gold &&
|
||||
- ((!is_android && linux_use_bundled_binutils) || is_chromeos ||
|
||||
+ ((!is_android && linux_use_bundled_binutils && current_cpu != "x86") || is_chromeos ||
|
||||
!(current_cpu == "x86" || current_cpu == "x64"))))
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/libgtkui/gtk_util.cc chrome/browser/ui/libgtkui/gtk_util.cc
|
||||
@ -60,3 +60,18 @@ index 96f8c0e71472..49c462b37e12 100644
|
||||
|
||||
ScopedStyleContext child_context(gtk_style_context_new());
|
||||
gtk_style_context_set_path(child_context, path);
|
||||
diff --git third_party/unrar/BUILD.gn third_party/unrar/BUILD.gn
|
||||
index 6e2bc75171ee..9275f68d12e3 100644
|
||||
--- third_party/unrar/BUILD.gn
|
||||
+++ third_party/unrar/BUILD.gn
|
||||
@@ -56,6 +56,10 @@ if (safe_browsing_mode == 1) {
|
||||
"src/volume.cpp",
|
||||
]
|
||||
|
||||
+ if (is_posix && !is_mac) {
|
||||
+ sources += [ "src/global.cpp" ]
|
||||
+ }
|
||||
+
|
||||
configs -= [
|
||||
"//build/config/compiler:chromium_code",
|
||||
"//build/config/compiler:no_exceptions",
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
|
||||
index 828ce9bb0138..1301e6cc1d14 100644
|
||||
index d58e64ff1939..d83df5dc84ee 100644
|
||||
--- ui/gl/init/gl_initializer_mac.cc
|
||||
+++ ui/gl/init/gl_initializer_mac.cc
|
||||
@@ -40,11 +40,8 @@ bool InitializeOneOffForSandbox() {
|
||||
@@ -47,11 +47,8 @@ bool InitializeOneOffForSandbox() {
|
||||
// GPU-related stuff is very slow without this, probably because
|
||||
// the sandbox prevents loading graphics drivers or some such.
|
||||
std::vector<CGLPixelFormatAttribute> attribs;
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h
|
||||
index 27ee7fe8155b..353a61c3badd 100644
|
||||
index 439d364fc54c..6cbe494e7041 100644
|
||||
--- base/message_loop/message_loop.h
|
||||
+++ base/message_loop/message_loop.h
|
||||
@@ -266,6 +266,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
|
||||
@@ -257,6 +257,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
|
||||
void AddTaskObserver(TaskObserver* task_observer);
|
||||
void RemoveTaskObserver(TaskObserver* task_observer);
|
||||
|
||||
@ -19,7 +19,7 @@ index 27ee7fe8155b..353a61c3badd 100644
|
||||
// Returns true if the message loop is idle (ignoring delayed tasks). This is
|
||||
// the same condition which triggers DoWork() to return false: i.e.
|
||||
// out of tasks which can be processed at the current run-level -- there might
|
||||
@@ -373,6 +383,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
|
||||
@@ -358,6 +368,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
|
||||
// is known to generate a system-driven nested loop.
|
||||
bool task_execution_allowed_ = true;
|
||||
|
||||
@ -33,10 +33,10 @@ index 27ee7fe8155b..353a61c3badd 100644
|
||||
// if type_ is TYPE_CUSTOM and pump_ is null.
|
||||
MessagePumpFactoryCallback pump_factory_;
|
||||
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
|
||||
index 5069b8524924..e88a3c7974f2 100644
|
||||
index b145a1d54a32..9b28169050b2 100644
|
||||
--- base/message_loop/message_pump_win.cc
|
||||
+++ base/message_loop/message_pump_win.cc
|
||||
@@ -366,20 +366,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
|
||||
@@ -372,20 +372,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
|
||||
}
|
||||
|
||||
bool MessagePumpForUI::ProcessPumpReplacementMessage() {
|
||||
|
@ -55,10 +55,10 @@ index fb6f4847cfe9..aa4c1cdafb9f 100644
|
||||
|
||||
} // namespace net
|
||||
diff --git net/http/transport_security_state.cc net/http/transport_security_state.cc
|
||||
index cd4e9c74a31c..66e3598bb127 100644
|
||||
index 2f07f68ace0d..8c223aed6210 100644
|
||||
--- net/http/transport_security_state.cc
|
||||
+++ net/http/transport_security_state.cc
|
||||
@@ -1564,8 +1564,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
|
||||
@@ -1581,8 +1581,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
|
||||
sent_expect_ct_reports_cache_.Clear();
|
||||
}
|
||||
|
||||
@ -72,10 +72,10 @@ index cd4e9c74a31c..66e3598bb127 100644
|
||||
// We consider built-in information to be timely for 10 weeks.
|
||||
return (base::Time::Now() - build_time).InDays() < 70 /* 10 weeks */;
|
||||
diff --git net/http/transport_security_state.h net/http/transport_security_state.h
|
||||
index 79d3a1c3453f..d97e26b4b024 100644
|
||||
index cf034710df38..d53de146034e 100644
|
||||
--- net/http/transport_security_state.h
|
||||
+++ net/http/transport_security_state.h
|
||||
@@ -576,6 +576,10 @@ class NET_EXPORT TransportSecurityState {
|
||||
@@ -582,6 +582,10 @@ class NET_EXPORT TransportSecurityState {
|
||||
// Expect-CT reports.
|
||||
void ClearReportCachesForTesting();
|
||||
|
||||
@ -86,7 +86,7 @@ index 79d3a1c3453f..d97e26b4b024 100644
|
||||
private:
|
||||
friend class TransportSecurityStateTest;
|
||||
friend class TransportSecurityStateStaticFuzzer;
|
||||
@@ -596,7 +600,7 @@ class NET_EXPORT TransportSecurityState {
|
||||
@@ -602,7 +606,7 @@ class NET_EXPORT TransportSecurityState {
|
||||
// IsBuildTimely returns true if the current build is new enough ensure that
|
||||
// built in security information (i.e. HSTS preloading and pinning
|
||||
// information) is timely.
|
||||
@ -95,7 +95,7 @@ index 79d3a1c3453f..d97e26b4b024 100644
|
||||
|
||||
// Helper method for actually checking pins.
|
||||
PKPStatus CheckPublicKeyPinsImpl(
|
||||
@@ -705,6 +709,8 @@ class NET_EXPORT TransportSecurityState {
|
||||
@@ -711,6 +715,8 @@ class NET_EXPORT TransportSecurityState {
|
||||
// True if public key pinning bypass is enabled for local trust anchors.
|
||||
bool enable_pkp_bypass_for_local_trust_anchors_;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git net/url_request/url_request.h net/url_request/url_request.h
|
||||
index c0fc8aeee535..0a16da034f80 100644
|
||||
index 57273101f211..cbd357b4d910 100644
|
||||
--- net/url_request/url_request.h
|
||||
+++ net/url_request/url_request.h
|
||||
@@ -705,10 +705,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
|
||||
@@ -712,10 +712,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
|
||||
void set_socket_tag(const SocketTag& socket_tag);
|
||||
const SocketTag& socket_tag() const { return socket_tag_; }
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user