mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision ad51088c (#444943)
This commit is contained in:
@@ -15,10 +15,10 @@ index 865b29f..ef44e27 100644
|
||||
|
||||
void SwapCompositorFrame(uint32_t compositor_frame_sink_id,
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
index 4ff716d..aaf17b2 100644
|
||||
index bd36336..9123781 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
@@ -199,6 +199,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
||||
@@ -201,6 +201,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
||||
g_spare_recyclable_compositors.Get().clear();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ index 4ff716d..aaf17b2 100644
|
||||
ui::AcceleratedWidgetMac* BrowserCompositorMac::GetAcceleratedWidgetMac() {
|
||||
if (recyclable_compositor_)
|
||||
return recyclable_compositor_->accelerated_widget_mac();
|
||||
@@ -416,8 +422,13 @@ SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor(
|
||||
@@ -417,8 +423,13 @@ SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor(
|
||||
}
|
||||
|
||||
gfx::Size BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP() const {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
|
||||
index c628e20..3c4e008d 100644
|
||||
index abb76e3..cdf5a84d 100644
|
||||
--- render_widget_host_view_guest.cc
|
||||
+++ render_widget_host_view_guest.cc
|
||||
@@ -253,13 +253,14 @@ void RenderWidgetHostViewGuest::Destroy() {
|
||||
@@ -254,13 +254,14 @@ void RenderWidgetHostViewGuest::Destroy() {
|
||||
}
|
||||
|
||||
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
|
||||
index d4d4f14..977e24e 100644
|
||||
index 97ea047..1efbcf9 100644
|
||||
--- browser/browser_plugin/browser_plugin_guest.cc
|
||||
+++ browser/browser_plugin/browser_plugin_guest.cc
|
||||
@@ -29,7 +29,7 @@
|
||||
@@ -36,7 +36,7 @@ index d4d4f14..977e24e 100644
|
||||
}
|
||||
|
||||
RendererPreferences* renderer_prefs =
|
||||
@@ -796,11 +795,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
@@ -787,11 +786,10 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
->GetWidget()
|
||||
->Init();
|
||||
GetWebContents()->GetMainFrame()->Init();
|
||||
|
@@ -63,10 +63,10 @@ index 4b43013..169ca47 100644
|
||||
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
|
||||
content::BrowserContext* context);
|
||||
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
|
||||
index f715370..fb38098 100644
|
||||
index 6554312..701cb0f 100644
|
||||
--- chrome/browser/profiles/profile_manager.h
|
||||
+++ chrome/browser/profiles/profile_manager.h
|
||||
@@ -90,7 +90,7 @@ class ProfileManager : public base::NonThreadSafe,
|
||||
@@ -89,7 +89,7 @@ class ProfileManager : public base::NonThreadSafe,
|
||||
// acceptable. Returns null if creation of the new profile fails.
|
||||
// TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then
|
||||
// make this method private.
|
||||
@@ -75,7 +75,7 @@ index f715370..fb38098 100644
|
||||
|
||||
// Returns total number of profiles available on this machine.
|
||||
size_t GetNumberOfProfiles();
|
||||
@@ -118,7 +118,7 @@ class ProfileManager : public base::NonThreadSafe,
|
||||
@@ -117,7 +117,7 @@ class ProfileManager : public base::NonThreadSafe,
|
||||
|
||||
// Returns true if the profile pointer is known to point to an existing
|
||||
// profile.
|
||||
@@ -84,7 +84,7 @@ index f715370..fb38098 100644
|
||||
|
||||
// Returns the directory where the first created profile is stored,
|
||||
// relative to the user data directory currently in use.
|
||||
@@ -127,7 +127,7 @@ class ProfileManager : public base::NonThreadSafe,
|
||||
@@ -126,7 +126,7 @@ class ProfileManager : public base::NonThreadSafe,
|
||||
// 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/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
|
||||
index bb7757b..532f036 100644
|
||||
index 4255c1b..f4b197c 100644
|
||||
--- chrome/common/chrome_content_client.cc
|
||||
+++ chrome/common/chrome_content_client.cc
|
||||
@@ -78,7 +78,7 @@
|
||||
@@ -80,7 +80,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) && \
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
|
||||
index 7d1cf0c..a806826 100644
|
||||
index 072d500..c2cc813 100644
|
||||
--- content/browser/compositor/gpu_process_transport_factory.cc
|
||||
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
||||
@@ -196,6 +196,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
|
||||
@@ -199,6 +199,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
|
||||
std::unique_ptr<cc::SoftwareOutputDevice>
|
||||
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
|
||||
ui::Compositor* compositor) {
|
||||
@@ -13,11 +13,11 @@ index 7d1cf0c..a806826 100644
|
||||
+ return output_device;
|
||||
+ }
|
||||
+
|
||||
#if defined(USE_AURA)
|
||||
if (service_manager::ServiceManagerIsRemote()) {
|
||||
NOTREACHED();
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
if (command_line->HasSwitch(switches::kHeadless))
|
||||
return base::WrapUnique(new cc::SoftwareOutputDevice);
|
||||
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
|
||||
index 76f8f38..0fdc07b 100644
|
||||
index 7ecc5e5..e77f545 100644
|
||||
--- ui/compositor/compositor.h
|
||||
+++ ui/compositor/compositor.h
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -28,7 +28,7 @@ index 76f8f38..0fdc07b 100644
|
||||
#include "cc/surfaces/surface_sequence.h"
|
||||
#include "cc/trees/layer_tree_host_client.h"
|
||||
#include "cc/trees/layer_tree_host_single_thread_client.h"
|
||||
@@ -188,6 +189,17 @@ class COMPOSITOR_EXPORT CompositorLock
|
||||
@@ -194,6 +195,17 @@ class COMPOSITOR_EXPORT CompositorLock
|
||||
DISALLOW_COPY_AND_ASSIGN(CompositorLock);
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ index 76f8f38..0fdc07b 100644
|
||||
// Compositor object to take care of GPU painting.
|
||||
// A Browser compositor object is responsible for generating the final
|
||||
// displayable form of pixels comprising a single widget's contents. It draws an
|
||||
@@ -211,6 +223,9 @@ class COMPOSITOR_EXPORT Compositor
|
||||
@@ -223,6 +235,9 @@ class COMPOSITOR_EXPORT Compositor
|
||||
// Schedules a redraw of the layer tree associated with this compositor.
|
||||
void ScheduleDraw();
|
||||
|
||||
@@ -56,9 +56,9 @@ index 76f8f38..0fdc07b 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
|
||||
@@ -393,6 +408,8 @@ class COMPOSITOR_EXPORT Compositor
|
||||
|
||||
@@ -406,6 +421,8 @@ class COMPOSITOR_EXPORT Compositor
|
||||
ui::ContextFactory* context_factory_;
|
||||
ui::ContextFactoryPrivate* context_factory_private_;
|
||||
|
||||
+ CompositorDelegate* delegate_ = nullptr;
|
||||
+
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
|
||||
index 642521f..8fb647f 100644
|
||||
index cc1d049a..8490e65 100644
|
||||
--- public/renderer/content_renderer_client.cc
|
||||
+++ public/renderer/content_renderer_client.cc
|
||||
@@ -100,7 +100,6 @@ bool ContentRendererClient::AllowPopup() {
|
||||
@@ -99,7 +99,6 @@ bool ContentRendererClient::AllowPopup() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ index 642521f..8fb647f 100644
|
||||
bool ContentRendererClient::HandleNavigation(
|
||||
RenderFrame* render_frame,
|
||||
bool is_content_initiated,
|
||||
@@ -113,6 +112,7 @@ bool ContentRendererClient::HandleNavigation(
|
||||
@@ -112,6 +111,7 @@ bool ContentRendererClient::HandleNavigation(
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ index 642521f..8fb647f 100644
|
||||
return false;
|
||||
}
|
||||
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
|
||||
index f2a854f..913e30c 100644
|
||||
index 9895206..1f4626d 100644
|
||||
--- public/renderer/content_renderer_client.h
|
||||
+++ public/renderer/content_renderer_client.h
|
||||
@@ -204,7 +204,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -198,7 +198,6 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// Returns true if a popup window should be allowed.
|
||||
virtual bool AllowPopup();
|
||||
|
||||
@@ -30,7 +30,7 @@ index f2a854f..913e30c 100644
|
||||
// TODO(sgurun) This callback is deprecated and will be removed as soon
|
||||
// as android webview completes implementation of a resource throttle based
|
||||
// shouldoverrideurl implementation. See crbug.com/325351
|
||||
@@ -220,6 +219,7 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -214,6 +213,7 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
blink::WebNavigationPolicy default_policy,
|
||||
bool is_redirect);
|
||||
|
||||
@@ -39,18 +39,22 @@ index f2a854f..913e30c 100644
|
||||
// built in media player for the given |url|. Defaults to false.
|
||||
virtual bool ShouldUseMediaPlayerForURL(const GURL& url);
|
||||
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
|
||||
index 2f79ac0..7e0c73b 100644
|
||||
index 2d93238..95969c4 100644
|
||||
--- renderer/render_frame_impl.cc
|
||||
+++ renderer/render_frame_impl.cc
|
||||
@@ -5112,7 +5112,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
@@ -5259,9 +5259,8 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
(pending_navigation_params_ &&
|
||||
!pending_navigation_params_->request_params.redirects.empty());
|
||||
|
||||
-#ifdef OS_ANDROID
|
||||
- bool render_view_was_created_by_renderer =
|
||||
- render_view_->was_created_by_renderer_;
|
||||
+ // CEF doesn't use this value, so just pass false.
|
||||
+ bool render_view_was_created_by_renderer = false;
|
||||
// The handlenavigation API is deprecated and will be removed once
|
||||
// crbug.com/325351 is resolved.
|
||||
if (GetContentClient()->renderer()->HandleNavigation(
|
||||
@@ -5121,7 +5120,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
@@ -5270,7 +5269,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
is_redirect)) {
|
||||
return blink::WebNavigationPolicyIgnore;
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ index 6cd8b9f..dfbbdc6 100644
|
||||
cflags = [ "/wd4201" ]
|
||||
}
|
||||
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
|
||||
index 800f704..e4b4063 100644
|
||||
index c099a26..6fae782 100644
|
||||
--- chrome/common/crash_keys.cc
|
||||
+++ chrome/common/crash_keys.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
@@ -43,7 +43,7 @@ index 800f704..e4b4063 100644
|
||||
#include "base/base_switches.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/format_macros.h"
|
||||
@@ -94,7 +96,7 @@ const char kViewCount[] = "view-count";
|
||||
@@ -101,7 +103,7 @@ const char kViewCount[] = "view-count";
|
||||
|
||||
const char kZeroEncodeDetails[] = "zero-encode-details";
|
||||
|
||||
@@ -52,7 +52,7 @@ index 800f704..e4b4063 100644
|
||||
// The following keys may be chunked by the underlying crash logging system,
|
||||
// but ultimately constitute a single key-value pair.
|
||||
//
|
||||
@@ -250,10 +252,16 @@ size_t RegisterChromeCrashKeys() {
|
||||
@@ -259,10 +261,16 @@ size_t RegisterChromeCrashKeys() {
|
||||
|
||||
// This dynamic set of keys is used for sets of key value pairs when gathering
|
||||
// a collection of data, like command line switches or extension IDs.
|
||||
@@ -71,7 +71,7 @@ index 800f704..e4b4063 100644
|
||||
|
||||
// Register the extension IDs.
|
||||
{
|
||||
@@ -287,7 +295,7 @@ size_t RegisterChromeCrashKeys() {
|
||||
@@ -296,7 +304,7 @@ size_t RegisterChromeCrashKeys() {
|
||||
return base::debug::InitCrashKeys(&keys.at(0), keys.size(), kChunkMaxLength);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ index 800f704..e4b4063 100644
|
||||
static const char* const kIgnoreSwitches[] = {
|
||||
switches::kEnableLogging,
|
||||
switches::kFlagSwitchesBegin,
|
||||
@@ -343,7 +351,7 @@ static bool IsBoringSwitch(const std::string& flag) {
|
||||
@@ -352,7 +360,7 @@ static bool IsBoringSwitch(const std::string& flag) {
|
||||
}
|
||||
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) {
|
||||
@@ -90,7 +90,7 @@ index 800f704..e4b4063 100644
|
||||
|
||||
void SetActiveExtensions(const std::set<std::string>& extensions) {
|
||||
diff --git chrome/common/crash_keys.h chrome/common/crash_keys.h
|
||||
index 6f66031..1abcdf8 100644
|
||||
index 2b6106c..cfe4548 100644
|
||||
--- chrome/common/crash_keys.h
|
||||
+++ chrome/common/crash_keys.h
|
||||
@@ -23,10 +23,18 @@ class CommandLine;
|
||||
@@ -112,75 +112,8 @@ index 6f66031..1abcdf8 100644
|
||||
// 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/install_static/install_util.cc chrome/install_static/install_util.cc
|
||||
index edec76d..1db1c9c 100644
|
||||
--- chrome/install_static/install_util.cc
|
||||
+++ chrome/install_static/install_util.cc
|
||||
@@ -473,7 +473,9 @@ bool IsNonBrowserProcess() {
|
||||
return g_process_type == ProcessType::NON_BROWSER_PROCESS;
|
||||
}
|
||||
|
||||
-bool GetDefaultUserDataDirectory(std::wstring* result) {
|
||||
+bool GetDefaultUserDataDirectory(
|
||||
+ std::wstring* result,
|
||||
+ const std::wstring& install_sub_directory) {
|
||||
// This environment variable should be set on Windows Vista and later
|
||||
// (https://msdn.microsoft.com/library/windows/desktop/dd378457.aspx).
|
||||
std::wstring user_data_dir = GetEnvironmentString16(L"LOCALAPPDATA");
|
||||
@@ -493,17 +495,23 @@ bool GetDefaultUserDataDirectory(std::wstring* result) {
|
||||
result->swap(user_data_dir);
|
||||
if ((*result)[result->length() - 1] != L'\\')
|
||||
result->push_back(L'\\');
|
||||
- AppendChromeInstallSubDirectory(result, true /* include_suffix */);
|
||||
+ if (!install_sub_directory.empty()) {
|
||||
+ result->append(install_sub_directory);
|
||||
+ } else {
|
||||
+ AppendChromeInstallSubDirectory(result, true /* include_suffix */);
|
||||
+ }
|
||||
result->push_back(L'\\');
|
||||
result->append(kUserDataDirname);
|
||||
return true;
|
||||
}
|
||||
|
||||
-bool GetDefaultCrashDumpLocation(std::wstring* crash_dir) {
|
||||
+bool GetDefaultCrashDumpLocation(
|
||||
+ std::wstring* crash_dir,
|
||||
+ const std::wstring& install_sub_directory) {
|
||||
// In order to be able to start crash handling very early, we do not rely on
|
||||
// chrome's PathService entries (for DIR_CRASH_DUMPS) being available on
|
||||
// Windows. See https://crbug.com/564398.
|
||||
- if (!GetDefaultUserDataDirectory(crash_dir))
|
||||
+ if (!GetDefaultUserDataDirectory(crash_dir, install_sub_directory))
|
||||
return false;
|
||||
|
||||
// We have to make sure the user data dir exists on first run. See
|
||||
diff --git chrome/install_static/install_util.h chrome/install_static/install_util.h
|
||||
index 4ded522..81eba43 100644
|
||||
--- chrome/install_static/install_util.h
|
||||
+++ chrome/install_static/install_util.h
|
||||
@@ -86,14 +86,18 @@ bool IsNonBrowserProcess();
|
||||
// TODO(ananta)
|
||||
// http://crbug.com/604923
|
||||
// Unify this with the Browser Distribution code.
|
||||
-bool GetDefaultUserDataDirectory(std::wstring* result);
|
||||
+bool GetDefaultUserDataDirectory(
|
||||
+ std::wstring* result,
|
||||
+ const std::wstring& install_sub_directory = std::wstring());
|
||||
|
||||
// Populates |crash_dir| with the default crash dump location regardless of
|
||||
// whether DIR_USER_DATA or DIR_CRASH_DUMPS has been overridden.
|
||||
// TODO(ananta)
|
||||
// http://crbug.com/604923
|
||||
// Unify this with the Browser Distribution code.
|
||||
-bool GetDefaultCrashDumpLocation(std::wstring* crash_dir);
|
||||
+bool GetDefaultCrashDumpLocation(
|
||||
+ std::wstring* crash_dir,
|
||||
+ const std::wstring& install_sub_directory = std::wstring());
|
||||
|
||||
// Returns the contents of the specified |variable_name| from the environment
|
||||
// block of the calling process. Returns an empty string if the variable does
|
||||
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
|
||||
index 0629b6f..9c150b5 100644
|
||||
index c2861e0..7d6de6b 100644
|
||||
--- chrome_elf/BUILD.gn
|
||||
+++ chrome_elf/BUILD.gn
|
||||
@@ -7,6 +7,7 @@
|
||||
@@ -191,7 +124,7 @@ index 0629b6f..9c150b5 100644
|
||||
import("//chrome/process_version_rc_template.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -138,16 +139,40 @@ static_library("blacklist") {
|
||||
@@ -139,16 +140,40 @@ static_library("blacklist") {
|
||||
|
||||
static_library("crash") {
|
||||
sources = [
|
||||
@@ -270,7 +203,7 @@ index c658fa9..8c4a145 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 9ebc33f..c013b36 100644
|
||||
index 6e5058e..3dd2b56 100644
|
||||
--- components/crash/content/app/breakpad_linux.cc
|
||||
+++ components/crash/content/app/breakpad_linux.cc
|
||||
@@ -29,6 +29,7 @@
|
||||
@@ -289,7 +222,7 @@ index 9ebc33f..c013b36 100644
|
||||
#endif
|
||||
|
||||
bool g_is_crash_reporter_enabled = false;
|
||||
@@ -654,7 +656,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
@@ -686,7 +688,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
info.process_type_length = 7;
|
||||
info.distro = base::g_linux_distro;
|
||||
info.distro_length = my_strlen(base::g_linux_distro);
|
||||
@@ -298,7 +231,7 @@ index 9ebc33f..c013b36 100644
|
||||
info.process_start_time = g_process_start_time;
|
||||
info.oom_size = base::g_oom_size;
|
||||
info.pid = g_pid;
|
||||
@@ -1275,7 +1277,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
@@ -1299,7 +1301,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
header_content_encoding,
|
||||
header_content_type,
|
||||
post_file,
|
||||
@@ -307,7 +240,7 @@ index 9ebc33f..c013b36 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 fd 3
|
||||
@@ -1880,6 +1882,17 @@ void InitCrashReporter(const std::string& process_type) {
|
||||
@@ -1906,6 +1908,17 @@ void InitCrashReporter(const std::string& process_type) {
|
||||
PostEnableBreakpadInitialization();
|
||||
}
|
||||
|
||||
@@ -326,7 +259,7 @@ index 9ebc33f..c013b36 100644
|
||||
void InitNonBrowserCrashReporterForAndroid(const std::string& process_type) {
|
||||
const base::CommandLine* command_line =
|
||||
diff --git components/crash/content/app/breakpad_linux.h components/crash/content/app/breakpad_linux.h
|
||||
index 3316fa0..df90dbd 100644
|
||||
index bbeb208..74440a0 100644
|
||||
--- components/crash/content/app/breakpad_linux.h
|
||||
+++ components/crash/content/app/breakpad_linux.h
|
||||
@@ -16,6 +16,9 @@ namespace breakpad {
|
||||
@@ -554,7 +487,7 @@ index 7df66ea..1e24110 100644
|
||||
bool result = crashpad_client.StartHandler(handler_path,
|
||||
database_path,
|
||||
diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc
|
||||
index a22af31..bde918e 100644
|
||||
index 1e9c06c..8ed020d 100644
|
||||
--- components/crash/content/app/crashpad_win.cc
|
||||
+++ components/crash/content/app/crashpad_win.cc
|
||||
@@ -81,7 +81,7 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
@@ -594,14 +527,14 @@ index a22af31..bde918e 100644
|
||||
|
||||
+ crash_reporter_client->GetCrashOptionalArguments(&arguments);
|
||||
+
|
||||
g_crashpad_client.Get().StartHandler(
|
||||
exe_file, database_path, metrics_path, url, process_annotations,
|
||||
arguments, false, false);
|
||||
if (!g_crashpad_client.Get().StartHandler(
|
||||
exe_file, database_path, metrics_path, url, process_annotations,
|
||||
arguments, false, true)) {
|
||||
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
|
||||
index 2e61cc1..6b8b943 100644
|
||||
index c404067..4938dfd6 100644
|
||||
--- content/browser/frame_host/debug_urls.cc
|
||||
+++ content/browser/frame_host/debug_urls.cc
|
||||
@@ -189,7 +189,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
||||
@@ -190,7 +190,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
||||
cc::switches::kEnableGpuBenchmarking) &&
|
||||
(PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_TYPED));
|
||||
|
||||
|
@@ -26,7 +26,7 @@ index 3aaaeee..d99fcb4 100644
|
||||
|
||||
static const time_t kSecondsInDay = 60 * 60 * 24;
|
||||
diff --git crashpad/client/prune_crash_reports.h crashpad/client/prune_crash_reports.h
|
||||
index b66e9349..86d1f15 100644
|
||||
index 6dac5f3..34f5ee1 100644
|
||||
--- crashpad/client/prune_crash_reports.h
|
||||
+++ crashpad/client/prune_crash_reports.h
|
||||
@@ -57,7 +57,8 @@ class PruneCondition {
|
||||
@@ -40,7 +40,7 @@ index b66e9349..86d1f15 100644
|
||||
virtual ~PruneCondition() {}
|
||||
|
||||
diff --git crashpad/client/settings.cc crashpad/client/settings.cc
|
||||
index d018e37f..47d8110 100644
|
||||
index 7757ecb..d458337 100644
|
||||
--- crashpad/client/settings.cc
|
||||
+++ crashpad/client/settings.cc
|
||||
@@ -38,7 +38,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) {
|
||||
@@ -65,8 +65,8 @@ index d018e37f..47d8110 100644
|
||||
@@ -56,6 +59,9 @@ struct Settings::Data {
|
||||
uint32_t options;
|
||||
uint32_t padding_0;
|
||||
uint64_t last_upload_attempt_time; // time_t
|
||||
+ uint64_t next_upload_attempt_time; // time_t
|
||||
int64_t last_upload_attempt_time; // time_t
|
||||
+ int64_t next_upload_attempt_time; // time_t
|
||||
+ uint32_t backoff_step;
|
||||
+ uint32_t padding_1;
|
||||
UUID client_id;
|
||||
@@ -96,7 +96,7 @@ index d018e37f..47d8110 100644
|
||||
+ if (!handle.is_valid())
|
||||
+ return false;
|
||||
+
|
||||
+ settings.next_upload_attempt_time = InRangeCast<uint64_t>(time, 0);
|
||||
+ settings.next_upload_attempt_time = InRangeCast<int64_t>(time, 0);
|
||||
+
|
||||
+ return WriteSettings(handle.get(), settings);
|
||||
+}
|
||||
@@ -177,7 +177,7 @@ index a9601d1..9517730 100644
|
||||
//! \brief Attempts to upload a crash report.
|
||||
//!
|
||||
diff --git crashpad/handler/handler_main.cc crashpad/handler/handler_main.cc
|
||||
index 29c5ddc..7a6bad7 100644
|
||||
index 3ada8c3..ffaae42 100644
|
||||
--- crashpad/handler/handler_main.cc
|
||||
+++ crashpad/handler/handler_main.cc
|
||||
@@ -29,8 +29,10 @@
|
||||
@@ -202,7 +202,7 @@ index 29c5ddc..7a6bad7 100644
|
||||
namespace crashpad {
|
||||
|
||||
namespace {
|
||||
@@ -168,6 +174,9 @@ int HandlerMain(int argc, char* argv[]) {
|
||||
@@ -175,6 +181,9 @@ int HandlerMain(int argc, char* argv[]) {
|
||||
kOptionPipeName,
|
||||
#endif // OS_MACOSX
|
||||
kOptionURL,
|
||||
@@ -212,7 +212,7 @@ index 29c5ddc..7a6bad7 100644
|
||||
|
||||
// Standard options.
|
||||
kOptionHelp = -2,
|
||||
@@ -188,11 +197,17 @@ int HandlerMain(int argc, char* argv[]) {
|
||||
@@ -195,11 +204,17 @@ int HandlerMain(int argc, char* argv[]) {
|
||||
InitialClientData initial_client_data;
|
||||
#endif // OS_MACOSX
|
||||
bool rate_limit;
|
||||
@@ -230,7 +230,7 @@ index 29c5ddc..7a6bad7 100644
|
||||
|
||||
const option long_options[] = {
|
||||
{"annotation", required_argument, nullptr, kOptionAnnotation},
|
||||
@@ -222,6 +237,9 @@ int HandlerMain(int argc, char* argv[]) {
|
||||
@@ -229,6 +244,9 @@ int HandlerMain(int argc, char* argv[]) {
|
||||
{"url", required_argument, nullptr, kOptionURL},
|
||||
{"help", no_argument, nullptr, kOptionHelp},
|
||||
{"version", no_argument, nullptr, kOptionVersion},
|
||||
@@ -240,7 +240,7 @@ index 29c5ddc..7a6bad7 100644
|
||||
{nullptr, 0, nullptr, 0},
|
||||
};
|
||||
|
||||
@@ -293,6 +311,27 @@ int HandlerMain(int argc, char* argv[]) {
|
||||
@@ -300,6 +318,27 @@ int HandlerMain(int argc, char* argv[]) {
|
||||
options.url = optarg;
|
||||
break;
|
||||
}
|
||||
@@ -268,7 +268,7 @@ index 29c5ddc..7a6bad7 100644
|
||||
case kOptionHelp: {
|
||||
Usage(me);
|
||||
return EXIT_SUCCESS;
|
||||
@@ -425,12 +464,18 @@ int HandlerMain(int argc, char* argv[]) {
|
||||
@@ -432,12 +471,18 @@ int HandlerMain(int argc, char* argv[]) {
|
||||
// TODO(scottmg): options.rate_limit should be removed when we have a
|
||||
// configurable database setting to control upload limiting.
|
||||
// See https://crashpad.chromium.org/bug/23.
|
||||
|
@@ -1,20 +1,20 @@
|
||||
diff --git .gn .gn
|
||||
index e4b474a..38a41be 100644
|
||||
index f3ea8df..09d0a1e 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -241,6 +241,7 @@ exec_script_whitelist = [
|
||||
"//build/toolchain/win/BUILD.gn",
|
||||
"//build/util/branding.gni",
|
||||
"//build/util/version.gni",
|
||||
+ "//cef/BUILD.gn",
|
||||
"//chromeos/BUILD.gn",
|
||||
@@ -225,6 +225,7 @@ exec_script_whitelist =
|
||||
# in the Chromium repo outside of //build.
|
||||
"//android_webview/BUILD.gn",
|
||||
"//build_overrides/build.gni",
|
||||
+ "//cef/BUILD.gn",
|
||||
"//chromeos/BUILD.gn",
|
||||
|
||||
# TODO(dgn): Layer violation but breaks the build otherwise, see
|
||||
# TODO(dgn): Layer violation but breaks the build otherwise, see
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 43c7b3d..df225a1 100644
|
||||
index 0cd9629..97c284c 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -282,6 +282,7 @@ group("both_gn_and_gyp") {
|
||||
@@ -286,6 +286,7 @@ group("both_gn_and_gyp") {
|
||||
# and whether there should be other targets that are iOS-only and missing.
|
||||
deps += [
|
||||
"//cc:cc_unittests",
|
||||
@@ -55,7 +55,7 @@ index 982fbe8..e757be46 100644
|
||||
+ "studio path")
|
||||
}
|
||||
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
|
||||
index fbc201e..299156d 100644
|
||||
index fbc201e..98ad106 100644
|
||||
--- build/toolchain/win/setup_toolchain.py
|
||||
+++ build/toolchain/win/setup_toolchain.py
|
||||
@@ -126,11 +126,15 @@ def _LoadToolchainEnv(cpu, sdk_dir):
|
||||
@@ -69,7 +69,7 @@ index fbc201e..299156d 100644
|
||||
- variables = _LoadEnvFromBat(args)
|
||||
+ if os.path.exists(script_path):
|
||||
+ args = [script_path, 'amd64_x86' if cpu == 'x86' else 'amd64', \
|
||||
+ '10.0.10586.0']
|
||||
+ '10.0.14393.0']
|
||||
+ variables = _LoadEnvFromBat(args)
|
||||
+ else:
|
||||
+ variables = []
|
||||
@@ -80,7 +80,7 @@ index fbc201e..299156d 100644
|
||||
|
||||
|
||||
diff --git build/vs_toolchain.py build/vs_toolchain.py
|
||||
index c768a8a..bb91777 100755
|
||||
index 3edf1ff..66e150a 100755
|
||||
--- build/vs_toolchain.py
|
||||
+++ build/vs_toolchain.py
|
||||
@@ -74,11 +74,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||
@@ -103,10 +103,10 @@ index c768a8a..bb91777 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 c3ac484..13ae760 100644
|
||||
index 27c483c..24502e9 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -235,7 +235,7 @@ template("chrome_paks") {
|
||||
@@ -245,7 +245,7 @@ template("chrome_paks") {
|
||||
additional_source_patterns = invoker.additional_locale_source_patterns
|
||||
}
|
||||
input_locales = locales
|
||||
@@ -116,10 +116,10 @@ index c3ac484..13ae760 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 0f37e54..7b81cde 100644
|
||||
index 84be262..687ffac 100644
|
||||
--- chrome/installer/mini_installer/BUILD.gn
|
||||
+++ chrome/installer/mini_installer/BUILD.gn
|
||||
@@ -124,7 +124,7 @@ template("generate_mini_installer") {
|
||||
@@ -125,7 +125,7 @@ template("generate_mini_installer") {
|
||||
inputs = [
|
||||
"$chrome_dll_file",
|
||||
"$root_out_dir/chrome.exe",
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git resource_ids resource_ids
|
||||
index c500512..0ac0e98 100644
|
||||
index d454de7..42e591a 100644
|
||||
--- resource_ids
|
||||
+++ resource_ids
|
||||
@@ -358,5 +358,12 @@
|
||||
@@ -355,5 +355,12 @@
|
||||
# Thinking about appending to the end?
|
||||
# Please read the header and find the right section above instead.
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git message_loop.cc message_loop.cc
|
||||
index 1581f6c..ecb3149 100644
|
||||
index 2212941..c2895af 100644
|
||||
--- message_loop.cc
|
||||
+++ message_loop.cc
|
||||
@@ -96,12 +96,6 @@ MessageLoop::~MessageLoop() {
|
||||
@@ -26,10 +26,10 @@ index 1581f6c..ecb3149 100644
|
||||
run_loop_(NULL),
|
||||
incoming_task_queue_(new internal::IncomingTaskQueue(this)),
|
||||
diff --git message_loop.h message_loop.h
|
||||
index ac7a303..b39018b 100644
|
||||
index 91a7b1d..de864d4 100644
|
||||
--- message_loop.h
|
||||
+++ message_loop.h
|
||||
@@ -299,6 +299,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
||||
@@ -303,6 +303,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
||||
void AddTaskObserver(TaskObserver* task_observer);
|
||||
void RemoveTaskObserver(TaskObserver* task_observer);
|
||||
|
||||
@@ -46,7 +46,7 @@ index ac7a303..b39018b 100644
|
||||
// Can only be called from the thread that owns the MessageLoop.
|
||||
bool is_running() const;
|
||||
|
||||
@@ -436,6 +446,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
||||
@@ -440,6 +450,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
||||
// insider a (accidentally induced?) nested message pump.
|
||||
bool nestable_tasks_allowed_;
|
||||
|
||||
@@ -60,7 +60,7 @@ index ac7a303..b39018b 100644
|
||||
// if type_ is TYPE_CUSTOM and pump_ is null.
|
||||
MessagePumpFactoryCallback pump_factory_;
|
||||
diff --git message_pump_win.cc message_pump_win.cc
|
||||
index f1ec727..4b859c0 100644
|
||||
index 30638df..a50d626 100644
|
||||
--- message_pump_win.cc
|
||||
+++ message_pump_win.cc
|
||||
@@ -366,20 +366,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git mime_handler_view_guest.cc mime_handler_view_guest.cc
|
||||
index 049af16..c5130acd 100644
|
||||
index 6e59562..69f9769 100644
|
||||
--- mime_handler_view_guest.cc
|
||||
+++ mime_handler_view_guest.cc
|
||||
@@ -179,6 +179,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
|
@@ -22,10 +22,10 @@ index 0fccae1..73e33ad 100644
|
||||
// This is the interface for subclasses of NetworkDelegate to implement. These
|
||||
// member functions will be called by the respective public notification
|
||||
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
|
||||
index b315664..55701edf 100644
|
||||
index cdf60f8..d6dd4bf 100644
|
||||
--- net/url_request/url_request_job.cc
|
||||
+++ net/url_request/url_request_job.cc
|
||||
@@ -494,6 +494,12 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||
@@ -497,6 +497,12 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||
DCHECK(!source_stream_);
|
||||
source_stream_ = SetUpSourceStream();
|
||||
|
||||
@@ -36,5 +36,5 @@ index b315664..55701edf 100644
|
||||
+ }
|
||||
+
|
||||
if (!source_stream_) {
|
||||
NotifyDone(URLRequestStatus(URLRequestStatus::FAILED,
|
||||
ERR_CONTENT_DECODING_INIT_FAILED));
|
||||
OnDone(URLRequestStatus(URLRequestStatus::FAILED,
|
||||
ERR_CONTENT_DECODING_INIT_FAILED),
|
||||
|
@@ -33,7 +33,7 @@ index 42f631e..b02edb0 100644
|
||||
+
|
||||
} // namespace net
|
||||
diff --git net/cert/ct_policy_enforcer.h net/cert/ct_policy_enforcer.h
|
||||
index c732cee..1c80e81 100644
|
||||
index 7111970..f751d6c 100644
|
||||
--- net/cert/ct_policy_enforcer.h
|
||||
+++ net/cert/ct_policy_enforcer.h
|
||||
@@ -101,6 +101,17 @@ class NET_EXPORT CTPolicyEnforcer {
|
||||
@@ -55,10 +55,10 @@ index c732cee..1c80e81 100644
|
||||
|
||||
} // namespace net
|
||||
diff --git net/http/transport_security_state.cc net/http/transport_security_state.cc
|
||||
index 9b42feb..f7860be 100644
|
||||
index 5f82c28..0ebee04 100644
|
||||
--- net/http/transport_security_state.cc
|
||||
+++ net/http/transport_security_state.cc
|
||||
@@ -1362,8 +1362,10 @@ void TransportSecurityState::SetShouldRequireCTForTesting(bool* required) {
|
||||
@@ -1371,8 +1371,10 @@ void TransportSecurityState::SetShouldRequireCTForTesting(bool* required) {
|
||||
g_ct_required_for_testing = *required ? 1 : -1;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ index 9b42feb..f7860be 100644
|
||||
// We consider built-in information to be timely for 10 weeks.
|
||||
return (base::Time::Now() - build_time).InDays() < 70 /* 10 weeks */;
|
||||
diff --git net/http/transport_security_state.h net/http/transport_security_state.h
|
||||
index fc40b7d..c0b14a4 100644
|
||||
index a55cf62..b984474 100644
|
||||
--- net/http/transport_security_state.h
|
||||
+++ net/http/transport_security_state.h
|
||||
@@ -475,6 +475,10 @@ class NET_EXPORT TransportSecurityState
|
||||
@@ -85,8 +85,8 @@ index fc40b7d..c0b14a4 100644
|
||||
+
|
||||
private:
|
||||
friend class TransportSecurityStateTest;
|
||||
FRIEND_TEST_ALL_PREFIXES(HttpSecurityHeadersTest, UpdateDynamicPKPOnly);
|
||||
@@ -498,7 +502,7 @@ class NET_EXPORT TransportSecurityState
|
||||
friend class TransportSecurityStateStaticFuzzer;
|
||||
@@ -499,7 +503,7 @@ class NET_EXPORT TransportSecurityState
|
||||
// IsBuildTimely returns true if the current build is new enough ensure that
|
||||
// built in security information (i.e. HSTS preloading and pinning
|
||||
// information) is timely.
|
||||
@@ -95,7 +95,7 @@ index fc40b7d..c0b14a4 100644
|
||||
|
||||
// Helper method for actually checking pins.
|
||||
PKPStatus CheckPublicKeyPinsImpl(
|
||||
@@ -589,6 +593,8 @@ class NET_EXPORT TransportSecurityState
|
||||
@@ -590,6 +594,8 @@ class NET_EXPORT TransportSecurityState
|
||||
// True if public key pinning bypass is enabled for local trust anchors.
|
||||
bool enable_pkp_bypass_for_local_trust_anchors_;
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git url_request.h url_request.h
|
||||
index 9ef191c..2100168 100644
|
||||
index e1406f3..ed9aa91 100644
|
||||
--- url_request.h
|
||||
+++ url_request.h
|
||||
@@ -655,10 +655,11 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
|
||||
@@ -651,10 +651,11 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
|
||||
// Returns the error status of the request.
|
||||
// Do not use! Going to be protected!
|
||||
const URLRequestStatus& status() const { return status_; }
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index f91ea0e..b57c692 100644
|
||||
index 4a05c56..5e1c4e8 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -183,6 +183,10 @@ static_library("pdfium") {
|
||||
@@ -194,6 +194,10 @@ static_library("pdfium") {
|
||||
} else {
|
||||
libs += [ "freetype" ]
|
||||
}
|
||||
@@ -14,7 +14,7 @@ index f91ea0e..b57c692 100644
|
||||
|
||||
static_library("test_support") {
|
||||
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
|
||||
index 334c14c..fd918f3 100644
|
||||
index ff4d46e..5d4c419 100644
|
||||
--- fpdfsdk/fpdfview.cpp
|
||||
+++ fpdfsdk/fpdfview.cpp
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -25,7 +25,7 @@ index 334c14c..fd918f3 100644
|
||||
#include "public/fpdf_ext.h"
|
||||
#include "public/fpdf_progressive.h"
|
||||
#include "third_party/base/numerics/safe_conversions_impl.h"
|
||||
@@ -263,6 +264,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
|
||||
@@ -383,6 +384,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
|
||||
|
||||
CPDF_ModuleMgr::Destroy();
|
||||
CFX_GEModule::Destroy();
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
|
||||
index 86fcd13..c695975 100644
|
||||
index ffe235a..e7bf4be 100644
|
||||
--- public/common/common_param_traits_macros.h
|
||||
+++ public/common/common_param_traits_macros.h
|
||||
@@ -201,6 +201,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
@@ -202,6 +202,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
|
||||
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
|
||||
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
|
||||
@@ -11,10 +11,10 @@ index 86fcd13..c695975 100644
|
||||
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
|
||||
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
|
||||
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
|
||||
index da49d44..e42e715 100644
|
||||
index 7f24f09..ab0fe0d 100644
|
||||
--- public/common/web_preferences.cc
|
||||
+++ public/common/web_preferences.cc
|
||||
@@ -173,6 +173,7 @@ WebPreferences::WebPreferences()
|
||||
@@ -172,6 +172,7 @@ WebPreferences::WebPreferences()
|
||||
spatial_navigation_enabled(false),
|
||||
use_solid_color_scrollbars(false),
|
||||
navigate_on_drag_drop(true),
|
||||
@@ -23,7 +23,7 @@ index da49d44..e42e715 100644
|
||||
inert_visual_viewport(false),
|
||||
record_whole_document(false),
|
||||
diff --git public/common/web_preferences.h public/common/web_preferences.h
|
||||
index b853dd3..d2324bd 100644
|
||||
index 4835144..16fa0ad 100644
|
||||
--- public/common/web_preferences.h
|
||||
+++ public/common/web_preferences.h
|
||||
@@ -186,6 +186,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
@@ -35,10 +35,10 @@ index b853dd3..d2324bd 100644
|
||||
bool inert_visual_viewport;
|
||||
bool record_whole_document;
|
||||
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
|
||||
index 0c11c30..c0ae0af 100644
|
||||
index 7083f7d..e307222 100644
|
||||
--- renderer/render_view_impl.cc
|
||||
+++ renderer/render_view_impl.cc
|
||||
@@ -1351,6 +1351,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
|
||||
@@ -1389,6 +1389,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
|
||||
blink::WebView* web_view,
|
||||
CompositorDependencies* compositor_deps) {
|
||||
ApplyWebPreferences(prefs, web_view);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git prefs_tab_helper.cc prefs_tab_helper.cc
|
||||
index e20d4e5c..d350a14 100644
|
||||
index 72267d2..5146b39 100644
|
||||
--- prefs_tab_helper.cc
|
||||
+++ prefs_tab_helper.cc
|
||||
@@ -11,8 +11,8 @@
|
||||
@@ -12,7 +12,7 @@ index e20d4e5c..d350a14 100644
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
@@ -429,12 +429,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||
@@ -431,12 +431,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||
GetInstance()->GetServiceForBrowserContext(profile, true));
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ index e20d4e5c..d350a14 100644
|
||||
|
||||
PrefWatcherFactory() : BrowserContextKeyedServiceFactory(
|
||||
"PrefWatcher",
|
||||
@@ -455,6 +453,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||
@@ -457,6 +455,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/cocoa/applescript/tab_applescript.mm chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||
index cb9d140..528091d 100644
|
||||
index 7ec0135..9f68626 100644
|
||||
--- chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||
+++ chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||
@@ -9,7 +9,6 @@
|
||||
@@ -24,7 +24,7 @@ index cb9d140..528091d 100644
|
||||
using content::NavigationController;
|
||||
using content::NavigationEntry;
|
||||
using content::OpenURLParams;
|
||||
@@ -231,11 +235,15 @@ - (void)handlesStopScriptCommand:(NSScriptCommand*)command {
|
||||
@@ -231,11 +235,15 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id,
|
||||
|
||||
- (void)handlesPrintScriptCommand:(NSScriptCommand*)command {
|
||||
AppleScript::LogAppleScriptUMA(AppleScript::AppleScriptCommand::TAB_PRINT);
|
||||
@@ -41,10 +41,10 @@ index cb9d140..528091d 100644
|
||||
|
||||
- (void)handlesSaveScriptCommand:(NSScriptCommand*)command {
|
||||
diff --git components/printing/common/print_messages.cc components/printing/common/print_messages.cc
|
||||
index 5820bb1..a1a8f08 100644
|
||||
index a9291a2..1a50724 100644
|
||||
--- components/printing/common/print_messages.cc
|
||||
+++ components/printing/common/print_messages.cc
|
||||
@@ -105,7 +105,6 @@ void PrintMsg_PrintPages_Params::Reset() {
|
||||
@@ -107,7 +107,6 @@ void PrintMsg_PrintPages_Params::Reset() {
|
||||
pages = std::vector<int>();
|
||||
}
|
||||
|
||||
@@ -52,16 +52,16 @@ index 5820bb1..a1a8f08 100644
|
||||
PrintHostMsg_RequestPrintPreview_Params::
|
||||
PrintHostMsg_RequestPrintPreview_Params()
|
||||
: is_modifiable(false),
|
||||
@@ -127,4 +126,3 @@ PrintHostMsg_SetOptionsFromDocument_Params::
|
||||
@@ -129,4 +128,3 @@ PrintHostMsg_SetOptionsFromDocument_Params::
|
||||
PrintHostMsg_SetOptionsFromDocument_Params::
|
||||
~PrintHostMsg_SetOptionsFromDocument_Params() {
|
||||
}
|
||||
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h
|
||||
index 3d1e71a..a876c2a 100644
|
||||
index 3679499..b2d2544 100644
|
||||
--- components/printing/common/print_messages.h
|
||||
+++ components/printing/common/print_messages.h
|
||||
@@ -73,7 +73,6 @@ struct PrintMsg_PrintPages_Params {
|
||||
@@ -74,7 +74,6 @@ struct PrintMsg_PrintPages_Params {
|
||||
std::vector<int> pages;
|
||||
};
|
||||
|
||||
@@ -69,7 +69,7 @@ index 3d1e71a..a876c2a 100644
|
||||
struct PrintHostMsg_RequestPrintPreview_Params {
|
||||
PrintHostMsg_RequestPrintPreview_Params();
|
||||
~PrintHostMsg_RequestPrintPreview_Params();
|
||||
@@ -92,7 +91,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params {
|
||||
@@ -93,7 +92,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params {
|
||||
printing::DuplexMode duplex;
|
||||
printing::PageRanges page_ranges;
|
||||
};
|
||||
@@ -77,7 +77,7 @@ index 3d1e71a..a876c2a 100644
|
||||
|
||||
#endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
|
||||
|
||||
@@ -182,7 +180,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange)
|
||||
@@ -186,7 +184,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange)
|
||||
IPC_STRUCT_TRAITS_MEMBER(to)
|
||||
IPC_STRUCT_TRAITS_END()
|
||||
|
||||
@@ -85,7 +85,7 @@ index 3d1e71a..a876c2a 100644
|
||||
IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params)
|
||||
IPC_STRUCT_TRAITS_MEMBER(is_modifiable)
|
||||
IPC_STRUCT_TRAITS_MEMBER(webnode_only)
|
||||
@@ -203,7 +200,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params)
|
||||
@@ -207,7 +204,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params)
|
||||
// Specifies page range to be printed.
|
||||
IPC_STRUCT_TRAITS_MEMBER(page_ranges)
|
||||
IPC_STRUCT_TRAITS_END()
|
||||
@@ -93,7 +93,7 @@ index 3d1e71a..a876c2a 100644
|
||||
|
||||
IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins)
|
||||
IPC_STRUCT_TRAITS_MEMBER(content_width)
|
||||
@@ -223,7 +219,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params)
|
||||
@@ -227,7 +223,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params)
|
||||
IPC_STRUCT_TRAITS_MEMBER(pages)
|
||||
IPC_STRUCT_TRAITS_END()
|
||||
|
||||
@@ -101,7 +101,7 @@ index 3d1e71a..a876c2a 100644
|
||||
// Parameters to describe a rendered document.
|
||||
IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params)
|
||||
// A shared memory handle to metafile data.
|
||||
@@ -280,7 +275,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params)
|
||||
@@ -284,7 +279,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params)
|
||||
// Indicates whether the existing preview data needs to be cleared or not.
|
||||
IPC_STRUCT_MEMBER(bool, clear_preview_data)
|
||||
IPC_STRUCT_END()
|
||||
@@ -109,7 +109,7 @@ index 3d1e71a..a876c2a 100644
|
||||
|
||||
// Parameters to describe a rendered page.
|
||||
IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params)
|
||||
@@ -319,22 +313,20 @@ IPC_STRUCT_END()
|
||||
@@ -323,22 +317,20 @@ IPC_STRUCT_END()
|
||||
|
||||
// Messages sent from the browser to the renderer.
|
||||
|
||||
@@ -134,7 +134,7 @@ index 3d1e71a..a876c2a 100644
|
||||
|
||||
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
// Tells the RenderFrame to switch the CSS to print media type, renders every
|
||||
@@ -352,13 +344,11 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
|
||||
@@ -356,13 +348,11 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
|
||||
// Tells the RenderFrame whether printing is enabled or not.
|
||||
IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */)
|
||||
|
||||
@@ -148,15 +148,15 @@ index 3d1e71a..a876c2a 100644
|
||||
|
||||
// Messages sent from the renderer to the browser.
|
||||
|
||||
@@ -414,7 +404,6 @@ IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten,
|
||||
int /* fd in browser */) // Used only by Chrome OS.
|
||||
@@ -418,7 +408,6 @@ IPC_MESSAGE_CONTROL2(PrintHostMsg_TempFileForPrintingWritten,
|
||||
int /* fd in browser */)
|
||||
#endif // defined(OS_ANDROID)
|
||||
|
||||
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Asks the browser to do print preview.
|
||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview,
|
||||
PrintHostMsg_RequestPrintPreview_Params /* params */)
|
||||
@@ -448,7 +437,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
|
||||
@@ -452,7 +441,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
|
||||
// The memory handle in this message is already valid in the browser process.
|
||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting,
|
||||
PrintHostMsg_DidPreviewDocument_Params /* params */)
|
||||
@@ -164,7 +164,7 @@ index 3d1e71a..a876c2a 100644
|
||||
|
||||
// This is sent when there are invalid printer settings.
|
||||
IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
|
||||
@@ -457,7 +445,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
|
||||
@@ -461,7 +449,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
|
||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed,
|
||||
int /* document cookie */)
|
||||
|
||||
@@ -172,16 +172,16 @@ index 3d1e71a..a876c2a 100644
|
||||
// Tell the browser print preview failed.
|
||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed,
|
||||
int /* document cookie */)
|
||||
@@ -484,4 +471,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
|
||||
@@ -488,4 +475,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
|
||||
// Notify the browser to set print presets based on source PDF document.
|
||||
IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
|
||||
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
|
||||
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
diff --git components/printing/renderer/print_web_view_helper.cc components/printing/renderer/print_web_view_helper.cc
|
||||
index e343eef..025671c 100644
|
||||
index 3144c40..8679f72 100644
|
||||
--- components/printing/renderer/print_web_view_helper.cc
|
||||
+++ components/printing/renderer/print_web_view_helper.cc
|
||||
@@ -88,6 +88,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
|
||||
@@ -89,6 +89,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
bool g_is_preview_enabled = true;
|
||||
@@ -191,7 +191,7 @@ index e343eef..025671c 100644
|
||||
|
||||
const char kPageLoadScriptFormat[] =
|
||||
"document.open(); document.write(%s); document.close();";
|
||||
@@ -102,9 +105,6 @@ void ExecuteScript(blink::WebFrame* frame,
|
||||
@@ -103,9 +106,6 @@ void ExecuteScript(blink::WebFrame* frame,
|
||||
std::string script = base::StringPrintf(script_format, json.c_str());
|
||||
frame->executeScript(blink::WebString(base::UTF8ToUTF16(script)));
|
||||
}
|
||||
@@ -201,7 +201,7 @@ index e343eef..025671c 100644
|
||||
|
||||
int GetDPI(const PrintMsg_Print_Params* print_params) {
|
||||
#if defined(OS_MACOSX)
|
||||
@@ -321,7 +321,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
|
||||
@@ -323,7 +323,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
|
||||
return plugin && plugin->supportsPaginatedPrint();
|
||||
}
|
||||
|
||||
@@ -209,15 +209,15 @@ index e343eef..025671c 100644
|
||||
// Returns true if the current destination printer is PRINT_TO_PDF.
|
||||
bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) {
|
||||
bool print_to_pdf = false;
|
||||
@@ -343,7 +342,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame,
|
||||
@@ -345,7 +344,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame,
|
||||
}
|
||||
return frame_has_custom_page_size_style;
|
||||
}
|
||||
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
// Disable scaling when either:
|
||||
// - The PDF specifies disabling scaling.
|
||||
@@ -397,7 +395,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
|
||||
@@ -401,7 +399,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -225,7 +225,7 @@ index e343eef..025671c 100644
|
||||
bool FitToPageEnabled(const base::DictionaryValue& job_settings) {
|
||||
bool fit_to_paper_size = false;
|
||||
if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) {
|
||||
@@ -440,7 +437,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
|
||||
@@ -444,7 +441,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
|
||||
}
|
||||
return blink::WebPrintScalingOptionFitToPrintableArea;
|
||||
}
|
||||
@@ -233,7 +233,7 @@ index e343eef..025671c 100644
|
||||
|
||||
// Helper function to scale and round an integer value with a double valued
|
||||
// scaling.
|
||||
@@ -559,7 +555,6 @@ blink::WebView* FrameReference::view() {
|
||||
@@ -563,7 +559,6 @@ blink::WebView* FrameReference::view() {
|
||||
return view_;
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ index e343eef..025671c 100644
|
||||
// static - Not anonymous so that platform implementations can use it.
|
||||
void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||
blink::WebCanvas* canvas,
|
||||
@@ -617,7 +612,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||
@@ -621,7 +616,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||
|
||||
web_view->close();
|
||||
}
|
||||
@@ -249,7 +249,7 @@ index e343eef..025671c 100644
|
||||
|
||||
// static - Not anonymous so that platform implementations can use it.
|
||||
float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame,
|
||||
@@ -902,6 +896,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderFrame* render_frame,
|
||||
@@ -906,6 +900,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderFrame* render_frame,
|
||||
print_for_preview_(false),
|
||||
delegate_(std::move(delegate)),
|
||||
print_node_in_progress_(false),
|
||||
@@ -257,7 +257,7 @@ index e343eef..025671c 100644
|
||||
is_loading_(false),
|
||||
is_scripted_preview_delayed_(false),
|
||||
ipc_nesting_level_(0),
|
||||
@@ -961,10 +956,8 @@ void PrintWebViewHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -966,10 +961,8 @@ void PrintWebViewHelper::ScriptedPrint(bool user_initiated) {
|
||||
return;
|
||||
|
||||
if (g_is_preview_enabled) {
|
||||
@@ -268,7 +268,7 @@ index e343eef..025671c 100644
|
||||
} else {
|
||||
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
Print(web_frame, blink::WebNode(), true /* is_scripted? */);
|
||||
@@ -988,14 +981,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
|
||||
@@ -997,14 +990,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
|
||||
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
|
||||
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
|
||||
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
@@ -283,7 +283,7 @@ index e343eef..025671c 100644
|
||||
IPC_MESSAGE_HANDLER(PrintMsg_SetPrintingEnabled, OnSetPrintingEnabled)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
IPC_END_MESSAGE_MAP()
|
||||
@@ -1033,7 +1022,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
|
||||
@@ -1048,7 +1037,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
|
||||
@@ -291,7 +291,7 @@ index e343eef..025671c 100644
|
||||
void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||
const base::DictionaryValue& job_settings) {
|
||||
CHECK_LE(ipc_nesting_level_, 1);
|
||||
@@ -1092,7 +1080,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||
@@ -1107,7 +1095,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||
DidFinishPrinting(FAIL_PRINT);
|
||||
}
|
||||
}
|
||||
@@ -299,7 +299,7 @@ index e343eef..025671c 100644
|
||||
|
||||
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
|
||||
const PageSizeMargins& page_layout_in_points,
|
||||
@@ -1117,7 +1104,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
|
||||
@@ -1132,7 +1119,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
|
||||
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ index e343eef..025671c 100644
|
||||
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
@@ -1302,7 +1288,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
|
||||
@@ -1317,7 +1303,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ index e343eef..025671c 100644
|
||||
bool PrintWebViewHelper::RenderPreviewPage(
|
||||
int page_number,
|
||||
const PrintMsg_Print_Params& print_params) {
|
||||
@@ -1332,7 +1318,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
|
||||
@@ -1347,7 +1333,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
|
||||
}
|
||||
return PreviewPageRendered(page_number, draft_metafile.get());
|
||||
}
|
||||
@@ -325,7 +325,7 @@ index e343eef..025671c 100644
|
||||
|
||||
bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||
DCHECK(!is_print_ready_metafile_sent_);
|
||||
@@ -1362,7 +1348,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||
@@ -1377,7 +1363,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
|
||||
return true;
|
||||
}
|
||||
@@ -333,7 +333,7 @@ index e343eef..025671c 100644
|
||||
|
||||
void PrintWebViewHelper::OnPrintingDone(bool success) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
@@ -1377,7 +1362,6 @@ void PrintWebViewHelper::OnSetPrintingEnabled(bool enabled) {
|
||||
@@ -1392,7 +1377,6 @@ void PrintWebViewHelper::OnSetPrintingEnabled(bool enabled) {
|
||||
is_printing_enabled_ = enabled;
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ index e343eef..025671c 100644
|
||||
void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
@@ -1388,7 +1372,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
@@ -1403,7 +1387,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
// that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
if (!plugin.isNull()) {
|
||||
@@ -351,7 +351,7 @@ index e343eef..025671c 100644
|
||||
return;
|
||||
}
|
||||
print_preview_context_.InitWithFrame(frame);
|
||||
@@ -1396,7 +1382,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
@@ -1411,7 +1397,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
? PRINT_PREVIEW_USER_INITIATED_SELECTION
|
||||
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
|
||||
}
|
||||
@@ -359,10 +359,10 @@ index e343eef..025671c 100644
|
||||
|
||||
bool PrintWebViewHelper::IsPrintingEnabled() const {
|
||||
return is_printing_enabled_;
|
||||
@@ -1420,11 +1405,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1433,11 +1418,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
print_node_in_progress_ = true;
|
||||
|
||||
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets
|
||||
// its |context_menu_node_|.
|
||||
- if (g_is_preview_enabled) {
|
||||
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
+ if (g_is_preview_enabled || force_print_preview_) {
|
||||
@@ -371,8 +371,8 @@ index e343eef..025671c 100644
|
||||
-#endif
|
||||
} else {
|
||||
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
blink::WebNode duplicate_node(node);
|
||||
@@ -1490,7 +1473,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
// Make a copy of the node, in case RenderView::OnContextMenuClosed() resets
|
||||
@@ -1526,7 +1509,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -380,7 +380,7 @@ index e343eef..025671c 100644
|
||||
case FAIL_PREVIEW:
|
||||
int cookie =
|
||||
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
|
||||
@@ -1502,7 +1484,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
@@ -1538,7 +1520,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
}
|
||||
print_preview_context_.Failed(notify_browser_of_print_failure_);
|
||||
break;
|
||||
@@ -388,7 +388,7 @@ index e343eef..025671c 100644
|
||||
}
|
||||
prep_frame_view_.reset();
|
||||
print_pages_params_.reset();
|
||||
@@ -1634,7 +1615,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
@@ -1670,7 +1651,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -396,15 +396,15 @@ index e343eef..025671c 100644
|
||||
bool PrintWebViewHelper::SetOptionsFromPdfDocument(
|
||||
PrintHostMsg_SetOptionsFromDocument_Params* options) {
|
||||
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
|
||||
@@ -1743,7 +1723,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
|
||||
|
||||
return true;
|
||||
@@ -1777,7 +1757,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
|
||||
print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS);
|
||||
return false;
|
||||
}
|
||||
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
|
||||
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame,
|
||||
@@ -1857,7 +1836,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
void PrintWebViewHelper::GetPrintSettingsFromUser(
|
||||
@@ -1884,7 +1863,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
|
||||
@@ -412,7 +412,7 @@ index e343eef..025671c 100644
|
||||
if (params.params.display_header_footer) {
|
||||
// TODO(thestig): Figure out why Linux needs this. It is almost certainly
|
||||
// |printingMinimumShrinkFactor| from Blink.
|
||||
@@ -1872,7 +1850,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
@@ -1899,7 +1877,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
scale_factor / fudge_factor, page_layout_in_points,
|
||||
params.params);
|
||||
}
|
||||
@@ -420,7 +420,7 @@ index e343eef..025671c 100644
|
||||
|
||||
float webkit_scale_factor =
|
||||
RenderPageContent(frame, params.page_number, canvas_area, content_area,
|
||||
@@ -1908,7 +1885,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
@@ -1935,7 +1912,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ index e343eef..025671c 100644
|
||||
void PrintWebViewHelper::ShowScriptedPrintPreview() {
|
||||
if (is_scripted_preview_delayed_) {
|
||||
is_scripted_preview_delayed_ = false;
|
||||
@@ -2036,7 +2012,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
|
||||
@@ -2066,7 +2042,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
|
||||
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
|
||||
return true;
|
||||
}
|
||||
@@ -437,10 +437,10 @@ index e343eef..025671c 100644
|
||||
PrintWebViewHelper::PrintPreviewContext::PrintPreviewContext()
|
||||
: total_page_count_(0),
|
||||
diff --git components/printing/renderer/print_web_view_helper.h components/printing/renderer/print_web_view_helper.h
|
||||
index 2dad908..fea05fd 100644
|
||||
index e603411..ec4b7d8 100644
|
||||
--- components/printing/renderer/print_web_view_helper.h
|
||||
+++ components/printing/renderer/print_web_view_helper.h
|
||||
@@ -143,9 +143,7 @@ class PrintWebViewHelper
|
||||
@@ -145,9 +145,7 @@ class PrintWebViewHelper
|
||||
OK,
|
||||
FAIL_PRINT_INIT,
|
||||
FAIL_PRINT,
|
||||
@@ -450,7 +450,7 @@ index 2dad908..fea05fd 100644
|
||||
};
|
||||
|
||||
enum PrintPreviewErrorBuckets {
|
||||
@@ -181,10 +179,8 @@ class PrintWebViewHelper
|
||||
@@ -183,10 +181,8 @@ class PrintWebViewHelper
|
||||
void OnPrintForSystemDialog();
|
||||
void OnPrintForPrintPreview(const base::DictionaryValue& job_settings);
|
||||
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
@@ -461,7 +461,7 @@ index 2dad908..fea05fd 100644
|
||||
void OnPrintingDone(bool success);
|
||||
|
||||
// Get |page_size| and |content_area| information from
|
||||
@@ -197,7 +193,6 @@ class PrintWebViewHelper
|
||||
@@ -199,7 +195,6 @@ class PrintWebViewHelper
|
||||
// Update |ignore_css_margins_| based on settings.
|
||||
void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings);
|
||||
|
||||
@@ -469,7 +469,7 @@ index 2dad908..fea05fd 100644
|
||||
// Prepare frame for creating preview document.
|
||||
void PrepareFrameForPreviewDocument();
|
||||
|
||||
@@ -214,7 +209,6 @@ class PrintWebViewHelper
|
||||
@@ -216,7 +211,6 @@ class PrintWebViewHelper
|
||||
|
||||
// Finalize the print ready preview document.
|
||||
bool FinalizePrintReadyDocument();
|
||||
@@ -477,7 +477,7 @@ index 2dad908..fea05fd 100644
|
||||
|
||||
// Enable/Disable printing.
|
||||
void OnSetPrintingEnabled(bool enabled);
|
||||
@@ -242,7 +236,6 @@ class PrintWebViewHelper
|
||||
@@ -246,7 +240,6 @@ class PrintWebViewHelper
|
||||
const blink::WebNode& node,
|
||||
int* number_of_pages);
|
||||
|
||||
@@ -485,15 +485,15 @@ index 2dad908..fea05fd 100644
|
||||
// Set options for print preset from source PDF document.
|
||||
bool SetOptionsFromPdfDocument(
|
||||
PrintHostMsg_SetOptionsFromDocument_Params* options);
|
||||
@@ -253,7 +246,6 @@ class PrintWebViewHelper
|
||||
@@ -257,7 +250,6 @@ class PrintWebViewHelper
|
||||
bool UpdatePrintSettings(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
const base::DictionaryValue& passed_job_settings);
|
||||
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
|
||||
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
// Get final print settings from the user.
|
||||
// Return false if the user cancels or on error.
|
||||
@@ -328,7 +320,6 @@ class PrintWebViewHelper
|
||||
@@ -335,7 +327,6 @@ class PrintWebViewHelper
|
||||
const PrintMsg_PrintPages_Params& params,
|
||||
int page_count);
|
||||
|
||||
@@ -501,7 +501,7 @@ index 2dad908..fea05fd 100644
|
||||
// Given the |device| and |canvas| to draw on, prints the appropriate headers
|
||||
// and footers using strings from |header_footer_info| on to the canvas.
|
||||
static void PrintHeaderAndFooter(blink::WebCanvas* canvas,
|
||||
@@ -338,7 +329,6 @@ class PrintWebViewHelper
|
||||
@@ -345,7 +336,6 @@ class PrintWebViewHelper
|
||||
float webkit_scale_factor,
|
||||
const PageSizeMargins& page_layout_in_points,
|
||||
const PrintMsg_Print_Params& params);
|
||||
@@ -509,15 +509,15 @@ index 2dad908..fea05fd 100644
|
||||
|
||||
// Script Initiated Printing ------------------------------------------------
|
||||
|
||||
@@ -348,7 +338,6 @@ class PrintWebViewHelper
|
||||
bool IsScriptInitiatedPrintAllowed(blink::WebFrame* frame,
|
||||
@@ -355,7 +345,6 @@ class PrintWebViewHelper
|
||||
bool IsScriptInitiatedPrintAllowed(blink::WebLocalFrame* frame,
|
||||
bool user_initiated);
|
||||
|
||||
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Shows scripted print preview when options from plugin are available.
|
||||
void ShowScriptedPrintPreview();
|
||||
|
||||
@@ -364,7 +353,6 @@ class PrintWebViewHelper
|
||||
@@ -373,7 +362,6 @@ class PrintWebViewHelper
|
||||
// |metafile| is the rendered page. Otherwise |metafile| is NULL.
|
||||
// Returns true if print preview should continue, false on failure.
|
||||
bool PreviewPageRendered(int page_number, PdfMetafileSkia* metafile);
|
||||
@@ -525,7 +525,7 @@ index 2dad908..fea05fd 100644
|
||||
|
||||
void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings);
|
||||
|
||||
@@ -516,6 +504,7 @@ class PrintWebViewHelper
|
||||
@@ -525,6 +513,7 @@ class PrintWebViewHelper
|
||||
ScriptingThrottler scripting_throttler_;
|
||||
|
||||
bool print_node_in_progress_;
|
||||
@@ -537,7 +537,7 @@ diff --git components/printing/renderer/print_web_view_helper_mac.mm components/
|
||||
index ff49472..b107439 100644
|
||||
--- components/printing/renderer/print_web_view_helper_mac.mm
|
||||
+++ components/printing/renderer/print_web_view_helper_mac.mm
|
||||
@@ -69,7 +69,6 @@
|
||||
@@ -69,7 +69,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
Send(new PrintHostMsg_DidPrintPage(routing_id(), page_params));
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ index ff49472..b107439 100644
|
||||
bool PrintWebViewHelper::RenderPreviewPage(
|
||||
int page_number,
|
||||
const PrintMsg_Print_Params& print_params) {
|
||||
@@ -106,7 +105,6 @@
|
||||
@@ -106,7 +105,6 @@ bool PrintWebViewHelper::RenderPreviewPage(
|
||||
}
|
||||
return PreviewPageRendered(page_number, draft_metafile.get());
|
||||
}
|
||||
@@ -553,7 +553,7 @@ index ff49472..b107439 100644
|
||||
|
||||
void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
||||
int page_number,
|
||||
@@ -142,14 +140,12 @@
|
||||
@@ -142,14 +140,12 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
||||
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsPreviewMetafile(*canvas, is_preview);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
|
||||
index 573b5d9..e61cfa0 100644
|
||||
index 93a1da4..476d7cc 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.cc
|
||||
+++ content/browser/frame_host/render_frame_message_filter.cc
|
||||
@@ -491,7 +491,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git render_view_host_impl.h render_view_host_impl.h
|
||||
index e8890aa..910a25b 100644
|
||||
index a2a0359..d5d2ff7 100644
|
||||
--- render_view_host_impl.h
|
||||
+++ render_view_host_impl.h
|
||||
@@ -167,6 +167,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,
|
||||
@@ -158,6 +158,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,
|
||||
void set_is_swapped_out(bool is_swapped_out) {
|
||||
is_swapped_out_ = is_swapped_out;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
|
||||
index 689ae2c..52e405d 100644
|
||||
index 53c4808..21d741a 100644
|
||||
--- render_widget_host_view_mac.mm
|
||||
+++ render_widget_host_view_mac.mm
|
||||
@@ -462,9 +462,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
|
||||
|
@@ -1,12 +1,12 @@
|
||||
diff --git content/browser/renderer_host/input/render_widget_host_latency_tracker.cc content/browser/renderer_host/input/render_widget_host_latency_tracker.cc
|
||||
index a8d3ac2..908d0e5d 100644
|
||||
index 02d6fe5..6d26a26 100644
|
||||
--- content/browser/renderer_host/input/render_widget_host_latency_tracker.cc
|
||||
+++ content/browser/renderer_host/input/render_widget_host_latency_tracker.cc
|
||||
@@ -96,7 +96,6 @@ void UpdateLatencyCoordinates(const WebInputEvent& event,
|
||||
@@ -99,7 +99,6 @@ void UpdateLatencyCoordinates(const WebInputEvent& event,
|
||||
#define CONFIRM_VALID_TIMING(start, end) \
|
||||
DCHECK(!start.first_event_time.is_null()); \
|
||||
DCHECK(!end.last_event_time.is_null()); \
|
||||
- DCHECK_GE(end.last_event_time, start.first_event_time);
|
||||
|
||||
// Touch/wheel to scroll latency that is mostly under 1 second.
|
||||
#define UMA_HISTOGRAM_TOUCH_WHEEL_TO_SCROLL_LATENCY(name, start, end) \
|
||||
// Touch/wheel to scroll latency using Rappor.
|
||||
#define RAPPOR_TOUCH_WHEEL_TO_SCROLL_LATENCY(delegate, name, start, end) \
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git renderer_preferences_util.cc renderer_preferences_util.cc
|
||||
index c20a01d..ceeb3eb 100644
|
||||
index 7296a04..c702d31 100644
|
||||
--- renderer_preferences_util.cc
|
||||
+++ renderer_preferences_util.cc
|
||||
@@ -31,7 +31,8 @@
|
||||
@@ -32,7 +32,8 @@
|
||||
#include "ui/base/cocoa/defaults_utils.h"
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,7 @@ index c20a01d..ceeb3eb 100644
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
#include "chrome/browser/themes/theme_service_factory.h"
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
@@ -133,7 +134,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs,
|
||||
@@ -134,7 +135,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs,
|
||||
prefs->caret_blink_interval = interval.InSecondsF();
|
||||
#endif
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index 8a73ab8..11f2d54 100644
|
||||
index 6cd8721..2f54816 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -761,8 +761,10 @@ void RenderWidgetHostViewAura::SetBackgroundColor(SkColor color) {
|
||||
@@ -746,8 +746,10 @@ void RenderWidgetHostViewAura::SetBackgroundColor(SkColor color) {
|
||||
RenderWidgetHostViewBase::SetBackgroundColor(color);
|
||||
bool opaque = GetBackgroundOpaque();
|
||||
host_->SetBackgroundOpaque(opaque);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git components/browsing_data/content/BUILD.gn components/browsing_data/content/BUILD.gn
|
||||
index 6229e1b..176f897 100644
|
||||
index aa613cf..ee771ae 100644
|
||||
--- components/browsing_data/content/BUILD.gn
|
||||
+++ components/browsing_data/content/BUILD.gn
|
||||
@@ -15,6 +15,7 @@ static_library("content") {
|
||||
@@ -17,6 +17,7 @@ static_library("content") {
|
||||
deps = [
|
||||
"//base",
|
||||
"//content/public/browser",
|
||||
@@ -11,7 +11,7 @@ index 6229e1b..176f897 100644
|
||||
]
|
||||
}
|
||||
diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc
|
||||
index 41f74ae..daca31a7 100644
|
||||
index 89913ca..db08c06 100644
|
||||
--- content/browser/appcache/appcache_internals_ui.cc
|
||||
+++ content/browser/appcache/appcache_internals_ui.cc
|
||||
@@ -369,8 +369,8 @@ void AppCacheInternalsUI::CreateProxyForPartition(
|
||||
@@ -26,10 +26,10 @@ index 41f74ae..daca31a7 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc
|
||||
index 533d3f1..f0fc700 100644
|
||||
index 3192cd0..39b1518 100644
|
||||
--- content/browser/blob_storage/chrome_blob_storage_context.cc
|
||||
+++ content/browser/blob_storage/chrome_blob_storage_context.cc
|
||||
@@ -41,6 +41,11 @@ class BlobHandleImpl : public BlobHandle {
|
||||
@@ -73,6 +73,11 @@ class BlobHandleImpl : public BlobHandle {
|
||||
|
||||
ChromeBlobStorageContext::ChromeBlobStorageContext() {}
|
||||
|
||||
@@ -42,10 +42,10 @@ index 533d3f1..f0fc700 100644
|
||||
BrowserContext* context) {
|
||||
if (!context->GetUserData(kBlobStorageContextKeyName)) {
|
||||
diff --git content/browser/blob_storage/chrome_blob_storage_context.h content/browser/blob_storage/chrome_blob_storage_context.h
|
||||
index bd02cb1..074e77f 100644
|
||||
index 4c7cfac..4d5c09c 100644
|
||||
--- content/browser/blob_storage/chrome_blob_storage_context.h
|
||||
+++ content/browser/blob_storage/chrome_blob_storage_context.h
|
||||
@@ -41,6 +41,7 @@ class CONTENT_EXPORT ChromeBlobStorageContext
|
||||
@@ -43,6 +43,7 @@ class CONTENT_EXPORT ChromeBlobStorageContext
|
||||
public:
|
||||
ChromeBlobStorageContext();
|
||||
|
||||
@@ -54,10 +54,10 @@ index bd02cb1..074e77f 100644
|
||||
BrowserContext* browser_context);
|
||||
|
||||
diff --git content/browser/browser_context.cc content/browser/browser_context.cc
|
||||
index 063b0ef..b05fd26 100644
|
||||
index 2f14933..6894773 100644
|
||||
--- content/browser/browser_context.cc
|
||||
+++ content/browser/browser_context.cc
|
||||
@@ -117,7 +117,14 @@ StoragePartition* GetStoragePartitionFromConfig(
|
||||
@@ -115,7 +115,14 @@ StoragePartition* GetStoragePartitionFromConfig(
|
||||
if (browser_context->IsOffTheRecord())
|
||||
in_memory = true;
|
||||
|
||||
@@ -73,7 +73,7 @@ index 063b0ef..b05fd26 100644
|
||||
}
|
||||
|
||||
void SaveSessionStateOnIOThread(
|
||||
@@ -516,6 +523,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor(
|
||||
@@ -503,6 +510,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor(
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
@@ -86,10 +86,10 @@ index 063b0ef..b05fd26 100644
|
||||
CHECK(GetUserData(kMojoWasInitialized))
|
||||
<< "Attempting to destroy a BrowserContext that never called "
|
||||
diff --git content/browser/devtools/protocol/service_worker_handler.cc content/browser/devtools/protocol/service_worker_handler.cc
|
||||
index c34d15a1..429c0e8 100644
|
||||
index 242d33e..4dfb463 100644
|
||||
--- content/browser/devtools/protocol/service_worker_handler.cc
|
||||
+++ content/browser/devtools/protocol/service_worker_handler.cc
|
||||
@@ -384,10 +384,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent(
|
||||
@@ -321,10 +321,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent(
|
||||
if (!base::StringToInt64(registration_id, &id))
|
||||
return CreateInvalidVersionIdErrorResponse();
|
||||
|
||||
@@ -103,10 +103,10 @@ index c34d15a1..429c0e8 100644
|
||||
|
||||
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
|
||||
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 43b5cf5..c387825 100644
|
||||
index 5e75c17..28fdb04 100644
|
||||
--- content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -649,7 +649,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() {
|
||||
@@ -653,7 +653,7 @@ void RenderProcessHostImpl::EarlyZygoteLaunch() {
|
||||
|
||||
RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
BrowserContext* browser_context,
|
||||
@@ -115,7 +115,17 @@ index 43b5cf5..c387825 100644
|
||||
bool is_for_guests_only)
|
||||
: fast_shutdown_started_(false),
|
||||
deleting_soon_(false),
|
||||
@@ -1001,6 +1001,22 @@ void RenderProcessHostImpl::ResetChannelProxy() {
|
||||
@@ -685,7 +685,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
indexed_db_factory_(new IndexedDBDispatcherHost(
|
||||
id_,
|
||||
storage_partition_impl_->GetURLRequestContext(),
|
||||
- storage_partition_impl_->GetIndexedDBContext(),
|
||||
+ static_cast<IndexedDBContextImpl*>(
|
||||
+ storage_partition_impl_->GetIndexedDBContext()),
|
||||
ChromeBlobStorageContext::GetFor(browser_context_))),
|
||||
channel_connected_(false),
|
||||
sent_render_process_ready_(false),
|
||||
@@ -1010,6 +1011,22 @@ void RenderProcessHostImpl::ResetChannelProxy() {
|
||||
|
||||
void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
@@ -138,7 +148,7 @@ index 43b5cf5..c387825 100644
|
||||
AddFilter(new ResourceSchedulerFilter(GetID()));
|
||||
MediaInternals* media_internals = MediaInternals::GetInstance();
|
||||
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
|
||||
@@ -1015,8 +1031,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1024,8 +1041,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
new RenderMessageFilter(
|
||||
GetID(), GetBrowserContext(), request_context.get(),
|
||||
widget_helper_.get(), media_internals,
|
||||
@@ -149,37 +159,33 @@ index 43b5cf5..c387825 100644
|
||||
AddFilter(render_message_filter.get());
|
||||
|
||||
render_frame_message_filter_ = new RenderFrameMessageFilter(
|
||||
@@ -1047,9 +1063,9 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1055,10 +1072,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
ChromeBlobStorageContext::GetFor(browser_context);
|
||||
|
||||
resource_message_filter_ = new ResourceMessageFilter(
|
||||
GetID(), PROCESS_TYPE_RENDERER,
|
||||
- storage_partition_impl_->GetAppCacheService(), blob_storage_context.get(),
|
||||
+ app_cache_service, blob_storage_context.get(),
|
||||
- GetID(), storage_partition_impl_->GetAppCacheService(),
|
||||
+ GetID(), app_cache_service,
|
||||
blob_storage_context.get(),
|
||||
storage_partition_impl_->GetFileSystemContext(),
|
||||
- storage_partition_impl_->GetServiceWorkerContext(),
|
||||
+ service_worker_context,
|
||||
get_contexts_callback);
|
||||
|
||||
AddFilter(resource_message_filter_.get());
|
||||
@@ -1072,14 +1088,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
AddFilter(audio_renderer_host_.get());
|
||||
@@ -1082,10 +1099,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
AddFilter(
|
||||
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager()));
|
||||
- AddFilter(new AppCacheDispatcherHost(
|
||||
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service()));
|
||||
AddFilter(new AppCacheDispatcherHost(
|
||||
- storage_partition_impl_->GetAppCacheService(), GetID()));
|
||||
+ AddFilter(new AppCacheDispatcherHost(app_cache_service, GetID()));
|
||||
+ app_cache_service, GetID()));
|
||||
AddFilter(new ClipboardMessageFilter(blob_storage_context));
|
||||
- AddFilter(new DOMStorageMessageFilter(
|
||||
AddFilter(new DOMStorageMessageFilter(
|
||||
- storage_partition_impl_->GetDOMStorageContext()));
|
||||
+ AddFilter(new DOMStorageMessageFilter(dom_storage_context));
|
||||
AddFilter(new IndexedDBDispatcherHost(
|
||||
GetID(), storage_partition_impl_->GetURLRequestContext(),
|
||||
- storage_partition_impl_->GetIndexedDBContext(),
|
||||
+ indexed_db_context,
|
||||
blob_storage_context.get()));
|
||||
+ dom_storage_context));
|
||||
|
||||
#if defined(ENABLE_WEBRTC)
|
||||
@@ -1125,14 +1139,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
peer_connection_tracker_host_ = new PeerConnectionTrackerHost(
|
||||
@@ -1130,14 +1147,13 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
|
||||
scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter =
|
||||
new CacheStorageDispatcherHost();
|
||||
@@ -196,7 +202,7 @@ index 43b5cf5..c387825 100644
|
||||
AddFilter(service_worker_filter.get());
|
||||
|
||||
AddFilter(new SharedWorkerMessageFilter(
|
||||
@@ -1140,12 +1153,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1145,12 +1161,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
WorkerStoragePartition(
|
||||
storage_partition_impl_->GetURLRequestContext(),
|
||||
storage_partition_impl_->GetMediaURLRequestContext(),
|
||||
@@ -211,8 +217,8 @@ index 43b5cf5..c387825 100644
|
||||
+ service_worker_context),
|
||||
message_port_message_filter_.get()));
|
||||
|
||||
#if defined(ENABLE_WEBRTC)
|
||||
@@ -1160,11 +1173,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
@@ -1165,11 +1181,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
GetID(), storage_partition_impl_->GetQuotaManager(),
|
||||
GetContentClient()->browser()->CreateQuotaPermissionContext()));
|
||||
|
||||
@@ -225,16 +231,16 @@ index 43b5cf5..c387825 100644
|
||||
resource_context, service_worker_context, browser_context);
|
||||
AddFilter(notification_message_filter_.get());
|
||||
|
||||
@@ -1173,7 +1183,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1177,7 +1190,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
AddFilter(new HistogramMessageFilter());
|
||||
AddFilter(new MemoryMessageFilter(this));
|
||||
AddFilter(new PushMessagingMessageFilter(
|
||||
- GetID(), storage_partition_impl_->GetServiceWorkerContext()));
|
||||
+ GetID(), service_worker_context));
|
||||
#if defined(OS_ANDROID)
|
||||
AddFilter(new ScreenOrientationMessageFilterAndroid());
|
||||
AddFilter(new ScreenOrientationListenerAndroid());
|
||||
synchronous_compositor_filter_ =
|
||||
@@ -1186,6 +1196,11 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
@@ -1190,6 +1203,11 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
auto registry = base::MakeUnique<service_manager::InterfaceRegistry>(
|
||||
service_manager::mojom::kServiceManager_ConnectorSpec);
|
||||
|
||||
@@ -246,7 +252,7 @@ index 43b5cf5..c387825 100644
|
||||
channel_->AddAssociatedInterface(
|
||||
base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest,
|
||||
base::Unretained(this)));
|
||||
@@ -1224,8 +1239,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
@@ -1234,8 +1252,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
AddUIThreadInterface(
|
||||
registry.get(),
|
||||
base::Bind(&PlatformNotificationContextImpl::CreateService,
|
||||
@@ -256,19 +262,19 @@ index 43b5cf5..c387825 100644
|
||||
GetID()));
|
||||
AddUIThreadInterface(
|
||||
registry.get(),
|
||||
@@ -1399,6 +1413,7 @@ void RenderProcessHostImpl::ForceReleaseWorkerRefCounts() {
|
||||
@@ -1428,6 +1445,7 @@ void RenderProcessHostImpl::ForceReleaseWorkerRefCounts() {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
DCHECK(!is_worker_ref_count_disabled_);
|
||||
is_worker_ref_count_disabled_ = true;
|
||||
+ browser_context_ = nullptr;
|
||||
if (!worker_ref_count())
|
||||
if (!GetWorkerRefCount())
|
||||
return;
|
||||
service_worker_ref_count_ = 0;
|
||||
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
|
||||
index 93c9fd0..968b230 100644
|
||||
index 75895e1..ccc5e00 100644
|
||||
--- content/browser/renderer_host/render_process_host_impl.h
|
||||
+++ content/browser/renderer_host/render_process_host_impl.h
|
||||
@@ -66,7 +66,6 @@ class RenderWidgetHelper;
|
||||
@@ -71,7 +71,6 @@ class RenderWidgetHelper;
|
||||
class RenderWidgetHost;
|
||||
class ResourceMessageFilter;
|
||||
class StoragePartition;
|
||||
@@ -276,7 +282,7 @@ index 93c9fd0..968b230 100644
|
||||
|
||||
namespace mojom {
|
||||
class StoragePartitionService;
|
||||
@@ -102,7 +101,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
@@ -107,7 +106,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider) {
|
||||
public:
|
||||
RenderProcessHostImpl(BrowserContext* browser_context,
|
||||
@@ -285,7 +291,7 @@ index 93c9fd0..968b230 100644
|
||||
bool is_for_guests_only);
|
||||
~RenderProcessHostImpl() override;
|
||||
|
||||
@@ -493,7 +492,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
@@ -508,7 +507,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
BrowserContext* browser_context_;
|
||||
|
||||
// Owned by |browser_context_|.
|
||||
@@ -295,10 +301,10 @@ index 93c9fd0..968b230 100644
|
||||
// The observers watching our lifetime.
|
||||
base::ObserverList<RenderProcessHostObserver> observers_;
|
||||
diff --git content/browser/site_instance_impl.cc content/browser/site_instance_impl.cc
|
||||
index 7980783..e6d5a49 100644
|
||||
index a4c8862..2312f35 100644
|
||||
--- content/browser/site_instance_impl.cc
|
||||
+++ content/browser/site_instance_impl.cc
|
||||
@@ -116,9 +116,8 @@ RenderProcessHost* SiteInstanceImpl::GetProcess() {
|
||||
@@ -198,9 +198,8 @@ RenderProcessHost* SiteInstanceImpl::GetProcess() {
|
||||
process_ = g_render_process_host_factory_->CreateRenderProcessHost(
|
||||
browser_context, this);
|
||||
} else {
|
||||
@@ -307,15 +313,15 @@ index 7980783..e6d5a49 100644
|
||||
- BrowserContext::GetStoragePartition(browser_context, this));
|
||||
+ StoragePartition* partition =
|
||||
+ BrowserContext::GetStoragePartition(browser_context, this);
|
||||
process_ = new RenderProcessHostImpl(browser_context,
|
||||
partition,
|
||||
site_.SchemeIs(kGuestScheme));
|
||||
process_ = new RenderProcessHostImpl(browser_context, partition,
|
||||
is_for_guests_only);
|
||||
}
|
||||
diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h
|
||||
index 34dcfa6..5459ec4 100644
|
||||
index 2c20f2e..185048e 100644
|
||||
--- content/browser/storage_partition_impl.h
|
||||
+++ content/browser/storage_partition_impl.h
|
||||
@@ -25,9 +25,7 @@
|
||||
#include "content/browser/payments/payment_app_context.h"
|
||||
@@ -26,9 +26,7 @@
|
||||
#include "content/browser/push_messaging/push_messaging_context.h"
|
||||
#include "content/browser/service_worker/service_worker_context_wrapper.h"
|
||||
#include "content/common/content_export.h"
|
||||
-#include "content/common/storage_partition_service.mojom.h"
|
||||
@@ -324,16 +330,16 @@ index 34dcfa6..5459ec4 100644
|
||||
#include "net/cookies/cookie_store.h"
|
||||
#include "storage/browser/quota/special_storage_policy.h"
|
||||
|
||||
@@ -73,10 +71,9 @@ class CONTENT_EXPORT StoragePartitionImpl
|
||||
@@ -74,10 +72,9 @@ class CONTENT_EXPORT StoragePartitionImpl
|
||||
HostZoomLevelContext* GetHostZoomLevelContext() override;
|
||||
ZoomLevelDelegate* GetZoomLevelDelegate() override;
|
||||
PlatformNotificationContextImpl* GetPlatformNotificationContext() override;
|
||||
-
|
||||
- BackgroundSyncContext* GetBackgroundSyncContext();
|
||||
- PaymentAppContext* GetPaymentAppContext();
|
||||
- PaymentAppContextImpl* GetPaymentAppContext();
|
||||
- BroadcastChannelProvider* GetBroadcastChannelProvider();
|
||||
+ BackgroundSyncContext* GetBackgroundSyncContext() override;
|
||||
+ PaymentAppContext* GetPaymentAppContext() override;
|
||||
+ PaymentAppContextImpl* GetPaymentAppContext() override;
|
||||
+ BroadcastChannelProvider* GetBroadcastChannelProvider() override;
|
||||
|
||||
// mojom::StoragePartitionService interface.
|
||||
@@ -377,7 +383,7 @@ index 075ae3e..57fb5fd 100644
|
||||
|
||||
void InitializeOnIOThread();
|
||||
diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h
|
||||
index d69bd71..e5da59f 100644
|
||||
index f5cc21f..0a6cd2b 100644
|
||||
--- content/public/browser/browser_context.h
|
||||
+++ content/public/browser/browser_context.h
|
||||
@@ -170,6 +170,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
|
||||
@@ -405,7 +411,7 @@ index d69bd71..e5da59f 100644
|
||||
|
||||
} // namespace content
|
||||
diff --git content/public/browser/storage_partition.h content/public/browser/storage_partition.h
|
||||
index 909b370..29587b9 100644
|
||||
index 909b370..73e8a80 100644
|
||||
--- content/public/browser/storage_partition.h
|
||||
+++ content/public/browser/storage_partition.h
|
||||
@@ -13,6 +13,8 @@
|
||||
@@ -429,7 +435,7 @@ index 909b370..29587b9 100644
|
||||
class HostZoomLevelContext;
|
||||
class HostZoomMap;
|
||||
class IndexedDBContext;
|
||||
+class PaymentAppContext;
|
||||
+class PaymentAppContextImpl;
|
||||
class PlatformNotificationContext;
|
||||
class ServiceWorkerContext;
|
||||
class ZoomLevelDelegate;
|
||||
@@ -438,7 +444,7 @@ index 909b370..29587b9 100644
|
||||
virtual ZoomLevelDelegate* GetZoomLevelDelegate() = 0;
|
||||
virtual PlatformNotificationContext* GetPlatformNotificationContext() = 0;
|
||||
+ virtual BackgroundSyncContext* GetBackgroundSyncContext() = 0;
|
||||
+ virtual PaymentAppContext* GetPaymentAppContext() = 0;
|
||||
+ virtual PaymentAppContextImpl* GetPaymentAppContext() = 0;
|
||||
+ virtual BroadcastChannelProvider* GetBroadcastChannelProvider() = 0;
|
||||
|
||||
enum : uint32_t {
|
||||
@@ -454,6 +460,26 @@ index 909b370..29587b9 100644
|
||||
protected:
|
||||
virtual ~StoragePartition() {}
|
||||
};
|
||||
diff --git extensions/browser/api/socket/socket_api.cc extensions/browser/api/socket/socket_api.cc
|
||||
index cbc8019..d04955c 100644
|
||||
--- extensions/browser/api/socket/socket_api.cc
|
||||
+++ extensions/browser/api/socket/socket_api.cc
|
||||
@@ -816,11 +816,11 @@ void SocketGetNetworkListFunction::SendResponseOnUIThread(
|
||||
|
||||
std::vector<api::socket::NetworkInterface> create_arg;
|
||||
create_arg.reserve(interface_list.size());
|
||||
- for (const net::NetworkInterface& interface : interface_list) {
|
||||
+ for (const net::NetworkInterface& i : interface_list) {
|
||||
api::socket::NetworkInterface info;
|
||||
- info.name = interface.name;
|
||||
- info.address = interface.address.ToString();
|
||||
- info.prefix_length = interface.prefix_length;
|
||||
+ info.name = i.name;
|
||||
+ info.address = i.address.ToString();
|
||||
+ info.prefix_length = i.prefix_length;
|
||||
create_arg.push_back(std::move(info));
|
||||
}
|
||||
|
||||
diff --git extensions/browser/guest_view/web_view/web_ui/BUILD.gn extensions/browser/guest_view/web_view/web_ui/BUILD.gn
|
||||
index 9b26c41..e9f4a0c 100644
|
||||
--- extensions/browser/guest_view/web_view/web_ui/BUILD.gn
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git supports_user_data.h supports_user_data.h
|
||||
index a9f1c93..48d88fa 100644
|
||||
index a4c7c9f..54a151b 100644
|
||||
--- supports_user_data.h
|
||||
+++ supports_user_data.h
|
||||
@@ -33,9 +33,9 @@ class BASE_EXPORT SupportsUserData {
|
||||
@@ -37,9 +37,9 @@ class BASE_EXPORT SupportsUserData {
|
||||
// Multiple user data values can be stored under different keys.
|
||||
// This object will TAKE OWNERSHIP of the given data pointer, and will
|
||||
// delete the object if it is changed or the object is destroyed.
|
||||
@@ -14,4 +14,4 @@ index a9f1c93..48d88fa 100644
|
||||
+ virtual void RemoveUserData(const void* key);
|
||||
|
||||
// SupportsUserData is not thread-safe, and on debug build will assert it is
|
||||
// only used on one thread. Calling this method allows the caller to hand
|
||||
// only used on one execution sequence. Calling this method allows the caller
|
||||
|
@@ -1,10 +1,10 @@
|
||||
diff --git ui/views/test/ui_controls_factory_desktop_aurax11.cc ui/views/test/ui_controls_factory_desktop_aurax11.cc
|
||||
index 2be0e63..343176d 100644
|
||||
index d7b41b1..6065c73 100644
|
||||
--- ui/views/test/ui_controls_factory_desktop_aurax11.cc
|
||||
+++ ui/views/test/ui_controls_factory_desktop_aurax11.cc
|
||||
@@ -146,10 +146,6 @@ class UIControlsDesktopX11 : public UIControlsAura {
|
||||
aura::test::QueryLatestMousePositionRequestInHost(host);
|
||||
host->ConvertPointFromHost(&root_current_location);
|
||||
host->ConvertPixelsToDIP(&root_current_location);
|
||||
|
||||
- auto screen = views::test::TestDesktopScreenX11::GetInstance();
|
||||
- DCHECK_EQ(screen, display::Screen::GetScreen());
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git controls/button/menu_button.cc controls/button/menu_button.cc
|
||||
index e98dda7..14825f6 100644
|
||||
index c4e986b..02fb9f3 100644
|
||||
--- controls/button/menu_button.cc
|
||||
+++ controls/button/menu_button.cc
|
||||
@@ -195,7 +195,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) {
|
||||
@@ -193,7 +193,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) {
|
||||
gfx::Size MenuButton::GetPreferredSize() const {
|
||||
gfx::Size prefsize = LabelButton::GetPreferredSize();
|
||||
if (show_menu_marker_) {
|
||||
@@ -56,7 +56,7 @@ index c232cc1..cc207f9 100644
|
||||
// The time is used for simulating menu behavior for the menu button; that
|
||||
// is, if the menu is shown and the button is pressed, we need to close the
|
||||
diff --git view.h view.h
|
||||
index bb5ebdf..959645a 100644
|
||||
index 147785c..5d413a1 100644
|
||||
--- view.h
|
||||
+++ view.h
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -67,7 +67,7 @@ index bb5ebdf..959645a 100644
|
||||
#include "build/build_config.h"
|
||||
#include "ui/accessibility/ax_enums.h"
|
||||
#include "ui/base/accelerators/accelerator.h"
|
||||
@@ -112,7 +113,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
@@ -114,7 +115,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
public ui::LayerOwner,
|
||||
public ui::AcceleratorTarget,
|
||||
public ui::EventTarget,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index 6408c68..735a253 100644
|
||||
index 11482ff..57e8b58 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -44,6 +44,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
|
||||
@@ -10,7 +10,7 @@ index 6408c68..735a253 100644
|
||||
renderer_frame_number_(0),
|
||||
weak_factory_(this) {
|
||||
}
|
||||
@@ -327,6 +328,14 @@ void RenderWidgetHostViewBase::FocusedNodeTouched(
|
||||
@@ -336,6 +337,14 @@ void RenderWidgetHostViewBase::FocusedNodeTouched(
|
||||
DVLOG(1) << "FocusedNodeTouched: " << editable;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ index 6408c68..735a253 100644
|
||||
return renderer_frame_number_;
|
||||
}
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h
|
||||
index 88e7a04..0e6a740 100644
|
||||
index 08aad92..c18da2d 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -107,6 +107,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
@@ -38,7 +38,7 @@ index 88e7a04..0e6a740 100644
|
||||
|
||||
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
|
||||
// that handle content embedded within other RenderWidgetHostViews.
|
||||
@@ -488,6 +490,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
@@ -491,6 +493,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
// destroyed before the RWHV is destroyed.
|
||||
TextInputManager* text_input_manager_;
|
||||
|
||||
@@ -50,7 +50,7 @@ index 88e7a04..0e6a740 100644
|
||||
void FlushInput();
|
||||
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc
|
||||
index 2adb005..222ca88 100644
|
||||
index 2307c54..7944580 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
|
||||
@@ -28,6 +28,10 @@
|
||||
@@ -64,7 +64,7 @@ index 2adb005..222ca88 100644
|
||||
#if defined(OS_WIN)
|
||||
#include "content/browser/frame_host/render_frame_host_impl.h"
|
||||
#include "content/public/common/context_menu_params.h"
|
||||
@@ -812,6 +816,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
|
||||
@@ -805,6 +809,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -80,10 +80,10 @@ index 2adb005..222ca88 100644
|
||||
if (host_ && set_focus_on_mouse_down_or_key_event_) {
|
||||
set_focus_on_mouse_down_or_key_event_ = false;
|
||||
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
|
||||
index f721d17..5b6dfa9 100644
|
||||
index 71c693b..fffee17 100644
|
||||
--- content/public/browser/render_widget_host_view.h
|
||||
+++ content/public/browser/render_widget_host_view.h
|
||||
@@ -171,6 +171,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
|
||||
@@ -174,6 +174,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
|
||||
// when the value has changed. Views must initially default to false.
|
||||
virtual void SetNeedsBeginFrames(bool needs_begin_frames) = 0;
|
||||
|
||||
@@ -112,10 +112,10 @@ index f772f64..7d13f9f 100644
|
||||
return host ? host->GetAcceleratedWidget() : NULL;
|
||||
}
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 0dea5ca..b167c8a 100644
|
||||
index 5eb0d54..89c614a 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -86,6 +86,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
|
||||
@@ -84,6 +84,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
|
||||
should_animate_window_close_(false),
|
||||
pending_close_(false),
|
||||
has_non_client_view_(false),
|
||||
@@ -123,7 +123,7 @@ index 0dea5ca..b167c8a 100644
|
||||
tooltip_(NULL) {
|
||||
}
|
||||
|
||||
@@ -136,8 +137,12 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window,
|
||||
@@ -119,8 +120,12 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window,
|
||||
native_widget_delegate_);
|
||||
|
||||
HWND parent_hwnd = NULL;
|
||||
@@ -137,7 +137,7 @@ index 0dea5ca..b167c8a 100644
|
||||
|
||||
remove_standard_frame_ = params.remove_standard_frame;
|
||||
has_non_client_view_ = Widget::RequiresNonClientView(params.type);
|
||||
@@ -818,11 +823,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
|
||||
@@ -819,11 +824,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
|
||||
}
|
||||
|
||||
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
|
||||
@@ -156,10 +156,10 @@ index 0dea5ca..b167c8a 100644
|
||||
|
||||
bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
index c1ee992..6591ddf 100644
|
||||
index b69a1f7..0e60fec 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
@@ -249,6 +249,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
@@ -255,6 +255,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
// True if the window should have the frame removed.
|
||||
bool remove_standard_frame_;
|
||||
|
||||
@@ -171,10 +171,10 @@ index c1ee992..6591ddf 100644
|
||||
// a reference.
|
||||
corewm::TooltipWin* tooltip_;
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
index 8550a32..9cdd035 100644
|
||||
index 3b848bc..716ab57 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
@@ -195,6 +195,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
@@ -194,6 +194,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
use_native_frame_(false),
|
||||
should_maximize_after_map_(false),
|
||||
use_argb_visual_(false),
|
||||
@@ -182,7 +182,7 @@ index 8550a32..9cdd035 100644
|
||||
drag_drop_client_(NULL),
|
||||
native_widget_delegate_(native_widget_delegate),
|
||||
desktop_native_widget_aura_(desktop_native_widget_aura),
|
||||
@@ -208,6 +209,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
@@ -207,6 +208,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
has_window_focus_(false),
|
||||
has_pointer_focus_(false),
|
||||
modal_dialog_xid_(0),
|
||||
@@ -190,7 +190,16 @@ index 8550a32..9cdd035 100644
|
||||
close_widget_factory_(this),
|
||||
weak_factory_(this) {}
|
||||
|
||||
@@ -545,7 +547,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
|
||||
@@ -242,6 +244,8 @@ std::vector<aura::Window*> DesktopWindowTreeHostX11::GetAllOpenWindows() {
|
||||
}
|
||||
|
||||
gfx::Rect DesktopWindowTreeHostX11::GetX11RootWindowBounds() const {
|
||||
+ if (!screen_bounds_.IsEmpty())
|
||||
+ return screen_bounds_;
|
||||
return bounds_in_pixels_;
|
||||
}
|
||||
|
||||
@@ -550,7 +554,8 @@ void DesktopWindowTreeHostX11::CloseNow() {
|
||||
// Actually free our native resources.
|
||||
if (ui::PlatformEventSource::GetInstance())
|
||||
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
|
||||
@@ -200,7 +209,7 @@ index 8550a32..9cdd035 100644
|
||||
xwindow_ = None;
|
||||
|
||||
desktop_native_widget_aura_->OnHostClosed();
|
||||
@@ -686,6 +689,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
|
||||
@@ -691,6 +696,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement(
|
||||
}
|
||||
|
||||
gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const {
|
||||
@@ -209,25 +218,16 @@ index 8550a32..9cdd035 100644
|
||||
return ToDIPRect(bounds_in_pixels_);
|
||||
}
|
||||
|
||||
@@ -1202,6 +1207,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
|
||||
@@ -1279,6 +1286,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
|
||||
}
|
||||
|
||||
gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
|
||||
+ if (!screen_bounds_.IsEmpty())
|
||||
+ return screen_bounds_;
|
||||
return bounds_in_pixels_;
|
||||
}
|
||||
|
||||
@@ -1261,6 +1268,8 @@ void DesktopWindowTreeHostX11::SetBounds(
|
||||
}
|
||||
|
||||
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
|
||||
gfx::Point DesktopWindowTreeHostX11::GetLocationOnScreenInPixels() const {
|
||||
+ if (!screen_bounds_.IsEmpty())
|
||||
+ return screen_bounds_.origin();
|
||||
return bounds_in_pixels_.origin();
|
||||
}
|
||||
|
||||
@@ -1386,9 +1395,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
@@ -1405,9 +1414,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
attribute_mask |= CWBorderPixel;
|
||||
swa.border_pixel = 0;
|
||||
|
||||
@@ -244,7 +244,7 @@ index 8550a32..9cdd035 100644
|
||||
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
|
||||
bounds_in_pixels_.height(),
|
||||
0, // border width
|
||||
@@ -2019,6 +2034,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
@@ -2038,6 +2053,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -256,10 +256,10 @@ index 8550a32..9cdd035 100644
|
||||
case FocusOut:
|
||||
OnFocusEvent(xev->type == FocusIn, event->xfocus.mode,
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
index cc2339f..949ea23 100644
|
||||
index f592e1e..6bf0f4d 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
@@ -90,6 +90,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -91,6 +91,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// there is no dialog on the host window.
|
||||
XID GetModalDialog();
|
||||
|
||||
@@ -272,7 +272,7 @@ index cc2339f..949ea23 100644
|
||||
protected:
|
||||
// Overridden from DesktopWindowTreeHost:
|
||||
void Init(aura::Window* content_window,
|
||||
@@ -298,6 +304,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -305,6 +311,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// The bounds of |xwindow_|.
|
||||
gfx::Rect bounds_in_pixels_;
|
||||
|
||||
@@ -282,7 +282,7 @@ index cc2339f..949ea23 100644
|
||||
// Whenever the bounds are set, we keep the previous set of bounds around so
|
||||
// we can have a better chance of getting the real
|
||||
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
|
||||
@@ -337,6 +346,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -344,6 +353,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// Whether we used an ARGB visual for our window.
|
||||
bool use_argb_visual_;
|
||||
|
||||
@@ -293,7 +293,7 @@ index cc2339f..949ea23 100644
|
||||
DesktopDragDropClientAuraX11* drag_drop_client_;
|
||||
|
||||
std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
|
||||
@@ -424,6 +437,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -431,6 +444,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
|
||||
XID modal_dialog_xid_;
|
||||
|
||||
@@ -304,7 +304,7 @@ index cc2339f..949ea23 100644
|
||||
base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_;
|
||||
|
||||
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
|
||||
index 4c21064..ec476af 100644
|
||||
index 8b06275..45b100d 100644
|
||||
--- ui/views/widget/widget.cc
|
||||
+++ ui/views/widget/widget.cc
|
||||
@@ -129,6 +129,7 @@ Widget::InitParams::InitParams(Type type)
|
||||
@@ -339,10 +339,10 @@ index 4c21064..ec476af 100644
|
||||
// This must come after SetContentsView() or it might not be able to find
|
||||
// the correct NativeTheme (on Linux). See http://crbug.com/384492
|
||||
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
|
||||
index 0c7ab33..946a67d 100644
|
||||
index 2c5ba16..87046a0 100644
|
||||
--- ui/views/widget/widget.h
|
||||
+++ ui/views/widget/widget.h
|
||||
@@ -239,6 +239,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
@@ -250,6 +250,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
// Whether the widget should be maximized or minimized.
|
||||
ui::WindowShowState show_state;
|
||||
gfx::NativeView parent;
|
||||
@@ -351,10 +351,10 @@ index 0c7ab33..946a67d 100644
|
||||
ui::Window* parent_mus = nullptr;
|
||||
// Specifies the initial bounds of the Widget. Default is empty, which means
|
||||
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
|
||||
index 6f80d3e..9a21157 100644
|
||||
index a58c5f7..712f1d6 100644
|
||||
--- ui/views/win/hwnd_message_handler.cc
|
||||
+++ ui/views/win/hwnd_message_handler.cc
|
||||
@@ -2508,8 +2508,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -2540,8 +2540,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
active_mouse_tracking_flags_ = 0;
|
||||
} else if (event.type() == ui::ET_MOUSEWHEEL) {
|
||||
// Reroute the mouse wheel to the window under the pointer if applicable.
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/extensions/api/tab_capture/offscreen_tab.cc chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
|
||||
index f50fdf9..9e59835 100644
|
||||
index 776dd0a..1a86478 100644
|
||||
--- chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
|
||||
+++ chrome/browser/extensions/api/tab_capture/offscreen_tab.cc
|
||||
@@ -214,7 +214,9 @@ bool OffscreenTab::ShouldCreateWebContents(
|
||||
@@ -225,7 +225,9 @@ bool OffscreenTab::ShouldCreateWebContents(
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -10,14 +10,14 @@ index f50fdf9..9e59835 100644
|
||||
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||
+ content::WebContentsView** view,
|
||||
+ content::RenderViewHostDelegateView** delegate_view) {
|
||||
DCHECK_EQ(offscreen_tab_web_contents_.get(), contents);
|
||||
DCHECK_EQ(offscreen_tab_web_contents_.get(), web_contents);
|
||||
// Disallow creating separate WebContentses. The WebContents implementation
|
||||
// uses this to spawn new windows/tabs, which is also not allowed for
|
||||
diff --git chrome/browser/extensions/api/tab_capture/offscreen_tab.h chrome/browser/extensions/api/tab_capture/offscreen_tab.h
|
||||
index e639319..5f75a9a 100644
|
||||
index 992160d..b5dcc72 100644
|
||||
--- chrome/browser/extensions/api/tab_capture/offscreen_tab.h
|
||||
+++ chrome/browser/extensions/api/tab_capture/offscreen_tab.h
|
||||
@@ -148,7 +148,9 @@ class OffscreenTab : protected content::WebContentsDelegate,
|
||||
@@ -150,7 +150,9 @@ class OffscreenTab : protected content::WebContentsDelegate,
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -29,10 +29,10 @@ index e639319..5f75a9a 100644
|
||||
void EnterFullscreenModeForTab(content::WebContents* contents,
|
||||
const GURL& origin) final;
|
||||
diff --git chrome/browser/prerender/prerender_contents.cc chrome/browser/prerender/prerender_contents.cc
|
||||
index c3e60e0..93365f5c 100644
|
||||
index aea147d..cac0c15 100644
|
||||
--- chrome/browser/prerender/prerender_contents.cc
|
||||
+++ chrome/browser/prerender/prerender_contents.cc
|
||||
@@ -139,7 +139,9 @@ class PrerenderContents::WebContentsDelegateImpl
|
||||
@@ -142,7 +142,9 @@ class PrerenderContents::WebContentsDelegateImpl
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -44,10 +44,10 @@ index c3e60e0..93365f5c 100644
|
||||
// window.opener property, terminate prerendering.
|
||||
prerender_contents_->Destroy(FINAL_STATUS_CREATE_NEW_WINDOW);
|
||||
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||
index bbb37ff..484eda3 100644
|
||||
index ffcba10..514c431 100644
|
||||
--- chrome/browser/ui/browser.cc
|
||||
+++ chrome/browser/ui/browser.cc
|
||||
@@ -1589,7 +1589,9 @@ bool Browser::ShouldCreateWebContents(
|
||||
@@ -1600,7 +1600,9 @@ bool Browser::ShouldCreateWebContents(
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -59,10 +59,10 @@ index bbb37ff..484eda3 100644
|
||||
// If a BackgroundContents is created, suppress the normal WebContents.
|
||||
return !MaybeCreateBackgroundContents(
|
||||
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
||||
index 6cdff54..0efcaa2 100644
|
||||
index 0860714..a011ad7 100644
|
||||
--- chrome/browser/ui/browser.h
|
||||
+++ chrome/browser/ui/browser.h
|
||||
@@ -619,7 +619,9 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -626,7 +626,9 @@ class Browser : public TabStripModelObserver,
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -73,11 +73,41 @@ index 6cdff54..0efcaa2 100644
|
||||
void WebContentsCreated(content::WebContents* source_contents,
|
||||
int opener_render_process_id,
|
||||
int opener_render_frame_id,
|
||||
diff --git components/offline_pages/content/background_loader/background_loader_contents.cc components/offline_pages/content/background_loader/background_loader_contents.cc
|
||||
index 5998fc7..a98eea6 100644
|
||||
--- components/offline_pages/content/background_loader/background_loader_contents.cc
|
||||
+++ components/offline_pages/content/background_loader/background_loader_contents.cc
|
||||
@@ -71,7 +71,9 @@ bool BackgroundLoaderContents::ShouldCreateWebContents(
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
- content::SessionStorageNamespace* session_storage_namespace) {
|
||||
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||
+ content::WebContentsView** view,
|
||||
+ content::RenderViewHostDelegateView** delegate_view) {
|
||||
// Background pages should not create other webcontents/tabs.
|
||||
return false;
|
||||
}
|
||||
diff --git components/offline_pages/content/background_loader/background_loader_contents.h components/offline_pages/content/background_loader/background_loader_contents.h
|
||||
index 43b6cea..29b6ae2 100644
|
||||
--- components/offline_pages/content/background_loader/background_loader_contents.h
|
||||
+++ components/offline_pages/content/background_loader/background_loader_contents.h
|
||||
@@ -54,7 +54,9 @@ class BackgroundLoaderContents : public content::WebContentsDelegate {
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
- content::SessionStorageNamespace* session_storage_namespace) override;
|
||||
+ content::SessionStorageNamespace* session_storage_namespace,
|
||||
+ content::WebContentsView** view,
|
||||
+ content::RenderViewHostDelegateView** delegate_view) override;
|
||||
|
||||
void AddNewContents(content::WebContents* source,
|
||||
content::WebContents* new_contents,
|
||||
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
|
||||
index 8850f6a..1a3719e 100644
|
||||
index 35b6f47..d444e66 100644
|
||||
--- content/browser/web_contents/web_contents_impl.cc
|
||||
+++ content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -1572,6 +1572,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -1560,6 +1560,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
std::string unique_name;
|
||||
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
|
||||
|
||||
@@ -90,7 +120,7 @@ index 8850f6a..1a3719e 100644
|
||||
WebContentsViewDelegate* delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -1602,6 +1608,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -1576,6 +1582,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
std::move(view_),
|
||||
&render_view_host_delegate_view_));
|
||||
}
|
||||
@@ -98,7 +128,7 @@ index 8850f6a..1a3719e 100644
|
||||
CHECK(render_view_host_delegate_view_);
|
||||
CHECK(view_.get());
|
||||
|
||||
@@ -2063,11 +2070,14 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -2040,12 +2047,15 @@ void WebContentsImpl::CreateNewWindow(
|
||||
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
|
||||
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
|
||||
|
||||
@@ -107,14 +137,15 @@ index 8850f6a..1a3719e 100644
|
||||
+
|
||||
if (delegate_ &&
|
||||
!delegate_->ShouldCreateWebContents(
|
||||
this, route_id, main_frame_route_id, main_frame_widget_route_id,
|
||||
params.window_container_type, params.frame_name, params.target_url,
|
||||
- partition_id, session_storage_namespace)) {
|
||||
+ partition_id, session_storage_namespace, &view, &delegate_view)) {
|
||||
if (route_id != MSG_ROUTING_NONE &&
|
||||
!RenderViewHost::FromID(render_process_id, route_id)) {
|
||||
// If the embedder didn't create a WebContents for this route, we need to
|
||||
@@ -2096,6 +2106,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||
this, source_site_instance, render_view_route_id, main_frame_route_id,
|
||||
main_frame_widget_route_id, params.window_container_type,
|
||||
params.opener_url, params.frame_name, params.target_url, partition_id,
|
||||
- session_storage_namespace)) {
|
||||
+ session_storage_namespace, &view, &delegate_view)) {
|
||||
// Note: even though we're not creating a WebContents here, it could have
|
||||
// been created by the embedder so ensure that the RenderFrameHost is
|
||||
// properly initialized.
|
||||
@@ -2070,6 +2080,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||
create_params.opener_render_process_id = render_process_id;
|
||||
create_params.opener_render_frame_id = params.opener_render_frame_id;
|
||||
create_params.opener_suppressed = params.opener_suppressed;
|
||||
@@ -139,7 +170,7 @@ index fa0afb5..d677b31 100644
|
||||
|
||||
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
|
||||
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
|
||||
index af944f7..cde1d7b 100644
|
||||
index a5e2535..704c137 100644
|
||||
--- content/public/browser/web_contents.h
|
||||
+++ content/public/browser/web_contents.h
|
||||
@@ -59,9 +59,11 @@ class PageState;
|
||||
@@ -166,10 +197,10 @@ index af944f7..cde1d7b 100644
|
||||
|
||||
// Creates a new WebContents.
|
||||
diff --git content/public/browser/web_contents_delegate.cc content/public/browser/web_contents_delegate.cc
|
||||
index b86ec61..2d1ddb2 100644
|
||||
index 01c9c08..704459d 100644
|
||||
--- content/public/browser/web_contents_delegate.cc
|
||||
+++ content/public/browser/web_contents_delegate.cc
|
||||
@@ -144,7 +144,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
||||
@@ -146,7 +146,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -181,22 +212,24 @@ index b86ec61..2d1ddb2 100644
|
||||
}
|
||||
|
||||
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
|
||||
index 2beb83c..b02f4f1 100644
|
||||
index 6456878..21afa0b 100644
|
||||
--- content/public/browser/web_contents_delegate.h
|
||||
+++ content/public/browser/web_contents_delegate.h
|
||||
@@ -42,9 +42,11 @@ class ColorChooser;
|
||||
@@ -42,11 +42,13 @@ class ColorChooser;
|
||||
class JavaScriptDialogManager;
|
||||
class PageState;
|
||||
class RenderFrameHost;
|
||||
+class RenderViewHostDelegateView;
|
||||
class RenderWidgetHost;
|
||||
class SessionStorageNamespace;
|
||||
class SiteInstance;
|
||||
class WebContents;
|
||||
class WebContentsImpl;
|
||||
+class WebContentsView;
|
||||
struct ColorSuggestion;
|
||||
struct ContextMenuParams;
|
||||
struct DropData;
|
||||
@@ -303,7 +305,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -323,7 +325,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -208,10 +241,10 @@ index 2beb83c..b02f4f1 100644
|
||||
// Notifies the delegate about the creation of a new WebContents. This
|
||||
// typically happens when popups are created.
|
||||
diff --git extensions/browser/guest_view/extension_options/extension_options_guest.cc extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
index c02aace..67b9bd8 100644
|
||||
index 12dd8f3..c358a52 100644
|
||||
--- extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
+++ extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
@@ -201,7 +201,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
|
||||
@@ -203,7 +203,9 @@ bool ExtensionOptionsGuest::ShouldCreateWebContents(
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -223,10 +256,10 @@ index c02aace..67b9bd8 100644
|
||||
// view is used for displaying embedded extension options, we want any
|
||||
// external links to be opened in a new tab, not in a new guest view.
|
||||
diff --git extensions/browser/guest_view/extension_options/extension_options_guest.h extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||
index e0309f7..f6a3878 100644
|
||||
index 5b0505c..63bf100 100644
|
||||
--- extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||
+++ extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||
@@ -56,7 +56,9 @@ class ExtensionOptionsGuest
|
||||
@@ -54,7 +54,9 @@ class ExtensionOptionsGuest
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -238,10 +271,10 @@ index e0309f7..f6a3878 100644
|
||||
// content::WebContentsObserver implementation.
|
||||
void DidNavigateMainFrame(const content::LoadCommittedDetails& details,
|
||||
diff --git ui/keyboard/content/keyboard_ui_content.cc ui/keyboard/content/keyboard_ui_content.cc
|
||||
index d08fd23..3ec515c 100644
|
||||
index 1dba63e..0268ea3 100644
|
||||
--- ui/keyboard/content/keyboard_ui_content.cc
|
||||
+++ ui/keyboard/content/keyboard_ui_content.cc
|
||||
@@ -64,7 +64,9 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate,
|
||||
@@ -67,7 +67,9 @@ class KeyboardContentsDelegate : public content::WebContentsDelegate,
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -253,10 +286,10 @@ index d08fd23..3ec515c 100644
|
||||
}
|
||||
|
||||
diff --git ui/views/controls/webview/web_dialog_view.cc ui/views/controls/webview/web_dialog_view.cc
|
||||
index d8afe6e..59259b7 100644
|
||||
index cd4f8ec..9b9c9a3 100644
|
||||
--- ui/views/controls/webview/web_dialog_view.cc
|
||||
+++ ui/views/controls/webview/web_dialog_view.cc
|
||||
@@ -341,7 +341,9 @@ bool WebDialogView::ShouldCreateWebContents(
|
||||
@@ -343,7 +343,9 @@ bool WebDialogView::ShouldCreateWebContents(
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@@ -268,10 +301,10 @@ index d8afe6e..59259b7 100644
|
||||
return delegate_->HandleShouldCreateWebContents();
|
||||
return true;
|
||||
diff --git ui/views/controls/webview/web_dialog_view.h ui/views/controls/webview/web_dialog_view.h
|
||||
index 65be6d54..7802d6d 100644
|
||||
index c5d6791..bc1eb5d 100644
|
||||
--- ui/views/controls/webview/web_dialog_view.h
|
||||
+++ ui/views/controls/webview/web_dialog_view.h
|
||||
@@ -123,7 +123,9 @@ class WEBVIEW_EXPORT WebDialogView : public views::ClientView,
|
||||
@@ -125,7 +125,9 @@ class WEBVIEW_EXPORT WebDialogView : public views::ClientView,
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
||||
index 1c0863b..a0f06f4 100644
|
||||
index 11d980e..a87fb7e 100644
|
||||
--- Source/web/ChromeClientImpl.cpp
|
||||
+++ Source/web/ChromeClientImpl.cpp
|
||||
@@ -893,7 +893,7 @@ bool ChromeClientImpl::hasOpenedPopup() const {
|
||||
@@ -895,7 +895,7 @@ bool ChromeClientImpl::hasOpenedPopup() const {
|
||||
PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame,
|
||||
HTMLSelectElement& select) {
|
||||
notifyPopupOpeningObservers();
|
||||
@@ -12,18 +12,18 @@ index 1c0863b..a0f06f4 100644
|
||||
|
||||
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
|
||||
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
||||
index 8e1ca8b..83589b6 100644
|
||||
index 6a7688b..7ca2fab 100644
|
||||
--- Source/web/WebViewImpl.cpp
|
||||
+++ Source/web/WebViewImpl.cpp
|
||||
@@ -379,6 +379,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
|
||||
@@ -358,6 +358,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
|
||||
m_enableFakePageScaleAnimationForTesting(false),
|
||||
m_fakePageScaleAnimationPageScaleFactor(0),
|
||||
m_fakePageScaleAnimationUseAnchor(false),
|
||||
+ m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus),
|
||||
m_doingDragAndDrop(false),
|
||||
m_ignoreInputEvents(false),
|
||||
m_compositorDeviceScaleFactorOverride(0),
|
||||
@@ -3727,8 +3728,13 @@ void WebViewImpl::mainFrameScrollOffsetChanged() {
|
||||
m_suppressNextKeypressEvent(false),
|
||||
m_imeAcceptEvents(true),
|
||||
@@ -3704,8 +3705,13 @@ void WebViewImpl::mainFrameScrollOffsetChanged() {
|
||||
m_devToolsEmulator->mainFrameScrollOrScaleChanged();
|
||||
}
|
||||
|
||||
@@ -37,12 +37,12 @@ index 8e1ca8b..83589b6 100644
|
||||
+ return m_shouldUseExternalPopupMenus;
|
||||
}
|
||||
|
||||
void WebViewImpl::setIgnoreInputEvents(bool newValue) {
|
||||
void WebViewImpl::setBackgroundColorOverride(WebColor color) {
|
||||
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
|
||||
index d002c0d..74cbb22 100644
|
||||
index e4ad02f..8bfaa1c 100644
|
||||
--- Source/web/WebViewImpl.h
|
||||
+++ Source/web/WebViewImpl.h
|
||||
@@ -375,7 +375,8 @@ class WEB_EXPORT WebViewImpl final
|
||||
@@ -371,7 +371,8 @@ class WEB_EXPORT WebViewImpl final
|
||||
|
||||
// Returns true if popup menus should be rendered by the browser, false if
|
||||
// they should be rendered by WebKit (which is the default).
|
||||
@@ -52,20 +52,20 @@ index d002c0d..74cbb22 100644
|
||||
|
||||
bool shouldAutoResize() const { return m_shouldAutoResize; }
|
||||
|
||||
@@ -654,6 +655,8 @@ class WEB_EXPORT WebViewImpl final
|
||||
@@ -651,6 +652,8 @@ class WEB_EXPORT WebViewImpl final
|
||||
float m_fakePageScaleAnimationPageScaleFactor;
|
||||
bool m_fakePageScaleAnimationUseAnchor;
|
||||
|
||||
+ bool m_shouldUseExternalPopupMenus;
|
||||
+
|
||||
// TODO(paulmeyer): Move this to WebWidget once all drag-and-drop functions
|
||||
// are there.
|
||||
bool m_doingDragAndDrop;
|
||||
float m_compositorDeviceScaleFactorOverride;
|
||||
TransformationMatrix m_deviceEmulationTransform;
|
||||
|
||||
diff --git public/web/WebView.h public/web/WebView.h
|
||||
index 3127234..e79f0d2 100644
|
||||
index 061f017..9fd430e 100644
|
||||
--- public/web/WebView.h
|
||||
+++ public/web/WebView.h
|
||||
@@ -408,6 +408,7 @@ class WebView : protected WebWidget {
|
||||
@@ -404,6 +404,7 @@ class WebView : protected WebWidget {
|
||||
|
||||
// Sets whether select popup menus should be rendered by the browser.
|
||||
BLINK_EXPORT static void setUseExternalPopupMenus(bool);
|
||||
|
@@ -1,8 +1,25 @@
|
||||
diff --git chrome/browser/ui/webui/net_internals/net_internals_ui.cc chrome/browser/ui/webui/net_internals/net_internals_ui.cc
|
||||
index 1e821dc..76bc9e7 100644
|
||||
index 354238a..42f1829 100644
|
||||
--- chrome/browser/ui/webui/net_internals/net_internals_ui.cc
|
||||
+++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc
|
||||
@@ -689,9 +689,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady(
|
||||
@@ -572,16 +572,6 @@ void NetInternalsMessageHandler::OnGetSessionNetworkStats(
|
||||
const base::ListValue* list) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
std::unique_ptr<base::Value> session_network_info;
|
||||
- Profile* profile = Profile::FromWebUI(web_ui());
|
||||
- DataReductionProxyChromeSettings* data_reduction_proxy_settings =
|
||||
- DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile);
|
||||
- if (data_reduction_proxy_settings) {
|
||||
- data_reduction_proxy::DataReductionProxyCompressionStats*
|
||||
- compression_stats =
|
||||
- data_reduction_proxy_settings->data_reduction_proxy_service()
|
||||
- ->compression_stats();
|
||||
- session_network_info = compression_stats->SessionNetworkStatsInfoToValue();
|
||||
- }
|
||||
SendJavascriptCommand("receivedSessionNetworkStats",
|
||||
std::move(session_network_info));
|
||||
}
|
||||
@@ -707,9 +697,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady(
|
||||
|
||||
PrePopulateEventList();
|
||||
|
||||
@@ -23,29 +40,7 @@ index 1e821dc..76bc9e7 100644
|
||||
}
|
||||
|
||||
void NetInternalsMessageHandler::IOThreadImpl::OnGetNetInfo(
|
||||
@@ -869,21 +877,8 @@ void NetInternalsMessageHandler::IOThreadImpl::OnHSTSDelete(
|
||||
void NetInternalsMessageHandler::IOThreadImpl::OnGetSessionNetworkStats(
|
||||
const base::ListValue* list) {
|
||||
DCHECK(!list);
|
||||
- net::URLRequestContext* context =
|
||||
- main_context_getter_->GetURLRequestContext();
|
||||
- net::HttpNetworkSession* http_network_session =
|
||||
- GetHttpNetworkSession(context);
|
||||
|
||||
std::unique_ptr<base::Value> network_info;
|
||||
- if (http_network_session) {
|
||||
- // TODO(mmenke): This cast is ugly. Can we get rid of it, or, better,
|
||||
- // remove DRP data from net-internals entirely?
|
||||
- data_reduction_proxy::DataReductionProxyNetworkDelegate* net_delegate =
|
||||
- static_cast<data_reduction_proxy::DataReductionProxyNetworkDelegate*>(
|
||||
- context->network_delegate());
|
||||
- if (net_delegate)
|
||||
- network_info = net_delegate->SessionNetworkStatsInfoToValue();
|
||||
- }
|
||||
SendJavascriptCommand("receivedSessionNetworkStats", std::move(network_info));
|
||||
}
|
||||
|
||||
@@ -1149,8 +1144,10 @@ void NetInternalsMessageHandler::IOThreadImpl::PrePopulateEventList() {
|
||||
@@ -1146,8 +1144,10 @@ void NetInternalsMessageHandler::IOThreadImpl::PrePopulateEventList() {
|
||||
std::set<net::URLRequestContext*> contexts;
|
||||
for (const auto& getter : context_getters_)
|
||||
contexts.insert(getter->GetURLRequestContext());
|
||||
@@ -59,10 +54,10 @@ index 1e821dc..76bc9e7 100644
|
||||
// Add entries for ongoing network objects.
|
||||
CreateNetLogEntriesForActiveObjects(contexts, this);
|
||||
diff --git content/browser/resource_context_impl.cc content/browser/resource_context_impl.cc
|
||||
index 22c12ee..57031f3 100644
|
||||
index 93e2890..67a1029 100644
|
||||
--- content/browser/resource_context_impl.cc
|
||||
+++ content/browser/resource_context_impl.cc
|
||||
@@ -84,6 +84,10 @@ URLDataManagerBackend* GetURLDataManagerForResourceContext(
|
||||
@@ -74,6 +74,10 @@ URLDataManagerBackend* GetURLDataManagerForResourceContext(
|
||||
context->GetUserData(kURLDataManagerBackendKeyName));
|
||||
}
|
||||
|
||||
@@ -87,10 +82,10 @@ index 903cc54..56ee4ea 100644
|
||||
CONTENT_EXPORT void InitializeResourceContext(BrowserContext* browser_context);
|
||||
|
||||
diff --git content/browser/webui/url_data_manager.cc content/browser/webui/url_data_manager.cc
|
||||
index a9ec107..4a215ca 100644
|
||||
index 0a482ad..c707073 100644
|
||||
--- content/browser/webui/url_data_manager.cc
|
||||
+++ content/browser/webui/url_data_manager.cc
|
||||
@@ -123,6 +123,11 @@ void URLDataManager::AddWebUIDataSource(BrowserContext* browser_context,
|
||||
@@ -151,6 +151,11 @@ void URLDataManager::UpdateWebUIDataSource(
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -103,12 +98,12 @@ index a9ec107..4a215ca 100644
|
||||
const URLDataSourceImpl* data_source) {
|
||||
base::AutoLock lock(g_delete_lock.Get());
|
||||
diff --git content/browser/webui/url_data_manager.h content/browser/webui/url_data_manager.h
|
||||
index 8eca18c..97fc80ea 100644
|
||||
index 5ceb74d..0c584d6 100644
|
||||
--- content/browser/webui/url_data_manager.h
|
||||
+++ content/browser/webui/url_data_manager.h
|
||||
@@ -55,6 +55,8 @@ class CONTENT_EXPORT URLDataManager : public base::SupportsUserData::Data {
|
||||
static void AddWebUIDataSource(BrowserContext* browser_context,
|
||||
WebUIDataSource* source);
|
||||
@@ -69,6 +69,8 @@ class CONTENT_EXPORT URLDataManager : public base::SupportsUserData::Data {
|
||||
const std::string& source_name,
|
||||
std::unique_ptr<base::DictionaryValue> update);
|
||||
|
||||
+ static const void* GetUserDataKey();
|
||||
+
|
||||
|
@@ -1,239 +1,13 @@
|
||||
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
|
||||
index 351ceb7..304c765 100644
|
||||
index 990cffa..e1099ae 100644
|
||||
--- chrome/app/generated_resources.grd
|
||||
+++ chrome/app/generated_resources.grd
|
||||
@@ -7199,7 +7199,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
|
||||
@@ -7137,7 +7137,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
|
||||
</message>
|
||||
</if>
|
||||
<message name="IDS_PLUGIN_BLOCKED_BY_POLICY" desc="The placeholder text for a plugin blocked by enterprise policy.">
|
||||
- <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> is blocked by enterprise policy
|
||||
+ <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> is not allowed
|
||||
</message>
|
||||
<if expr="chromeos">
|
||||
<message name="IDS_NACL_PLUGIN_BLOCKED" desc="The placeholder text for a blocked plugin.">
|
||||
diff --git components/plugins/renderer/loadable_plugin_placeholder.cc components/plugins/renderer/loadable_plugin_placeholder.cc
|
||||
index 1f38fdb..03e0f60 100644
|
||||
--- components/plugins/renderer/loadable_plugin_placeholder.cc
|
||||
+++ components/plugins/renderer/loadable_plugin_placeholder.cc
|
||||
@@ -127,11 +127,10 @@ void LoadablePluginPlaceholder::ReplacePlugin(blink::WebPlugin* new_plugin) {
|
||||
// this point.
|
||||
new_plugin = container->plugin();
|
||||
|
||||
+ plugin()->RestoreTitleText();
|
||||
container->invalidate();
|
||||
container->reportGeometry();
|
||||
- if (plugin()->focused())
|
||||
- new_plugin->updateFocus(true, blink::WebFocusTypeNone);
|
||||
- container->element().setAttribute("title", plugin()->old_title());
|
||||
+ plugin()->ReplayReceivedData(new_plugin);
|
||||
plugin()->destroy();
|
||||
}
|
||||
|
||||
diff --git components/plugins/renderer/webview_plugin.cc components/plugins/renderer/webview_plugin.cc
|
||||
index 8d45c42..2a2ec9a 100644
|
||||
--- components/plugins/renderer/webview_plugin.cc
|
||||
+++ components/plugins/renderer/webview_plugin.cc
|
||||
@@ -18,7 +18,9 @@
|
||||
#include "gin/converter.h"
|
||||
#include "skia/ext/platform_canvas.h"
|
||||
#include "third_party/WebKit/public/platform/WebInputEvent.h"
|
||||
+#include "third_party/WebKit/public/platform/WebSize.h"
|
||||
#include "third_party/WebKit/public/platform/WebURL.h"
|
||||
+#include "third_party/WebKit/public/platform/WebURLRequest.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"
|
||||
@@ -40,8 +42,10 @@ using blink::WebPlugin;
|
||||
using blink::WebPluginContainer;
|
||||
using blink::WebPoint;
|
||||
using blink::WebRect;
|
||||
+using blink::WebSize;
|
||||
using blink::WebString;
|
||||
using blink::WebURLError;
|
||||
+using blink::WebURLRequest;
|
||||
using blink::WebURLResponse;
|
||||
using blink::WebVector;
|
||||
using blink::WebView;
|
||||
@@ -54,16 +58,16 @@ WebViewPlugin::WebViewPlugin(content::RenderView* render_view,
|
||||
delegate_(delegate),
|
||||
container_(nullptr),
|
||||
web_view_(WebView::create(this, blink::WebPageVisibilityStateVisible)),
|
||||
+ finished_loading_(false),
|
||||
focused_(false),
|
||||
is_painting_(false),
|
||||
is_resizing_(false),
|
||||
- web_frame_client_(this),
|
||||
weak_factory_(this) {
|
||||
// ApplyWebPreferences before making a WebLocalFrame so that the frame sees a
|
||||
// consistent view of our preferences.
|
||||
content::RenderView::ApplyWebPreferences(preferences, web_view_);
|
||||
- WebLocalFrame* web_frame = WebLocalFrame::create(
|
||||
- blink::WebTreeScopeType::Document, &web_frame_client_);
|
||||
+ WebLocalFrame* web_frame =
|
||||
+ WebLocalFrame::create(blink::WebTreeScopeType::Document, this);
|
||||
web_view_->setMainFrame(web_frame);
|
||||
// TODO(dcheng): The main frame widget currently has a special case.
|
||||
// Eliminate this once WebView is no longer a WebWidget.
|
||||
@@ -87,6 +91,42 @@ WebViewPlugin::~WebViewPlugin() {
|
||||
web_view_->close();
|
||||
}
|
||||
|
||||
+void WebViewPlugin::ReplayReceivedData(WebPlugin* plugin) {
|
||||
+ const WebURLResponse& response =
|
||||
+ web_view_->mainFrame()->dataSource()->response();
|
||||
+ if (!response.isNull()) {
|
||||
+ plugin->didReceiveResponse(response);
|
||||
+ size_t total_bytes = 0;
|
||||
+ for (std::list<std::string>::iterator it = data_.begin(); it != data_.end();
|
||||
+ ++it) {
|
||||
+ plugin->didReceiveData(
|
||||
+ it->c_str(), base::checked_cast<int>(it->length()));
|
||||
+ total_bytes += it->length();
|
||||
+ }
|
||||
+ UMA_HISTOGRAM_MEMORY_KB(
|
||||
+ "PluginDocument.Memory",
|
||||
+ (base::checked_cast<int>(total_bytes / 1024)));
|
||||
+ UMA_HISTOGRAM_COUNTS(
|
||||
+ "PluginDocument.NumChunks",
|
||||
+ (base::checked_cast<int>(data_.size())));
|
||||
+ }
|
||||
+ // We need to transfer the |focused_| to new plugin after it loaded.
|
||||
+ if (focused_) {
|
||||
+ plugin->updateFocus(true, blink::WebFocusTypeNone);
|
||||
+ }
|
||||
+ if (finished_loading_) {
|
||||
+ plugin->didFinishLoading();
|
||||
+ }
|
||||
+ if (error_) {
|
||||
+ plugin->didFailLoading(*error_);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void WebViewPlugin::RestoreTitleText() {
|
||||
+ if (container_)
|
||||
+ container_->element().setAttribute("title", old_title_);
|
||||
+}
|
||||
+
|
||||
WebPluginContainer* WebViewPlugin::container() const { return container_; }
|
||||
|
||||
bool WebViewPlugin::initialize(WebPluginContainer* container) {
|
||||
@@ -215,20 +255,18 @@ blink::WebInputEventResult WebViewPlugin::handleInputEvent(
|
||||
return handled;
|
||||
}
|
||||
|
||||
-void WebViewPlugin::didReceiveResponse(const WebURLResponse& response) {
|
||||
- NOTREACHED();
|
||||
-}
|
||||
-
|
||||
void WebViewPlugin::didReceiveData(const char* data, int data_length) {
|
||||
- NOTREACHED();
|
||||
+ data_.push_back(std::string(data, data_length));
|
||||
}
|
||||
|
||||
void WebViewPlugin::didFinishLoading() {
|
||||
- NOTREACHED();
|
||||
+ DCHECK(!finished_loading_);
|
||||
+ finished_loading_ = true;
|
||||
}
|
||||
|
||||
void WebViewPlugin::didFailLoading(const WebURLError& error) {
|
||||
- NOTREACHED();
|
||||
+ DCHECK(!error_.get());
|
||||
+ error_.reset(new WebURLError(error));
|
||||
}
|
||||
|
||||
bool WebViewPlugin::acceptsLoadDrops() { return false; }
|
||||
@@ -279,9 +317,8 @@ void WebViewPlugin::scheduleAnimation() {
|
||||
}
|
||||
}
|
||||
|
||||
-void WebViewPlugin::PluginWebFrameClient::didClearWindowObject(
|
||||
- WebLocalFrame* frame) {
|
||||
- if (!plugin_->delegate_)
|
||||
+void WebViewPlugin::didClearWindowObject(WebLocalFrame* frame) {
|
||||
+ if (!delegate_)
|
||||
return;
|
||||
|
||||
v8::Isolate* isolate = blink::mainThreadIsolate();
|
||||
@@ -293,7 +330,7 @@ void WebViewPlugin::PluginWebFrameClient::didClearWindowObject(
|
||||
v8::Local<v8::Object> global = context->Global();
|
||||
|
||||
global->Set(gin::StringToV8(isolate, "plugin"),
|
||||
- plugin_->delegate_->GetV8Handle(isolate));
|
||||
+ delegate_->GetV8Handle(isolate));
|
||||
}
|
||||
|
||||
void WebViewPlugin::OnDestruct() {}
|
||||
diff --git components/plugins/renderer/webview_plugin.h components/plugins/renderer/webview_plugin.h
|
||||
index fdb1cf9..97e3995 100644
|
||||
--- components/plugins/renderer/webview_plugin.h
|
||||
+++ components/plugins/renderer/webview_plugin.h
|
||||
@@ -42,6 +42,7 @@ class Size;
|
||||
|
||||
class WebViewPlugin : public blink::WebPlugin,
|
||||
public blink::WebViewClient,
|
||||
+ public blink::WebFrameClient,
|
||||
public content::RenderViewObserver {
|
||||
public:
|
||||
class Delegate {
|
||||
@@ -74,8 +75,12 @@ class WebViewPlugin : public blink::WebPlugin,
|
||||
|
||||
blink::WebView* web_view() { return web_view_; }
|
||||
|
||||
- bool focused() const { return focused_; }
|
||||
- const blink::WebString& old_title() const { return old_title_; }
|
||||
+ // When loading a plugin document (i.e. a full page plugin not embedded in
|
||||
+ // another page), we save all data that has been received, and replay it with
|
||||
+ // this method on the actual plugin.
|
||||
+ void ReplayReceivedData(blink::WebPlugin* plugin);
|
||||
+
|
||||
+ void RestoreTitleText();
|
||||
|
||||
// WebPlugin methods:
|
||||
blink::WebPluginContainer* container() const override;
|
||||
@@ -103,7 +108,7 @@ class WebViewPlugin : public blink::WebPlugin,
|
||||
const blink::WebInputEvent& event,
|
||||
blink::WebCursorInfo& cursor_info) override;
|
||||
|
||||
- void didReceiveResponse(const blink::WebURLResponse& response) override;
|
||||
+ void didReceiveResponse(const blink::WebURLResponse& response) override {}
|
||||
void didReceiveData(const char* data, int data_length) override;
|
||||
void didFinishLoading() override;
|
||||
void didFailLoading(const blink::WebURLError& error) override;
|
||||
@@ -129,6 +134,9 @@ class WebViewPlugin : public blink::WebPlugin,
|
||||
void didChangeCursor(const blink::WebCursorInfo& cursor) override;
|
||||
void scheduleAnimation() override;
|
||||
|
||||
+ // WebFrameClient methods:
|
||||
+ void didClearWindowObject(blink::WebLocalFrame* frame) override;
|
||||
+
|
||||
private:
|
||||
friend class base::DeleteHelper<WebViewPlugin>;
|
||||
WebViewPlugin(content::RenderView* render_view,
|
||||
@@ -156,23 +164,14 @@ class WebViewPlugin : public blink::WebPlugin,
|
||||
|
||||
gfx::Rect rect_;
|
||||
|
||||
+ std::list<std::string> data_;
|
||||
+ std::unique_ptr<blink::WebURLError> error_;
|
||||
blink::WebString old_title_;
|
||||
+ bool finished_loading_;
|
||||
bool focused_;
|
||||
bool is_painting_;
|
||||
bool is_resizing_;
|
||||
|
||||
- // A helper needed to create a WebLocalFrame.
|
||||
- class PluginWebFrameClient : public blink::WebFrameClient {
|
||||
- public:
|
||||
- PluginWebFrameClient(WebViewPlugin* plugin) : plugin_(plugin) {}
|
||||
- ~PluginWebFrameClient() override {}
|
||||
- void didClearWindowObject(blink::WebLocalFrame* frame) override;
|
||||
-
|
||||
- private:
|
||||
- WebViewPlugin* plugin_;
|
||||
- };
|
||||
- PluginWebFrameClient web_frame_client_;
|
||||
-
|
||||
// Should be invalidated when destroy() is called.
|
||||
base::WeakPtrFactory<WebViewPlugin> weak_factory_;
|
||||
};
|
||||
<message name="IDS_PLUGIN_BLOCKED_NO_LOADING" desc="The placeholder text for a blocked plugin that cannot be manually loaded by the user.">
|
||||
<ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> is blocked
|
||||
|
Reference in New Issue
Block a user