mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d49d25f881 | ||
|
3e1975534a | ||
|
d1df1907f3 | ||
|
5aa6c55c50 | ||
|
6c5418d0e9 | ||
|
d0bfc4d2a4 | ||
|
8e7c5d6568 | ||
|
7735948042 | ||
|
7f6bb962eb | ||
|
8235330984 | ||
|
45b333fa44 | ||
|
0cf891e89a | ||
|
5211ca6298 | ||
|
bcb7529ed3 | ||
|
0fee952053 | ||
|
30bfedfb19 | ||
|
1e6d036cfe | ||
|
173d79a417 | ||
|
9dcab19430 | ||
|
049cf31b62 | ||
|
ddd0e80cbd | ||
|
828e17ec28 | ||
|
6f88af7923 | ||
|
bdc3b2a5ce | ||
|
69868374eb |
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/buildflags/buildflags.gni")
|
||||
import("//extensions/features/features.gni")
|
||||
import("//media/media_options.gni")
|
||||
import("//mojo/public/tools/bindings/mojom.gni")
|
||||
import("//ppapi/buildflags/buildflags.gni")
|
||||
import("//printing/buildflags/buildflags.gni")
|
||||
import("//ppapi/features/features.gni")
|
||||
import("//printing/features/features.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/buildflags:buildflags",
|
||||
"//printing/buildflags:buildflags",
|
||||
"//ppapi/features:features",
|
||||
"//printing/features:features",
|
||||
"//ui/base:ui_features",
|
||||
]
|
||||
}
|
||||
@@ -698,9 +698,10 @@ 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",
|
||||
@@ -710,8 +711,8 @@ static_library("libcef_static") {
|
||||
"//net:net_utility_services",
|
||||
"//net:net_with_v8",
|
||||
"//pdf",
|
||||
"//ppapi/buildflags",
|
||||
"//printing/buildflags",
|
||||
"//ppapi/features",
|
||||
"//printing/features",
|
||||
"//services/network:network_service",
|
||||
"//services/network/public/cpp",
|
||||
"//services/service_manager/embedder",
|
||||
@@ -719,14 +720,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",
|
||||
"//third_party/widevine/cdm:widevinecdmadapter",
|
||||
"//third_party/icu",
|
||||
"//third_party/zlib:minizip",
|
||||
"//ui/base",
|
||||
@@ -1074,11 +1075,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",
|
||||
]
|
||||
|
||||
@@ -1086,18 +1087,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/blink/public:scaled_resources_${percent}_percent",
|
||||
"//third_party/WebKit/public:scaled_resources_${percent}_percent",
|
||||
]
|
||||
|
||||
if (toolkit_views) {
|
||||
@@ -1214,6 +1215,7 @@ 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",
|
||||
@@ -1222,13 +1224,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",
|
||||
@@ -1237,7 +1239,6 @@ repack("pak") {
|
||||
"//content/browser/tracing:resources",
|
||||
"//content:resources",
|
||||
"//net:net_resources",
|
||||
"//third_party/blink/public:resources",
|
||||
]
|
||||
|
||||
output = "$root_out_dir/cef.pak"
|
||||
@@ -1274,6 +1275,9 @@ 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",
|
||||
@@ -1288,7 +1292,6 @@ 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",
|
||||
@@ -1354,6 +1357,7 @@ 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 = [
|
||||
@@ -1362,6 +1366,7 @@ if (is_mac) {
|
||||
":pak_200_percent",
|
||||
":pak_devtools",
|
||||
":pak_extensions",
|
||||
"//third_party/widevine/cdm:widevinecdmadapter",
|
||||
]
|
||||
|
||||
if (icu_use_data_file) {
|
||||
@@ -1389,11 +1394,6 @@ 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/Versions/A/$output_name
|
||||
# $app_name.app/Contents/Frameworks/$output_name.framework/$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': 'refs/tags/67.0.3396.79',
|
||||
'chromium_checkout': 'refs/tags/66.0.3359.181',
|
||||
}
|
||||
|
@@ -159,6 +159,7 @@
|
||||
'tests/shared/browser/main_message_loop_std.cc',
|
||||
'tests/shared/browser/main_message_loop_std.h',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
'tests/shared/browser/resource_util.h',
|
||||
],
|
||||
'shared_sources_common': [
|
||||
'tests/shared/common/client_app.cc',
|
||||
|
@@ -86,8 +86,7 @@ if(OS_LINUX)
|
||||
-Werror # Treat warnings as errors
|
||||
-Wno-missing-field-initializers # Don't warn about missing field initializers
|
||||
-Wno-unused-parameter # Don't warn about unused parameters
|
||||
-Wno-error=comment # Don't warn about code in comments
|
||||
-Wno-comment # Don't warn about code in comments
|
||||
-Wno-error=comment # Don't complain about code in ascii art
|
||||
)
|
||||
list(APPEND CEF_C_COMPILER_FLAGS
|
||||
-std=c99 # Use the C99 language standard
|
||||
@@ -337,15 +336,12 @@ if(OS_WINDOWS)
|
||||
option(USE_SANDBOX "Enable or disable use of the sandbox." ON)
|
||||
if(USE_SANDBOX)
|
||||
# Check if the current MSVC version is compatible with the cef_sandbox.lib
|
||||
# static library. For a list of all version numbers see
|
||||
# https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering
|
||||
# static library.
|
||||
list(APPEND supported_msvc_versions
|
||||
1900 # VS2015 and updates 1, 2, & 3
|
||||
1910 # VS2017 version 15.1 & 15.2
|
||||
1911 # VS2017 version 15.3 & 15.4
|
||||
1912 # VS2017 version 15.5
|
||||
1913 # VS2017 version 15.6
|
||||
1914 # VS2017 version 15.7
|
||||
)
|
||||
list(FIND supported_msvc_versions ${MSVC_VERSION} _index)
|
||||
if (${_index} EQUAL -1)
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=8815d0d0778cc210fb6f9ede9dafc5ca51124169$
|
||||
// $hash=ec4f722423ff89dd2ff61fd3336bda1776081023$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
|
||||
@@ -202,6 +202,9 @@ 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,6 +179,9 @@ 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,11 +1423,6 @@ 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_resolution_service.h"
|
||||
#include "net/proxy_resolution/proxy_service.h"
|
||||
|
||||
using content::BrowserThread;
|
||||
|
||||
@@ -176,11 +176,11 @@ class CefVisitedLinkListener : public visitedlink::VisitedLinkMaster::Listener {
|
||||
|
||||
// visitedlink::VisitedLinkMaster::Listener methods.
|
||||
|
||||
void NewTable(base::ReadOnlySharedMemoryRegion* table_region) override {
|
||||
void NewTable(mojo::SharedBufferHandle table) override {
|
||||
CEF_REQUIRE_UIT();
|
||||
ListenerMap::iterator it = listener_map_.begin();
|
||||
for (; it != listener_map_.end(); ++it)
|
||||
it->second->NewTable(table_region);
|
||||
it->second->NewTable(table);
|
||||
}
|
||||
|
||||
void Add(visitedlink::VisitedLinkCommon::Fingerprint fingerprint) override {
|
||||
@@ -462,8 +462,10 @@ net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
|
||||
// data in its installation directory).
|
||||
extensions::InfoMap* extension_info_map = extension_system()->info_map();
|
||||
(*protocol_handlers)[extensions::kExtensionScheme] =
|
||||
extensions::CreateExtensionProtocolHandler(IsOffTheRecord(),
|
||||
extension_info_map);
|
||||
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
||||
extensions::CreateExtensionProtocolHandler(IsOffTheRecord(),
|
||||
extension_info_map)
|
||||
.release());
|
||||
}
|
||||
|
||||
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/blink/public/web/web_find_options.h"
|
||||
#include "third_party/WebKit/public/web/WebFindOptions.h"
|
||||
#include "ui/events/base_event_utils.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
@@ -999,17 +999,16 @@ void CefBrowserHostImpl::SetAutoResizeEnabled(bool enabled,
|
||||
return;
|
||||
}
|
||||
|
||||
if (enabled == auto_resize_enabled_)
|
||||
if (!web_contents() || !web_contents()->GetRenderViewHost())
|
||||
return;
|
||||
|
||||
auto_resize_enabled_ = enabled;
|
||||
if (enabled) {
|
||||
auto_resize_min_ = gfx::Size(min_size.width, min_size.height);
|
||||
auto_resize_max_ = gfx::Size(max_size.width, max_size.height);
|
||||
web_contents()->GetRenderViewHost()->EnableAutoResize(
|
||||
gfx::Size(min_size.width, min_size.height),
|
||||
gfx::Size(max_size.width, max_size.height));
|
||||
} else {
|
||||
auto_resize_min_ = auto_resize_max_ = gfx::Size();
|
||||
web_contents()->GetRenderViewHost()->DisableAutoResize(gfx::Size());
|
||||
}
|
||||
ConfigureAutoResize();
|
||||
}
|
||||
|
||||
CefRefPtr<CefExtension> CefBrowserHostImpl::GetExtension() {
|
||||
@@ -2587,7 +2586,7 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
|
||||
}
|
||||
|
||||
bool CefBrowserHostImpl::CheckMediaAccessPermission(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
content::WebContents* web_contents,
|
||||
const GURL& security_origin,
|
||||
content::MediaStreamType type) {
|
||||
// Check media access permission without prompting the user. This is called
|
||||
@@ -2705,8 +2704,6 @@ void CefBrowserHostImpl::RenderViewDeleted(
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::RenderViewReady() {
|
||||
ConfigureAutoResize();
|
||||
|
||||
// Send the queued messages.
|
||||
queue_messages_ = false;
|
||||
while (!queued_messages_.empty()) {
|
||||
@@ -3513,20 +3510,6 @@ 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::RenderFrameHost* render_frame_host,
|
||||
bool CheckMediaAccessPermission(content::WebContents* web_contents,
|
||||
const GURL& security_origin,
|
||||
content::MediaStreamType type) override;
|
||||
bool IsNeverVisible(content::WebContents* web_contents) override;
|
||||
@@ -626,8 +626,6 @@ 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.
|
||||
@@ -729,11 +727,6 @@ 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/blink/public/web/window_features.mojom.h"
|
||||
#include "third_party/WebKit/public/web/window_features.mojom.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
|
@@ -8,7 +8,11 @@
|
||||
|
||||
#include "libcef/browser/browser_main.h"
|
||||
|
||||
#include "base/logging.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"
|
||||
|
||||
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_buildflags.h"
|
||||
#include "media/media_features.h"
|
||||
|
||||
class ChromeProfileManagerStub;
|
||||
|
||||
|
@@ -41,7 +41,6 @@
|
||||
#include "base/json/json_reader.h"
|
||||
#include "base/path_service.h"
|
||||
#include "cef/grit/cef_resources.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/chrome_service.h"
|
||||
#include "chrome/browser/plugins/plugin_info_host_impl.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -76,9 +75,7 @@
|
||||
#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"
|
||||
@@ -89,7 +86,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/blink/public/web/web_window_features.h"
|
||||
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
@@ -732,7 +729,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::AddContentDecryptionModules.
|
||||
// CefWidevineLoader::AddPepperPlugins.
|
||||
const base::FilePath& cdm_path = CefWidevineLoader::GetInstance()->path();
|
||||
if (!cdm_path.empty())
|
||||
command_line->AppendSwitchPath(switches::kWidevineCdmPath, cdm_path);
|
||||
@@ -762,10 +759,6 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
}
|
||||
}
|
||||
|
||||
std::string CefContentBrowserClient::GetApplicationLocale() {
|
||||
return g_browser_process->GetApplicationLocale();
|
||||
}
|
||||
|
||||
content::QuotaPermissionContext*
|
||||
CefContentBrowserClient::CreateQuotaPermissionContext() {
|
||||
return new CefQuotaPermissionContext();
|
||||
@@ -1032,68 +1025,6 @@ 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
|
||||
@@ -1137,18 +1068,3 @@ 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);
|
||||
}
|
||||
}
|
||||
|
@@ -60,7 +60,6 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
content::BrowserContext* context2) override;
|
||||
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
|
||||
int child_process_id) override;
|
||||
std::string GetApplicationLocale() override;
|
||||
content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
|
||||
void GetQuotaSettings(
|
||||
content::BrowserContext* context,
|
||||
@@ -128,27 +127,6 @@ 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);
|
||||
|
||||
@@ -164,11 +142,6 @@ 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_;
|
||||
|
@@ -100,7 +100,7 @@ int ResponseWriter::Finish(int net_error,
|
||||
}
|
||||
|
||||
static std::string GetFrontendURL() {
|
||||
return base::StringPrintf("%s://%s/devtools_app.html",
|
||||
return base::StringPrintf("%s://%s/inspector.html",
|
||||
content::kChromeDevToolsScheme,
|
||||
scheme::kChromeDevToolsHost);
|
||||
}
|
||||
|
@@ -142,11 +142,11 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
|
||||
return set_init_result(SUCCESS);
|
||||
}
|
||||
|
||||
bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage(std::string* error) {
|
||||
bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage() {
|
||||
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(std::string* error) {
|
||||
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(std::string* error) {
|
||||
// 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,12 +196,11 @@ bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage(std::string* error) {
|
||||
return true;
|
||||
}
|
||||
|
||||
ScriptExecutor* ExecuteCodeInTabFunction::GetScriptExecutor(
|
||||
std::string* error) {
|
||||
ScriptExecutor* ExecuteCodeInTabFunction::GetScriptExecutor() {
|
||||
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;
|
||||
|
||||
@@ -218,8 +217,7 @@ const GURL& ExecuteCodeInTabFunction::GetWebViewSrc() const {
|
||||
return GURL::EmptyGURL();
|
||||
}
|
||||
|
||||
bool ExecuteCodeInTabFunction::LoadFile(const std::string& file,
|
||||
std::string* error) {
|
||||
bool ExecuteCodeInTabFunction::LoadFile(const std::string& file) {
|
||||
if (cef_details_.LoadFile(
|
||||
file, base::BindOnce(&ExecuteCodeInTabFunction::LoadFileComplete,
|
||||
this, file))) {
|
||||
@@ -227,7 +225,7 @@ bool ExecuteCodeInTabFunction::LoadFile(const std::string& file,
|
||||
}
|
||||
|
||||
// Default handling.
|
||||
return ExecuteCodeFunction::LoadFile(file, error);
|
||||
return ExecuteCodeFunction::LoadFile(file);
|
||||
}
|
||||
|
||||
void ExecuteCodeInTabFunction::LoadFileComplete(
|
||||
@@ -241,6 +239,15 @@ 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;
|
||||
}
|
||||
@@ -257,31 +264,10 @@ 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_PRERUN_VALIDATE(params);
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
|
||||
int tab_id = params->tab_id ? *params->tab_id : -1;
|
||||
content::WebContents* web_contents = GetWebContents(tab_id);
|
||||
@@ -313,7 +299,7 @@ bool TabsSetZoomFunction::RunAsync() {
|
||||
bool TabsGetZoomFunction::RunAsync() {
|
||||
std::unique_ptr<tabs::GetZoom::Params> params(
|
||||
tabs::GetZoom::Params::Create(*args_));
|
||||
EXTENSION_FUNCTION_PRERUN_VALIDATE(params);
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
|
||||
int tab_id = params->tab_id ? *params->tab_id : -1;
|
||||
content::WebContents* web_contents = GetWebContents(tab_id);
|
||||
@@ -333,7 +319,7 @@ bool TabsSetZoomSettingsFunction::RunAsync() {
|
||||
|
||||
std::unique_ptr<tabs::SetZoomSettings::Params> params(
|
||||
tabs::SetZoomSettings::Params::Create(*args_));
|
||||
EXTENSION_FUNCTION_PRERUN_VALIDATE(params);
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
|
||||
int tab_id = params->tab_id ? *params->tab_id : -1;
|
||||
content::WebContents* web_contents = GetWebContents(tab_id);
|
||||
@@ -384,7 +370,7 @@ bool TabsSetZoomSettingsFunction::RunAsync() {
|
||||
bool TabsGetZoomSettingsFunction::RunAsync() {
|
||||
std::unique_ptr<tabs::GetZoomSettings::Params> params(
|
||||
tabs::GetZoomSettings::Params::Create(*args_));
|
||||
EXTENSION_FUNCTION_PRERUN_VALIDATE(params);
|
||||
EXTENSION_FUNCTION_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(std::string* error) override;
|
||||
ScriptExecutor* GetScriptExecutor(std::string* error) override;
|
||||
bool CanExecuteScriptOnPage() override;
|
||||
ScriptExecutor* GetScriptExecutor() override;
|
||||
bool IsWebView() const override;
|
||||
const GURL& GetWebViewSrc() const override;
|
||||
bool LoadFile(const std::string& file, std::string* error) override;
|
||||
bool LoadFile(const std::string& file) override;
|
||||
|
||||
private:
|
||||
const CefExtensionFunctionDetails cef_details_;
|
||||
@@ -78,6 +78,10 @@ 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)
|
||||
};
|
||||
|
||||
@@ -90,8 +94,7 @@ class TabsInsertCSSFunction : public ExecuteCodeInTabFunction {
|
||||
DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS)
|
||||
};
|
||||
|
||||
// Based on ChromeAsyncExtensionFunction.
|
||||
class ZoomAPIFunction : public UIThreadExtensionFunction {
|
||||
class ZoomAPIFunction : public AsyncExtensionFunction {
|
||||
public:
|
||||
ZoomAPIFunction();
|
||||
|
||||
@@ -100,26 +103,10 @@ class ZoomAPIFunction : public UIThreadExtensionFunction {
|
||||
|
||||
// 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::RenderFrameHost* render_frame_host,
|
||||
content::WebContents* web_contents,
|
||||
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::RenderFrameHost* render_frame_host,
|
||||
bool CheckMediaAccessPermission(content::WebContents* web_contents,
|
||||
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/blink/public/platform/web_gesture_event.h"
|
||||
#include "third_party/WebKit/public/platform/WebGestureEvent.h"
|
||||
|
||||
using content::NativeWebKeyboardEvent;
|
||||
using content::OpenURLParams;
|
||||
|
@@ -21,16 +21,6 @@ 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,10 +22,6 @@ 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/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"
|
||||
#include "third_party/WebKit/public/platform/WebInputEvent.h"
|
||||
#include "third_party/WebKit/public/platform/WebMouseEvent.h"
|
||||
#include "third_party/WebKit/public/platform/WebMouseWheelEvent.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/blink/public/platform/web_mouse_event.h"
|
||||
#include "third_party/blink/public/platform/web_mouse_wheel_event.h"
|
||||
#include "third_party/WebKit/public/platform/WebMouseEvent.h"
|
||||
#include "third_party/WebKit/public/platform/WebMouseWheelEvent.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 ui::PlatformEvent& xev) {
|
||||
::Window FindEventTarget(const base::NativeEvent& xev) {
|
||||
::Window target = xev->xany.window;
|
||||
if (xev->type == GenericEvent)
|
||||
target = static_cast<XIDeviceEvent*>(xev->xcookie.data)->event;
|
||||
|
@@ -22,18 +22,12 @@ class NullCookieChangeDispatcher : public net::CookieChangeDispatcher {
|
||||
std::unique_ptr<net::CookieChangeSubscription> AddCallbackForCookie(
|
||||
const GURL& url,
|
||||
const std::string& name,
|
||||
net::CookieChangeCallback callback) override {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<net::CookieChangeSubscription> AddCallbackForUrl(
|
||||
const GURL& url,
|
||||
net::CookieChangeCallback callback) override {
|
||||
net::CookieChangeCallback callback) override WARN_UNUSED_RESULT {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<net::CookieChangeSubscription> AddCallbackForAllChanges(
|
||||
net::CookieChangeCallback callback) override {
|
||||
net::CookieChangeCallback callback) override WARN_UNUSED_RESULT {
|
||||
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_buildflags.h"
|
||||
#include "net/net_features.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,16 +29,19 @@ void InstallInternalProtectedHandlers(
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
net::HostResolver* host_resolver) {
|
||||
protocol_handlers->insert(std::make_pair(
|
||||
url::kDataScheme, std::make_unique<net::DataProtocolHandler>()));
|
||||
url::kDataScheme, linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
||||
new net::DataProtocolHandler)));
|
||||
protocol_handlers->insert(std::make_pair(
|
||||
url::kFileScheme,
|
||||
std::make_unique<net::FileProtocolHandler>(
|
||||
base::CreateTaskRunnerWithTraits(
|
||||
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
||||
new 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, net::FtpProtocolHandler::Create(host_resolver)));
|
||||
url::kFtpScheme,
|
||||
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
|
||||
net::FtpProtocolHandler::Create(host_resolver).release())));
|
||||
#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_resolution_service.h"
|
||||
#include "net/proxy_resolution/proxy_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::DhcpPacFileFetcher> dhcp_pac_file_fetcher;
|
||||
net::DhcpPacFileFetcherFactory dhcp_factory;
|
||||
dhcp_pac_file_fetcher = dhcp_factory.Create(context);
|
||||
std::unique_ptr<net::DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher;
|
||||
net::DhcpProxyScriptFetcherFactory dhcp_factory;
|
||||
dhcp_proxy_script_fetcher = dhcp_factory.Create(context);
|
||||
|
||||
proxy_service = network::CreateProxyResolutionServiceUsingMojoFactory(
|
||||
proxy_service = network::CreateProxyServiceUsingMojoFactory(
|
||||
std::move(proxy_resolver_factory), std::move(proxy_config_service),
|
||||
std::make_unique<net::PacFileFetcherImpl>(context),
|
||||
std::move(dhcp_pac_file_fetcher), context->host_resolver(), net_log,
|
||||
std::make_unique<net::ProxyScriptFetcherImpl>(context),
|
||||
std::move(dhcp_proxy_script_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::kMinValue) + 1;
|
||||
i <= static_cast<unsigned>(ax::mojom::Role::kMaxValue); i++) {
|
||||
for (unsigned i = static_cast<unsigned>(ax::mojom::Role::kNone);
|
||||
i <= static_cast<unsigned>(ax::mojom::Role::kLast); 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::kMinValue) + 1;
|
||||
action_index <= static_cast<int>(ax::mojom::Action::kMaxValue);
|
||||
for (int action_index = static_cast<int>(ax::mojom::Action::kNone) + 1;
|
||||
action_index <= static_cast<int>(ax::mojom::Action::kLast);
|
||||
++action_index) {
|
||||
auto action = static_cast<ax::mojom::Action>(action_index);
|
||||
if (node.HasAction(action)) {
|
||||
|
@@ -206,8 +206,7 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
||||
content::RenderWidgetHost* widget,
|
||||
CefRenderWidgetHostViewOSR* parent_host_view,
|
||||
bool is_guest_view_hack)
|
||||
: content::RenderWidgetHostViewBase(widget),
|
||||
background_color_(background_color),
|
||||
: background_color_(background_color),
|
||||
frame_rate_threshold_us_(0),
|
||||
#if !defined(OS_MACOSX)
|
||||
compositor_widget_(gfx::kNullAcceleratedWidget),
|
||||
@@ -337,6 +336,10 @@ 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();
|
||||
}
|
||||
@@ -438,22 +441,6 @@ 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;
|
||||
@@ -741,6 +728,11 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetBoundsInRootWindow() {
|
||||
return GetViewBounds();
|
||||
}
|
||||
|
||||
content::RenderWidgetHostImpl*
|
||||
CefRenderWidgetHostViewOSR::GetRenderWidgetHostImpl() const {
|
||||
return render_widget_host_;
|
||||
}
|
||||
|
||||
viz::SurfaceId CefRenderWidgetHostViewOSR::GetCurrentSurfaceId() const {
|
||||
return GetDelegatedFrameHost()
|
||||
? GetDelegatedFrameHost()->GetCurrentSurfaceId()
|
||||
@@ -774,9 +766,7 @@ 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.thick ? ui::ImeTextSpan::Thickness::kThick
|
||||
: ui::ImeTextSpan::Thickness::kThin,
|
||||
line.color, line.background_color, std::vector<std::string>()));
|
||||
line.color, line.thick ? true : false, line.background_color));
|
||||
}
|
||||
gfx::Range range(replacement_range.from, replacement_range.to);
|
||||
|
||||
@@ -1036,7 +1026,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 (UpdateNSViewAndDisplay())
|
||||
if (browser_compositor_->UpdateNSViewAndDisplay())
|
||||
render_widget_host_->NotifyScreenInfoChanged();
|
||||
#else
|
||||
render_widget_host_->NotifyScreenInfoChanged();
|
||||
@@ -1296,11 +1286,9 @@ void CefRenderWidgetHostViewOSR::SetFrameRate() {
|
||||
osr_util::ClampFrameRate(browser->settings().windowless_frame_rate);
|
||||
frame_rate_threshold_us_ = 1000000 / frame_rate;
|
||||
|
||||
if (GetCompositor()) {
|
||||
// Configure the VSync interval for the browser process.
|
||||
GetCompositor()->vsync_manager()->SetAuthoritativeVSyncInterval(
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
}
|
||||
// Configure the VSync interval for the browser process.
|
||||
GetCompositor()->vsync_manager()->SetAuthoritativeVSyncInterval(
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
|
||||
if (copy_frame_generator_.get()) {
|
||||
copy_frame_generator_->set_frame_rate_threshold_us(
|
||||
@@ -1366,14 +1354,12 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
||||
local_surface_id_ = local_surface_id_allocator_.GenerateId();
|
||||
|
||||
GetRootLayer()->SetBounds(gfx::Rect(size));
|
||||
if (GetCompositor()) {
|
||||
GetCompositor()->SetScaleAndSize(current_device_scale_factor_,
|
||||
size_in_pixels, local_surface_id_);
|
||||
}
|
||||
GetCompositor()->SetScaleAndSize(current_device_scale_factor_, size_in_pixels,
|
||||
local_surface_id_);
|
||||
PlatformResizeCompositorWidget(size_in_pixels);
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
bool resized = UpdateNSViewAndDisplay();
|
||||
bool resized = browser_compositor_->UpdateNSViewAndDisplay();
|
||||
#else
|
||||
bool resized = true;
|
||||
GetDelegatedFrameHost()->WasResized(local_surface_id_, size,
|
||||
|
@@ -102,6 +102,7 @@ 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;
|
||||
@@ -115,12 +116,14 @@ 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)
|
||||
|
||||
@@ -155,6 +158,7 @@ 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,
|
||||
@@ -298,9 +302,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
friend class MacHelper;
|
||||
bool UpdateNSViewAndDisplay();
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
#endif
|
||||
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/blink/public/platform/web_cursor_info.h"
|
||||
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
|
||||
#include "ui/base/x/x11_util.h"
|
||||
#include "ui/gfx/x/x11_types.h"
|
||||
|
||||
|
@@ -17,16 +17,6 @@
|
||||
#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 {
|
||||
@@ -47,7 +37,7 @@ class MacHelper : public content::BrowserCompositorMacClient,
|
||||
return view_->background_color();
|
||||
}
|
||||
|
||||
void BrowserCompositorMacOnBeginFrame(base::TimeTicks frame_time) override {}
|
||||
void BrowserCompositorMacOnBeginFrame() override {}
|
||||
|
||||
void OnFrameTokenChanged(uint32_t frame_token) override {
|
||||
view_->render_widget_host()->DidProcessFrame(frame_token);
|
||||
@@ -76,8 +66,6 @@ class MacHelper : public content::BrowserCompositorMacClient,
|
||||
|
||||
void DestroyCompositorForShutdown() override {}
|
||||
|
||||
void WasResized() override { view_->render_widget_host()->WasResized(); }
|
||||
|
||||
private:
|
||||
// Guaranteed to outlive this object.
|
||||
CefRenderWidgetHostViewOSR* view_;
|
||||
@@ -89,8 +77,18 @@ 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();
|
||||
}
|
||||
@@ -108,11 +106,6 @@ 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.
|
||||
@@ -131,7 +124,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,
|
||||
GetDisplay(), AllocateFrameSinkId(is_guest_view_hack)));
|
||||
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/blink/public/platform/web_cursor_info.h"
|
||||
#include "third_party/WebKit/public/platform/WebCursorInfo.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/buildflags/buildflags.h"
|
||||
#include "extensions/features/features.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_buildflags.h"
|
||||
#include "media/media_features.h"
|
||||
|
||||
namespace renderer_prefs {
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#include "base/auto_reset.h"
|
||||
#include "base/bind.h"
|
||||
#include "base/location.h"
|
||||
#include "base/memory/ref_counted_memory.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/memory/shared_memory.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/run_loop.h"
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "mojo/public/cpp/system/buffer.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "printing/features/features.h"
|
||||
#include "printing/pdf_metafile_skia.h"
|
||||
#include "printing/print_settings.h"
|
||||
#include "printing/printed_document.h"
|
||||
@@ -108,7 +108,7 @@ bool CefPrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
|
||||
void CefPrintViewManagerBase::PrintDocument(
|
||||
PrintedDocument* document,
|
||||
const scoped_refptr<base::RefCountedMemory>& print_data,
|
||||
const scoped_refptr<base::RefCountedBytes>& print_data,
|
||||
const gfx::Size& page_size,
|
||||
const gfx::Rect& content_area,
|
||||
const gfx::Point& offsets) {
|
||||
@@ -207,13 +207,11 @@ void CefPrintViewManagerBase::OnComposePdfDone(
|
||||
|
||||
std::unique_ptr<base::SharedMemory> shared_buf =
|
||||
GetShmFromMojoHandle(std::move(handle));
|
||||
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,
|
||||
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,
|
||||
params.physical_offsets);
|
||||
}
|
||||
|
||||
@@ -240,6 +238,7 @@ 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)) {
|
||||
@@ -247,10 +246,11 @@ void CefPrintViewManagerBase::OnDidPrintDocument(
|
||||
web_contents()->Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
auto data = base::MakeRefCounted<base::RefCountedSharedMemory>(
|
||||
std::move(shared_buf), content.data_size);
|
||||
PrintDocument(document, data, params.page_size, params.content_area,
|
||||
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,
|
||||
params.physical_offsets);
|
||||
}
|
||||
|
||||
@@ -437,7 +437,7 @@ bool CefPrintViewManagerBase::CreateNewPrintJob(PrintJobWorkerOwner* job) {
|
||||
if (!job)
|
||||
return false;
|
||||
|
||||
print_job_ = base::MakeRefCounted<PrintJob>();
|
||||
print_job_ = new 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/scoped_refptr.h"
|
||||
#include "base/memory/ref_counted.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/buildflags/buildflags.h"
|
||||
#include "printing/features/features.h"
|
||||
|
||||
struct PrintHostMsg_DidPrintDocument_Params;
|
||||
|
||||
namespace base {
|
||||
class RefCountedMemory;
|
||||
class RefCountedBytes;
|
||||
}
|
||||
|
||||
namespace content {
|
||||
@@ -74,15 +74,6 @@ 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,
|
||||
@@ -119,7 +110,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::RefCountedMemory>& print_data,
|
||||
const scoped_refptr<base::RefCountedBytes>& print_data,
|
||||
const gfx::Size& page_size,
|
||||
const gfx::Rect& content_area,
|
||||
const gfx::Point& offsets);
|
||||
@@ -131,6 +122,12 @@ 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();
|
||||
@@ -166,6 +163,9 @@ 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,6 +23,7 @@
|
||||
#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/buildflags/buildflags.h"
|
||||
#include "printing/features/features.h"
|
||||
|
||||
struct PrintHostMsg_ScriptedPrint_Params;
|
||||
class Profile;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/process/launch.h"
|
||||
#include "content/public/browser/child_process_launcher_utils.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
|
||||
bool CefLaunchProcess(CefRefPtr<CefCommandLine> command_line) {
|
||||
if (!command_line.get()) {
|
||||
@@ -15,7 +15,8 @@ bool CefLaunchProcess(CefRefPtr<CefCommandLine> command_line) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!content::CurrentlyOnProcessLauncherTaskRunner()) {
|
||||
if (!content::BrowserThread::CurrentlyOn(
|
||||
content::BrowserThread::PROCESS_LAUNCHER)) {
|
||||
NOTREACHED() << "called on invalid thread";
|
||||
return false;
|
||||
}
|
||||
|
@@ -30,10 +30,65 @@
|
||||
#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(
|
||||
@@ -95,14 +150,12 @@ void CefResourceDispatcherHostDelegate::OnStreamCreated(
|
||||
stream_target_info_.find(request);
|
||||
CHECK(ix != stream_target_info_.end());
|
||||
bool embedded = info->GetResourceType() != content::RESOURCE_TYPE_MAIN_FRAME;
|
||||
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()));
|
||||
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()));
|
||||
stream_target_info_.erase(request);
|
||||
}
|
||||
|
||||
@@ -125,3 +178,17 @@ 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,6 +21,8 @@ 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,6 +28,101 @@ 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();
|
||||
@@ -37,7 +132,37 @@ CefSpeechRecognitionManagerDelegate ::CefSpeechRecognitionManagerDelegate() {
|
||||
|
||||
CefSpeechRecognitionManagerDelegate ::~CefSpeechRecognitionManagerDelegate() {}
|
||||
|
||||
void CefSpeechRecognitionManagerDelegate::OnRecognitionStart(int session_id) {}
|
||||
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::OnAudioStart(int session_id) {}
|
||||
|
||||
|
@@ -48,6 +48,13 @@ 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,16 +30,11 @@ network::mojom::NetworkContext* CefStoragePartitionProxy::GetNetworkContext() {
|
||||
return parent_->GetNetworkContext();
|
||||
}
|
||||
|
||||
scoped_refptr<network::SharedURLLoaderFactory>
|
||||
scoped_refptr<content::SharedURLLoaderFactory>
|
||||
CefStoragePartitionProxy::GetURLLoaderFactoryForBrowserProcess() {
|
||||
return parent_->GetURLLoaderFactoryForBrowserProcess();
|
||||
}
|
||||
|
||||
std::unique_ptr<network::SharedURLLoaderFactoryInfo>
|
||||
CefStoragePartitionProxy::GetURLLoaderFactoryForBrowserProcessIOThread() {
|
||||
return parent_->GetURLLoaderFactoryForBrowserProcessIOThread();
|
||||
}
|
||||
|
||||
network::mojom::CookieManager*
|
||||
CefStoragePartitionProxy::GetCookieManagerForBrowserProcess() {
|
||||
return parent_->GetCookieManagerForBrowserProcess();
|
||||
@@ -106,10 +101,6 @@ 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,10 +25,8 @@ class CefStoragePartitionProxy : public content::StoragePartition {
|
||||
net::URLRequestContextGetter* GetURLRequestContext() override;
|
||||
net::URLRequestContextGetter* GetMediaURLRequestContext() override;
|
||||
network::mojom::NetworkContext* GetNetworkContext() override;
|
||||
scoped_refptr<network::SharedURLLoaderFactory>
|
||||
scoped_refptr<content::SharedURLLoaderFactory>
|
||||
GetURLLoaderFactoryForBrowserProcess() override;
|
||||
std::unique_ptr<network::SharedURLLoaderFactoryInfo>
|
||||
GetURLLoaderFactoryForBrowserProcessIOThread() override;
|
||||
network::mojom::CookieManager* GetCookieManagerForBrowserProcess() override;
|
||||
storage::QuotaManager* GetQuotaManager() override;
|
||||
content::AppCacheService* GetAppCacheService() override;
|
||||
@@ -45,7 +43,6 @@ 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,6 +9,38 @@
|
||||
|
||||
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,
|
||||
@@ -77,7 +109,7 @@ void CefCrashReportUploadThread::ProcessPendingReport(
|
||||
return;
|
||||
}
|
||||
|
||||
std::unique_ptr<const CrashReportDatabase::UploadReport> upload_report;
|
||||
const CrashReportDatabase::Report* upload_report;
|
||||
CrashReportDatabase::OperationStatus status =
|
||||
database_->GetReportForUploading(report.uuid, &upload_report);
|
||||
switch (status) {
|
||||
@@ -101,19 +133,22 @@ void CefCrashReportUploadThread::ProcessPendingReport(
|
||||
return;
|
||||
}
|
||||
|
||||
CallRecordUploadAttempt call_record_upload_attempt(database_, upload_report);
|
||||
|
||||
std::string response_body;
|
||||
UploadResult upload_result =
|
||||
UploadReport(upload_report.get(), &response_body);
|
||||
UploadResult upload_result = UploadReport(upload_report, &response_body);
|
||||
switch (upload_result) {
|
||||
case UploadResult::kSuccess:
|
||||
// The upload completed successfully.
|
||||
database_->RecordUploadComplete(std::move(upload_report), response_body);
|
||||
call_record_upload_attempt.Disarm();
|
||||
database_->RecordUploadAttempt(upload_report, true, 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;
|
||||
|
@@ -52,7 +52,7 @@ const char kPDFPluginExtension[] = "pdf";
|
||||
const char kPDFPluginDescription[] = "Portable Document Format";
|
||||
const char kPDFPluginOutOfProcessMimeType[] = "application/x-google-chrome-pdf";
|
||||
const uint32_t kPDFPluginPermissions =
|
||||
ppapi::PERMISSION_PDF | ppapi::PERMISSION_DEV;
|
||||
ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV;
|
||||
|
||||
content::PepperPluginInfo::GetInterfaceFunc g_pdf_get_interface;
|
||||
content::PepperPluginInfo::PPP_InitializeModuleFunc g_pdf_initialize_module;
|
||||
@@ -204,21 +204,17 @@ 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,9 +33,6 @@ 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(), base::FilePath());
|
||||
std::string());
|
||||
} else {
|
||||
crash_reporter::InitializeCrashpad(
|
||||
process_type.empty(), install_static::UTF16ToUTF8(process_type));
|
||||
@@ -603,12 +603,6 @@ 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,9 +53,6 @@ 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_buildflags.h"
|
||||
#include "ipc/ipc_features.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_buildflags.h"
|
||||
#include "net/net_features.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/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"
|
||||
#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"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@@ -13,8 +13,8 @@
|
||||
#include "include/cef_request.h"
|
||||
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "third_party/blink/public/platform/web_http_body.h"
|
||||
#include "third_party/blink/public/platform/web_referrer_policy.h"
|
||||
#include "third_party/WebKit/public/platform/WebHTTPBody.h"
|
||||
#include "third_party/WebKit/public/platform/WebReferrerPolicy.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/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"
|
||||
#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"
|
||||
|
||||
#define CHECK_READONLY_RETURN_VOID() \
|
||||
if (read_only_) { \
|
||||
|
@@ -13,7 +13,6 @@
|
||||
#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;
|
||||
|
||||
@@ -74,8 +73,6 @@ 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;
|
||||
@@ -84,7 +81,7 @@ scoped_refptr<base::SingleThreadTaskRunner> CefTaskRunnerImpl::GetTaskRunner(
|
||||
};
|
||||
|
||||
if (id >= 0 &&
|
||||
BrowserThread::IsThreadInitialized(static_cast<BrowserThread::ID>(id))) {
|
||||
BrowserThread::IsMessageLoopValid(static_cast<BrowserThread::ID>(id))) {
|
||||
return BrowserThread::GetTaskRunnerForThread(
|
||||
static_cast<BrowserThread::ID>(id));
|
||||
}
|
||||
@@ -101,7 +98,7 @@ CefTaskRunnerImpl::GetCurrentTaskRunner() {
|
||||
// GetTaskRunner(). Otherwise BelongsToThread() will return incorrect results.
|
||||
BrowserThread::ID current_id;
|
||||
if (BrowserThread::GetCurrentThreadIdentifier(¤t_id) &&
|
||||
BrowserThread::IsThreadInitialized(current_id)) {
|
||||
BrowserThread::IsMessageLoopValid(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,9 +174,31 @@ 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,
|
||||
@@ -184,6 +206,13 @@ 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)) {
|
||||
@@ -257,28 +286,33 @@ std::vector<media::VideoCodec> ConvertCodecsString(const std::string& codecs) {
|
||||
return supported_video_codecs;
|
||||
}
|
||||
|
||||
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,
|
||||
void RegisterWidevineCdmOnUIThread(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,
|
||||
CefRefPtr<CefRegisterCdmCallback> callback) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
// Register Widevine with the CdmRegistry.
|
||||
content::CdmRegistry::GetInstance()->RegisterCdm(MakeCdmInfo(
|
||||
cdm_path, cdm_version, cdm_codecs, supports_persistent_license));
|
||||
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));
|
||||
|
||||
DeliverWidevineCdmCallback(CEF_CDM_REGISTRATION_ERROR_NONE, std::string(),
|
||||
callback);
|
||||
@@ -289,14 +323,15 @@ 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_path, &cdm_version, &cdm_codecs,
|
||||
&supports_persistent_license, &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);
|
||||
if (result != CEF_CDM_REGISTRATION_ERROR_NONE) {
|
||||
CEF_POST_TASK(CEF_UIT, base::Bind(DeliverWidevineCdmCallback, result,
|
||||
error_message, callback));
|
||||
@@ -305,8 +340,9 @@ void LoadWidevineCdmInfoOnBlockingThread(
|
||||
|
||||
// Continue execution on the UI thread.
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::Bind(RegisterWidevineCdmOnUIThread, cdm_path, cdm_version,
|
||||
cdm_codecs, supports_persistent_license, callback));
|
||||
base::Bind(RegisterWidevineCdmOnUIThread, cdm_adapter_path,
|
||||
cdm_path, cdm_version, cdm_codecs,
|
||||
supports_persistent_license, callback));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -343,9 +379,8 @@ void CefWidevineLoader::OnContextInitialized() {
|
||||
#if defined(OS_LINUX)
|
||||
|
||||
// static
|
||||
void CefWidevineLoader::AddContentDecryptionModules(
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
|
||||
void CefWidevineLoader::AddPepperPlugins(
|
||||
std::vector<content::PepperPluginInfo>* plugins) {
|
||||
const base::CommandLine& command_line =
|
||||
*base::CommandLine::ForCurrentProcess();
|
||||
|
||||
@@ -374,16 +409,18 @@ void CefWidevineLoader::AddContentDecryptionModules(
|
||||
std::string cdm_codecs;
|
||||
bool supports_persistent_license;
|
||||
std::string error_message;
|
||||
cef_cdm_registration_error_t result =
|
||||
LoadWidevineCdmInfo(base_path, &cdm_path, &cdm_version, &cdm_codecs,
|
||||
&supports_persistent_license, &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);
|
||||
if (result != CEF_CDM_REGISTRATION_ERROR_NONE) {
|
||||
LOG(ERROR) << "Widevine CDM registration failed; " << error_message;
|
||||
return;
|
||||
}
|
||||
|
||||
cdms->push_back(MakeCdmInfo(cdm_path, cdm_version, cdm_codecs,
|
||||
supports_persistent_license));
|
||||
content::PepperPluginInfo widevine_cdm;
|
||||
GetPluginInfo(cdm_adapter_path, cdm_path, cdm_version, cdm_codecs,
|
||||
supports_persistent_license, &widevine_cdm);
|
||||
plugins->push_back(widevine_cdm);
|
||||
}
|
||||
|
||||
#endif // defined(OS_LINUX)
|
||||
|
@@ -19,11 +19,7 @@
|
||||
#include "base/lazy_instance.h"
|
||||
|
||||
namespace content {
|
||||
struct CdmInfo;
|
||||
}
|
||||
|
||||
namespace media {
|
||||
struct CdmHostFilePath;
|
||||
struct PepperPluginInfo;
|
||||
}
|
||||
|
||||
class CefWidevineLoader {
|
||||
@@ -42,12 +38,10 @@ class CefWidevineLoader {
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
// The zygote process which is used when the sandbox is enabled on Linux
|
||||
// requires early loading of CDM modules. Other processes will receive
|
||||
// requires early loading of pepper plugins. Other processes will receive
|
||||
// load notification in the usual way.
|
||||
// Called from CefContentClient::AddContentDecryptionModules.
|
||||
static void AddContentDecryptionModules(
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths);
|
||||
// Called from CefContentClient::AddPepperPlugins.
|
||||
static void AddPepperPlugins(std::vector<content::PepperPluginInfo>* plugins);
|
||||
|
||||
const base::FilePath& path() { return path_; }
|
||||
#endif
|
||||
|
@@ -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/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"
|
||||
#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"
|
||||
|
||||
using blink::WebFrame;
|
||||
using blink::WebLocalFrame;
|
||||
@@ -72,25 +72,25 @@ CefRefPtr<CefBrowserHost> CefBrowserImpl::GetHost() {
|
||||
bool CefBrowserImpl::CanGoBack() {
|
||||
CEF_REQUIRE_RT_RETURN(false);
|
||||
|
||||
return blink_glue::CanGoBack(render_view()->GetWebView());
|
||||
return webkit_glue::CanGoBack(render_view()->GetWebView());
|
||||
}
|
||||
|
||||
void CefBrowserImpl::GoBack() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
|
||||
blink_glue::GoBack(render_view()->GetWebView());
|
||||
webkit_glue::GoBack(render_view()->GetWebView());
|
||||
}
|
||||
|
||||
bool CefBrowserImpl::CanGoForward() {
|
||||
CEF_REQUIRE_RT_RETURN(false);
|
||||
|
||||
return blink_glue::CanGoForward(render_view()->GetWebView());
|
||||
return webkit_glue::CanGoForward(render_view()->GetWebView());
|
||||
}
|
||||
|
||||
void CefBrowserImpl::GoForward() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
|
||||
blink_glue::GoForward(render_view()->GetWebView());
|
||||
webkit_glue::GoForward(render_view()->GetWebView());
|
||||
}
|
||||
|
||||
bool CefBrowserImpl::IsLoading() {
|
||||
@@ -345,15 +345,15 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
||||
if (it != frames_.end())
|
||||
return it->second;
|
||||
|
||||
CefRefPtr<CefFrameImpl> framePtr(new CefFrameImpl(this, frame, frame_id));
|
||||
CefRefPtr<CefFrameImpl> framePtr(new CefFrameImpl(this, frame));
|
||||
frames_.insert(std::make_pair(frame_id, framePtr));
|
||||
|
||||
const int64_t parent_id = frame->Parent() == NULL
|
||||
? blink_glue::kInvalidFrameId
|
||||
? webkit_glue::kInvalidFrameId
|
||||
: frame->Parent()->IsWebLocalFrame()
|
||||
? render_frame_util::GetIdentifier(
|
||||
frame->Parent()->ToWebLocalFrame())
|
||||
: blink_glue::kInvalidFrameId;
|
||||
: webkit_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 == blink_glue::kInvalidFrameId) {
|
||||
if (frame_id == webkit_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 = blink_glue::DumpDocumentText(web_frame);
|
||||
response = webkit_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 = blink_glue::CanGoBack(web_view);
|
||||
const bool canGoForward = blink_glue::CanGoForward(web_view);
|
||||
const bool canGoBack = webkit_glue::CanGoBack(web_view);
|
||||
const bool canGoForward = webkit_glue::CanGoForward(web_view);
|
||||
|
||||
load_handler->OnLoadingStateChange(this, isLoading, canGoBack,
|
||||
canGoForward);
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#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"
|
||||
@@ -32,6 +31,7 @@
|
||||
#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/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 "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 "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)
|
||||
blink_glue::RegisterURLSchemeAsLocal(scheme);
|
||||
webkit_glue::RegisterURLSchemeAsLocal(scheme);
|
||||
if (info.is_display_isolated)
|
||||
blink::WebSecurityPolicy::RegisterURLSchemeAsDisplayIsolated(scheme);
|
||||
if (info.is_secure)
|
||||
blink_glue::RegisterURLSchemeAsSecure(scheme);
|
||||
webkit_glue::RegisterURLSchemeAsSecure(scheme);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,20 +511,17 @@ bool CefContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefContentRendererClient::WillSendRequest(
|
||||
bool CefContentRendererClient::WillSendRequest(
|
||||
blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
const blink::WebURL& url,
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies) {
|
||||
GURL* new_url) {
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
extensions_renderer_client_->WillSendRequest(frame, transition_type, url,
|
||||
initiator_origin, new_url,
|
||||
attach_same_site_cookies);
|
||||
if (!new_url->is_empty())
|
||||
return;
|
||||
return extensions_renderer_client_->WillSendRequest(frame, transition_type,
|
||||
url, new_url);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned long long CefContentRendererClient::VisitedLinkHash(
|
||||
@@ -538,21 +535,14 @@ 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, info, mime_type, original_url);
|
||||
render_frame, mime_type, original_url);
|
||||
}
|
||||
|
||||
void CefContentRendererClient::AddSupportedKeySystems(
|
||||
|
@@ -114,19 +114,15 @@ class CefContentRendererClient : public content::ContentRendererClient,
|
||||
bool is_initial_navigation,
|
||||
bool is_server_redirect,
|
||||
bool* send_referrer) override;
|
||||
void WillSendRequest(blink::WebLocalFrame* frame,
|
||||
bool WillSendRequest(blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
const blink::WebURL& url,
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies) override;
|
||||
GURL* new_url) 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/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"
|
||||
#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"
|
||||
|
||||
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/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"
|
||||
#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"
|
||||
|
||||
using blink::WebDocument;
|
||||
using blink::WebDOMEvent;
|
||||
@@ -48,7 +48,7 @@ CefDOMNodeImpl::Type CefDOMNodeImpl::GetType() {
|
||||
if (!VerifyContext())
|
||||
return DOM_NODE_TYPE_UNSUPPORTED;
|
||||
|
||||
return blink_glue::GetNodeType(node_);
|
||||
return webkit_glue::GetNodeType(node_);
|
||||
}
|
||||
|
||||
bool CefDOMNodeImpl::IsText() {
|
||||
@@ -75,7 +75,7 @@ bool CefDOMNodeImpl::IsEditable() {
|
||||
|
||||
if (node_.IsElementNode()) {
|
||||
const WebElement& element = node_.ToConst<WebElement>();
|
||||
if (blink_glue::IsTextControlElement(element))
|
||||
if (webkit_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 = blink_glue::GetNodeName(node_);
|
||||
const WebString& name = webkit_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 blink_glue::SetNodeValue(node_,
|
||||
WebString::FromUTF16(value.ToString16()));
|
||||
return webkit_glue::SetNodeValue(node_,
|
||||
WebString::FromUTF16(value.ToString16()));
|
||||
}
|
||||
|
||||
CefString CefDOMNodeImpl::GetAsMarkup() {
|
||||
@@ -205,7 +205,7 @@ CefString CefDOMNodeImpl::GetAsMarkup() {
|
||||
if (!VerifyContext())
|
||||
return str;
|
||||
|
||||
const WebString& markup = blink_glue::CreateNodeMarkup(node_);
|
||||
const WebString& markup = webkit_glue::CreateNodeMarkup(node_);
|
||||
if (!markup.IsNull())
|
||||
str = markup.Utf16();
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_dom.h"
|
||||
#include "third_party/blink/public/web/web_node.h"
|
||||
#include "third_party/WebKit/public/web/WebNode.h"
|
||||
|
||||
class CefDOMDocumentImpl;
|
||||
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#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"
|
||||
@@ -27,9 +26,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/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"
|
||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebPluginParams.h"
|
||||
|
||||
namespace extensions {
|
||||
|
||||
@@ -163,42 +162,21 @@ bool CefExtensionsRendererClient::OverrideCreatePlugin(
|
||||
return !guest_view_api_available;
|
||||
}
|
||||
|
||||
void CefExtensionsRendererClient::WillSendRequest(
|
||||
bool CefExtensionsRendererClient::WillSendRequest(
|
||||
blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
const blink::WebURL& 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GURL* new_url) {
|
||||
// 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(
|
||||
@@ -272,12 +250,11 @@ 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, info, mime_type,
|
||||
return new extensions::MimeHandlerViewContainer(render_frame, mime_type,
|
||||
original_url);
|
||||
}
|
||||
|
||||
|
@@ -25,13 +25,8 @@ class WebURL;
|
||||
namespace content {
|
||||
class BrowserPluginDelegate;
|
||||
class RenderFrame;
|
||||
struct WebPluginInfo;
|
||||
} // namespace content
|
||||
|
||||
namespace url {
|
||||
class Origin;
|
||||
}
|
||||
|
||||
namespace extensions {
|
||||
|
||||
class Dispatcher;
|
||||
@@ -58,12 +53,10 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient {
|
||||
service_manager::BinderRegistry* registry);
|
||||
bool OverrideCreatePlugin(content::RenderFrame* render_frame,
|
||||
const blink::WebPluginParams& params);
|
||||
void WillSendRequest(blink::WebLocalFrame* frame,
|
||||
bool WillSendRequest(blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
const blink::WebURL& url,
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies);
|
||||
GURL* new_url);
|
||||
void RunScriptsAtDocumentStart(content::RenderFrame* render_frame);
|
||||
void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame);
|
||||
void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame);
|
||||
@@ -76,7 +69,6 @@ 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/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/WebKit/public/web/WebDocument.h"
|
||||
#include "third_party/WebKit/public/web/WebElement.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
|
||||
namespace extensions {
|
||||
|
||||
|
@@ -15,30 +15,29 @@
|
||||
#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/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_document_loader.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"
|
||||
#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"
|
||||
|
||||
using blink::WebString;
|
||||
|
||||
CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser,
|
||||
blink::WebLocalFrame* frame,
|
||||
int64_t frame_id)
|
||||
: browser_(browser), frame_(frame), frame_id_(frame_id) {}
|
||||
CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser, blink::WebLocalFrame* frame)
|
||||
: browser_(browser),
|
||||
frame_(frame),
|
||||
frame_id_(render_frame_util::GetIdentifier(frame)) {}
|
||||
|
||||
CefFrameImpl::~CefFrameImpl() {}
|
||||
|
||||
@@ -93,7 +92,7 @@ void CefFrameImpl::GetText(CefRefPtr<CefStringVisitor> visitor) {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
|
||||
if (frame_) {
|
||||
const CefString& content = blink_glue::DumpDocumentText(frame_);
|
||||
const CefString& content = webkit_glue::DumpDocumentText(frame_);
|
||||
visitor->Visit(content);
|
||||
}
|
||||
}
|
||||
@@ -217,13 +216,6 @@ CefString CefFrameImpl::GetURL() {
|
||||
|
||||
if (frame_) {
|
||||
GURL gurl = frame_->GetDocument().Url();
|
||||
if (gurl.is_empty()) {
|
||||
// For popups the main document URL will be empty during loading. Return
|
||||
// the provisional document URL instead.
|
||||
blink::WebDocumentLoader* loader = frame_->GetProvisionalDocumentLoader();
|
||||
if (loader)
|
||||
gurl = loader->GetRequest().Url();
|
||||
}
|
||||
url = gurl.spec();
|
||||
}
|
||||
return url;
|
||||
|
@@ -21,9 +21,7 @@ class WebLocalFrame;
|
||||
// associated renderer WebFrame will close.
|
||||
class CefFrameImpl : public CefFrame {
|
||||
public:
|
||||
CefFrameImpl(CefBrowserImpl* browser,
|
||||
blink::WebLocalFrame* frame,
|
||||
int64_t frame_id);
|
||||
CefFrameImpl(CefBrowserImpl* browser, blink::WebLocalFrame* frame);
|
||||
~CefFrameImpl() override;
|
||||
|
||||
// CefFrame implementation.
|
||||
|
@@ -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/blink/public/web/blink.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/WebKit/public/web/WebKit.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.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.
|
||||
blink_glue::CefScriptForbiddenScope forbidScript;
|
||||
webkit_glue::CefScriptForbiddenScope forbidScript;
|
||||
|
||||
CefRefPtr<CefV8Context> contextPtr(
|
||||
new CefV8ContextImpl(isolate, context));
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
#include "libcef/renderer/render_frame_util.h"
|
||||
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "content/renderer/render_frame_impl.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.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 blink_glue::kInvalidFrameId;
|
||||
return webkit_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/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/web/web_security_policy.h"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/web/WebSecurityPolicy.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/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"
|
||||
#include "third_party/WebKit/public/platform/WebString.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
#include "third_party/WebKit/public/web/WebSecurityPolicy.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/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"
|
||||
#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"
|
||||
|
||||
using blink::WebReferrerPolicy;
|
||||
using blink::WebString;
|
||||
@@ -139,7 +139,7 @@ class CefRenderURLRequest::Context
|
||||
const WebURLResponse& response) {
|
||||
DCHECK(CalledOnValidThread());
|
||||
|
||||
response_was_cached_ = blink_glue::ResponseWasCached(response);
|
||||
response_was_cached_ = webkit_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_ = blink_glue::ResponseWasCached(response);
|
||||
response_was_cached_ = webkit_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/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 "third_party/WebKit/public/web/WebFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebKit.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
namespace {
|
||||
@@ -625,9 +625,9 @@ void AccessorNameSetterCallbackImpl(
|
||||
}
|
||||
|
||||
// Two helper functions for V8 Interceptor callbacks.
|
||||
CefString PropertyToIndex(v8::Local<v8::Name> property) {
|
||||
CefString PropertyToIndex(v8::Local<v8::String> str) {
|
||||
CefString name;
|
||||
GetCefString(property.As<v8::String>(), name);
|
||||
GetCefString(str, name);
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ int PropertyToIndex(uint32_t index) {
|
||||
}
|
||||
|
||||
// V8 Interceptor callbacks.
|
||||
// T == v8::Local<v8::Name> for named property handlers and
|
||||
// T == v8::Local<v8::String> 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 (blink_glue::IsScriptForbidden())
|
||||
if (webkit_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 (blink_glue::IsScriptForbidden())
|
||||
if (webkit_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 (blink_glue::IsScriptForbidden())
|
||||
if (webkit_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 (blink_glue::IsScriptForbidden())
|
||||
if (webkit_glue::IsScriptForbidden())
|
||||
return false;
|
||||
|
||||
if (code.empty()) {
|
||||
@@ -1091,9 +1091,10 @@ bool CefV8ContextImpl::Eval(const CefString& code,
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
|
||||
v8::MaybeLocal<v8::Value> func_rv = blink_glue::ExecuteV8ScriptAndReturnValue(
|
||||
source, source_url, start_line, context, isolate, try_catch,
|
||||
blink::AccessControlStatus::kNotSharableCrossOrigin);
|
||||
v8::MaybeLocal<v8::Value> func_rv =
|
||||
webkit_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());
|
||||
@@ -1114,7 +1115,7 @@ v8::Local<v8::Context> CefV8ContextImpl::GetV8Context() {
|
||||
blink::WebLocalFrame* CefV8ContextImpl::GetWebFrame() {
|
||||
CEF_REQUIRE_RT();
|
||||
|
||||
if (blink_glue::IsScriptForbidden())
|
||||
if (webkit_glue::IsScriptForbidden())
|
||||
return nullptr;
|
||||
|
||||
v8::HandleScope handle_scope(handle_->isolate());
|
||||
@@ -1324,11 +1325,9 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
|
||||
v8::Local<v8::Object> obj;
|
||||
if (interceptor.get()) {
|
||||
v8::Local<v8::ObjectTemplate> tmpl = v8::ObjectTemplate::New(isolate);
|
||||
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->SetNamedPropertyHandler(
|
||||
InterceptorGetterCallbackImpl<v8::Local<v8::String>>,
|
||||
InterceptorSetterCallbackImpl<v8::Local<v8::String>>);
|
||||
|
||||
tmpl->SetIndexedPropertyHandler(InterceptorGetterCallbackImpl<uint32_t>,
|
||||
InterceptorSetterCallbackImpl<uint32_t>);
|
||||
@@ -2375,7 +2374,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
|
||||
v8::MaybeLocal<v8::Value> func_rv = blink_glue::CallV8Function(
|
||||
v8::MaybeLocal<v8::Value> func_rv = webkit_glue::CallV8Function(
|
||||
context_local, func, recv, argc, argv, handle_->isolate());
|
||||
|
||||
if (!HasCaught(context_local, try_catch) && !func_rv.IsEmpty()) {
|
||||
|
@@ -3,39 +3,38 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "libcef/renderer/blink_glue.h"
|
||||
#include "libcef/renderer/webkit_glue.h"
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#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/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/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"
|
||||
#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"
|
||||
MSVC_POP_WARNING();
|
||||
#undef LOG
|
||||
|
||||
#include "base/logging.h"
|
||||
|
||||
namespace blink_glue {
|
||||
namespace webkit_glue {
|
||||
|
||||
const int64_t kInvalidFrameId = -1;
|
||||
|
||||
@@ -230,4 +229,4 @@ bool ResponseWasCached(const blink::WebURLResponse& response) {
|
||||
return response.ToResourceResponse().WasCached();
|
||||
}
|
||||
|
||||
} // namespace blink_glue
|
||||
} // namespace webkit_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_BLINK_GLUE_H_
|
||||
#define CEF_LIBCEF_RENDERER_BLINK_GLUE_H_
|
||||
#ifndef CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
||||
#define CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
|
||||
#include "include/internal/cef_types.h"
|
||||
|
||||
#include "third_party/blink/public/platform/web_common.h"
|
||||
#include "third_party/blink/renderer/platform/loader/fetch/access_control_status.h"
|
||||
#include "third_party/WebKit/Source/platform/loader/fetch/AccessControlStatus.h"
|
||||
#include "third_party/WebKit/public/platform/WebCommon.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
namespace blink {
|
||||
@@ -26,7 +26,7 @@ class WebURLResponse;
|
||||
class WebView;
|
||||
} // namespace blink
|
||||
|
||||
namespace blink_glue {
|
||||
namespace webkit_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 blink_glue
|
||||
} // namespace webkit_glue
|
||||
|
||||
#endif // CEF_LIBCEF_RENDERER_BLINK_GLUE_H_
|
||||
#endif // CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
@@ -228,11 +228,6 @@ patches = [
|
||||
# Support CEF changes in chrome/renderer.
|
||||
'name': 'chrome_renderer',
|
||||
},
|
||||
{
|
||||
# Add missing depenencies in chrome/services/media_gallery_util/public/cpp.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=832591
|
||||
'name': 'chrome_services',
|
||||
},
|
||||
{
|
||||
# Don't initialize ExtensionSystemFactory when extensions are disabled.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2359
|
||||
@@ -333,8 +328,6 @@ patches = [
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2256
|
||||
#
|
||||
# Linux: Fix GTK2 compile errors.
|
||||
#
|
||||
# Linux: Fix "undefined symbol: ErrHandler" runtime error.
|
||||
'name': 'linux_build',
|
||||
},
|
||||
{
|
||||
@@ -343,8 +336,6 @@ 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',
|
||||
},
|
||||
{
|
||||
@@ -368,13 +359,18 @@ patches = [
|
||||
'name': 'mac_gpu_2398',
|
||||
},
|
||||
{
|
||||
# Linux: Use poll instead of select to fix crash during startup.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2466
|
||||
'name': 'linux_poll_2466',
|
||||
# Windows: Resolve conflict between base::StrCat and Win32 StrCat.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=817738
|
||||
'name': 'win_strcat_817738',
|
||||
},
|
||||
{
|
||||
# Adjust out-of-flow position for rtl container with left-hand scrollbar.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=832569
|
||||
'name': 'blink_rtl_832569',
|
||||
# Fix jumbo build compile error in service_worker_version.cc
|
||||
# https://crrev.com/35dabc0d
|
||||
'name': 'service_worker_jumbo',
|
||||
},
|
||||
{
|
||||
# Fix Remote Debugging is missing 'Select Element Button'
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=837145
|
||||
'name': 'devtools_837145',
|
||||
},
|
||||
]
|
||||
|
@@ -1,17 +0,0 @@
|
||||
diff --git third_party/blink/renderer/core/layout/layout_box.cc third_party/blink/renderer/core/layout/layout_box.cc
|
||||
index 4f724b594484..3bb15ddacdd1 100644
|
||||
--- third_party/blink/renderer/core/layout/layout_box.cc
|
||||
+++ third_party/blink/renderer/core/layout/layout_box.cc
|
||||
@@ -3998,6 +3998,12 @@ void LayoutBox::ComputeInlineStaticDistance(
|
||||
LayoutUnit static_position = child->Layer()->StaticInlinePosition() +
|
||||
container_logical_width +
|
||||
container_block->BorderLogicalLeft();
|
||||
+ if (container_block->IsBox() &&
|
||||
+ ToLayoutBox(container_block)
|
||||
+ ->ShouldPlaceBlockDirectionScrollbarOnLogicalLeft()) {
|
||||
+ static_position +=
|
||||
+ ToLayoutBox(container_block)->OriginAdjustmentForScrollbars().Width();
|
||||
+ }
|
||||
for (LayoutObject* curr = child->Parent(); curr; curr = curr->Container()) {
|
||||
if (curr->IsBox()) {
|
||||
if (curr == enclosing_box)
|
@@ -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 e7d40839956f..bda09e167c87 100644
|
||||
index 7426062f7381..1ed9dedff31b 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
@@ -55,11 +55,13 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
|
||||
@@ -53,11 +53,13 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
|
||||
|
||||
// These will not return nullptr until Destroy is called.
|
||||
DelegatedFrameHost* GetDelegatedFrameHost();
|
||||
@@ -17,7 +17,7 @@ index e7d40839956f..bda09e167c87 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 3d5a2193bd51..9bdd51d2007d 100644
|
||||
index 7fcc24c15c37..d5949c6baddb 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
@@ -208,6 +208,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
||||
@@ -33,8 +33,19 @@ index 3d5a2193bd51..9bdd51d2007d 100644
|
||||
gfx::AcceleratedWidget BrowserCompositorMac::GetAcceleratedWidget() {
|
||||
if (recyclable_compositor_) {
|
||||
return recyclable_compositor_->accelerated_widget_mac()
|
||||
@@ -261,7 +267,9 @@ bool BrowserCompositorMac::UpdateNSViewAndDisplay() {
|
||||
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 97e7b502f15d..44811edbda4c 100644
|
||||
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 AcceleratedWidgetMac::SetNSView(AcceleratedWidgetMacNSView* view) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
index 15994d5dada4..e19eca0c4369 100644
|
||||
index 3e1786aa6901..2a94e9ec8856 100644
|
||||
--- content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
+++ content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
@@ -315,8 +315,11 @@ void BrowserPluginGuest::InitInternal(
|
||||
@@ -322,8 +322,11 @@ void BrowserPluginGuest::InitInternal(
|
||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ index 15994d5dada4..e19eca0c4369 100644
|
||||
|
||||
// Once a BrowserPluginGuest has an embedder WebContents, it's considered to
|
||||
// be attached.
|
||||
@@ -799,10 +802,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
@@ -806,10 +809,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
|
||||
web_contents_view->CreateViewForWidget(
|
||||
@@ -37,10 +37,10 @@ index 15994d5dada4..e19eca0c4369 100644
|
||||
|
||||
attached_ = true;
|
||||
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
|
||||
index 94e29b878e17..fb546b77d2b7 100644
|
||||
index 7c83d2a63b2c..070982ea2298 100644
|
||||
--- content/browser/frame_host/interstitial_page_impl.cc
|
||||
+++ content/browser/frame_host/interstitial_page_impl.cc
|
||||
@@ -618,7 +618,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||
@@ -614,7 +614,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||
WebContentsView* wcv =
|
||||
static_cast<WebContentsImpl*>(web_contents())->GetView();
|
||||
RenderWidgetHostViewBase* view =
|
||||
@@ -79,10 +79,10 @@ 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 3aea2d29dc40..65ab77f7ddf5 100644
|
||||
index 5d28247a3161..b4f77825bbfb 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,
|
||||
@@ -784,7 +784,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
|
||||
}
|
||||
|
||||
RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||
@@ -92,7 +92,7 @@ index 3aea2d29dc40..65ab77f7ddf5 100644
|
||||
if (render_widget_host->GetView()) {
|
||||
// During testing, the view will already be set up in most cases to the
|
||||
// test view, so we don't want to clobber it with a real one. To verify that
|
||||
@@ -793,6 +794,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||
@@ -796,6 +797,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||
render_widget_host->GetView());
|
||||
}
|
||||
|
||||
@@ -101,10 +101,10 @@ index 3aea2d29dc40..65ab77f7ddf5 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 82807c7f77fd..60bd9ceaf9ee 100644
|
||||
index 50c22b1dfb53..d83f2dfab6d5 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
|
||||
@@ -119,7 +119,7 @@ class CONTENT_EXPORT WebContentsViewAura
|
||||
gfx::NativeView context) override;
|
||||
RenderWidgetHostViewBase* CreateViewForWidget(
|
||||
RenderWidgetHost* render_widget_host,
|
||||
@@ -221,10 +221,10 @@ index 968c5157ab41..22aad9fbafa4 100644
|
||||
RenderWidgetHost* render_widget_host) override;
|
||||
void SetPageTitle(const base::string16& title) override;
|
||||
diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm
|
||||
index 6a9ee15776b6..e4872d47e3d2 100644
|
||||
index d3533591027d..8b9bbbc2f0de 100644
|
||||
--- content/browser/web_contents/web_contents_view_mac.mm
|
||||
+++ content/browser/web_contents/web_contents_view_mac.mm
|
||||
@@ -346,7 +346,8 @@ void WebContentsViewMac::CreateView(
|
||||
@@ -348,7 +348,8 @@ void WebContentsViewMac::CreateView(
|
||||
}
|
||||
|
||||
RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||
@@ -234,7 +234,7 @@ index 6a9ee15776b6..e4872d47e3d2 100644
|
||||
if (render_widget_host->GetView()) {
|
||||
// During testing, the view will already be set up in most cases to the
|
||||
// test view, so we don't want to clobber it with a real one. To verify that
|
||||
@@ -358,6 +359,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||
@@ -360,6 +361,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||
render_widget_host->GetView());
|
||||
}
|
||||
|
||||
@@ -266,19 +266,19 @@ 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 57e98ae8a5bb..72f9e29dfcd5 100644
|
||||
index 6f2b56d0cd90..ec6f15c0a789 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
|
||||
@@ -193,6 +193,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
@@ -174,6 +174,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
WebContents::CreateParams params(browser_context(),
|
||||
guest_site_instance.get());
|
||||
params.guest_delegate = this;
|
||||
+ if (delegate_)
|
||||
+ delegate_->OverrideWebContentsCreateParams(¶ms);
|
||||
auto* web_contents = WebContents::Create(params);
|
||||
SetViewType(web_contents, VIEW_TYPE_EXTENSION_GUEST);
|
||||
callback.Run(web_contents);
|
||||
@@ -228,6 +230,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
|
||||
callback.Run(WebContents::Create(params));
|
||||
|
||||
registry_.AddInterface(
|
||||
@@ -199,6 +201,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -298,10 +298,10 @@ index 57e98ae8a5bb..72f9e29dfcd5 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 2bc53e063aae..9814b40f84ea 100644
|
||||
index df25eca4aeae..3072be6a9ca5 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
|
||||
@@ -108,6 +108,10 @@ class MimeHandlerViewGuest :
|
||||
@@ -89,6 +89,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 e73bbc01264c..7cf4471e4b24 100644
|
||||
index 957ba49abb8d..a4daa1d76df0 100644
|
||||
--- chrome/browser/BUILD.gn
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -8,6 +8,7 @@ import("//build/config/features.gni")
|
||||
@@ -10,7 +10,7 @@ index e73bbc01264c..7cf4471e4b24 100644
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/feature_engagement/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
@@ -1581,6 +1582,7 @@ jumbo_split_static_library("browser") {
|
||||
@@ -1579,6 +1580,7 @@ jumbo_split_static_library("browser") {
|
||||
"//base:i18n",
|
||||
"//base/allocator:buildflags",
|
||||
"//cc",
|
||||
@@ -18,7 +18,7 @@ index e73bbc01264c..7cf4471e4b24 100644
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -1835,6 +1837,10 @@ jumbo_split_static_library("browser") {
|
||||
@@ -1833,6 +1835,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 607dfe4d4c99..27e55b7f6b2d 100644
|
||||
index deb6c5322b9b..09803293be6c 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 @@
|
||||
@@ -9,10 +9,10 @@ index 607dfe4d4c99..27e55b7f6b2d 100644
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/search_engines/template_url_service_factory.h"
|
||||
@@ -17,6 +18,10 @@
|
||||
#include "chrome/common/chrome_features.h"
|
||||
@@ -16,6 +17,10 @@
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
#include "extensions/features/features.h"
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+#include "cef/libcef/common/extensions/extensions_util.h"
|
||||
@@ -21,7 +21,7 @@ index 607dfe4d4c99..27e55b7f6b2d 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/extension_service.h"
|
||||
#include "extensions/browser/extension_system.h"
|
||||
@@ -42,8 +47,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
||||
@@ -41,8 +46,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
||||
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@@ -36,7 +36,7 @@ index 607dfe4d4c99..27e55b7f6b2d 100644
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -87,9 +98,15 @@ scoped_refptr<RefcountedKeyedService>
|
||||
@@ -86,9 +97,15 @@ scoped_refptr<RefcountedKeyedService>
|
||||
/*store_last_modified=*/true));
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
@@ -1,11 +1,12 @@
|
||||
diff --git chrome/browser/profiles/incognito_helpers.cc chrome/browser/profiles/incognito_helpers.cc
|
||||
index ce4f72b98a05..39f7c3140c6e 100644
|
||||
index ce4f72b98a05..f7d57b854399 100644
|
||||
--- chrome/browser/profiles/incognito_helpers.cc
|
||||
+++ chrome/browser/profiles/incognito_helpers.cc
|
||||
@@ -8,18 +8,41 @@
|
||||
@@ -7,19 +7,42 @@
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
|
||||
namespace chrome {
|
||||
|
||||
+
|
||||
+namespace {
|
||||
+BrowserContextIncognitoHelper* g_helper = nullptr;
|
||||
+} // namespace
|
||||
@@ -13,7 +14,7 @@ index ce4f72b98a05..39f7c3140c6e 100644
|
||||
+void SetBrowserContextIncognitoHelper(BrowserContextIncognitoHelper* helper) {
|
||||
+ g_helper = helper;
|
||||
+}
|
||||
+
|
||||
|
||||
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
|
||||
content::BrowserContext* context) {
|
||||
+ if (g_helper) {
|
||||
@@ -70,7 +71,7 @@ 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 7675240b2556..08f621236038 100644
|
||||
index 5ba0e61824b0..db12c9e551ed 100644
|
||||
--- chrome/browser/profiles/profile_manager.cc
|
||||
+++ chrome/browser/profiles/profile_manager.cc
|
||||
@@ -378,7 +378,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
@@ -83,10 +84,10 @@ index 7675240b2556..08f621236038 100644
|
||||
this));
|
||||
}
|
||||
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
|
||||
index 9a0d8dd4c3e6..6cfbfd1ddc8d 100644
|
||||
index 95d20f01a062..96834378f487 100644
|
||||
--- chrome/browser/profiles/profile_manager.h
|
||||
+++ chrome/browser/profiles/profile_manager.h
|
||||
@@ -94,7 +94,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -93,7 +93,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.
|
||||
@@ -95,7 +96,7 @@ index 9a0d8dd4c3e6..6cfbfd1ddc8d 100644
|
||||
|
||||
// Returns total number of profiles available on this machine.
|
||||
size_t GetNumberOfProfiles();
|
||||
@@ -125,7 +125,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -124,7 +124,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
|
||||
// Returns true if the profile pointer is known to point to an existing
|
||||
// profile.
|
||||
@@ -104,7 +105,7 @@ index 9a0d8dd4c3e6..6cfbfd1ddc8d 100644
|
||||
|
||||
// Returns the directory where the first created profile is stored,
|
||||
// relative to the user data directory currently in use.
|
||||
@@ -134,7 +134,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -133,7 +133,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 484e07af5a98..0e62e20095c7 100644
|
||||
index ab3fd0de9e07..298db88e685f 100644
|
||||
--- chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
+++ chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -17,6 +17,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 484e07af5a98..0e62e20095c7 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"
|
||||
@@ -53,6 +54,11 @@
|
||||
@@ -55,6 +56,11 @@
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
|
||||
@@ -22,7 +22,7 @@ index 484e07af5a98..0e62e20095c7 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "components/guest_view/browser/guest_view_base.h"
|
||||
#include "extensions/browser/extension_registry.h"
|
||||
@@ -74,12 +80,10 @@ namespace {
|
||||
@@ -76,12 +82,10 @@ namespace {
|
||||
class PluginInfoHostImplShutdownNotifierFactory
|
||||
: public BrowserContextKeyedServiceShutdownNotifierFactory {
|
||||
public:
|
||||
@@ -37,7 +37,7 @@ index 484e07af5a98..0e62e20095c7 100644
|
||||
PluginInfoHostImplShutdownNotifierFactory>;
|
||||
|
||||
PluginInfoHostImplShutdownNotifierFactory()
|
||||
@@ -91,6 +95,16 @@ class PluginInfoHostImplShutdownNotifierFactory
|
||||
@@ -93,6 +97,16 @@ class PluginInfoHostImplShutdownNotifierFactory
|
||||
DISALLOW_COPY_AND_ASSIGN(PluginInfoHostImplShutdownNotifierFactory);
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ index 484e07af5a98..0e62e20095c7 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
|
||||
@@ -99,6 +113,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
@@ -101,6 +115,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
extensions::ExtensionRegistry* extension_registry,
|
||||
int process_id,
|
||||
const GURL& resource) {
|
||||
@@ -64,7 +64,7 @@ index 484e07af5a98..0e62e20095c7 100644
|
||||
extensions::WebViewRendererState* renderer_state =
|
||||
extensions::WebViewRendererState::GetInstance();
|
||||
std::string partition_id;
|
||||
@@ -128,12 +145,16 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
@@ -130,12 +147,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 484e07af5a98..0e62e20095c7 100644
|
||||
allow_outdated_plugins_.Init(prefs::kPluginsAllowOutdated,
|
||||
profile->GetPrefs());
|
||||
allow_outdated_plugins_.MoveToThread(
|
||||
@@ -232,6 +253,7 @@ void PluginInfoHostImpl::PluginsLoaded(
|
||||
@@ -234,6 +255,7 @@ void PluginInfoHostImpl::PluginsLoaded(
|
||||
plugin_metadata->identifier(), &output->status);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ index 484e07af5a98..0e62e20095c7 100644
|
||||
if (output->status == chrome::mojom::PluginStatus::kNotFound) {
|
||||
// Check to see if the component updater can fetch an implementation.
|
||||
base::PostTaskAndReplyWithResult(
|
||||
@@ -243,7 +265,9 @@ void PluginInfoHostImpl::PluginsLoaded(
|
||||
@@ -245,7 +267,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 484e07af5a98..0e62e20095c7 100644
|
||||
GetPluginInfoFinish(params, std::move(output), std::move(callback),
|
||||
std::move(plugin_metadata));
|
||||
}
|
||||
@@ -256,6 +280,14 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
|
||||
@@ -258,6 +282,14 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
|
||||
PluginMetadata::SecurityStatus security_status,
|
||||
const std::string& plugin_identifier,
|
||||
chrome::mojom::PluginStatus* status) const {
|
||||
@@ -118,7 +118,7 @@ index 484e07af5a98..0e62e20095c7 100644
|
||||
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
|
||||
*status = chrome::mojom::PluginStatus::kAllowed;
|
||||
return;
|
||||
@@ -380,16 +412,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
|
||||
@@ -382,16 +414,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -157,10 +157,10 @@ index 484e07af5a98..0e62e20095c7 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 1cd2e64b9eb9..a46e40fb1e25 100644
|
||||
index 910bf38b9c46..88ec7d4076b8 100644
|
||||
--- chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -770,6 +770,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -773,6 +773,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
|
||||
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
|
||||
status == chrome::mojom::PluginStatus::kBlocked) &&
|
||||
@@ -168,7 +168,7 @@ index 1cd2e64b9eb9..a46e40fb1e25 100644
|
||||
observer->IsPluginTemporarilyAllowed(identifier)) {
|
||||
status = chrome::mojom::PluginStatus::kAllowed;
|
||||
}
|
||||
@@ -957,7 +958,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -960,7 +961,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
&plugin_auth_host);
|
||||
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
|
||||
@@ -178,7 +178,7 @@ index 1cd2e64b9eb9..a46e40fb1e25 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlocked: {
|
||||
@@ -966,7 +968,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -969,7 +971,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 1cd2e64b9eb9..a46e40fb1e25 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
|
||||
@@ -976,7 +979,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -979,7 +982,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
group_name));
|
||||
RenderThread::Get()->RecordAction(
|
||||
UserMetricsAction("Plugin_BlockedByPolicy"));
|
||||
@@ -198,7 +198,7 @@ index 1cd2e64b9eb9..a46e40fb1e25 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
|
||||
@@ -984,7 +988,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -987,7 +991,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
IDR_BLOCKED_PLUGIN_HTML,
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
|
||||
group_name));
|
||||
@@ -209,7 +209,7 @@ index 1cd2e64b9eb9..a46e40fb1e25 100644
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kComponentUpdateRequired: {
|
||||
diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
||||
index 7052b1d68246..ba05a591ebf5 100644
|
||||
index 6bc73727e61b..4f84ab989060 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 0903a4520939..be719c54f671 100644
|
||||
index 1ec9a536a378..8ab180c18d8e 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -3,6 +3,7 @@
|
||||
@@ -9,8 +9,8 @@ index 0903a4520939..be719c54f671 100644
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//components/offline_pages/buildflags/features.gni")
|
||||
@@ -109,6 +110,7 @@ static_library("renderer") {
|
||||
import("//components/spellcheck/spellcheck_build_features.gni")
|
||||
@@ -106,6 +107,7 @@ static_library("renderer") {
|
||||
defines = []
|
||||
|
||||
deps = [
|
||||
@@ -18,7 +18,7 @@ index 0903a4520939..be719c54f671 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -169,6 +171,10 @@ static_library("renderer") {
|
||||
@@ -166,6 +168,10 @@ static_library("renderer") {
|
||||
|
||||
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
|
||||
|
@@ -1,13 +0,0 @@
|
||||
diff --git chrome/services/media_gallery_util/public/cpp/BUILD.gn chrome/services/media_gallery_util/public/cpp/BUILD.gn
|
||||
index fcdc1906851d..b6f7112e144e 100644
|
||||
--- chrome/services/media_gallery_util/public/cpp/BUILD.gn
|
||||
+++ chrome/services/media_gallery_util/public/cpp/BUILD.gn
|
||||
@@ -15,6 +15,8 @@ source_set("cpp") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
+ "//media:media_buildflags",
|
||||
+ "//net:buildflags",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//third_party/boringssl",
|
||||
"//third_party/libyuv",
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
|
||||
index d15599593511..0f37d5933391 100644
|
||||
index 750df2f7fbbe..5b46bb127102 100644
|
||||
--- chrome/common/chrome_content_client.cc
|
||||
+++ chrome/common/chrome_content_client.cc
|
||||
@@ -92,7 +92,8 @@
|
||||
@@ -91,7 +91,8 @@
|
||||
|
||||
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
|
||||
#include "media/cdm/cdm_paths.h" // nogncheck
|
||||
@@ -10,26 +10,5 @@ index d15599593511..0f37d5933391 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 55b471ea93f8..6dac0552d66f 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/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
|
||||
index 7f3cf01859a7..74deeb84127f 100644
|
||||
--- third_party/blink/renderer/controller/BUILD.gn
|
||||
+++ third_party/blink/renderer/controller/BUILD.gn
|
||||
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
|
||||
@@ -25,6 +25,7 @@ component("controller") {
|
||||
|
||||
configs += [
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
+ "//cef/libcef/features:config",
|
||||
"//third_party/blink/renderer:config",
|
||||
"//third_party/blink/renderer:inside_blink",
|
||||
"//third_party/blink/renderer:non_test_config",
|
||||
"//third_party/WebKit/Source:config",
|
||||
"//third_party/WebKit/Source:inside_blink",
|
||||
"//third_party/WebKit/Source:non_test_config",
|
||||
@@ -41,6 +42,8 @@ component("controller") {
|
||||
"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",
|
||||
"DevToolsFrontendImpl.h",
|
||||
"OomInterventionImpl.cpp",
|
||||
"OomInterventionImpl.h",
|
||||
+ "//cef/libcef/renderer/webkit_glue.cc",
|
||||
+ "//cef/libcef/renderer/webkit_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 7b9fc4114c52..bdbbf93f6f0d 100644
|
||||
index b40de2a2910a..da20699a5d64 100644
|
||||
--- content/browser/compositor/gpu_process_transport_factory.cc
|
||||
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
||||
@@ -495,9 +495,19 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
@@ -492,9 +492,19 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
// surfaces as they are not following the correct mode.
|
||||
DisableGpuCompositing(compositor.get());
|
||||
}
|
||||
@@ -18,13 +18,13 @@ index 7b9fc4114c52..bdbbf93f6f0d 100644
|
||||
+
|
||||
display_output_surface =
|
||||
std::make_unique<SoftwareBrowserCompositorOutputSurface>(
|
||||
- CreateSoftwareOutputDevice(compositor->widget()),
|
||||
+ std::move(output_device),
|
||||
std::move(vsync_callback), compositor->task_runner());
|
||||
- CreateSoftwareOutputDevice(compositor->widget()), vsync_callback,
|
||||
+ std::move(output_device), vsync_callback,
|
||||
compositor->task_runner());
|
||||
} else {
|
||||
DCHECK(context_provider);
|
||||
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
|
||||
index a6a0cb9df028..478f11e0d925 100644
|
||||
index 78b361460638..bbde6e19916d 100644
|
||||
--- ui/compositor/compositor.h
|
||||
+++ ui/compositor/compositor.h
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -63,7 +63,7 @@ index a6a0cb9df028..478f11e0d925 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
|
||||
@@ -442,6 +457,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -441,6 +456,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 cbc50ff93650..c91171abf5b0 100644
|
||||
index 03ca8ad55078..0899131ab154 100644
|
||||
--- chrome/browser/download/download_target_determiner.cc
|
||||
+++ chrome/browser/download/download_target_determiner.cc
|
||||
@@ -571,8 +571,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
|
||||
@@ -540,8 +540,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 cbc50ff93650..c91171abf5b0 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 e47d5ea63e5a..f2d21e4cefe4 100644
|
||||
index 8e6ef99239ab..24ceaf229702 100644
|
||||
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
@@ -177,6 +177,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
|
||||
@@ -178,6 +178,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 d05027d09165..d3f57f6d96d7 100644
|
||||
index 3b0948c90a00..f0fb3b5d9d55 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 d05027d09165..d3f57f6d96d7 100644
|
||||
return nullptr;
|
||||
}
|
||||
diff --git chrome/browser/ui/cocoa/drag_util.mm chrome/browser/ui/cocoa/drag_util.mm
|
||||
index 569e6112d86b..41599944688a 100644
|
||||
index b1a49f718226..cb56c9fd4765 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 569e6112d86b..41599944688a 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
index dfbad402f1ea..7a332ea67611 100644
|
||||
index f4eb41e948bb..7e47a184d8c0 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 dfbad402f1ea..7a332ea67611 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 0c0c4cbb9efe..4703ce943367 100644
|
||||
index 2986bf0e340e..6ef8486960ce 100644
|
||||
--- content/browser/frame_host/navigation_handle_impl.cc
|
||||
+++ content/browser/frame_host/navigation_handle_impl.cc
|
||||
@@ -382,12 +382,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
|
||||
@@ -368,12 +368,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
|
||||
}
|
||||
|
||||
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
|
||||
@@ -93,10 +93,10 @@ index 0c0c4cbb9efe..4703ce943367 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc
|
||||
index d938013c90b6..5602c2279847 100644
|
||||
index 6416a4690766..e961b32a0306 100644
|
||||
--- content/browser/frame_host/render_frame_host_impl.cc
|
||||
+++ content/browser/frame_host/render_frame_host_impl.cc
|
||||
@@ -1557,6 +1557,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
||||
@@ -1534,6 +1534,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
||||
if (GetNavigationHandle()) {
|
||||
GetNavigationHandle()->set_net_error_code(
|
||||
static_cast<net::Error>(params.error_code));
|
||||
@@ -104,7 +104,7 @@ index d938013c90b6..5602c2279847 100644
|
||||
}
|
||||
|
||||
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
|
||||
@@ -3326,9 +3327,9 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
|
||||
@@ -3285,9 +3286,9 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
|
||||
&QuotaDispatcherHost::CreateForFrame, GetProcess(), routing_id_));
|
||||
|
||||
if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
|
||||
@@ -117,7 +117,7 @@ index d938013c90b6..5602c2279847 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
|
||||
@@ -3605,9 +3606,9 @@ void RenderFrameHostImpl::CommitNavigation(
|
||||
@@ -3561,9 +3562,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 d938013c90b6..5602c2279847 100644
|
||||
if (subresource_loader_params &&
|
||||
subresource_loader_params->loader_factory_info.is_valid()) {
|
||||
// If the caller has supplied a default URLLoaderFactory override (for
|
||||
@@ -4235,8 +4236,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve(
|
||||
// Keep DevTools proxy lasy, i.e. closest to the network.
|
||||
RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory(
|
||||
this, false, &default_factory_request);
|
||||
@@ -4178,8 +4179,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve(
|
||||
auto* context = GetSiteInstance()->GetBrowserContext();
|
||||
GetContentClient()->browser()->WillCreateURLLoaderFactory(
|
||||
this, false /* is_navigation */, &default_factory_request);
|
||||
- StoragePartitionImpl* storage_partition = static_cast<StoragePartitionImpl*>(
|
||||
- BrowserContext::GetStoragePartition(context, GetSiteInstance()));
|
||||
+ StoragePartition* storage_partition =
|
||||
@@ -141,22 +141,11 @@ index d938013c90b6..5602c2279847 100644
|
||||
if (g_create_network_factory_callback_for_test.Get().is_null()) {
|
||||
storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
|
||||
std::move(default_factory_request), GetProcess()->GetID());
|
||||
@@ -4487,8 +4488,8 @@ void RenderFrameHostImpl::CreateWebSocket(
|
||||
network::mojom::WebSocketRequest request) {
|
||||
if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
|
||||
auto* context = GetSiteInstance()->GetBrowserContext();
|
||||
- auto* storage_partition = static_cast<StoragePartitionImpl*>(
|
||||
- BrowserContext::GetStoragePartition(context, GetSiteInstance()));
|
||||
+ auto* storage_partition =
|
||||
+ BrowserContext::GetStoragePartition(context, GetSiteInstance());
|
||||
storage_partition->GetNetworkContext()->CreateWebSocket(
|
||||
std::move(request), process_->GetID(), routing_id_,
|
||||
last_committed_origin_);
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
|
||||
index 80fd7cf89578..8e965cd18a47 100644
|
||||
index b3653373a51f..6db0652284ec 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.cc
|
||||
+++ content/browser/frame_host/render_frame_message_filter.cc
|
||||
@@ -552,6 +552,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
|
||||
@@ -546,6 +546,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
|
||||
|
||||
void RenderFrameMessageFilter::OnGetPlugins(
|
||||
bool refresh,
|
||||
@@ -164,7 +153,7 @@ index 80fd7cf89578..8e965cd18a47 100644
|
||||
const url::Origin& main_frame_origin,
|
||||
IPC::Message* reply_msg) {
|
||||
// Don't refresh if the specified threshold has not been passed. Note that
|
||||
@@ -573,18 +574,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
|
||||
@@ -567,18 +568,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
|
||||
|
||||
PluginServiceImpl::GetInstance()->GetPlugins(
|
||||
base::BindOnce(&RenderFrameMessageFilter::GetPluginsCallback, this,
|
||||
@@ -186,7 +175,7 @@ index 80fd7cf89578..8e965cd18a47 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.
|
||||
@@ -593,7 +595,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
|
||||
@@ -587,7 +589,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
|
||||
if (!filter ||
|
||||
filter->IsPluginAvailable(child_process_id, routing_id,
|
||||
resource_context_, main_frame_origin.GetURL(),
|
||||
@@ -195,7 +184,7 @@ index 80fd7cf89578..8e965cd18a47 100644
|
||||
plugins.push_back(plugin);
|
||||
}
|
||||
}
|
||||
@@ -605,6 +607,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
|
||||
@@ -599,6 +601,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
|
||||
void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
@@ -203,7 +192,7 @@ index 80fd7cf89578..8e965cd18a47 100644
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool* found,
|
||||
@@ -613,8 +616,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
@@ -607,8 +610,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
bool allow_wildcard = true;
|
||||
*found = plugin_service_->GetPluginInfo(
|
||||
render_process_id_, render_frame_id, resource_context_, url,
|
||||
@@ -215,10 +204,10 @@ index 80fd7cf89578..8e965cd18a47 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 871e11f61274..5b1009ab7ec6 100644
|
||||
index db9398a07607..ce062d8a9ccd 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.h
|
||||
+++ content/browser/frame_host/render_frame_message_filter.h
|
||||
@@ -139,13 +139,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter
|
||||
@@ -136,13 +136,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter
|
||||
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
void OnGetPlugins(bool refresh,
|
||||
@@ -236,7 +225,7 @@ index 871e11f61274..5b1009ab7ec6 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 577f62b57ff2..3847f8ec616a 100644
|
||||
index a9322bc8b5d7..0b3bfef2237b 100644
|
||||
--- content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
+++ content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
@@ -494,8 +494,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
|
||||
@@ -251,10 +240,10 @@ index 577f62b57ff2..3847f8ec616a 100644
|
||||
if (stale) {
|
||||
// Refresh the plugins asynchronously.
|
||||
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
|
||||
index dcdae19642b5..f1b3c8166ce9 100644
|
||||
index 130f4d8e92e8..bade33e04c2e 100644
|
||||
--- content/browser/plugin_service_impl.cc
|
||||
+++ content/browser/plugin_service_impl.cc
|
||||
@@ -286,6 +286,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
@@ -262,6 +262,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
int render_frame_id,
|
||||
ResourceContext* context,
|
||||
const GURL& url,
|
||||
@@ -262,7 +251,7 @@ index dcdae19642b5..f1b3c8166ce9 100644
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
@@ -302,7 +303,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
@@ -278,7 +279,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,
|
||||
@@ -273,10 +262,10 @@ index dcdae19642b5..f1b3c8166ce9 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 4e11056a3dc9..973ad50975e1 100644
|
||||
index e6de4ca6c8b3..18eea4948e43 100644
|
||||
--- content/browser/plugin_service_impl.h
|
||||
+++ content/browser/plugin_service_impl.h
|
||||
@@ -65,6 +65,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
|
||||
@@ -63,6 +63,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
|
||||
int render_frame_id,
|
||||
ResourceContext* context,
|
||||
const GURL& url,
|
||||
@@ -285,10 +274,10 @@ index 4e11056a3dc9..973ad50975e1 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/common/frame_messages.h content/common/frame_messages.h
|
||||
index cf96a19a4e09..67882fb1b97d 100644
|
||||
index c06c9d132a3a..f58a2ca60eb2 100644
|
||||
--- content/common/frame_messages.h
|
||||
+++ content/common/frame_messages.h
|
||||
@@ -1388,8 +1388,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
@@ -1368,8 +1368,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.
|
||||
@@ -299,7 +288,7 @@ index cf96a19a4e09..67882fb1b97d 100644
|
||||
url::Origin /* main_frame_origin */,
|
||||
std::vector<content::WebPluginInfo> /* plugins */)
|
||||
|
||||
@@ -1397,9 +1398,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins,
|
||||
@@ -1377,9 +1378,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.
|
||||
@@ -312,7 +301,7 @@ index cf96a19a4e09..67882fb1b97d 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 a6e5823a51d7..397bb78e41fb 100644
|
||||
index bf3c786b5093..ea8f85700e86 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() {
|
||||
@@ -336,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 27021d64244d..60f1ec1845d9 100644
|
||||
index ac05c13b1df8..762262bff01a 100644
|
||||
--- content/public/browser/plugin_service.h
|
||||
+++ content/public/browser/plugin_service.h
|
||||
@@ -73,6 +73,7 @@ class CONTENT_EXPORT PluginService {
|
||||
@@ -74,6 +74,7 @@ class PluginService {
|
||||
int render_frame_id,
|
||||
ResourceContext* context,
|
||||
const GURL& url,
|
||||
@@ -360,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 a68f00aec37a..696f9efab95d 100644
|
||||
index 34aed4fd3565..364f042ee903 100644
|
||||
--- content/public/renderer/content_renderer_client.h
|
||||
+++ content/public/renderer/content_renderer_client.h
|
||||
@@ -77,6 +77,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -74,6 +74,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// Notifies us that the RenderThread has been created.
|
||||
virtual void RenderThreadStarted() {}
|
||||
|
||||
@@ -373,7 +362,7 @@ index a68f00aec37a..696f9efab95d 100644
|
||||
// Notifies that a new RenderFrame has been created.
|
||||
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
|
||||
|
||||
@@ -356,6 +359,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -333,6 +336,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// This method may invalidate the frame.
|
||||
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
|
||||
|
||||
@@ -385,12 +374,12 @@ index a68f00aec37a..696f9efab95d 100644
|
||||
// started.
|
||||
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
|
||||
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
|
||||
index 74a031ad10c3..3b3f9e292f4b 100644
|
||||
index aa77b86eee98..097d26a80aa9 100644
|
||||
--- content/public/renderer/render_frame_observer.h
|
||||
+++ content/public/renderer/render_frame_observer.h
|
||||
@@ -123,6 +123,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
virtual void DidObserveNewCssPropertyUsage(int css_property,
|
||||
bool is_animated) {}
|
||||
@@ -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) {}
|
||||
|
||||
+ // Called when this frame gains focus.
|
||||
+ virtual void FrameFocused() {}
|
||||
@@ -399,10 +388,10 @@ index 74a031ad10c3..3b3f9e292f4b 100644
|
||||
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
|
||||
|
||||
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
|
||||
index 5efb96acfd76..224ee156df07 100644
|
||||
index 7fc7063d9f45..d0cf90c9fadc 100644
|
||||
--- content/renderer/render_frame_impl.cc
|
||||
+++ content/renderer/render_frame_impl.cc
|
||||
@@ -3494,7 +3494,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
@@ -3484,7 +3484,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
std::string mime_type;
|
||||
bool found = false;
|
||||
Send(new FrameHostMsg_GetPluginInfo(
|
||||
@@ -412,7 +401,7 @@ index 5efb96acfd76..224ee156df07 100644
|
||||
params.mime_type.Utf8(), &found, &info, &mime_type));
|
||||
if (!found)
|
||||
return nullptr;
|
||||
@@ -3855,6 +3856,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
|
||||
@@ -3845,6 +3846,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
|
||||
|
||||
void RenderFrameImpl::FrameFocused() {
|
||||
Send(new FrameHostMsg_FrameFocused(routing_id_));
|
||||
@@ -422,10 +411,10 @@ index 5efb96acfd76..224ee156df07 100644
|
||||
|
||||
void RenderFrameImpl::WillCommitProvisionalLoad() {
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index 089bc9a31881..7c938b4d3c8d 100644
|
||||
index 81d3f80db8ef..1e349f80ed23 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -942,6 +942,8 @@ void RenderThreadImpl::Init(
|
||||
@@ -925,6 +925,8 @@ void RenderThreadImpl::Init(
|
||||
|
||||
StartServiceManagerConnection();
|
||||
|
||||
@@ -435,10 +424,10 @@ index 089bc9a31881..7c938b4d3c8d 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 c2c62bae127d..c6543410977d 100644
|
||||
index 0affacaa0294..8c08aad965a2 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -842,6 +842,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
|
||||
@@ -849,6 +849,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
|
||||
|
||||
void RendererBlinkPlatformImpl::GetPluginList(
|
||||
bool refresh,
|
||||
@@ -446,7 +435,7 @@ index c2c62bae127d..c6543410977d 100644
|
||||
const blink::WebSecurityOrigin& mainFrameOrigin,
|
||||
blink::WebPluginListBuilder* builder) {
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
@@ -849,7 +850,8 @@ void RendererBlinkPlatformImpl::GetPluginList(
|
||||
@@ -856,7 +857,8 @@ void RendererBlinkPlatformImpl::GetPluginList(
|
||||
if (!plugin_refresh_allowed_)
|
||||
refresh = false;
|
||||
RenderThread::Get()->Send(
|
||||
@@ -472,10 +461,10 @@ index c2c62bae127d..c6543410977d 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 611b6b70f3cb..98e858e6bd93 100644
|
||||
index e8a4578009d1..780d8b29acb2 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -126,6 +126,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -128,6 +128,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
viz::FrameSinkId GenerateFrameSinkId() override;
|
||||
|
||||
void GetPluginList(bool refresh,
|
||||
@@ -518,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 dfc1e111ac10..23106007a32e 100644
|
||||
index 6746b9f16e7e..8634ada48d57 100644
|
||||
--- content/test/fake_plugin_service.cc
|
||||
+++ content/test/fake_plugin_service.cc
|
||||
@@ -29,6 +29,7 @@ bool FakePluginService::GetPluginInfo(int render_process_id,
|
||||
@@ -530,7 +519,7 @@ index dfc1e111ac10..23106007a32e 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/test/fake_plugin_service.h content/test/fake_plugin_service.h
|
||||
index 84bed37848d9..1a66c0757437 100644
|
||||
index db23a83ed079..57a4c536118c 100644
|
||||
--- content/test/fake_plugin_service.h
|
||||
+++ content/test/fake_plugin_service.h
|
||||
@@ -30,6 +30,7 @@ class FakePluginService : public PluginService {
|
||||
@@ -542,23 +531,23 @@ index 84bed37848d9..1a66c0757437 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 c945e7e32cf2..aa73864ea602 100644
|
||||
index 25182fdb0928..9cc19c4016d3 100644
|
||||
--- content/test/test_blink_web_unit_test_support.cc
|
||||
+++ content/test/test_blink_web_unit_test_support.cc
|
||||
@@ -325,6 +325,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
|
||||
@@ -324,6 +324,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
|
||||
|
||||
void TestBlinkWebUnitTestSupport::GetPluginList(
|
||||
bool refresh,
|
||||
+ bool is_main_frame,
|
||||
const blink::WebSecurityOrigin& mainFrameOrigin,
|
||||
blink::WebPluginListBuilder* builder) {
|
||||
builder->AddPlugin("pdf", "pdf", "pdf-files", SkColorSetRGB(38, 38, 38));
|
||||
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 06ddd5b7b28f..c3371fecff87 100644
|
||||
index d8ad7b6e4435..5eda4bc3c2d5 100644
|
||||
--- content/test/test_blink_web_unit_test_support.h
|
||||
+++ content/test/test_blink_web_unit_test_support.h
|
||||
@@ -73,6 +73,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {
|
||||
viz::ResourceFormat format) override;
|
||||
@@ -72,6 +72,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {
|
||||
const blink::WebSize& size) override;
|
||||
|
||||
void GetPluginList(bool refresh,
|
||||
+ bool is_main_frame,
|
||||
|
@@ -30,22 +30,22 @@ index 887e13776dd2..de30ebff25e4 100644
|
||||
|
||||
void SetActiveExtensions(const std::set<std::string>& extensions) {
|
||||
diff --git chrome/common/crash_keys.h chrome/common/crash_keys.h
|
||||
index bcf172e645a2..f879aa745adf 100644
|
||||
index bcf172e645a2..a46141ea43e0 100644
|
||||
--- chrome/common/crash_keys.h
|
||||
+++ chrome/common/crash_keys.h
|
||||
@@ -17,6 +17,10 @@ class CommandLine;
|
||||
@@ -16,6 +16,10 @@ class CommandLine;
|
||||
}
|
||||
|
||||
namespace crash_keys {
|
||||
|
||||
+
|
||||
+// Returns true if the specified command-line flag should be excluded from
|
||||
+// crash reporting.
|
||||
+bool IsBoringChromeSwitch(const std::string& flag);
|
||||
+
|
||||
|
||||
// Sets the kNumSwitches key and the set of keys named using kSwitchFormat based
|
||||
// on the given |command_line|.
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
|
||||
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
|
||||
index e66f49a470f8..f2b725efb6fd 100644
|
||||
index 08dc1ddba75a..e2bc7c365980 100644
|
||||
--- chrome_elf/BUILD.gn
|
||||
+++ chrome_elf/BUILD.gn
|
||||
@@ -7,6 +7,7 @@
|
||||
@@ -56,7 +56,7 @@ index e66f49a470f8..f2b725efb6fd 100644
|
||||
import("//chrome/process_version_rc_template.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -196,9 +197,6 @@ static_library("blacklist") {
|
||||
@@ -186,9 +187,6 @@ static_library("blacklist") {
|
||||
|
||||
static_library("crash") {
|
||||
sources = [
|
||||
@@ -66,7 +66,7 @@ index e66f49a470f8..f2b725efb6fd 100644
|
||||
"crash/crash_helper.cc",
|
||||
"crash/crash_helper.h",
|
||||
]
|
||||
@@ -206,6 +204,7 @@ static_library("crash") {
|
||||
@@ -196,6 +194,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 e66f49a470f8..f2b725efb6fd 100644
|
||||
"//chrome/install_static:install_static_util",
|
||||
"//components/crash/content/app",
|
||||
"//components/crash/core/common", # crash_keys
|
||||
@@ -213,6 +212,17 @@ static_library("crash") {
|
||||
@@ -203,6 +202,17 @@ static_library("crash") {
|
||||
"//content/public/common:result_codes",
|
||||
"//third_party/crashpad/crashpad/client", # DumpWithoutCrash
|
||||
]
|
||||
@@ -93,7 +93,7 @@ index e66f49a470f8..f2b725efb6fd 100644
|
||||
|
||||
static_library("hook_util") {
|
||||
diff --git chrome_elf/crash/crash_helper.cc chrome_elf/crash/crash_helper.cc
|
||||
index fdc51ab22807..cb0a99dd190c 100644
|
||||
index e8e27dc4ebd7..7cb2149ec41d 100644
|
||||
--- chrome_elf/crash/crash_helper.cc
|
||||
+++ chrome_elf/crash/crash_helper.cc
|
||||
@@ -11,12 +11,17 @@
|
||||
@@ -127,7 +127,7 @@ index fdc51ab22807..cb0a99dd190c 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 1dde47fb6bba..8b96a022abf0 100644
|
||||
index 460f7ac4defa..1c1b11f87e91 100644
|
||||
--- components/crash/content/app/breakpad_linux.cc
|
||||
+++ components/crash/content/app/breakpad_linux.cc
|
||||
@@ -28,6 +28,7 @@
|
||||
@@ -146,7 +146,7 @@ index 1dde47fb6bba..8b96a022abf0 100644
|
||||
#endif
|
||||
|
||||
bool g_is_crash_reporter_enabled = false;
|
||||
@@ -686,7 +688,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
@@ -689,7 +691,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 1dde47fb6bba..8b96a022abf0 100644
|
||||
info.process_start_time = g_process_start_time;
|
||||
info.oom_size = base::g_oom_size;
|
||||
info.pid = g_pid;
|
||||
@@ -1342,7 +1344,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
@@ -1345,7 +1347,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
header_content_encoding,
|
||||
header_content_type,
|
||||
post_file,
|
||||
@@ -164,7 +164,7 @@ index 1dde47fb6bba..8b96a022abf0 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.
|
||||
@@ -1682,10 +1684,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1685,10 +1687,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version);
|
||||
|
||||
writer.AddBoundary();
|
||||
@@ -186,7 +186,7 @@ index 1dde47fb6bba..8b96a022abf0 100644
|
||||
if (info.pid > 0) {
|
||||
char pid_value_buf[kUint64StringSize];
|
||||
uint64_t pid_value_len = my_uint64_len(info.pid);
|
||||
@@ -1803,10 +1814,20 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1793,10 +1804,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 1dde47fb6bba..8b96a022abf0 100644
|
||||
writer.AddBoundary();
|
||||
writer.Flush();
|
||||
}
|
||||
@@ -2016,6 +2037,17 @@ void SetChannelCrashKey(const std::string& channel) {
|
||||
@@ -2006,6 +2027,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 4ec26a2a487a..0eba6a25009c 100644
|
||||
index a37619c815e3..e13a0f7ade86 100644
|
||||
--- components/crash/content/app/crash_reporter_client.cc
|
||||
+++ components/crash/content/app/crash_reporter_client.cc
|
||||
@@ -88,7 +88,7 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
|
||||
@@ -88,11 +88,12 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -253,15 +253,12 @@ index 4ec26a2a487a..0eba6a25009c 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();
|
||||
}
|
||||
@@ -105,6 +106,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename) {
|
||||
@@ -101,6 +102,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
@@ -269,9 +266,9 @@ index 4ec26a2a487a..0eba6a25009c 100644
|
||||
|
||||
#if defined(OS_WIN)
|
||||
bool CrashReporterClient::GetCrashDumpLocation(base::string16* crash_dir) {
|
||||
@@ -147,6 +149,32 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
return false;
|
||||
@@ -145,6 +147,32 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
}
|
||||
#endif
|
||||
|
||||
+bool CrashReporterClient::EnableBreakpadForProcess(
|
||||
+ const std::string& process_type) {
|
||||
@@ -303,8 +300,8 @@ index 4ec26a2a487a..0eba6a25009c 100644
|
||||
int CrashReporterClient::GetAndroidMinidumpDescriptor() {
|
||||
return 0;
|
||||
@@ -175,9 +203,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
-bool CrashReporterClient::EnableBreakpadForProcess(
|
||||
- const std::string& process_type) {
|
||||
@@ -318,7 +315,7 @@ index 4ec26a2a487a..0eba6a25009c 100644
|
||||
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h
|
||||
index 94cdee55b87c..4612a6a6461a 100644
|
||||
index 75d3d6d93873..aa86f45c9746 100644
|
||||
--- components/crash/content/app/crash_reporter_client.h
|
||||
+++ components/crash/content/app/crash_reporter_client.h
|
||||
@@ -5,7 +5,9 @@
|
||||
@@ -331,7 +328,7 @@ index 94cdee55b87c..4612a6a6461a 100644
|
||||
|
||||
#include "base/strings/string16.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -91,7 +93,7 @@ class CrashReporterClient {
|
||||
@@ -91,12 +93,13 @@ class CrashReporterClient {
|
||||
virtual int GetResultCodeRespawnFailed();
|
||||
#endif
|
||||
|
||||
@@ -339,16 +336,14 @@ index 94cdee55b87c..4612a6a6461a 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.
|
||||
// TODO(jperaza): Remove the 2-parameter overload of this method once all
|
||||
@@ -102,6 +104,7 @@ class CrashReporterClient {
|
||||
const char** version,
|
||||
const char** channel);
|
||||
virtual void GetProductNameAndVersion(const char** product_name,
|
||||
const char** version);
|
||||
|
||||
+#if !defined(OS_MACOSX)
|
||||
virtual base::FilePath GetReporterLogFilename();
|
||||
|
||||
// Custom crash minidump handler after the minidump is generated.
|
||||
@@ -110,6 +113,7 @@ class CrashReporterClient {
|
||||
@@ -105,6 +108,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);
|
||||
@@ -356,7 +351,7 @@ index 94cdee55b87c..4612a6a6461a 100644
|
||||
#endif
|
||||
|
||||
// The location where minidump files should be written. Returns true if
|
||||
@@ -181,6 +185,30 @@ class CrashReporterClient {
|
||||
@@ -180,6 +184,30 @@ class CrashReporterClient {
|
||||
|
||||
// Returns true if breakpad should run in the given process type.
|
||||
virtual bool EnableBreakpadForProcess(const std::string& process_type);
|
||||
@@ -388,10 +383,10 @@ index 94cdee55b87c..4612a6a6461a 100644
|
||||
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/content/app/crashpad.cc components/crash/content/app/crashpad.cc
|
||||
index a5f6b2e6f423..b3892d3743ff 100644
|
||||
index 36ff7c219ad5..241156316efc 100644
|
||||
--- components/crash/content/app/crashpad.cc
|
||||
+++ components/crash/content/app/crashpad.cc
|
||||
@@ -147,7 +147,8 @@ void InitializeCrashpadImpl(bool initial_client,
|
||||
@@ -142,7 +142,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.
|
||||
@@ -402,7 +397,7 @@ index a5f6b2e6f423..b3892d3743ff 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 eb82f44053ce..daf2c722837c 100644
|
||||
index 6508c2a06760..f51ce5a17e63 100644
|
||||
--- components/crash/content/app/crashpad_mac.mm
|
||||
+++ components/crash/content/app/crashpad_mac.mm
|
||||
@@ -16,11 +16,14 @@
|
||||
@@ -420,7 +415,7 @@ index eb82f44053ce..daf2c722837c 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"
|
||||
@@ -42,9 +45,10 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
@@ -41,9 +44,10 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
|
||||
if (initial_client) {
|
||||
@autoreleasepool {
|
||||
@@ -434,7 +429,7 @@ index eb82f44053ce..daf2c722837c 100644
|
||||
|
||||
// Is there a way to recover if this fails?
|
||||
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
||||
@@ -56,16 +60,27 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
@@ -55,16 +59,27 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
// crash server won't have symbols for any other build types.
|
||||
std::string url = "https://clients2.google.com/cr/report";
|
||||
#else
|
||||
@@ -467,7 +462,7 @@ index eb82f44053ce..daf2c722837c 100644
|
||||
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
// Empty means stable.
|
||||
@@ -81,12 +96,16 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
@@ -80,12 +95,16 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
process_annotations["channel"] = "";
|
||||
}
|
||||
|
||||
@@ -489,7 +484,7 @@ index eb82f44053ce..daf2c722837c 100644
|
||||
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
@@ -108,6 +127,12 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
@@ -107,6 +126,12 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
"--reset-own-crash-exception-port-to-system-default");
|
||||
}
|
||||
|
||||
@@ -503,7 +498,7 @@ index eb82f44053ce..daf2c722837c 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 8b0edef1b594..22555bb9dc77 100644
|
||||
index a5d1afc409f4..dc9917f7eca9 100644
|
||||
--- components/crash/content/app/crashpad_win.cc
|
||||
+++ components/crash/content/app/crashpad_win.cc
|
||||
@@ -34,8 +34,8 @@ void GetPlatformCrashpadAnnotations(
|
||||
@@ -529,7 +524,7 @@ index 8b0edef1b594..22555bb9dc77 100644
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -62,7 +62,9 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
@@ -62,7 +62,9 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
base::FilePath metrics_path; // Only valid in the browser process.
|
||||
|
||||
const char kPipeNameVar[] = "CHROME_CRASHPAD_PIPE_NAME";
|
||||
@@ -539,7 +534,7 @@ index 8b0edef1b594..22555bb9dc77 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(bool initial_client,
|
||||
@@ -82,13 +84,13 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
std::string url = "https://clients2.google.com/cr/report";
|
||||
@@ -554,9 +549,9 @@ index 8b0edef1b594..22555bb9dc77 100644
|
||||
+ std::string url = crash_reporter_client->GetCrashServerURL();
|
||||
+#endif
|
||||
|
||||
base::FilePath exe_file(exe_path);
|
||||
if (exe_file.empty()) {
|
||||
@@ -106,13 +108,14 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
wchar_t exe_file_path[MAX_PATH] = {};
|
||||
CHECK(
|
||||
@@ -103,13 +105,14 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
crashpad::TriState::kEnabled, kIndirectMemoryLimit);
|
||||
}
|
||||
|
||||
@@ -576,7 +571,7 @@ index 8b0edef1b594..22555bb9dc77 100644
|
||||
if (!user_data_dir.empty()) {
|
||||
start_arguments.push_back(std::string("--user-data-dir=") +
|
||||
user_data_dir);
|
||||
@@ -123,9 +126,12 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
@@ -120,9 +123,12 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
start_arguments.push_back("/prefetch:7");
|
||||
} else {
|
||||
base::FilePath exe_dir = exe_file.DirName();
|
||||
@@ -591,10 +586,10 @@ index 8b0edef1b594..22555bb9dc77 100644
|
||||
|
||||
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
|
||||
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
|
||||
index f66e16a2ebc2..23118ffbeb4b 100644
|
||||
index 46954327b9c7..62a7ce8d4e46 100644
|
||||
--- content/browser/frame_host/debug_urls.cc
|
||||
+++ content/browser/frame_host/debug_urls.cc
|
||||
@@ -129,7 +129,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
||||
@@ -139,7 +139,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 20bd2581cd97..16d63af65e2f 100644
|
||||
index 15d16f2e0928..5e8eadfd3ad1 100644
|
||||
--- third_party/crashpad/crashpad/client/settings.cc
|
||||
+++ third_party/crashpad/crashpad/client/settings.cc
|
||||
@@ -85,7 +85,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) {
|
||||
@@ -38,7 +38,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) {
|
||||
|
||||
struct Settings::Data {
|
||||
static const uint32_t kSettingsMagic = 'CPds';
|
||||
@@ -52,7 +52,7 @@ index 20bd2581cd97..16d63af65e2f 100644
|
||||
|
||||
enum Options : uint32_t {
|
||||
kUploadsEnabled = 1 << 0,
|
||||
@@ -96,6 +96,9 @@ struct Settings::Data {
|
||||
@@ -49,6 +49,9 @@ struct Settings::Data {
|
||||
options(0),
|
||||
padding_0(0),
|
||||
last_upload_attempt_time(0),
|
||||
@@ -62,7 +62,7 @@ index 20bd2581cd97..16d63af65e2f 100644
|
||||
client_id() {}
|
||||
|
||||
uint32_t magic;
|
||||
@@ -103,6 +106,9 @@ struct Settings::Data {
|
||||
@@ -56,6 +59,9 @@ struct Settings::Data {
|
||||
uint32_t options;
|
||||
uint32_t padding_0;
|
||||
int64_t last_upload_attempt_time; // time_t
|
||||
@@ -72,7 +72,7 @@ index 20bd2581cd97..16d63af65e2f 100644
|
||||
UUID client_id;
|
||||
};
|
||||
|
||||
@@ -186,6 +192,56 @@ bool Settings::SetLastUploadAttemptTime(time_t time) {
|
||||
@@ -141,6 +147,56 @@ bool Settings::SetLastUploadAttemptTime(time_t time) {
|
||||
return WriteSettings(handle.get(), settings);
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ index 20bd2581cd97..16d63af65e2f 100644
|
||||
Settings::ScopedLockedFileHandle Settings::MakeScopedLockedFileHandle(
|
||||
FileHandle file,
|
||||
diff --git third_party/crashpad/crashpad/client/settings.h third_party/crashpad/crashpad/client/settings.h
|
||||
index a2b0c74636f4..01370fdc20d9 100644
|
||||
index b64f74fbaf28..0c3c22e215b6 100644
|
||||
--- third_party/crashpad/crashpad/client/settings.h
|
||||
+++ third_party/crashpad/crashpad/client/settings.h
|
||||
@@ -111,6 +111,11 @@ class Settings {
|
||||
@@ -102,6 +102,11 @@ class Settings {
|
||||
//! error logged.
|
||||
bool SetLastUploadAttemptTime(time_t time);
|
||||
|
||||
@@ -146,7 +146,7 @@ index a2b0c74636f4..01370fdc20d9 100644
|
||||
struct Data;
|
||||
|
||||
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
index 78a4b092d8a8..c2d3acfab889 100644
|
||||
index 9c337697b605..b1fbd1de6074 100644
|
||||
--- third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
+++ third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
@@ -12,6 +12,7 @@
|
||||
@@ -179,20 +179,20 @@ index 78a4b092d8a8..c2d3acfab889 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 715c533a2756..6f19e2ebc234 100644
|
||||
index 7505524b693b..4f8ceaa43bd6 100644
|
||||
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
@@ -264,6 +264,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
|
||||
if (minidump_process_snapshot.Initialize(reader)) {
|
||||
@@ -302,6 +302,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
|
||||
if (minidump_process_snapshot.Initialize(&minidump_file_reader)) {
|
||||
parameters =
|
||||
BreakpadHTTPFormParametersFromMinidump(&minidump_process_snapshot);
|
||||
+ if (!parameters.empty())
|
||||
+ parameters = FilterParameters(parameters);
|
||||
}
|
||||
|
||||
if (!reader->SeekSet(start_offset)) {
|
||||
if (!minidump_file_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 2ec1147d2620..8ff9a72e0bd7 100644
|
||||
index cdd1502b7e2f..cb8450a892ba 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 2ec1147d2620..8ff9a72e0bd7 100644
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
@@ -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;
|
||||
@@ -99,7 +100,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
||||
//! This method may be called from any thread.
|
||||
void ReportPending(const UUID& report_uuid);
|
||||
|
||||
- private:
|
||||
+ protected:
|
||||
//! \brief The result code from UploadReport().
|
||||
enum class UploadResult {
|
||||
//! \brief The crash report was uploaded successfully.
|
||||
@@ -131,7 +132,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
||||
@@ -127,7 +128,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 2ec1147d2620..8ff9a72e0bd7 100644
|
||||
|
||||
//! \brief Processes a single pending report from the database.
|
||||
//!
|
||||
@@ -145,7 +146,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
||||
@@ -141,7 +142,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 2ec1147d2620..8ff9a72e0bd7 100644
|
||||
|
||||
//! \brief Attempts to upload a crash report.
|
||||
//!
|
||||
@@ -162,6 +163,11 @@ class CrashReportUploadThread : public WorkerThread::Delegate,
|
||||
UploadResult UploadReport(const CrashReportDatabase::UploadReport* report,
|
||||
@@ -158,6 +159,11 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
||||
UploadResult UploadReport(const CrashReportDatabase::Report* report,
|
||||
std::string* response_body);
|
||||
|
||||
+ using ParameterMap = std::map<std::string, std::string>;
|
||||
@@ -243,12 +243,12 @@ index 2ec1147d2620..8ff9a72e0bd7 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 dd7adf6503fd..4ae51a58aa6e 100644
|
||||
index f175fddf6084..d6285bbf28bf 100644
|
||||
--- third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
+++ third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
@@ -36,8 +36,10 @@
|
||||
@@ -35,8 +35,10 @@
|
||||
#include "base/metrics/persistent_histogram_allocator.h"
|
||||
#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 dd7adf6503fd..4ae51a58aa6e 100644
|
||||
#include "client/crash_report_database.h"
|
||||
#include "client/crashpad_client.h"
|
||||
#include "client/crashpad_info.h"
|
||||
@@ -90,6 +92,10 @@
|
||||
#include "handler/linux/exception_handler_server.h"
|
||||
@@ -79,6 +81,10 @@
|
||||
#include "handler/fuchsia/exception_handler_server.h"
|
||||
#endif // OS_MACOSX
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
@@ -268,7 +268,7 @@ index dd7adf6503fd..4ae51a58aa6e 100644
|
||||
namespace crashpad {
|
||||
|
||||
namespace {
|
||||
@@ -173,6 +179,9 @@ struct Options {
|
||||
@@ -154,6 +160,9 @@ struct Options {
|
||||
bool periodic_tasks;
|
||||
bool rate_limit;
|
||||
bool upload_gzip;
|
||||
@@ -278,9 +278,9 @@ index dd7adf6503fd..4ae51a58aa6e 100644
|
||||
};
|
||||
|
||||
// Splits |key_value| on '=' and inserts the resulting key and value into |map|.
|
||||
@@ -532,6 +541,9 @@ int HandlerMain(int argc,
|
||||
kOptionInitialClientFD,
|
||||
#endif
|
||||
@@ -451,6 +460,9 @@ int HandlerMain(int argc,
|
||||
kOptionResetOwnCrashExceptionPortToSystemDefault,
|
||||
#endif // OS_MACOSX
|
||||
kOptionURL,
|
||||
+ kOptionMaxUploads,
|
||||
+ kOptionMaxDatabaseSize,
|
||||
@@ -288,7 +288,7 @@ index dd7adf6503fd..4ae51a58aa6e 100644
|
||||
|
||||
// Standard options.
|
||||
kOptionHelp = -2,
|
||||
@@ -589,6 +601,9 @@ int HandlerMain(int argc,
|
||||
@@ -501,6 +513,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 dd7adf6503fd..4ae51a58aa6e 100644
|
||||
{nullptr, 0, nullptr, 0},
|
||||
};
|
||||
|
||||
@@ -714,6 +729,27 @@ int HandlerMain(int argc,
|
||||
@@ -605,6 +620,27 @@ int HandlerMain(int argc,
|
||||
options.url = optarg;
|
||||
break;
|
||||
}
|
||||
@@ -326,28 +326,28 @@ index dd7adf6503fd..4ae51a58aa6e 100644
|
||||
case kOptionHelp: {
|
||||
Usage(me);
|
||||
MetricsRecordExit(Metrics::LifetimeMilestone::kExitedEarly);
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
+ upload_thread.Reset(new CefCrashReportUploadThread(
|
||||
+ database.get(), options.url, upload_thread_options,
|
||||
+ options.max_uploads));
|
||||
+ CefCrashReportUploadThread upload_thread(database.get(),
|
||||
+ options.url,
|
||||
+ upload_thread_options,
|
||||
+ options.max_uploads);
|
||||
+#else
|
||||
upload_thread.Reset(new CrashReportUploadThread(
|
||||
database.get(), options.url, upload_thread_options));
|
||||
CrashReportUploadThread upload_thread(database.get(),
|
||||
options.url,
|
||||
upload_thread_options);
|
||||
+#endif
|
||||
upload_thread.Get()->Start();
|
||||
}
|
||||
upload_thread.Start();
|
||||
|
||||
@@ -844,7 +886,8 @@ int HandlerMain(int argc,
|
||||
ScopedStoppable prune_thread;
|
||||
std::unique_ptr<PruneCrashReportThread> 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.Get()->Start();
|
||||
prune_thread->Start();
|
||||
}
|
||||
|
||||
|
64
patch/patches/devtools_837145.patch
Normal file
64
patch/patches/devtools_837145.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
diff --git content/shell/browser/shell_devtools_frontend.cc content/shell/browser/shell_devtools_frontend.cc
|
||||
index 3b3221a..6447347 100644
|
||||
--- content/shell/browser/shell_devtools_frontend.cc
|
||||
+++ content/shell/browser/shell_devtools_frontend.cc
|
||||
@@ -19,8 +19,8 @@
|
||||
namespace {
|
||||
static GURL GetFrontendURL() {
|
||||
int port = ShellDevToolsManagerDelegate::GetHttpHandlerPort();
|
||||
- return GURL(
|
||||
- base::StringPrintf("http://127.0.0.1:%d/devtools/inspector.html", port));
|
||||
+ return GURL(base::StringPrintf(
|
||||
+ "http://127.0.0.1:%d/devtools/devtools_app.html", port));
|
||||
}
|
||||
} // namespace
|
||||
|
||||
diff --git third_party/WebKit/Source/devtools/BUILD.gn third_party/WebKit/Source/devtools/BUILD.gn
|
||||
index 952b922..9e7b4bf 100644
|
||||
--- third_party/WebKit/Source/devtools/BUILD.gn
|
||||
+++ third_party/WebKit/Source/devtools/BUILD.gn
|
||||
@@ -1048,7 +1048,6 @@
|
||||
"$resources_out_dir/cm_modes/cm_modes_module.js",
|
||||
"$resources_out_dir/emulated_devices/emulated_devices_module.js",
|
||||
"$resources_out_dir/product_registry_impl/product_registry_impl_module.js",
|
||||
- "$resources_out_dir/screencast/screencast_module.js",
|
||||
]
|
||||
|
||||
devtools_applications = [
|
||||
diff --git third_party/WebKit/Source/devtools/front_end/inspector.json third_party/WebKit/Source/devtools/front_end/inspector.json
|
||||
index 36c222f..dc2149a 100644
|
||||
--- third_party/WebKit/Source/devtools/front_end/inspector.json
|
||||
+++ third_party/WebKit/Source/devtools/front_end/inspector.json
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"modules" : [
|
||||
- { "name": "screencast", "type": "remote" }
|
||||
+ { "name": "screencast", "type": "autostart" }
|
||||
],
|
||||
"extends": "devtools_app",
|
||||
"has_html": true
|
||||
diff --git third_party/WebKit/Source/devtools/front_end/main/Main.js third_party/WebKit/Source/devtools/front_end/main/Main.js
|
||||
index 4c9d9aa..e6d73b1 100644
|
||||
--- third_party/WebKit/Source/devtools/front_end/main/Main.js
|
||||
+++ third_party/WebKit/Source/devtools/front_end/main/Main.js
|
||||
@@ -212,19 +212,8 @@
|
||||
this._registerForwardedShortcuts();
|
||||
this._registerMessageSinkListener();
|
||||
|
||||
- // Pick first app we could instantiate (for test harness).
|
||||
- for (const extension of self.runtime.extensions(Common.AppProvider)) {
|
||||
- try {
|
||||
- const instance = await extension.instance();
|
||||
- if (instance) {
|
||||
- this._showAppUI(instance);
|
||||
- break;
|
||||
- }
|
||||
- } catch (e) {
|
||||
- console.error(e);
|
||||
- }
|
||||
- }
|
||||
Main.Main.timeEnd('Main._createAppUI');
|
||||
+ this._showAppUI(await self.runtime.extension(Common.AppProvider).instance());
|
||||
}
|
||||
|
||||
/**
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
|
||||
index cae7c566146e..95b4c23c53c9 100644
|
||||
index 26c4f50fad5b..1f95f9a18ad7 100644
|
||||
--- content/browser/devtools/devtools_http_handler.cc
|
||||
+++ content/browser/devtools/devtools_http_handler.cc
|
||||
@@ -564,7 +564,7 @@ void DevToolsHttpHandler::OnJsonRequest(
|
||||
@@ -560,7 +560,7 @@ void DevToolsHttpHandler::OnJsonRequest(
|
||||
version.SetString("Protocol-Version",
|
||||
DevToolsAgentHost::GetProtocolVersion());
|
||||
version.SetString("WebKit-Version", GetWebKitVersion());
|
||||
|
@@ -1,36 +1,8 @@
|
||||
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 d7875ac0c044..d369de7e33f1 100644
|
||||
index 6f16deeb5f4f..f943cfdd053f 100644
|
||||
--- content/browser/frame_host/render_frame_host_manager.cc
|
||||
+++ content/browser/frame_host/render_frame_host_manager.cc
|
||||
@@ -903,10 +903,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
|
||||
@@ -892,10 +892,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.
|
||||
@@ -46,7 +18,7 @@ index d7875ac0c044..d369de7e33f1 100644
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1046,7 +1047,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
|
||||
@@ -1034,7 +1035,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
|
||||
|
||||
// Double-check that the new SiteInstance is associated with the right
|
||||
// BrowserContext.
|
||||
@@ -57,10 +29,10 @@ index d7875ac0c044..d369de7e33f1 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 63cb3851db0a..161cccdf31af 100644
|
||||
index 5373ee07b5cd..2558e590ba7c 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -366,6 +366,13 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -354,6 +354,13 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const GURL& current_url,
|
||||
const GURL& new_url);
|
||||
|
||||
@@ -75,7 +47,7 @@ index 63cb3851db0a..161cccdf31af 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 a5a821840124..a2a8a0d63272 100644
|
||||
index d60c12116dcc..70d376348c46 100644
|
||||
--- extensions/browser/extension_host.cc
|
||||
+++ extensions/browser/extension_host.cc
|
||||
@@ -68,11 +68,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
|
||||
@@ -145,7 +117,7 @@ index a5a821840124..a2a8a0d63272 100644
|
||||
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
|
||||
|
||||
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
|
||||
index c93e3a48c7ee..ff6e2dbbca56 100644
|
||||
index 34812c083bf5..1ccfaf6e1c45 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 2bcaabc1330e..6e6cbb542a59 100644
|
||||
index 50a8a2fe9f1e..719adff0da9b 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -244,6 +244,8 @@ exec_script_whitelist =
|
||||
@@ -241,6 +241,8 @@ exec_script_whitelist =
|
||||
# in the Chromium repo outside of //build.
|
||||
"//build_overrides/build.gni",
|
||||
|
||||
@@ -12,10 +12,10 @@ index 2bcaabc1330e..6e6cbb542a59 100644
|
||||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index acd17275a438..52ea2a4654b0 100644
|
||||
index 161519ebfeac..c034f54603e8 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -192,6 +192,7 @@ group("gn_all") {
|
||||
@@ -190,6 +190,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 fce62521a385..73fa49852fd6 100644
|
||||
index a1d2ea4b2394..50514a54e64f 100644
|
||||
--- build/toolchain/win/setup_toolchain.py
|
||||
+++ build/toolchain/win/setup_toolchain.py
|
||||
@@ -134,26 +134,29 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store):
|
||||
@@ -132,19 +132,22 @@ def _LoadToolchainEnv(cpu, sdk_dir):
|
||||
# variable.
|
||||
if 'VSINSTALLDIR' in os.environ:
|
||||
del os.environ['VSINSTALLDIR']
|
||||
@@ -70,35 +70,21 @@ index fce62521a385..73fa49852fd6 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.append('10.0.15063.0')
|
||||
- args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64',
|
||||
- '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.append('10.0.15063.0')
|
||||
+ args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64',
|
||||
+ '10.0.15063.0']
|
||||
+ variables = _LoadEnvFromBat(args)
|
||||
+ else:
|
||||
+ variables = []
|
||||
@@ -110,7 +96,7 @@ index fce62521a385..73fa49852fd6 100644
|
||||
|
||||
|
||||
diff --git build/vs_toolchain.py build/vs_toolchain.py
|
||||
index 6060415bda86..1cc1eaae0a1d 100755
|
||||
index 5f9541e4556f..c1144b30f237 100755
|
||||
--- build/vs_toolchain.py
|
||||
+++ build/vs_toolchain.py
|
||||
@@ -81,11 +81,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||
@@ -133,10 +119,10 @@ index 6060415bda86..1cc1eaae0a1d 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 6d412994ffd8..575536f80166 100644
|
||||
index 94c5f759a0dd..a166b6302eeb 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -257,7 +257,7 @@ template("chrome_paks") {
|
||||
@@ -253,7 +253,7 @@ template("chrome_paks") {
|
||||
}
|
||||
|
||||
input_locales = locales
|
||||
@@ -146,10 +132,10 @@ index 6d412994ffd8..575536f80166 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 c365088b90b7..29c28300979e 100644
|
||||
index c44f8a110599..0597d10a54c1 100644
|
||||
--- chrome/installer/mini_installer/BUILD.gn
|
||||
+++ chrome/installer/mini_installer/BUILD.gn
|
||||
@@ -133,7 +133,7 @@ template("generate_mini_installer") {
|
||||
@@ -143,7 +143,7 @@ template("generate_mini_installer") {
|
||||
inputs = [
|
||||
"$chrome_dll_file",
|
||||
"$root_out_dir/chrome.exe",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user