mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
fef43e07d6 | ||
|
3d5ae838ca | ||
|
2c22842b7e | ||
|
9ec3e425dd | ||
|
d97fbff8c6 | ||
|
0ce82ecb6a | ||
|
f69054f2da | ||
|
8c8deea63a | ||
|
9809504014 | ||
|
0488961250 | ||
|
0dba8a1f29 | ||
|
d5392b33ef | ||
|
1b2f997a30 | ||
|
6c71485135 | ||
|
4407ef95c4 | ||
|
a906bdd2e3 | ||
|
86bb301075 | ||
|
7afb6c61ff | ||
|
c5896eb456 | ||
|
822508f4b4 | ||
|
141ab16dcd | ||
|
56ba4400a2 | ||
|
b96dd2462d | ||
|
8774cd9639 | ||
|
7d05784842 | ||
|
a2749d8fbd |
1
BUILD.gn
1
BUILD.gn
@@ -348,6 +348,7 @@ static_library("libcef_static") {
|
||||
"libcef/browser/net/chrome_scheme_handler.h",
|
||||
"libcef/browser/net/cookie_store_proxy.cc",
|
||||
"libcef/browser/net/cookie_store_proxy.h",
|
||||
"libcef/browser/net/crlset_file_util_impl.cc",
|
||||
"libcef/browser/net/devtools_scheme_handler.cc",
|
||||
"libcef/browser/net/devtools_scheme_handler.h",
|
||||
"libcef/browser/net/internal_scheme_handler.cc",
|
||||
|
@@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'd483fb7716e28b377c70c26c1bf1e3695aa1d8c9',
|
||||
'chromium_checkout': 'refs/tags/60.0.3112.113',
|
||||
}
|
||||
|
@@ -409,7 +409,6 @@
|
||||
'tests/cefsimple/simple_handler_linux.cc',
|
||||
],
|
||||
'ceftests_sources_common': [
|
||||
'tests/ceftests/accessibility_unittest.cc',
|
||||
'tests/ceftests/browser_info_map_unittest.cc',
|
||||
'tests/ceftests/command_line_unittest.cc',
|
||||
'tests/ceftests/cookie_unittest.cc',
|
||||
@@ -431,6 +430,8 @@
|
||||
'tests/ceftests/message_router_unittest.cc',
|
||||
'tests/ceftests/navigation_unittest.cc',
|
||||
'tests/ceftests/os_rendering_unittest.cc',
|
||||
'tests/ceftests/osr_accessibility_unittest.cc',
|
||||
'tests/ceftests/osr_display_unittest.cc',
|
||||
'tests/ceftests/parser_unittest.cc',
|
||||
'tests/ceftests/plugin_unittest.cc',
|
||||
'tests/ceftests/preference_unittest.cc',
|
||||
|
@@ -329,22 +329,13 @@ if(OS_WINDOWS)
|
||||
|
||||
# Configure use of the sandbox.
|
||||
option(USE_SANDBOX "Enable or disable use of the sandbox." ON)
|
||||
if(USE_SANDBOX AND NOT MSVC_VERSION EQUAL 1900)
|
||||
# The cef_sandbox.lib static library is currently built with VS2015. It will
|
||||
# not link successfully with other VS versions.
|
||||
if(USE_SANDBOX AND NOT MSVC_VERSION EQUAL 1900 AND NOT MSVC_VERSION EQUAL 1910)
|
||||
# The cef_sandbox.lib static library is currently built with VS2015, which
|
||||
# is compatible with VS2015 and VS2017. It will not link successfully with
|
||||
# other VS versions.
|
||||
set(USE_SANDBOX OFF)
|
||||
endif()
|
||||
|
||||
# Configure use of official build compiler settings.
|
||||
# When using an official build the "Debug" build is actually a Release build
|
||||
# with DCHECKs enabled. In order to link the sandbox the Debug build must
|
||||
# be configured with some Release-related compiler settings.
|
||||
option(USE_OFFICIAL_BUILD_SANDBOX "Enable or disable use of an official build sandbox." ON)
|
||||
if(NOT USE_SANDBOX)
|
||||
# Don't need official build settings when the sandbox is off.
|
||||
set(USE_OFFICIAL_BUILD_SANDBOX OFF)
|
||||
endif()
|
||||
|
||||
# Consumers who run into LNK4099 warnings can pass /Z7 instead (see issue #385).
|
||||
set(CEF_DEBUG_INFO_FLAG "/Zi" CACHE STRING "Optional flag specifying specific /Z flag to use")
|
||||
|
||||
@@ -366,27 +357,11 @@ if(OS_WINDOWS)
|
||||
/wd4996 # Ignore "function or variable may be unsafe" warning
|
||||
${CEF_DEBUG_INFO_FLAG}
|
||||
)
|
||||
if(USE_OFFICIAL_BUILD_SANDBOX)
|
||||
# CMake adds /RTC1, /D"_DEBUG" and a few other values by default for Debug
|
||||
# builds. We can't link the sandbox with those values so clear the CMake
|
||||
# defaults here.
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "")
|
||||
|
||||
# These flags are required to successfully link and run applications using
|
||||
# the sandbox library.
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
/MT # Multithreaded release runtime
|
||||
/O2 # Maximize speed optimization
|
||||
/Zc:inline # Remove unreferenced functions or data
|
||||
/Oy- # Disable frame-pointer omission
|
||||
)
|
||||
else()
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
/MTd # Multithreaded debug runtime
|
||||
/RTC1 # Disable optimizations
|
||||
/Od # Enable basic run-time checks
|
||||
)
|
||||
endif()
|
||||
list(APPEND CEF_COMPILER_FLAGS_DEBUG
|
||||
/MTd # Multithreaded debug runtime
|
||||
/RTC1 # Disable optimizations
|
||||
/Od # Enable basic run-time checks
|
||||
)
|
||||
list(APPEND CEF_COMPILER_FLAGS_RELEASE
|
||||
/MT # Multithreaded release runtime
|
||||
/O2 # Optimize for maximum speed
|
||||
@@ -408,12 +383,6 @@ if(OS_WINDOWS)
|
||||
WIN32_LEAN_AND_MEAN # Exclude less common API declarations
|
||||
_HAS_EXCEPTIONS=0 # Disable exceptions
|
||||
)
|
||||
if(USE_OFFICIAL_BUILD_SANDBOX)
|
||||
list(APPEND CEF_COMPILER_DEFINES_DEBUG
|
||||
NDEBUG _NDEBUG # Not a debug build
|
||||
DCHECK_ALWAYS_ON=1 # DCHECKs are enabled
|
||||
)
|
||||
endif()
|
||||
list(APPEND CEF_COMPILER_DEFINES_RELEASE
|
||||
NDEBUG _NDEBUG # Not a debug build
|
||||
)
|
||||
@@ -481,18 +450,25 @@ if(OS_WINDOWS)
|
||||
# Configure use of ATL.
|
||||
option(USE_ATL "Enable or disable use of ATL." ON)
|
||||
if(USE_ATL)
|
||||
# Locate the VC directory. The cl.exe path returned by CMAKE_CXX_COMPILER
|
||||
# may be at different directory depths depending on the toolchain version
|
||||
# (e.g. "VC/bin/cl.exe", "VC/bin/amd64_x86/cl.exe", etc).
|
||||
# Locate the atlmfc directory if it exists. It may be at any depth inside
|
||||
# the VC directory. The cl.exe path returned by CMAKE_CXX_COMPILER may also
|
||||
# be at different depths depending on the toolchain version
|
||||
# (e.g. "VC/bin/cl.exe", "VC/bin/amd64_x86/cl.exe",
|
||||
# "VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe", etc).
|
||||
set(HAS_ATLMFC 0)
|
||||
get_filename_component(VC_DIR ${CMAKE_CXX_COMPILER} DIRECTORY)
|
||||
get_filename_component(VC_DIR_NAME ${VC_DIR} NAME)
|
||||
while(NOT ${VC_DIR_NAME} STREQUAL "VC")
|
||||
get_filename_component(VC_DIR ${VC_DIR} DIRECTORY)
|
||||
if(IS_DIRECTORY "${VC_DIR}/atlmfc")
|
||||
set(HAS_ATLMFC 1)
|
||||
break()
|
||||
endif()
|
||||
get_filename_component(VC_DIR_NAME ${VC_DIR} NAME)
|
||||
endwhile()
|
||||
|
||||
# Determine if the Visual Studio install supports ATL.
|
||||
if(NOT IS_DIRECTORY "${VC_DIR}/atlmfc")
|
||||
if(NOT HAS_ATLMFC)
|
||||
message(WARNING "ATL is not supported by your VC installation.")
|
||||
set(USE_ATL OFF)
|
||||
endif()
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=4601edefadfafea031f2c5df498262fc2142252b$
|
||||
// $hash=1c02b57893a3f78c436bc2ab66c63753edfb174a$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_
|
||||
@@ -114,6 +114,16 @@ CEF_EXPORT int cef_zip_directory(const cef_string_t* src_dir,
|
||||
const cef_string_t* dest_file,
|
||||
int include_hidden_files);
|
||||
|
||||
///
|
||||
// Loads the existing "Certificate Revocation Lists" file that is managed by
|
||||
// Google Chrome. This file can generally be found in Chrome's User Data
|
||||
// directory (e.g. "C:\Users\[User]\AppData\Local\Google\Chrome\User Data\" on
|
||||
// Windows) and is updated periodically by Chrome's component updater service.
|
||||
// Must be called in the browser process after the context has been initialized.
|
||||
// See https://dev.chromium.org/Home/chromium-security/crlsets for background.
|
||||
///
|
||||
CEF_EXPORT void cef_load_crlsets_file(const cef_string_t* path);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=e8f6bdc822cf4f5c32b22ba8b5cacb25823d8971$
|
||||
// $hash=897f5b1ec6ed7430fff156f47b4ce6371d5db6f2$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_
|
||||
@@ -85,8 +85,9 @@ typedef struct _cef_print_job_callback_t {
|
||||
} cef_print_job_callback_t;
|
||||
|
||||
///
|
||||
// Implement this structure to handle printing on Linux. The functions of this
|
||||
// structure will be called on the browser process UI thread.
|
||||
// Implement this structure to handle printing on Linux. Each browser will have
|
||||
// only one print job in progress at a time. The functions of this structure
|
||||
// will be called on the browser process UI thread.
|
||||
///
|
||||
typedef struct _cef_print_handler_t {
|
||||
///
|
||||
@@ -109,6 +110,7 @@ typedef struct _cef_print_handler_t {
|
||||
// reference to |settings| outside of this callback.
|
||||
///
|
||||
void(CEF_CALLBACK* on_print_settings)(struct _cef_print_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
struct _cef_print_settings_t* settings,
|
||||
int get_defaults);
|
||||
|
||||
@@ -119,6 +121,7 @@ typedef struct _cef_print_handler_t {
|
||||
///
|
||||
int(CEF_CALLBACK* on_print_dialog)(
|
||||
struct _cef_print_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
int has_selection,
|
||||
struct _cef_print_dialog_callback_t* callback);
|
||||
|
||||
@@ -128,6 +131,7 @@ typedef struct _cef_print_handler_t {
|
||||
// the job immediately.
|
||||
///
|
||||
int(CEF_CALLBACK* on_print_job)(struct _cef_print_handler_t* self,
|
||||
struct _cef_browser_t* browser,
|
||||
const cef_string_t* document_name,
|
||||
const cef_string_t* pdf_file_path,
|
||||
struct _cef_print_job_callback_t* callback);
|
||||
@@ -135,7 +139,8 @@ typedef struct _cef_print_handler_t {
|
||||
///
|
||||
// Reset client state related to printing.
|
||||
///
|
||||
void(CEF_CALLBACK* on_print_reset)(struct _cef_print_handler_t* self);
|
||||
void(CEF_CALLBACK* on_print_reset)(struct _cef_print_handler_t* self,
|
||||
struct _cef_browser_t* browser);
|
||||
|
||||
///
|
||||
// Return the PDF paper size in device units. Used in combination with
|
||||
|
@@ -115,4 +115,15 @@ bool CefZipDirectory(const CefString& src_dir,
|
||||
const CefString& dest_file,
|
||||
bool include_hidden_files);
|
||||
|
||||
///
|
||||
// Loads the existing "Certificate Revocation Lists" file that is managed by
|
||||
// Google Chrome. This file can generally be found in Chrome's User Data
|
||||
// directory (e.g. "C:\Users\[User]\AppData\Local\Google\Chrome\User Data\" on
|
||||
// Windows) and is updated periodically by Chrome's component updater service.
|
||||
// Must be called in the browser process after the context has been initialized.
|
||||
// See https://dev.chromium.org/Home/chromium-security/crlsets for background.
|
||||
///
|
||||
/*--cef()--*/
|
||||
void CefLoadCRLSetsFile(const CefString& path);
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_FILE_UTIL_H_
|
||||
|
@@ -75,8 +75,9 @@ class CefPrintJobCallback : public virtual CefBaseRefCounted {
|
||||
};
|
||||
|
||||
///
|
||||
// Implement this interface to handle printing on Linux. The methods of this
|
||||
// class will be called on the browser process UI thread.
|
||||
// Implement this interface to handle printing on Linux. Each browser will have
|
||||
// only one print job in progress at a time. The methods of this class will be
|
||||
// called on the browser process UI thread.
|
||||
///
|
||||
/*--cef(source=client)--*/
|
||||
class CefPrintHandler : public virtual CefBaseRefCounted {
|
||||
@@ -96,7 +97,8 @@ class CefPrintHandler : public virtual CefBaseRefCounted {
|
||||
// reference to |settings| outside of this callback.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPrintSettings(CefRefPtr<CefPrintSettings> settings,
|
||||
virtual void OnPrintSettings(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefPrintSettings> settings,
|
||||
bool get_defaults) = 0;
|
||||
|
||||
///
|
||||
@@ -105,7 +107,8 @@ class CefPrintHandler : public virtual CefBaseRefCounted {
|
||||
// printing immediately.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnPrintDialog(bool has_selection,
|
||||
virtual bool OnPrintDialog(CefRefPtr<CefBrowser> browser,
|
||||
bool has_selection,
|
||||
CefRefPtr<CefPrintDialogCallback> callback) = 0;
|
||||
|
||||
///
|
||||
@@ -114,7 +117,8 @@ class CefPrintHandler : public virtual CefBaseRefCounted {
|
||||
// immediately.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnPrintJob(const CefString& document_name,
|
||||
virtual bool OnPrintJob(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& document_name,
|
||||
const CefString& pdf_file_path,
|
||||
CefRefPtr<CefPrintJobCallback> callback) = 0;
|
||||
|
||||
@@ -122,7 +126,7 @@ class CefPrintHandler : public virtual CefBaseRefCounted {
|
||||
// Reset client state related to printing.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnPrintReset() = 0;
|
||||
virtual void OnPrintReset(CefRefPtr<CefBrowser> browser) = 0;
|
||||
|
||||
///
|
||||
// Return the PDF paper size in device units. Used in combination with
|
||||
|
@@ -31,6 +31,8 @@
|
||||
#define CEF_INCLUDE_INTERNAL_CEF_LOGGING_INTERNAL_H_
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "include/internal/cef_export.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@@ -379,6 +379,11 @@ bool CefContext::Initialize(const CefMainArgs& args,
|
||||
sm_main_params_.reset(
|
||||
new service_manager::MainParams(sm_main_delegate_.get()));
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_ANDROID)
|
||||
sm_main_params_->argc = params.argc;
|
||||
sm_main_params_->argv = params.argv;
|
||||
#endif
|
||||
|
||||
exit_code = service_manager::MainInitialize(*sm_main_params_);
|
||||
DCHECK_LT(exit_code, 0);
|
||||
if (exit_code >= 0)
|
||||
|
@@ -594,7 +594,7 @@ LRESULT CALLBACK CefBrowserPlatformDelegateNativeWin::WndProc(HWND hwnd,
|
||||
// Allow the close.
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
case WM_NCDESTROY:
|
||||
if (platform_delegate) {
|
||||
// Clear the user data pointer.
|
||||
gfx::SetWindowUserData(hwnd, NULL);
|
||||
@@ -604,7 +604,7 @@ LRESULT CALLBACK CefBrowserPlatformDelegateNativeWin::WndProc(HWND hwnd,
|
||||
// CreateHostWindow().
|
||||
browser->WindowDestroyed();
|
||||
}
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
if (platform_delegate && platform_delegate->window_widget_) {
|
||||
|
65
libcef/browser/net/crlset_file_util_impl.cc
Normal file
65
libcef/browser/net/crlset_file_util_impl.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
// Copyright 2017 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that can
|
||||
// be found in the LICENSE file.
|
||||
|
||||
#include "include/cef_file_util.h"
|
||||
|
||||
#include "libcef/browser/context.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/task_scheduler/post_task.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "net/cert/crl_set.h"
|
||||
#include "net/cert/crl_set_storage.h"
|
||||
#include "net/ssl/ssl_config_service.h"
|
||||
|
||||
namespace {
|
||||
|
||||
// Based on chrome/browser/net/crl_set_fetcher.cc.
|
||||
|
||||
void SetCRLSetIfNewer(scoped_refptr<net::CRLSet> crl_set) {
|
||||
CEF_REQUIRE_IOT();
|
||||
|
||||
scoped_refptr<net::CRLSet> old_crl_set(net::SSLConfigService::GetCRLSet());
|
||||
if (old_crl_set.get() && old_crl_set->sequence() > crl_set->sequence()) {
|
||||
LOG(WARNING) << "Refusing to downgrade CRL set from #"
|
||||
<< old_crl_set->sequence() << "to #" << crl_set->sequence();
|
||||
} else {
|
||||
net::SSLConfigService::SetCRLSet(crl_set);
|
||||
VLOG(1) << "Installed CRL set #" << crl_set->sequence();
|
||||
}
|
||||
}
|
||||
|
||||
void LoadFromDisk(const base::FilePath& path) {
|
||||
base::ThreadRestrictions::AssertIOAllowed();
|
||||
|
||||
std::string crl_set_bytes;
|
||||
if (!base::ReadFileToString(path, &crl_set_bytes)) {
|
||||
LOG(WARNING) << "Failed to read CRL set from " << path.MaybeAsASCII();
|
||||
return;
|
||||
}
|
||||
|
||||
scoped_refptr<net::CRLSet> crl_set;
|
||||
if (!net::CRLSetStorage::Parse(crl_set_bytes, &crl_set)) {
|
||||
LOG(WARNING) << "Failed to parse CRL set from " << path.MaybeAsASCII();
|
||||
return;
|
||||
}
|
||||
|
||||
VLOG(1) << "Loaded " << crl_set_bytes.size() << " bytes of CRL set from disk";
|
||||
CEF_POST_TASK(CEF_IOT, base::BindOnce(&SetCRLSetIfNewer, crl_set));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void CefLoadCRLSetsFile(const CefString& path) {
|
||||
if (!CONTEXT_STATE_VALID()) {
|
||||
NOTREACHED() << "context not valid";
|
||||
return;
|
||||
}
|
||||
|
||||
base::PostTaskWithTraits(FROM_HERE,
|
||||
{base::TaskPriority::BACKGROUND, base::MayBlock()},
|
||||
base::BindOnce(&LoadFromDisk, path));
|
||||
}
|
@@ -198,6 +198,16 @@ void CefBrowserPlatformDelegateOsr::WasHidden(bool hidden) {
|
||||
else
|
||||
view->Show();
|
||||
}
|
||||
|
||||
// Also notify the WebContentsImpl for consistency.
|
||||
content::WebContentsImpl* web_contents =
|
||||
static_cast<content::WebContentsImpl*>(browser_->web_contents());
|
||||
if (web_contents) {
|
||||
if (hidden)
|
||||
web_contents->WasHidden();
|
||||
else
|
||||
web_contents->WasShown();
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegateOsr::NotifyScreenInfoChanged() {
|
||||
|
@@ -346,7 +346,6 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
||||
CefRenderWidgetHostViewOSR* parent_host_view,
|
||||
bool is_guest_view_hack)
|
||||
: background_color_(background_color),
|
||||
scale_factor_(kDefaultScaleFactor),
|
||||
frame_rate_threshold_ms_(0),
|
||||
#if !defined(OS_MACOSX)
|
||||
compositor_widget_(gfx::kNullAcceleratedWidget),
|
||||
@@ -366,6 +365,8 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
||||
DCHECK(render_widget_host_);
|
||||
DCHECK(!render_widget_host_->GetView());
|
||||
|
||||
current_device_scale_factor_ = kDefaultScaleFactor;
|
||||
|
||||
if (parent_host_view_) {
|
||||
browser_impl_ = parent_host_view_->browser_impl();
|
||||
DCHECK(browser_impl_);
|
||||
@@ -760,8 +761,14 @@ void CefRenderWidgetHostViewOSR::Destroy() {
|
||||
popup_host_view_->CancelWidget();
|
||||
if (child_host_view_)
|
||||
child_host_view_->CancelWidget();
|
||||
for (auto guest_host_view : guest_host_views_)
|
||||
guest_host_view->CancelWidget();
|
||||
if (!guest_host_views_.empty()) {
|
||||
// Guest RWHVs will be destroyed when the associated RWHVGuest is
|
||||
// destroyed. This parent RWHV may be destroyed first, so disassociate
|
||||
// the guest RWHVs here without destroying them.
|
||||
for (auto guest_host_view : guest_host_views_)
|
||||
guest_host_view->parent_host_view_ = nullptr;
|
||||
guest_host_views_.clear();
|
||||
}
|
||||
Hide();
|
||||
}
|
||||
}
|
||||
@@ -787,7 +794,8 @@ gfx::Size CefRenderWidgetHostViewOSR::GetRequestedRendererSize() const {
|
||||
}
|
||||
|
||||
gfx::Size CefRenderWidgetHostViewOSR::GetPhysicalBackingSize() const {
|
||||
return gfx::ConvertSizeToPixel(scale_factor_, GetRequestedRendererSize());
|
||||
return gfx::ConvertSizeToPixel(current_device_scale_factor_,
|
||||
GetRequestedRendererSize());
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::CopyFromSurface(
|
||||
@@ -927,20 +935,51 @@ void CefRenderWidgetHostViewOSR::SetNeedsBeginFrames(bool enabled) {
|
||||
}
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ProcessKeyboardEvent(
|
||||
const content::NativeWebKeyboardEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
render_widget_host_->ForwardKeyboardEventWithLatencyInfo(event, latency);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ProcessMouseEvent(
|
||||
const blink::WebMouseEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
render_widget_host_->ForwardMouseEventWithLatencyInfo(event, latency);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ProcessMouseWheelEvent(
|
||||
const blink::WebMouseWheelEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
render_widget_host_->ForwardWheelEventWithLatencyInfo(event, latency);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ProcessTouchEvent(
|
||||
const blink::WebTouchEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
render_widget_host_->ForwardTouchEventWithLatencyInfo(event, latency);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ProcessGestureEvent(
|
||||
const blink::WebGestureEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
render_widget_host_->ForwardGestureEventWithLatencyInfo(event, latency);
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::TransformPointToLocalCoordSpace(
|
||||
const gfx::Point& point,
|
||||
const cc::SurfaceId& original_surface,
|
||||
gfx::Point* transformed_point) {
|
||||
// Transformations use physical pixels rather than DIP, so conversion
|
||||
// is necessary.
|
||||
gfx::Point point_in_pixels = gfx::ConvertPointToPixel(scale_factor_, point);
|
||||
gfx::Point point_in_pixels =
|
||||
gfx::ConvertPointToPixel(current_device_scale_factor_, point);
|
||||
if (!GetDelegatedFrameHost()->TransformPointToLocalCoordSpace(
|
||||
point_in_pixels, original_surface, transformed_point)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
*transformed_point =
|
||||
gfx::ConvertPointToDIP(scale_factor_, *transformed_point);
|
||||
gfx::ConvertPointToDIP(current_device_scale_factor_, *transformed_point);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1126,9 +1165,15 @@ void CefRenderWidgetHostViewOSR::Invalidate(
|
||||
void CefRenderWidgetHostViewOSR::SendKeyEvent(
|
||||
const content::NativeWebKeyboardEvent& event) {
|
||||
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::SendKeyEvent");
|
||||
if (!render_widget_host_)
|
||||
return;
|
||||
render_widget_host_->ForwardKeyboardEvent(event);
|
||||
if (render_widget_host_ && render_widget_host_->GetView()) {
|
||||
// Direct routing requires that events go directly to the View.
|
||||
render_widget_host_->GetView()->ProcessKeyboardEvent(
|
||||
event, ui::LatencyInfo(event.GetType() == blink::WebInputEvent::kChar ||
|
||||
event.GetType() ==
|
||||
blink::WebInputEvent::kRawKeyDown
|
||||
? ui::SourceEventType::KEY_PRESS
|
||||
: ui::SourceEventType::OTHER));
|
||||
}
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SendMouseEvent(
|
||||
@@ -1140,23 +1185,48 @@ void CefRenderWidgetHostViewOSR::SendMouseEvent(
|
||||
browser_impl_->CancelContextMenu();
|
||||
}
|
||||
|
||||
if (popup_host_view_ &&
|
||||
popup_host_view_->popup_position_.Contains(
|
||||
event.PositionInWidget().x, event.PositionInWidget().y)) {
|
||||
blink::WebMouseEvent popup_event(event);
|
||||
popup_event.SetPositionInWidget(
|
||||
event.PositionInWidget().x - popup_host_view_->popup_position_.x(),
|
||||
event.PositionInWidget().y - popup_host_view_->popup_position_.y());
|
||||
popup_event.SetPositionInScreen(popup_event.PositionInWidget().x,
|
||||
popup_event.PositionInWidget().y);
|
||||
if (popup_host_view_) {
|
||||
if (popup_host_view_->popup_position_.Contains(
|
||||
event.PositionInWidget().x, event.PositionInWidget().y)) {
|
||||
blink::WebMouseEvent popup_event(event);
|
||||
popup_event.SetPositionInWidget(
|
||||
event.PositionInWidget().x - popup_host_view_->popup_position_.x(),
|
||||
event.PositionInWidget().y - popup_host_view_->popup_position_.y());
|
||||
popup_event.SetPositionInScreen(popup_event.PositionInWidget().x,
|
||||
popup_event.PositionInWidget().y);
|
||||
|
||||
popup_host_view_->SendMouseEvent(popup_event);
|
||||
return;
|
||||
popup_host_view_->SendMouseEvent(popup_event);
|
||||
return;
|
||||
}
|
||||
} else if (!guest_host_views_.empty()) {
|
||||
for (auto guest_host_view : guest_host_views_) {
|
||||
if (!guest_host_view->render_widget_host_ ||
|
||||
!guest_host_view->render_widget_host_->GetView()) {
|
||||
continue;
|
||||
}
|
||||
const gfx::Rect& guest_bounds =
|
||||
guest_host_view->render_widget_host_->GetView()->GetViewBounds();
|
||||
if (guest_bounds.Contains(event.PositionInWidget().x,
|
||||
event.PositionInWidget().y)) {
|
||||
blink::WebMouseEvent guest_event(event);
|
||||
guest_event.SetPositionInWidget(
|
||||
event.PositionInWidget().x - guest_bounds.x(),
|
||||
event.PositionInWidget().y - guest_bounds.y());
|
||||
guest_event.SetPositionInScreen(guest_event.PositionInWidget().x,
|
||||
guest_event.PositionInWidget().y);
|
||||
|
||||
guest_host_view->SendMouseEvent(guest_event);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!render_widget_host_)
|
||||
return;
|
||||
render_widget_host_->ForwardMouseEvent(event);
|
||||
|
||||
if (render_widget_host_ && render_widget_host_->GetView()) {
|
||||
// Direct routing requires that mouse events go directly to the View.
|
||||
render_widget_host_->GetView()->ProcessMouseEvent(
|
||||
event, ui::LatencyInfo(ui::SourceEventType::OTHER));
|
||||
}
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SendMouseWheelEvent(
|
||||
@@ -1187,11 +1257,35 @@ void CefRenderWidgetHostViewOSR::SendMouseWheelEvent(
|
||||
base::Bind(&CefRenderWidgetHostViewOSR::CancelWidget,
|
||||
popup_host_view_->weak_ptr_factory_.GetWeakPtr()));
|
||||
}
|
||||
} else if (!guest_host_views_.empty()) {
|
||||
for (auto guest_host_view : guest_host_views_) {
|
||||
if (!guest_host_view->render_widget_host_ ||
|
||||
!guest_host_view->render_widget_host_->GetView()) {
|
||||
continue;
|
||||
}
|
||||
const gfx::Rect& guest_bounds =
|
||||
guest_host_view->render_widget_host_->GetView()->GetViewBounds();
|
||||
if (guest_bounds.Contains(event.PositionInWidget().x,
|
||||
event.PositionInWidget().y)) {
|
||||
blink::WebMouseWheelEvent guest_event(event);
|
||||
guest_event.SetPositionInWidget(
|
||||
event.PositionInWidget().x - guest_bounds.x(),
|
||||
event.PositionInWidget().y - guest_bounds.y());
|
||||
guest_event.SetPositionInScreen(guest_event.PositionInWidget().x,
|
||||
guest_event.PositionInWidget().y);
|
||||
|
||||
guest_host_view->SendMouseWheelEvent(guest_event);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!render_widget_host_)
|
||||
return;
|
||||
render_widget_host_->ForwardWheelEvent(event);
|
||||
|
||||
if (render_widget_host_ && render_widget_host_->GetView()) {
|
||||
// Direct routing requires that mouse events go directly to the View.
|
||||
render_widget_host_->GetView()->ProcessMouseWheelEvent(
|
||||
event, ui::LatencyInfo(ui::SourceEventType::WHEEL));
|
||||
}
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SendFocusEvent(bool focus) {
|
||||
@@ -1333,28 +1427,30 @@ void CefRenderWidgetHostViewOSR::SetDeviceScaleFactor() {
|
||||
}
|
||||
}
|
||||
|
||||
scale_factor_ = new_scale_factor;
|
||||
current_device_scale_factor_ = new_scale_factor;
|
||||
|
||||
if (render_widget_host_ && render_widget_host_->delegate())
|
||||
render_widget_host_->delegate()->UpdateDeviceScaleFactor(new_scale_factor);
|
||||
|
||||
// Notify the guest hosts if any.
|
||||
for (auto guest_host_view : guest_host_views_) {
|
||||
if (guest_host_view->render_widget_host() &&
|
||||
guest_host_view->render_widget_host()->delegate()) {
|
||||
guest_host_view->render_widget_host()
|
||||
->delegate()
|
||||
->UpdateDeviceScaleFactor(new_scale_factor);
|
||||
}
|
||||
content::RenderWidgetHostImpl* rwhi = guest_host_view->render_widget_host();
|
||||
if (!rwhi)
|
||||
continue;
|
||||
if (rwhi->delegate())
|
||||
rwhi->delegate()->UpdateDeviceScaleFactor(new_scale_factor);
|
||||
if (rwhi->GetView())
|
||||
rwhi->GetView()->set_current_device_scale_factor(new_scale_factor);
|
||||
}
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
||||
SetFrameRate();
|
||||
|
||||
const float orgScaleFactor = scale_factor_;
|
||||
const float orgScaleFactor = current_device_scale_factor_;
|
||||
SetDeviceScaleFactor();
|
||||
const bool scaleFactorDidChange = (orgScaleFactor != scale_factor_);
|
||||
const bool scaleFactorDidChange =
|
||||
(orgScaleFactor != current_device_scale_factor_);
|
||||
|
||||
gfx::Size size;
|
||||
if (!IsPopupWidget())
|
||||
@@ -1366,10 +1462,11 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
||||
return;
|
||||
|
||||
const gfx::Size& size_in_pixels =
|
||||
gfx::ConvertSizeToPixel(scale_factor_, size);
|
||||
gfx::ConvertSizeToPixel(current_device_scale_factor_, size);
|
||||
|
||||
GetRootLayer()->SetBounds(gfx::Rect(size));
|
||||
GetCompositor()->SetScaleAndSize(scale_factor_, size_in_pixels);
|
||||
GetCompositor()->SetScaleAndSize(current_device_scale_factor_,
|
||||
size_in_pixels);
|
||||
PlatformResizeCompositorWidget(size_in_pixels);
|
||||
}
|
||||
|
||||
@@ -1435,8 +1532,13 @@ void CefRenderWidgetHostViewOSR::CancelWidget() {
|
||||
|
||||
if (render_widget_host_ && !is_destroyed_) {
|
||||
is_destroyed_ = true;
|
||||
|
||||
// Don't delete the RWHI manually while owned by a scoped_ptr in RVHI. This
|
||||
// matches a CHECK() in RenderWidgetHostImpl::Destroy().
|
||||
const bool also_delete = !render_widget_host_->owner_delegate();
|
||||
|
||||
// Results in a call to Destroy().
|
||||
render_widget_host_->ShutdownAndDestroyWidget(true);
|
||||
render_widget_host_->ShutdownAndDestroyWidget(also_delete);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1469,12 +1571,14 @@ void CefRenderWidgetHostViewOSR::RegisterGuestViewFrameSwappedCallback(
|
||||
base::MakeUnique<base::Closure>(base::Bind(
|
||||
&CefRenderWidgetHostViewOSR::OnGuestViewFrameSwapped,
|
||||
weak_ptr_factory_.GetWeakPtr(), base::Unretained(guest_host_view))));
|
||||
guest_host_view->set_current_device_scale_factor(
|
||||
current_device_scale_factor_);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::OnGuestViewFrameSwapped(
|
||||
content::RenderWidgetHostViewGuest* guest_host_view) {
|
||||
InvalidateInternal(
|
||||
gfx::ConvertRectToPixel(scale_factor_, guest_host_view->GetViewBounds()));
|
||||
InvalidateInternal(gfx::ConvertRectToPixel(current_device_scale_factor_,
|
||||
guest_host_view->GetViewBounds()));
|
||||
|
||||
RegisterGuestViewFrameSwappedCallback(guest_host_view);
|
||||
}
|
||||
|
@@ -178,6 +178,16 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
|
||||
void SetNeedsBeginFrames(bool enabled) override;
|
||||
|
||||
void ProcessKeyboardEvent(const content::NativeWebKeyboardEvent& event,
|
||||
const ui::LatencyInfo& latency) override;
|
||||
void ProcessMouseEvent(const blink::WebMouseEvent& event,
|
||||
const ui::LatencyInfo& latency) override;
|
||||
void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event,
|
||||
const ui::LatencyInfo& latency) override;
|
||||
void ProcessTouchEvent(const blink::WebTouchEvent& event,
|
||||
const ui::LatencyInfo& latency) override;
|
||||
void ProcessGestureEvent(const blink::WebGestureEvent& event,
|
||||
const ui::LatencyInfo& latency) override;
|
||||
bool TransformPointToLocalCoordSpace(const gfx::Point& point,
|
||||
const cc::SurfaceId& original_surface,
|
||||
gfx::Point* transformed_point) override;
|
||||
@@ -308,7 +318,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
// The background color of the web content.
|
||||
SkColor background_color_;
|
||||
|
||||
float scale_factor_;
|
||||
int frame_rate_threshold_ms_;
|
||||
|
||||
#if !defined(OS_MACOSX)
|
||||
|
@@ -6,10 +6,13 @@
|
||||
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_broker_message_filter.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_flash_clipboard_message_filter.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_output_protection_message_filter.h"
|
||||
#include "chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.h"
|
||||
#include "content/public/browser/browser_ppapi_host.h"
|
||||
#include "ppapi/host/message_filter_host.h"
|
||||
#include "ppapi/host/ppapi_host.h"
|
||||
@@ -38,6 +41,33 @@ std::unique_ptr<ResourceHost> CefBrowserPepperHostFactory::CreateResourceHost(
|
||||
if (!host_->IsValidInstance(instance))
|
||||
return nullptr;
|
||||
|
||||
// Private interfaces.
|
||||
if (host_->GetPpapiHost()->permissions().HasPermission(
|
||||
ppapi::PERMISSION_PRIVATE)) {
|
||||
switch (message.type()) {
|
||||
case PpapiHostMsg_Broker_Create::ID: {
|
||||
scoped_refptr<ResourceMessageFilter> broker_filter(
|
||||
new chrome::PepperBrokerMessageFilter(instance, host_));
|
||||
return std::unique_ptr<ResourceHost>(new MessageFilterHost(
|
||||
host_->GetPpapiHost(), instance, resource, broker_filter));
|
||||
}
|
||||
case PpapiHostMsg_PlatformVerification_Create::ID: {
|
||||
scoped_refptr<ResourceMessageFilter> pv_filter(
|
||||
new chrome::PepperPlatformVerificationMessageFilter(host_,
|
||||
instance));
|
||||
return std::unique_ptr<ResourceHost>(new MessageFilterHost(
|
||||
host_->GetPpapiHost(), instance, resource, pv_filter));
|
||||
}
|
||||
case PpapiHostMsg_OutputProtection_Create::ID: {
|
||||
scoped_refptr<ResourceMessageFilter> output_protection_filter(
|
||||
new chrome::PepperOutputProtectionMessageFilter(host_, instance));
|
||||
return std::unique_ptr<ResourceHost>(
|
||||
new MessageFilterHost(host_->GetPpapiHost(), instance, resource,
|
||||
output_protection_filter));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Flash interfaces.
|
||||
if (host_->GetPpapiHost()->permissions().HasPermission(
|
||||
ppapi::PERMISSION_FLASH)) {
|
||||
|
@@ -187,10 +187,14 @@ void CefPrintDialogLinux::ShowDialog(
|
||||
|
||||
callback_ = callback;
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser = extensions::GetOwnerBrowserForFrame(
|
||||
context_->render_process_id(), context_->render_frame_id(), NULL);
|
||||
|
||||
CefRefPtr<CefPrintDialogCallbackImpl> callback_impl(
|
||||
new CefPrintDialogCallbackImpl(this));
|
||||
|
||||
if (!handler_->OnPrintDialog(has_selection, callback_impl.get())) {
|
||||
if (!handler_->OnPrintDialog(browser.get(), has_selection,
|
||||
callback_impl.get())) {
|
||||
callback_impl->Disconnect();
|
||||
OnPrintCancel();
|
||||
}
|
||||
@@ -253,7 +257,10 @@ void CefPrintDialogLinux::SetHandler() {
|
||||
|
||||
void CefPrintDialogLinux::ReleaseHandler() {
|
||||
if (handler_.get()) {
|
||||
handler_->OnPrintReset();
|
||||
CefRefPtr<CefBrowserHostImpl> browser = extensions::GetOwnerBrowserForFrame(
|
||||
context_->render_process_id(), context_->render_frame_id(), NULL);
|
||||
|
||||
handler_->OnPrintReset(browser.get());
|
||||
handler_ = NULL;
|
||||
}
|
||||
}
|
||||
@@ -266,9 +273,12 @@ bool CefPrintDialogLinux::UpdateSettings(printing::PrintSettings* settings,
|
||||
if (!handler_.get())
|
||||
return false;
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser = extensions::GetOwnerBrowserForFrame(
|
||||
context_->render_process_id(), context_->render_frame_id(), NULL);
|
||||
|
||||
CefRefPtr<CefPrintSettingsImpl> settings_impl(
|
||||
new CefPrintSettingsImpl(settings, false, false));
|
||||
handler_->OnPrintSettings(settings_impl.get(), get_defaults);
|
||||
handler_->OnPrintSettings(browser.get(), settings_impl.get(), get_defaults);
|
||||
settings_impl->Detach(NULL);
|
||||
|
||||
context_->InitWithSettings(*settings);
|
||||
@@ -284,10 +294,13 @@ void CefPrintDialogLinux::SendDocumentToPrinter(
|
||||
return;
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> browser = extensions::GetOwnerBrowserForFrame(
|
||||
context_->render_process_id(), context_->render_frame_id(), NULL);
|
||||
|
||||
CefRefPtr<CefPrintJobCallbackImpl> callback_impl(
|
||||
new CefPrintJobCallbackImpl(this));
|
||||
|
||||
if (!handler_->OnPrintJob(document_name, path_to_pdf_.value(),
|
||||
if (!handler_->OnPrintJob(browser.get(), document_name, path_to_pdf_.value(),
|
||||
callback_impl.get())) {
|
||||
callback_impl->Disconnect();
|
||||
OnJobCompleted();
|
||||
|
@@ -63,7 +63,7 @@ CEF_VIEW_VIEW_T class CefViewView : public ViewsViewClass {
|
||||
}
|
||||
|
||||
// views::View methods:
|
||||
gfx::Size GetPreferredSize() const override;
|
||||
gfx::Size CalculatePreferredSize() const override;
|
||||
gfx::Size GetMinimumSize() const override;
|
||||
gfx::Size GetMaximumSize() const override;
|
||||
int GetHeightForWidth(int w) const override;
|
||||
@@ -87,7 +87,7 @@ CEF_VIEW_VIEW_T class CefViewView : public ViewsViewClass {
|
||||
CefViewDelegateClass* cef_delegate_;
|
||||
};
|
||||
|
||||
CEF_VIEW_VIEW_T gfx::Size CEF_VIEW_VIEW_D::GetPreferredSize() const {
|
||||
CEF_VIEW_VIEW_T gfx::Size CEF_VIEW_VIEW_D::CalculatePreferredSize() const {
|
||||
gfx::Size result;
|
||||
if (cef_delegate()) {
|
||||
CefSize cef_size = cef_delegate()->GetPreferredSize(GetCefView());
|
||||
@@ -95,7 +95,7 @@ CEF_VIEW_VIEW_T gfx::Size CEF_VIEW_VIEW_D::GetPreferredSize() const {
|
||||
result = gfx::Size(cef_size.width, cef_size.height);
|
||||
}
|
||||
if (result.IsEmpty())
|
||||
result = ParentClass::GetPreferredSize();
|
||||
result = ParentClass::CalculatePreferredSize();
|
||||
if (result.IsEmpty()) {
|
||||
// Some layouts like BoxLayout expect the preferred size to be non-empty.
|
||||
// The user may have set the size explicitly. Therefore return the current
|
||||
@@ -142,7 +142,7 @@ CEF_VIEW_VIEW_T int CEF_VIEW_VIEW_D::GetHeightForWidth(int w) const {
|
||||
// Some layouts like FillLayout will ignore the preferred size if this view
|
||||
// has no children. We want to use the preferred size if not otherwise
|
||||
// specified.
|
||||
result = GetPreferredSize().height();
|
||||
result = ParentClass::GetPreferredSize().height();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@@ -176,7 +176,7 @@ class CaptionlessFrameView : public views::NonClientFrameView {
|
||||
client_view_bounds_.SetRect(0, 0, width(), height());
|
||||
}
|
||||
|
||||
gfx::Size GetPreferredSize() const override {
|
||||
gfx::Size CalculatePreferredSize() const override {
|
||||
return widget_->non_client_view()
|
||||
->GetWindowBoundsForClientBounds(
|
||||
gfx::Rect(widget_->client_view()->GetPreferredSize()))
|
||||
|
@@ -476,8 +476,7 @@ void CefCrashReporterClient::InitializeCrashReportingForProcess() {
|
||||
!g_crash_reporter_client->HasCrashExternalHandler();
|
||||
if (embedded_handler) {
|
||||
crash_reporter::InitializeCrashpadWithEmbeddedHandler(
|
||||
process_type.empty(), install_static::UTF16ToUTF8(process_type),
|
||||
std::string());
|
||||
process_type.empty(), install_static::UTF16ToUTF8(process_type));
|
||||
} else {
|
||||
crash_reporter::InitializeCrashpad(
|
||||
process_type.empty(), install_static::UTF16ToUTF8(process_type));
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=e2a9910119dcf81b74624588d222c7781e3fdc9a$
|
||||
// $hash=eba15f068169c3d986c5b44ed55aa472f47a9081$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/print_handler_cpptoc.h"
|
||||
@@ -42,6 +42,7 @@ print_handler_on_print_start(struct _cef_print_handler_t* self,
|
||||
|
||||
void CEF_CALLBACK
|
||||
print_handler_on_print_settings(struct _cef_print_handler_t* self,
|
||||
cef_browser_t* browser,
|
||||
struct _cef_print_settings_t* settings,
|
||||
int get_defaults) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -49,6 +50,10 @@ print_handler_on_print_settings(struct _cef_print_handler_t* self,
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return;
|
||||
// Verify param: settings; type: refptr_diff
|
||||
DCHECK(settings);
|
||||
if (!settings)
|
||||
@@ -56,11 +61,13 @@ print_handler_on_print_settings(struct _cef_print_handler_t* self,
|
||||
|
||||
// Execute
|
||||
CefPrintHandlerCppToC::Get(self)->OnPrintSettings(
|
||||
CefPrintSettingsCToCpp::Wrap(settings), get_defaults ? true : false);
|
||||
CefBrowserCToCpp::Wrap(browser), CefPrintSettingsCToCpp::Wrap(settings),
|
||||
get_defaults ? true : false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK
|
||||
print_handler_on_print_dialog(struct _cef_print_handler_t* self,
|
||||
cef_browser_t* browser,
|
||||
int has_selection,
|
||||
cef_print_dialog_callback_t* callback) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -68,6 +75,10 @@ print_handler_on_print_dialog(struct _cef_print_handler_t* self,
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return 0;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback);
|
||||
if (!callback)
|
||||
@@ -75,7 +86,7 @@ print_handler_on_print_dialog(struct _cef_print_handler_t* self,
|
||||
|
||||
// Execute
|
||||
bool _retval = CefPrintHandlerCppToC::Get(self)->OnPrintDialog(
|
||||
has_selection ? true : false,
|
||||
CefBrowserCToCpp::Wrap(browser), has_selection ? true : false,
|
||||
CefPrintDialogCallbackCToCpp::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
@@ -84,6 +95,7 @@ print_handler_on_print_dialog(struct _cef_print_handler_t* self,
|
||||
|
||||
int CEF_CALLBACK
|
||||
print_handler_on_print_job(struct _cef_print_handler_t* self,
|
||||
cef_browser_t* browser,
|
||||
const cef_string_t* document_name,
|
||||
const cef_string_t* pdf_file_path,
|
||||
cef_print_job_callback_t* callback) {
|
||||
@@ -92,6 +104,10 @@ print_handler_on_print_job(struct _cef_print_handler_t* self,
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return 0;
|
||||
// Verify param: document_name; type: string_byref_const
|
||||
DCHECK(document_name);
|
||||
if (!document_name)
|
||||
@@ -107,23 +123,29 @@ print_handler_on_print_job(struct _cef_print_handler_t* self,
|
||||
|
||||
// Execute
|
||||
bool _retval = CefPrintHandlerCppToC::Get(self)->OnPrintJob(
|
||||
CefString(document_name), CefString(pdf_file_path),
|
||||
CefPrintJobCallbackCToCpp::Wrap(callback));
|
||||
CefBrowserCToCpp::Wrap(browser), CefString(document_name),
|
||||
CefString(pdf_file_path), CefPrintJobCallbackCToCpp::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
print_handler_on_print_reset(struct _cef_print_handler_t* self) {
|
||||
print_handler_on_print_reset(struct _cef_print_handler_t* self,
|
||||
cef_browser_t* browser) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefPrintHandlerCppToC::Get(self)->OnPrintReset();
|
||||
CefPrintHandlerCppToC::Get(self)->OnPrintReset(
|
||||
CefBrowserCToCpp::Wrap(browser));
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=0749b78aaf8f69cd706962477d4d0241c93cf333$
|
||||
// $hash=81ba68d1a06a25947aa4533d2c50fff945c54fd0$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/print_handler_ctocpp.h"
|
||||
@@ -37,6 +37,7 @@ void CefPrintHandlerCToCpp::OnPrintStart(CefRefPtr<CefBrowser> browser) {
|
||||
}
|
||||
|
||||
void CefPrintHandlerCToCpp::OnPrintSettings(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefPrintSettings> settings,
|
||||
bool get_defaults) {
|
||||
cef_print_handler_t* _struct = GetStruct();
|
||||
@@ -45,17 +46,23 @@ void CefPrintHandlerCToCpp::OnPrintSettings(
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
// Verify param: settings; type: refptr_diff
|
||||
DCHECK(settings.get());
|
||||
if (!settings.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
_struct->on_print_settings(_struct, CefPrintSettingsCppToC::Wrap(settings),
|
||||
_struct->on_print_settings(_struct, CefBrowserCppToC::Wrap(browser),
|
||||
CefPrintSettingsCppToC::Wrap(settings),
|
||||
get_defaults);
|
||||
}
|
||||
|
||||
bool CefPrintHandlerCToCpp::OnPrintDialog(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
bool has_selection,
|
||||
CefRefPtr<CefPrintDialogCallback> callback) {
|
||||
cef_print_handler_t* _struct = GetStruct();
|
||||
@@ -64,6 +71,10 @@ bool CefPrintHandlerCToCpp::OnPrintDialog(
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback.get());
|
||||
if (!callback.get())
|
||||
@@ -71,13 +82,15 @@ bool CefPrintHandlerCToCpp::OnPrintDialog(
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->on_print_dialog(
|
||||
_struct, has_selection, CefPrintDialogCallbackCppToC::Wrap(callback));
|
||||
_struct, CefBrowserCppToC::Wrap(browser), has_selection,
|
||||
CefPrintDialogCallbackCppToC::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
bool CefPrintHandlerCToCpp::OnPrintJob(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
const CefString& document_name,
|
||||
const CefString& pdf_file_path,
|
||||
CefRefPtr<CefPrintJobCallback> callback) {
|
||||
@@ -87,6 +100,10 @@ bool CefPrintHandlerCToCpp::OnPrintJob(
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: document_name; type: string_byref_const
|
||||
DCHECK(!document_name.empty());
|
||||
if (document_name.empty())
|
||||
@@ -102,22 +119,27 @@ bool CefPrintHandlerCToCpp::OnPrintJob(
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->on_print_job(
|
||||
_struct, document_name.GetStruct(), pdf_file_path.GetStruct(),
|
||||
CefPrintJobCallbackCppToC::Wrap(callback));
|
||||
_struct, CefBrowserCppToC::Wrap(browser), document_name.GetStruct(),
|
||||
pdf_file_path.GetStruct(), CefPrintJobCallbackCppToC::Wrap(callback));
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
void CefPrintHandlerCToCpp::OnPrintReset() {
|
||||
void CefPrintHandlerCToCpp::OnPrintReset(CefRefPtr<CefBrowser> browser) {
|
||||
cef_print_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_print_reset))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
_struct->on_print_reset(_struct);
|
||||
_struct->on_print_reset(_struct, CefBrowserCppToC::Wrap(browser));
|
||||
}
|
||||
|
||||
CefSize CefPrintHandlerCToCpp::GetPdfPaperSize(int device_units_per_inch) {
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=104e754c5019270e7bd700c6b979891f1275f9a7$
|
||||
// $hash=4a628ee393964285a7ad6f2a6c64cff8a88c3b20$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_HANDLER_CTOCPP_H_
|
||||
@@ -34,14 +34,17 @@ class CefPrintHandlerCToCpp : public CefCToCppRefCounted<CefPrintHandlerCToCpp,
|
||||
|
||||
// CefPrintHandler methods.
|
||||
void OnPrintStart(CefRefPtr<CefBrowser> browser) override;
|
||||
void OnPrintSettings(CefRefPtr<CefPrintSettings> settings,
|
||||
void OnPrintSettings(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefPrintSettings> settings,
|
||||
bool get_defaults) override;
|
||||
bool OnPrintDialog(bool has_selection,
|
||||
bool OnPrintDialog(CefRefPtr<CefBrowser> browser,
|
||||
bool has_selection,
|
||||
CefRefPtr<CefPrintDialogCallback> callback) override;
|
||||
bool OnPrintJob(const CefString& document_name,
|
||||
bool OnPrintJob(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& document_name,
|
||||
const CefString& pdf_file_path,
|
||||
CefRefPtr<CefPrintJobCallback> callback) override;
|
||||
void OnPrintReset() override;
|
||||
void OnPrintReset(CefRefPtr<CefBrowser> browser) override;
|
||||
CefSize GetPdfPaperSize(int device_units_per_inch) override;
|
||||
};
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=2ff7a51013987b111a12b700a0e018eb0bb08edc$
|
||||
// $hash=45f1ced8a482b44d73c8538fbbdbc27e73003d6f$
|
||||
//
|
||||
|
||||
#include "include/capi/cef_app_capi.h"
|
||||
@@ -584,6 +584,18 @@ CEF_EXPORT int cef_zip_directory(const cef_string_t* src_dir,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CEF_EXPORT void cef_load_crlsets_file(const cef_string_t* path) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: path; type: string_byref_const
|
||||
DCHECK(path);
|
||||
if (!path)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefLoadCRLSetsFile(CefString(path));
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_get_geolocation(
|
||||
struct _cef_get_geolocation_callback_t* callback) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=da690070ed610a81d9f5dcab623ca7822dbd0ac1$
|
||||
// $hash=5adfe7f61a476b5b7dac0365f481efc213b3c579$
|
||||
//
|
||||
|
||||
#include "include/capi/cef_app_capi.h"
|
||||
@@ -553,6 +553,18 @@ CEF_GLOBAL bool CefZipDirectory(const CefString& src_dir,
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
CEF_GLOBAL void CefLoadCRLSetsFile(const CefString& path) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: path; type: string_byref_const
|
||||
DCHECK(!path.empty());
|
||||
if (path.empty())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
cef_load_crlsets_file(path.GetStruct());
|
||||
}
|
||||
|
||||
CEF_GLOBAL bool CefGetGeolocation(
|
||||
CefRefPtr<CefGetGeolocationCallback> callback) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
@@ -69,6 +69,9 @@ patches = [
|
||||
#
|
||||
# Support creation of captionless windows with resizable borders.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/1749
|
||||
#
|
||||
# Support configuration of RWHVGuest device scale factor.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2078
|
||||
'name': 'views_widget_180_1481_1565_1677_1749',
|
||||
},
|
||||
{
|
||||
@@ -271,6 +274,9 @@ patches = [
|
||||
{
|
||||
# Fix white flash during browser creation.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/1984
|
||||
#
|
||||
# Windows: Fix crash during window creation.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=761389
|
||||
'name': 'rwh_background_color_1984',
|
||||
},
|
||||
{
|
||||
@@ -299,8 +305,24 @@ patches = [
|
||||
'name': 'webkit_plugin_info_2015',
|
||||
},
|
||||
{
|
||||
# Windows: Fix AssertIOAllowed failure in NetworkChangeNotifier.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=721461
|
||||
'name': 'network_change_721461',
|
||||
# Linux: Attach routing IDs to PrintingContext.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2196
|
||||
'name': 'printing_context_2196',
|
||||
},
|
||||
{
|
||||
# Windows: Disable allocator for cef_sandbox builds.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2220
|
||||
'name': 'sandbox_2220',
|
||||
},
|
||||
{
|
||||
# Linux: Fix build errors related to dependency versions.
|
||||
# https://chromium-review.googlesource.com/c/590271/
|
||||
'name': 'linux_build',
|
||||
},
|
||||
{
|
||||
# Linux: Work around gold linker bug for 32-bit code.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=729532
|
||||
'name': 'swiftshader_729532',
|
||||
'path': 'third_party/swiftshader/',
|
||||
},
|
||||
]
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
index 16599b1..e489af1 100644
|
||||
index 16599b12409c..e489af16f4d1 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
@@ -51,9 +51,11 @@ class BrowserCompositorMac : public DelegatedFrameHostClient {
|
||||
@@ -15,7 +15,7 @@ index 16599b1..e489af1 100644
|
||||
|
||||
void DidCreateNewRendererCompositorFrameSink(
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
index 4121584..c821275 100644
|
||||
index 4121584c970f..c82127536fca 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
@@ -202,6 +202,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/frame_host/render_widget_host_view_guest.cc content/browser/frame_host/render_widget_host_view_guest.cc
|
||||
index b7e4883..2dfd11e 100644
|
||||
index b7e4883f030e..2dfd11ec94bb 100644
|
||||
--- content/browser/frame_host/render_widget_host_view_guest.cc
|
||||
+++ content/browser/frame_host/render_widget_host_view_guest.cc
|
||||
@@ -246,13 +246,14 @@ void RenderWidgetHostViewGuest::Destroy() {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
index 1f985ec..47bf303 100644
|
||||
index e05acc6ca6dc..c5e82a9484a2 100644
|
||||
--- content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
+++ content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
@@ -322,14 +322,20 @@ void BrowserPluginGuest::InitInternal(
|
||||
@@ -25,7 +25,7 @@ index 1f985ec..47bf303 100644
|
||||
}
|
||||
|
||||
RendererPreferences* renderer_prefs =
|
||||
@@ -805,7 +811,8 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
@@ -818,7 +824,8 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
|
||||
web_contents_view->CreateViewForWidget(
|
||||
@@ -36,10 +36,10 @@ index 1f985ec..47bf303 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
|
||||
index d890e64..1965603 100644
|
||||
index 60dce63f16d3..1126c41ea8fe 100644
|
||||
--- content/browser/frame_host/interstitial_page_impl.cc
|
||||
+++ content/browser/frame_host/interstitial_page_impl.cc
|
||||
@@ -605,7 +605,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||
@@ -610,7 +610,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||
WebContentsView* wcv =
|
||||
static_cast<WebContentsImpl*>(web_contents())->GetView();
|
||||
RenderWidgetHostViewBase* view =
|
||||
@@ -49,7 +49,7 @@ index d890e64..1965603 100644
|
||||
render_view_host_->GetMainFrame()->AllowBindings(
|
||||
BINDINGS_POLICY_DOM_AUTOMATION);
|
||||
diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h
|
||||
index e4401f8..f2fdb9b 100644
|
||||
index e4401f85bf3f..f2fdb9be0d5c 100644
|
||||
--- content/browser/web_contents/web_contents_view.h
|
||||
+++ content/browser/web_contents/web_contents_view.h
|
||||
@@ -86,13 +86,9 @@ class WebContentsView {
|
||||
@@ -69,7 +69,7 @@ index e4401f8..f2fdb9b 100644
|
||||
// Creates a new View that holds a popup and receives messages for it.
|
||||
virtual RenderWidgetHostViewBase* CreateViewForPopupWidget(
|
||||
diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc
|
||||
index 84b906e..ec0d014 100644
|
||||
index 84b906e8b965..ec0d014b7ae8 100644
|
||||
--- content/browser/web_contents/web_contents_view_aura.cc
|
||||
+++ content/browser/web_contents/web_contents_view_aura.cc
|
||||
@@ -846,7 +846,8 @@ void WebContentsViewAura::CreateView(
|
||||
@@ -91,7 +91,7 @@ index 84b906e..ec0d014 100644
|
||||
g_create_render_widget_host_view
|
||||
? g_create_render_widget_host_view(render_widget_host,
|
||||
diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h
|
||||
index c52692e..63402a6 100644
|
||||
index c52692ed1634..63402a66e44a 100644
|
||||
--- content/browser/web_contents/web_contents_view_aura.h
|
||||
+++ content/browser/web_contents/web_contents_view_aura.h
|
||||
@@ -118,7 +118,7 @@ class CONTENT_EXPORT WebContentsViewAura
|
||||
@@ -104,7 +104,7 @@ index c52692e..63402a6 100644
|
||||
RenderWidgetHost* render_widget_host) override;
|
||||
void SetPageTitle(const base::string16& title) override;
|
||||
diff --git content/browser/web_contents/web_contents_view_child_frame.cc content/browser/web_contents/web_contents_view_child_frame.cc
|
||||
index d10fbca..18df45f 100644
|
||||
index d10fbca3c81e..18df45f5b778 100644
|
||||
--- content/browser/web_contents/web_contents_view_child_frame.cc
|
||||
+++ content/browser/web_contents/web_contents_view_child_frame.cc
|
||||
@@ -94,7 +94,7 @@ void WebContentsViewChildFrame::CreateView(const gfx::Size& initial_size,
|
||||
@@ -117,7 +117,7 @@ index d10fbca..18df45f 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/web_contents/web_contents_view_child_frame.h content/browser/web_contents/web_contents_view_child_frame.h
|
||||
index 86ce68b..fd21e5a 100644
|
||||
index 86ce68bfbe69..fd21e5a7f12b 100644
|
||||
--- content/browser/web_contents/web_contents_view_child_frame.h
|
||||
+++ content/browser/web_contents/web_contents_view_child_frame.h
|
||||
@@ -39,7 +39,7 @@ class WebContentsViewChildFrame : public WebContentsView,
|
||||
@@ -130,7 +130,7 @@ index 86ce68b..fd21e5a 100644
|
||||
RenderWidgetHost* render_widget_host) override;
|
||||
void SetPageTitle(const base::string16& title) override;
|
||||
diff --git content/browser/web_contents/web_contents_view_guest.cc content/browser/web_contents/web_contents_view_guest.cc
|
||||
index 702a579..2acceda 100644
|
||||
index 702a579c19a8..2acceda336b3 100644
|
||||
--- content/browser/web_contents/web_contents_view_guest.cc
|
||||
+++ content/browser/web_contents/web_contents_view_guest.cc
|
||||
@@ -72,6 +72,8 @@ void WebContentsViewGuest::GetScreenInfo(ScreenInfo* screen_info) const {
|
||||
@@ -185,7 +185,7 @@ index 702a579..2acceda 100644
|
||||
|
||||
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget(
|
||||
diff --git content/browser/web_contents/web_contents_view_guest.h content/browser/web_contents/web_contents_view_guest.h
|
||||
index 0102d7e..b89d66c 100644
|
||||
index 0102d7ee960b..b89d66c025cf 100644
|
||||
--- content/browser/web_contents/web_contents_view_guest.h
|
||||
+++ content/browser/web_contents/web_contents_view_guest.h
|
||||
@@ -58,7 +58,7 @@ class WebContentsViewGuest : public WebContentsView,
|
||||
@@ -198,7 +198,7 @@ index 0102d7e..b89d66c 100644
|
||||
RenderWidgetHost* render_widget_host) override;
|
||||
void SetPageTitle(const base::string16& title) override;
|
||||
diff --git content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.h
|
||||
index b0a1a1d..12fce1d3 100644
|
||||
index b0a1a1d99593..12fce1d3f5fb 100644
|
||||
--- content/browser/web_contents/web_contents_view_mac.h
|
||||
+++ content/browser/web_contents/web_contents_view_mac.h
|
||||
@@ -91,7 +91,7 @@ class WebContentsViewMac : public WebContentsView,
|
||||
@@ -211,7 +211,7 @@ index b0a1a1d..12fce1d3 100644
|
||||
RenderWidgetHost* render_widget_host) override;
|
||||
void SetPageTitle(const base::string16& title) override;
|
||||
diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm
|
||||
index ebd0ce3..64a9d85 100644
|
||||
index ebd0ce35c1c1..64a9d8525b9e 100644
|
||||
--- content/browser/web_contents/web_contents_view_mac.mm
|
||||
+++ content/browser/web_contents/web_contents_view_mac.mm
|
||||
@@ -352,7 +352,8 @@ void WebContentsViewMac::CreateView(
|
||||
@@ -233,7 +233,7 @@ index ebd0ce3..64a9d85 100644
|
||||
g_create_render_widget_host_view
|
||||
? g_create_render_widget_host_view(render_widget_host,
|
||||
diff --git content/public/browser/browser_plugin_guest_delegate.h content/public/browser/browser_plugin_guest_delegate.h
|
||||
index 61662f4..6a4648f 100644
|
||||
index 61662f4bab77..6a4648fb76ff 100644
|
||||
--- content/public/browser/browser_plugin_guest_delegate.h
|
||||
+++ content/public/browser/browser_plugin_guest_delegate.h
|
||||
@@ -19,6 +19,7 @@ namespace content {
|
||||
@@ -256,7 +256,7 @@ index 61662f4..6a4648f 100644
|
||||
// reported from the guest renderer should be ignored. The reported value
|
||||
// from the guest renderer is incorrect in situations where BrowserPlugin is
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index 255217d..1571064 100644
|
||||
index 255217dc252d..15710641cba3 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -174,6 +174,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
@@ -288,7 +288,7 @@ index 255217d..1571064 100644
|
||||
WebContents* source,
|
||||
const content::OpenURLParams& params) {
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
index f3fb783..642342c 100644
|
||||
index f3fb78307bc8..642342cfff43 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
@@ -87,6 +87,10 @@ class MimeHandlerViewGuest :
|
||||
@@ -303,7 +303,7 @@ index f3fb783..642342c 100644
|
||||
content::WebContents* OpenURLFromTab(
|
||||
content::WebContents* source,
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
||||
index 0928bf2..e954278 100644
|
||||
index 0928bf2f44da..e9542785ec8a 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
||||
@@ -6,9 +6,9 @@
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/profiles/incognito_helpers.cc chrome/browser/profiles/incognito_helpers.cc
|
||||
index 6155e96..2125a436 100644
|
||||
index 6155e9606d67..2125a436c87e 100644
|
||||
--- chrome/browser/profiles/incognito_helpers.cc
|
||||
+++ chrome/browser/profiles/incognito_helpers.cc
|
||||
@@ -8,13 +8,35 @@
|
||||
@@ -39,7 +39,7 @@ index 6155e96..2125a436 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/profiles/incognito_helpers.h chrome/browser/profiles/incognito_helpers.h
|
||||
index 4b43013..169ca47 100644
|
||||
index 4b430133e16f..169ca4765907 100644
|
||||
--- chrome/browser/profiles/incognito_helpers.h
|
||||
+++ chrome/browser/profiles/incognito_helpers.h
|
||||
@@ -11,6 +11,19 @@ class BrowserContext;
|
||||
@@ -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 385f9c3..3d126bd 100644
|
||||
index 5753fecbe39f..cc23f0662993 100644
|
||||
--- chrome/browser/profiles/profile_manager.h
|
||||
+++ chrome/browser/profiles/profile_manager.h
|
||||
@@ -89,7 +89,7 @@ class ProfileManager : public base::NonThreadSafe,
|
||||
@@ -95,7 +95,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 385f9c3..3d126bd 100644
|
||||
|
||||
// Returns total number of profiles available on this machine.
|
||||
size_t GetNumberOfProfiles();
|
||||
@@ -117,7 +117,7 @@ class ProfileManager : public base::NonThreadSafe,
|
||||
@@ -123,7 +123,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 385f9c3..3d126bd 100644
|
||||
|
||||
// Returns the directory where the first created profile is stored,
|
||||
// relative to the user data directory currently in use.
|
||||
@@ -126,7 +126,7 @@ class ProfileManager : public base::NonThreadSafe,
|
||||
@@ -132,7 +132,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,5 +1,5 @@
|
||||
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
|
||||
index b7429b1..a65dfbf 100644
|
||||
index b7429b126490..a65dfbfb7709 100644
|
||||
--- chrome/common/chrome_content_client.cc
|
||||
+++ chrome/common/chrome_content_client.cc
|
||||
@@ -81,7 +81,7 @@
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
|
||||
index 409df10..e1df182 100644
|
||||
index 409df107103e..e1df1826410e 100644
|
||||
--- content/browser/compositor/gpu_process_transport_factory.cc
|
||||
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
||||
@@ -240,6 +240,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
|
||||
@@ -17,7 +17,7 @@ index 409df10..e1df182 100644
|
||||
if (command_line->HasSwitch(switches::kHeadless))
|
||||
return base::WrapUnique(new cc::SoftwareOutputDevice);
|
||||
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
|
||||
index 54a104a..ba76d90 100644
|
||||
index 54a104ae7619..ba76d902d4ea 100644
|
||||
--- ui/compositor/compositor.h
|
||||
+++ ui/compositor/compositor.h
|
||||
@@ -18,6 +18,7 @@
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
|
||||
index ecc7952..69ef4b4 100644
|
||||
index ecc79522d5ae..69ef4b40ccd9 100644
|
||||
--- chrome/browser/download/download_target_determiner.cc
|
||||
+++ chrome/browser/download/download_target_determiner.cc
|
||||
@@ -476,8 +476,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
|
||||
@@ -14,7 +14,7 @@ index ecc7952..69ef4b4 100644
|
||||
// The GetPlugins call causes the plugin list to be refreshed. Once that's
|
||||
// done we can retry the GetPluginInfo call. We break out of this cycle
|
||||
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
index 1783a10..b380ef8 100644
|
||||
index 1783a101aa02..b380ef826ff7 100644
|
||||
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
@@ -179,6 +179,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
|
||||
@@ -26,7 +26,7 @@ index 1783a10..b380ef8 100644
|
||||
content::WebPluginInfo* plugin) {
|
||||
base::AutoLock auto_lock(lock_);
|
||||
diff --git chrome/browser/plugins/chrome_plugin_service_filter.h chrome/browser/plugins/chrome_plugin_service_filter.h
|
||||
index f8b651f..ec39f8d 100644
|
||||
index f8b651f1ddc4..ec39f8d7dc85 100644
|
||||
--- chrome/browser/plugins/chrome_plugin_service_filter.h
|
||||
+++ chrome/browser/plugins/chrome_plugin_service_filter.h
|
||||
@@ -71,6 +71,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter,
|
||||
@@ -38,7 +38,7 @@ index f8b651f..ec39f8d 100644
|
||||
content::WebPluginInfo* plugin) override;
|
||||
|
||||
diff --git chrome/browser/plugins/plugin_info_message_filter.cc chrome/browser/plugins/plugin_info_message_filter.cc
|
||||
index 8c31c98..beef4cb 100644
|
||||
index 8c31c98cf439..beef4cb9d3ae 100644
|
||||
--- chrome/browser/plugins/plugin_info_message_filter.cc
|
||||
+++ chrome/browser/plugins/plugin_info_message_filter.cc
|
||||
@@ -451,8 +451,8 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
|
||||
@@ -53,7 +53,7 @@ index 8c31c98..beef4cb 100644
|
||||
}
|
||||
}
|
||||
diff --git chrome/browser/ui/cocoa/drag_util.mm chrome/browser/ui/cocoa/drag_util.mm
|
||||
index fd8c993..7f70c96 100644
|
||||
index fd8c99386bdd..7f70c965ce49 100644
|
||||
--- chrome/browser/ui/cocoa/drag_util.mm
|
||||
+++ chrome/browser/ui/cocoa/drag_util.mm
|
||||
@@ -54,7 +54,7 @@ BOOL IsSupportedFileURL(Profile* profile, const GURL& url) {
|
||||
@@ -66,7 +66,7 @@ index fd8c993..7f70c96 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
index ea5764b..ae06854 100644
|
||||
index ea5764be19f4..ae06854189cd 100644
|
||||
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
@@ -585,6 +585,6 @@ void BrowserTabStripController::OnFindURLMimeTypeCompleted(
|
||||
@@ -78,10 +78,10 @@ index ea5764b..ae06854 100644
|
||||
mime_type, false, NULL, &plugin, NULL));
|
||||
}
|
||||
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
|
||||
index 7563fdf..d4e0a38 100644
|
||||
index 578c05b0c757..b2d26876b4bd 100644
|
||||
--- content/browser/frame_host/navigation_handle_impl.cc
|
||||
+++ content/browser/frame_host/navigation_handle_impl.cc
|
||||
@@ -294,12 +294,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
|
||||
@@ -299,12 +299,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
|
||||
}
|
||||
|
||||
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
|
||||
@@ -95,10 +95,10 @@ index 7563fdf..d4e0a38 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc
|
||||
index 2bdb04d..b28722e 100644
|
||||
index 747f19a594c2..642a86d8e60b 100644
|
||||
--- content/browser/frame_host/render_frame_host_impl.cc
|
||||
+++ content/browser/frame_host/render_frame_host_impl.cc
|
||||
@@ -865,10 +865,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
|
||||
@@ -881,10 +881,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
|
||||
IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup)
|
||||
IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup)
|
||||
#endif
|
||||
@@ -109,7 +109,7 @@ index 2bdb04d..b28722e 100644
|
||||
IPC_MESSAGE_HANDLER(FrameHostMsg_RequestOverlayRoutingToken,
|
||||
OnRequestOverlayRoutingToken)
|
||||
IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow)
|
||||
@@ -1323,6 +1321,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
||||
@@ -1347,6 +1345,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
|
||||
if (navigation_handle_) {
|
||||
navigation_handle_->set_net_error_code(
|
||||
static_cast<net::Error>(params.error_code));
|
||||
@@ -117,7 +117,7 @@ index 2bdb04d..b28722e 100644
|
||||
}
|
||||
|
||||
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
|
||||
@@ -2573,14 +2572,12 @@ void RenderFrameHostImpl::OnHidePopup() {
|
||||
@@ -2602,14 +2601,12 @@ void RenderFrameHostImpl::OnHidePopup() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -133,7 +133,7 @@ index 2bdb04d..b28722e 100644
|
||||
void RenderFrameHostImpl::OnRequestOverlayRoutingToken() {
|
||||
// Make sure that we have a token.
|
||||
diff --git content/browser/frame_host/render_frame_host_impl.h content/browser/frame_host/render_frame_host_impl.h
|
||||
index 1d1de6e..bd05959 100644
|
||||
index 1d1de6edf081..bd05959f98bb 100644
|
||||
--- content/browser/frame_host/render_frame_host_impl.h
|
||||
+++ content/browser/frame_host/render_frame_host_impl.h
|
||||
@@ -801,8 +801,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
@@ -147,7 +147,7 @@ index 1d1de6e..bd05959 100644
|
||||
mojo::ScopedMessagePipeHandle pipe);
|
||||
#endif
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
|
||||
index bbbb37d..1fa30da 100644
|
||||
index bbbb37d8917d..1fa30da1385b 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.cc
|
||||
+++ content/browser/frame_host/render_frame_message_filter.cc
|
||||
@@ -449,6 +449,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
|
||||
@@ -209,7 +209,7 @@ index bbbb37d..1fa30da 100644
|
||||
|
||||
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h
|
||||
index 3f49cc4..c593146 100644
|
||||
index 3f49cc40b6d9..c593146686f2 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.h
|
||||
+++ content/browser/frame_host/render_frame_message_filter.h
|
||||
@@ -124,13 +124,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter
|
||||
@@ -230,7 +230,7 @@ index 3f49cc4..c593146 100644
|
||||
const std::string& mime_type,
|
||||
bool* found,
|
||||
diff --git content/browser/loader/mime_sniffing_resource_handler.cc content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
index 11adad4..283f116 100644
|
||||
index 11adad470477..283f11625851 100644
|
||||
--- content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
+++ content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
@@ -519,8 +519,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
|
||||
@@ -245,7 +245,7 @@ index 11adad4..283f116 100644
|
||||
if (stale) {
|
||||
// Refresh the plugins asynchronously.
|
||||
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
|
||||
index 4bdfa1d..cf9b916 100644
|
||||
index 4bdfa1d5455f..cf9b9166ae43 100644
|
||||
--- content/browser/plugin_service_impl.cc
|
||||
+++ content/browser/plugin_service_impl.cc
|
||||
@@ -242,6 +242,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
@@ -267,7 +267,7 @@ index 4bdfa1d..cf9b916 100644
|
||||
if (actual_mime_type)
|
||||
*actual_mime_type = mime_types[i];
|
||||
diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h
|
||||
index 85b64da..e77f1bb 100644
|
||||
index 85b64dad4b90..e77f1bb5a1c2 100644
|
||||
--- content/browser/plugin_service_impl.h
|
||||
+++ content/browser/plugin_service_impl.h
|
||||
@@ -64,6 +64,7 @@ class CONTENT_EXPORT PluginServiceImpl
|
||||
@@ -279,7 +279,7 @@ index 85b64da..e77f1bb 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/common/frame_messages.h content/common/frame_messages.h
|
||||
index 7077b9a..5fa68b1 100644
|
||||
index 7077b9a6cefe..5fa68b1b1bdd 100644
|
||||
--- content/common/frame_messages.h
|
||||
+++ content/common/frame_messages.h
|
||||
@@ -1298,8 +1298,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
@@ -317,7 +317,7 @@ index 7077b9a..5fa68b1 100644
|
||||
// Adding a new message? Stick to the sort order above: first platform
|
||||
// independent FrameMsg, then ifdefs for platform specific FrameMsg, then
|
||||
diff --git content/ppapi_plugin/ppapi_blink_platform_impl.cc content/ppapi_plugin/ppapi_blink_platform_impl.cc
|
||||
index e9b8930..42e3aec 100644
|
||||
index e9b89307ad89..42e3aec266e0 100644
|
||||
--- content/ppapi_plugin/ppapi_blink_platform_impl.cc
|
||||
+++ content/ppapi_plugin/ppapi_blink_platform_impl.cc
|
||||
@@ -213,6 +213,7 @@ std::unique_ptr<blink::WebURLLoader> PpapiBlinkPlatformImpl::CreateURLLoader() {
|
||||
@@ -329,7 +329,7 @@ index e9b8930..42e3aec 100644
|
||||
blink::WebPluginListBuilder* builder) {
|
||||
NOTREACHED();
|
||||
diff --git content/ppapi_plugin/ppapi_blink_platform_impl.h content/ppapi_plugin/ppapi_blink_platform_impl.h
|
||||
index 84d29a5..3541ff0 100644
|
||||
index 84d29a5ae84a..3541ff0650be 100644
|
||||
--- content/ppapi_plugin/ppapi_blink_platform_impl.h
|
||||
+++ content/ppapi_plugin/ppapi_blink_platform_impl.h
|
||||
@@ -45,6 +45,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -341,7 +341,7 @@ index 84d29a5..3541ff0 100644
|
||||
blink::WebPluginListBuilder*) override;
|
||||
blink::WebData LoadResource(const char* name) override;
|
||||
diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h
|
||||
index ac05c13..762262b 100644
|
||||
index ac05c13b1df8..762262bff01a 100644
|
||||
--- content/public/browser/plugin_service.h
|
||||
+++ content/public/browser/plugin_service.h
|
||||
@@ -74,6 +74,7 @@ class PluginService {
|
||||
@@ -353,7 +353,7 @@ index ac05c13..762262b 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/public/browser/plugin_service_filter.h content/public/browser/plugin_service_filter.h
|
||||
index 3b610b1..7c439e0 100644
|
||||
index 3b610b1f554e..7c439e060779 100644
|
||||
--- content/public/browser/plugin_service_filter.h
|
||||
+++ content/public/browser/plugin_service_filter.h
|
||||
@@ -33,6 +33,7 @@ class PluginServiceFilter {
|
||||
@@ -365,7 +365,7 @@ index 3b610b1..7c439e0 100644
|
||||
WebPluginInfo* plugin) = 0;
|
||||
|
||||
diff --git content/public/renderer/content_renderer_client.cc content/public/renderer/content_renderer_client.cc
|
||||
index 02565ee..de8fa6e 100644
|
||||
index 02565ee6d990..de8fa6e7d535 100644
|
||||
--- content/public/renderer/content_renderer_client.cc
|
||||
+++ content/public/renderer/content_renderer_client.cc
|
||||
@@ -104,7 +104,6 @@ bool ContentRendererClient::AllowPopup() {
|
||||
@@ -385,7 +385,7 @@ index 02565ee..de8fa6e 100644
|
||||
return false;
|
||||
}
|
||||
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
|
||||
index 0e554ba..8ac5c54 100644
|
||||
index 0e554ba8467a..8ac5c5428a5c 100644
|
||||
--- content/public/renderer/content_renderer_client.h
|
||||
+++ content/public/renderer/content_renderer_client.h
|
||||
@@ -75,6 +75,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -415,7 +415,7 @@ index 0e554ba..8ac5c54 100644
|
||||
// built in media player for the given |url|. Defaults to false.
|
||||
virtual bool ShouldUseMediaPlayerForURL(const GURL& url);
|
||||
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
|
||||
index ebf4cd4..27a9df4 100644
|
||||
index ebf4cd4b118c..27a9df408783 100644
|
||||
--- content/public/renderer/render_frame_observer.h
|
||||
+++ content/public/renderer/render_frame_observer.h
|
||||
@@ -115,6 +115,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -429,7 +429,7 @@ index ebf4cd4..27a9df4 100644
|
||||
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
|
||||
|
||||
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
|
||||
index d1e9d50..ad7c36d7 100644
|
||||
index 2fd389c96cb5..8aa049b62e8e 100644
|
||||
--- content/renderer/render_frame_impl.cc
|
||||
+++ content/renderer/render_frame_impl.cc
|
||||
@@ -2902,7 +2902,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
@@ -451,7 +451,7 @@ index d1e9d50..ad7c36d7 100644
|
||||
}
|
||||
|
||||
void RenderFrameImpl::WillCommitProvisionalLoad() {
|
||||
@@ -5495,9 +5498,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
|
||||
@@ -5509,9 +5512,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
|
||||
(!IsBrowserSideNavigationEnabled() ||
|
||||
url != pending_navigation_params_->request_params.redirects[0]));
|
||||
|
||||
@@ -463,7 +463,7 @@ index d1e9d50..ad7c36d7 100644
|
||||
// The handlenavigation API is deprecated and will be removed once
|
||||
// crbug.com/325351 is resolved.
|
||||
if (GetContentClient()->renderer()->HandleNavigation(
|
||||
@@ -5510,7 +5512,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
|
||||
@@ -5524,7 +5526,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
|
||||
}
|
||||
return blink::kWebNavigationPolicyIgnore;
|
||||
}
|
||||
@@ -472,10 +472,10 @@ index d1e9d50..ad7c36d7 100644
|
||||
Referrer referrer(
|
||||
RenderViewImpl::GetReferrerFromRequest(frame_, info.url_request));
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index 116d31a8..ef645bb 100644
|
||||
index 574acb32ff2a..924d6cf35e5d 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -754,6 +754,8 @@ void RenderThreadImpl::Init(
|
||||
@@ -756,6 +756,8 @@ void RenderThreadImpl::Init(
|
||||
|
||||
StartServiceManagerConnection();
|
||||
|
||||
@@ -485,7 +485,7 @@ index 116d31a8..ef645bb 100644
|
||||
*base::CommandLine::ForCurrentProcess(), switches::kSingleProcess);
|
||||
|
||||
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
|
||||
index a540286..41b19d4 100644
|
||||
index a54028632b2d..41b19d41472a 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -738,6 +738,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
|
||||
@@ -507,7 +507,7 @@ index a540286..41b19d4 100644
|
||||
builder->AddPlugin(WebString::FromUTF16(plugin.name),
|
||||
WebString::FromUTF16(plugin.desc),
|
||||
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
|
||||
index b931470..af3719a 100644
|
||||
index b931470c95ce..af3719abb371 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -124,6 +124,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -519,7 +519,7 @@ index b931470..af3719a 100644
|
||||
blink::WebPluginListBuilder* builder) override;
|
||||
blink::WebPublicSuffixList* PublicSuffixList() override;
|
||||
diff --git content/shell/browser/shell_plugin_service_filter.cc content/shell/browser/shell_plugin_service_filter.cc
|
||||
index 3a48c59..d10ef64 100644
|
||||
index 3a48c59b7e3e..d10ef64adbba 100644
|
||||
--- content/shell/browser/shell_plugin_service_filter.cc
|
||||
+++ content/shell/browser/shell_plugin_service_filter.cc
|
||||
@@ -18,6 +18,7 @@ bool ShellPluginServiceFilter::IsPluginAvailable(
|
||||
@@ -531,7 +531,7 @@ index 3a48c59..d10ef64 100644
|
||||
WebPluginInfo* plugin) {
|
||||
return plugin->name == base::ASCIIToUTF16("Blink Test Plugin") ||
|
||||
diff --git content/shell/browser/shell_plugin_service_filter.h content/shell/browser/shell_plugin_service_filter.h
|
||||
index 7767a62..8a95377 100644
|
||||
index 7767a620a9fd..8a95377f5f3b 100644
|
||||
--- content/shell/browser/shell_plugin_service_filter.h
|
||||
+++ content/shell/browser/shell_plugin_service_filter.h
|
||||
@@ -21,6 +21,7 @@ class ShellPluginServiceFilter : public PluginServiceFilter {
|
||||
@@ -543,7 +543,7 @@ index 7767a62..8a95377 100644
|
||||
WebPluginInfo* plugin) override;
|
||||
|
||||
diff --git content/test/fake_plugin_service.cc content/test/fake_plugin_service.cc
|
||||
index 6746b9f..8634ada 100644
|
||||
index 6746b9f16e7e..8634ada48d57 100644
|
||||
--- content/test/fake_plugin_service.cc
|
||||
+++ content/test/fake_plugin_service.cc
|
||||
@@ -29,6 +29,7 @@ bool FakePluginService::GetPluginInfo(int render_process_id,
|
||||
@@ -555,7 +555,7 @@ index 6746b9f..8634ada 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/test/fake_plugin_service.h content/test/fake_plugin_service.h
|
||||
index db23a83..57a4c536 100644
|
||||
index db23a83ed079..57a4c536118c 100644
|
||||
--- content/test/fake_plugin_service.h
|
||||
+++ content/test/fake_plugin_service.h
|
||||
@@ -30,6 +30,7 @@ class FakePluginService : public PluginService {
|
||||
@@ -567,7 +567,7 @@ index db23a83..57a4c536 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/test/test_blink_web_unit_test_support.cc content/test/test_blink_web_unit_test_support.cc
|
||||
index 7150daf..69fcc9e 100644
|
||||
index 7150daf1402c..69fcc9e7442b 100644
|
||||
--- content/test/test_blink_web_unit_test_support.cc
|
||||
+++ content/test/test_blink_web_unit_test_support.cc
|
||||
@@ -289,6 +289,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
|
||||
@@ -579,7 +579,7 @@ index 7150daf..69fcc9e 100644
|
||||
blink::WebPluginListBuilder* builder) {
|
||||
builder->AddPlugin("pdf", "pdf", "pdf-files");
|
||||
diff --git content/test/test_blink_web_unit_test_support.h content/test/test_blink_web_unit_test_support.h
|
||||
index 78b7d2c..62a52cb 100644
|
||||
index 78b7d2cf4c02..62a52cbc905f 100644
|
||||
--- content/test/test_blink_web_unit_test_support.h
|
||||
+++ content/test/test_blink_web_unit_test_support.h
|
||||
@@ -68,6 +68,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
|
||||
index 6f03077..c61fed3 100644
|
||||
index 6f030773518c..c61fed3ab2f2 100644
|
||||
--- content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
|
||||
+++ content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
|
||||
@@ -55,7 +55,7 @@ PepperFlashFileMessageFilter::PepperFlashFileMessageFilter(
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
index 4d385dd..1b51f2d 100644
|
||||
index 4d385dd5512b..1b51f2d17491 100644
|
||||
--- build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
+++ build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
@@ -2,6 +2,8 @@
|
||||
@@ -31,7 +31,7 @@ index 4d385dd..1b51f2d 100644
|
||||
cflags = [ "/wd4201" ]
|
||||
}
|
||||
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
|
||||
index e9578be..2561824 100644
|
||||
index e9578be2cd28..2561824f984b 100644
|
||||
--- chrome/common/crash_keys.cc
|
||||
+++ chrome/common/crash_keys.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
@@ -90,7 +90,7 @@ index e9578be..2561824 100644
|
||||
|
||||
void SetActiveExtensions(const std::set<std::string>& extensions) {
|
||||
diff --git chrome/common/crash_keys.h chrome/common/crash_keys.h
|
||||
index 93fb0b0..3e543d2 100644
|
||||
index 93fb0b07ec1e..3e543d211ff3 100644
|
||||
--- chrome/common/crash_keys.h
|
||||
+++ chrome/common/crash_keys.h
|
||||
@@ -22,10 +22,18 @@ class CommandLine;
|
||||
@@ -113,7 +113,7 @@ index 93fb0b0..3e543d2 100644
|
||||
// on the given |command_line|.
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
|
||||
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
|
||||
index c8197e9..21ad726 100644
|
||||
index c8197e919e95..21ad726a223e 100644
|
||||
--- chrome_elf/BUILD.gn
|
||||
+++ chrome_elf/BUILD.gn
|
||||
@@ -7,6 +7,7 @@
|
||||
@@ -169,7 +169,7 @@ index c8197e9..21ad726 100644
|
||||
"//components/crash/content/app:app",
|
||||
"//components/crash/core/common", # crash_keys
|
||||
diff --git chrome_elf/crash/crash_helper.cc chrome_elf/crash/crash_helper.cc
|
||||
index c658fa9..8c4a145 100644
|
||||
index c658fa949b7c..8c4a145d1d9a 100644
|
||||
--- chrome_elf/crash/crash_helper.cc
|
||||
+++ chrome_elf/crash/crash_helper.cc
|
||||
@@ -11,12 +11,17 @@
|
||||
@@ -203,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 0d3de65..a1b8b09 100644
|
||||
index 0d3de65043a0..a1b8b092f23a 100644
|
||||
--- components/crash/content/app/breakpad_linux.cc
|
||||
+++ components/crash/content/app/breakpad_linux.cc
|
||||
@@ -29,6 +29,7 @@
|
||||
@@ -281,7 +281,7 @@ index 0d3de65..a1b8b09 100644
|
||||
void InitNonBrowserCrashReporterForAndroid(const std::string& process_type) {
|
||||
SanitizationInfo sanitization_info;
|
||||
diff --git components/crash/content/app/breakpad_linux.h components/crash/content/app/breakpad_linux.h
|
||||
index 0160f62..b732498 100644
|
||||
index 0160f6284561..b732498f86ab 100644
|
||||
--- components/crash/content/app/breakpad_linux.h
|
||||
+++ components/crash/content/app/breakpad_linux.h
|
||||
@@ -16,6 +16,9 @@ namespace breakpad {
|
||||
@@ -295,7 +295,7 @@ index 0160f62..b732498 100644
|
||||
extern void InitCrashKeysForTesting();
|
||||
|
||||
diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc
|
||||
index 2e9ee28..de53f59 100644
|
||||
index 2e9ee28e1b00..de53f5927143 100644
|
||||
--- components/crash/content/app/crash_reporter_client.cc
|
||||
+++ components/crash/content/app/crash_reporter_client.cc
|
||||
@@ -88,11 +88,12 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
|
||||
@@ -364,7 +364,7 @@ index 2e9ee28..de53f59 100644
|
||||
-
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h
|
||||
index 9f69c19..2abaee00 100644
|
||||
index 9f69c193dda2..2abaee004c47 100644
|
||||
--- components/crash/content/app/crash_reporter_client.h
|
||||
+++ components/crash/content/app/crash_reporter_client.h
|
||||
@@ -8,6 +8,7 @@
|
||||
@@ -390,14 +390,14 @@ index 9f69c19..2abaee00 100644
|
||||
virtual base::FilePath GetReporterLogFilename();
|
||||
|
||||
// Custom crash minidump handler after the minidump is generated.
|
||||
@@ -119,6 +121,7 @@ class CrashReporterClient {
|
||||
@@ -118,6 +120,7 @@ class CrashReporterClient {
|
||||
// WARNING: this handler runs in a compromised context. It may not call into
|
||||
// libc nor allocate memory normally.
|
||||
virtual bool HandleCrashDump(const char* crashdump_filename);
|
||||
#endif
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
// The location where minidump files should be written. Returns true if
|
||||
// |crash_dir| was set. Windows has to use base::string16 because this code
|
||||
@@ -197,6 +200,23 @@ class CrashReporterClient {
|
||||
|
||||
// Returns true if breakpad should run in the given process type.
|
||||
@@ -423,10 +423,10 @@ index 9f69c19..2abaee00 100644
|
||||
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/content/app/crashpad.cc components/crash/content/app/crashpad.cc
|
||||
index ba04da1..aa3f21a 100644
|
||||
index dcec34684352..6272df65bd0d 100644
|
||||
--- components/crash/content/app/crashpad.cc
|
||||
+++ components/crash/content/app/crashpad.cc
|
||||
@@ -143,7 +143,8 @@ void InitializeCrashpadImpl(bool initial_client,
|
||||
@@ -142,7 +142,8 @@ void InitializeCrashpadImpl(bool initial_client,
|
||||
// fallback. Forwarding is turned off for debug-mode builds even for the
|
||||
// browser process, because the system's crash reporter can take a very long
|
||||
// time to chew on symbols.
|
||||
@@ -437,7 +437,7 @@ index ba04da1..aa3f21a 100644
|
||||
crashpad::TriState::kDisabled);
|
||||
}
|
||||
diff --git components/crash/content/app/crashpad_mac.mm components/crash/content/app/crashpad_mac.mm
|
||||
index 485c2b4..3b5f3ea 100644
|
||||
index 3bae07e14c69..b2bee0ee1572 100644
|
||||
--- components/crash/content/app/crashpad_mac.mm
|
||||
+++ components/crash/content/app/crashpad_mac.mm
|
||||
@@ -16,11 +16,14 @@
|
||||
@@ -455,7 +455,7 @@ index 485c2b4..3b5f3ea 100644
|
||||
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
|
||||
#include "third_party/crashpad/crashpad/client/crashpad_client.h"
|
||||
#include "third_party/crashpad/crashpad/client/crashpad_info.h"
|
||||
@@ -42,9 +45,10 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -40,9 +43,10 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
|
||||
if (initial_client) {
|
||||
@autoreleasepool {
|
||||
@@ -469,7 +469,7 @@ index 485c2b4..3b5f3ea 100644
|
||||
|
||||
// Is there a way to recover if this fails?
|
||||
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
||||
@@ -56,16 +60,27 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -54,16 +58,27 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
// crash server won't have symbols for any other build types.
|
||||
std::string url = "https://clients2.google.com/cr/report";
|
||||
#else
|
||||
@@ -502,7 +502,7 @@ index 485c2b4..3b5f3ea 100644
|
||||
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
// Empty means stable.
|
||||
@@ -81,12 +96,16 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -79,12 +94,16 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
process_annotations["channel"] = "";
|
||||
}
|
||||
|
||||
@@ -524,7 +524,7 @@ index 485c2b4..3b5f3ea 100644
|
||||
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
@@ -108,6 +127,12 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -106,6 +125,12 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
"--reset-own-crash-exception-port-to-system-default");
|
||||
}
|
||||
|
||||
@@ -538,7 +538,7 @@ index 485c2b4..3b5f3ea 100644
|
||||
handler_path, database_path, metrics_path, url, process_annotations,
|
||||
arguments, true, false);
|
||||
diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc
|
||||
index 6fdfd83..1d5a2a9 100644
|
||||
index 94a350f4b5a4..09fce540a054 100644
|
||||
--- components/crash/content/app/crashpad_win.cc
|
||||
+++ components/crash/content/app/crashpad_win.cc
|
||||
@@ -33,8 +33,8 @@ void GetPlatformCrashpadAnnotations(
|
||||
@@ -564,7 +564,7 @@ index 6fdfd83..1d5a2a9 100644
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -80,7 +80,7 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
#if defined(GOOGLE_CHROME_BUILD)
|
||||
std::string url = "https://clients2.google.com/cr/report";
|
||||
#else
|
||||
@@ -573,7 +573,7 @@ index 6fdfd83..1d5a2a9 100644
|
||||
#endif
|
||||
|
||||
// Allow the crash server to be overridden for testing. If the variable
|
||||
@@ -102,13 +102,14 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -100,22 +100,26 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client,
|
||||
crashpad::TriState::kEnabled, kIndirectMemoryLimit);
|
||||
}
|
||||
|
||||
@@ -581,19 +581,19 @@ index 6fdfd83..1d5a2a9 100644
|
||||
- // reinvoke it with --type=crashpad-handler. Otherwise, we use the
|
||||
- // standalone crashpad_handler.exe (for tests, etc.).
|
||||
std::vector<std::string> start_arguments;
|
||||
- if (embedded_handler) {
|
||||
- start_arguments.push_back(std::string("--type=") +
|
||||
- switches::kCrashpadHandler);
|
||||
+
|
||||
+ // Always add --type=crashpad-handler because the value is expected by
|
||||
+ // CefExecuteProcess.
|
||||
+ start_arguments.push_back(
|
||||
+ std::string("--type=") + switches::kCrashpadHandler);
|
||||
+
|
||||
if (embedded_handler) {
|
||||
- start_arguments.push_back(std::string("--type=") +
|
||||
- switches::kCrashpadHandler);
|
||||
if (!user_data_dir.empty()) {
|
||||
start_arguments.push_back(std::string("--user-data-dir=") +
|
||||
user_data_dir);
|
||||
@@ -119,9 +120,12 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
+ if (embedded_handler) {
|
||||
// The prefetch argument added here has to be documented in
|
||||
// chrome_switches.cc, below the kPrefetchArgument* constants. A constant
|
||||
// can't be used here because crashpad can't depend on Chrome.
|
||||
start_arguments.push_back("/prefetch:7");
|
||||
} else {
|
||||
base::FilePath exe_dir = exe_file.DirName();
|
||||
@@ -608,7 +608,7 @@ index 6fdfd83..1d5a2a9 100644
|
||||
|
||||
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
|
||||
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
|
||||
index bcf53d5..d4f070b 100644
|
||||
index bcf53d5960e4..d4f070b19cd8 100644
|
||||
--- content/browser/frame_host/debug_urls.cc
|
||||
+++ content/browser/frame_host/debug_urls.cc
|
||||
@@ -139,7 +139,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git third_party/crashpad/crashpad/client/prune_crash_reports.cc third_party/crashpad/crashpad/client/prune_crash_reports.cc
|
||||
index 3aaaeee..d99fcb4 100644
|
||||
index 3aaaeee5d07f..d99fcb418d9e 100644
|
||||
--- third_party/crashpad/crashpad/client/prune_crash_reports.cc
|
||||
+++ third_party/crashpad/crashpad/client/prune_crash_reports.cc
|
||||
@@ -67,13 +67,19 @@ void PruneCrashReportDatabase(CrashReportDatabase* database,
|
||||
@@ -26,7 +26,7 @@ index 3aaaeee..d99fcb4 100644
|
||||
|
||||
static const time_t kSecondsInDay = 60 * 60 * 24;
|
||||
diff --git third_party/crashpad/crashpad/client/prune_crash_reports.h third_party/crashpad/crashpad/client/prune_crash_reports.h
|
||||
index 6dac5f3..34f5ee1 100644
|
||||
index 6dac5f3002b3..34f5ee111d3d 100644
|
||||
--- third_party/crashpad/crashpad/client/prune_crash_reports.h
|
||||
+++ third_party/crashpad/crashpad/client/prune_crash_reports.h
|
||||
@@ -57,7 +57,8 @@ class PruneCondition {
|
||||
@@ -40,7 +40,7 @@ index 6dac5f3..34f5ee1 100644
|
||||
virtual ~PruneCondition() {}
|
||||
|
||||
diff --git third_party/crashpad/crashpad/client/settings.cc third_party/crashpad/crashpad/client/settings.cc
|
||||
index 15d16f2..5e8eadf 100644
|
||||
index 15d16f2e0928..5e8eadfd3ad1 100644
|
||||
--- third_party/crashpad/crashpad/client/settings.cc
|
||||
+++ third_party/crashpad/crashpad/client/settings.cc
|
||||
@@ -38,7 +38,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) {
|
||||
@@ -130,7 +130,7 @@ index 15d16f2..5e8eadf 100644
|
||||
Settings::ScopedLockedFileHandle Settings::MakeScopedLockedFileHandle(
|
||||
FileHandle file,
|
||||
diff --git third_party/crashpad/crashpad/client/settings.h third_party/crashpad/crashpad/client/settings.h
|
||||
index b64f74f..0c3c22e 100644
|
||||
index b64f74fbaf28..0c3c22e215b6 100644
|
||||
--- third_party/crashpad/crashpad/client/settings.h
|
||||
+++ third_party/crashpad/crashpad/client/settings.h
|
||||
@@ -102,6 +102,11 @@ class Settings {
|
||||
@@ -146,7 +146,7 @@ index b64f74f..0c3c22e 100644
|
||||
struct Data;
|
||||
|
||||
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.h third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
|
||||
index c769efe..daec6cd 100644
|
||||
index c769efed5c54..daec6cd17f37 100644
|
||||
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
|
||||
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
|
||||
@@ -89,7 +89,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
|
||||
@@ -177,7 +177,7 @@ index c769efe..daec6cd 100644
|
||||
//! \brief Attempts to upload a crash report.
|
||||
//!
|
||||
diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
index e6d05e2..93e5eb1 100644
|
||||
index e6d05e22b639..93e5eb17f7c5 100644
|
||||
--- third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
+++ third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
@@ -35,8 +35,10 @@
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/font_family_cache.h chrome/browser/font_family_cache.h
|
||||
index 743448d..0a9f350 100644
|
||||
index 743448d8744a..0a9f35025a8b 100644
|
||||
--- chrome/browser/font_family_cache.h
|
||||
+++ chrome/browser/font_family_cache.h
|
||||
@@ -20,6 +20,8 @@ class Profile;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git .gn .gn
|
||||
index c91f911..bd906bc 100644
|
||||
index c91f91148cf0..bd906bc2e851 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -261,6 +261,8 @@ exec_script_whitelist =
|
||||
@@ -12,7 +12,7 @@ index c91f911..bd906bc 100644
|
||||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 9429718..1f8c486 100644
|
||||
index 94297185eddd..1f8c4866a48a 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -154,6 +154,7 @@ group("gn_all") {
|
||||
@@ -24,7 +24,7 @@ index 9429718..1f8c486 100644
|
||||
"//chrome/test:unit_tests",
|
||||
"//components:components_browsertests",
|
||||
diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni
|
||||
index 982fbe8..e757be46 100644
|
||||
index 982fbe8d3f0d..e757be4688f1 100644
|
||||
--- build/config/win/visual_studio_version.gni
|
||||
+++ build/config/win/visual_studio_version.gni
|
||||
@@ -12,9 +12,8 @@ declare_args() {
|
||||
@@ -56,7 +56,7 @@ index 982fbe8..e757be46 100644
|
||||
+ "studio path")
|
||||
}
|
||||
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
|
||||
index e8b0849..0bfc676 100644
|
||||
index e8b08495745c..0bfc67619941 100644
|
||||
--- build/toolchain/win/setup_toolchain.py
|
||||
+++ build/toolchain/win/setup_toolchain.py
|
||||
@@ -132,18 +132,20 @@ def _LoadToolchainEnv(cpu, sdk_dir):
|
||||
@@ -91,7 +91,7 @@ index e8b0849..0bfc676 100644
|
||||
|
||||
|
||||
diff --git build/vs_toolchain.py build/vs_toolchain.py
|
||||
index bb8f96c..6902237 100755
|
||||
index bb8f96c4e52c..690223784382 100755
|
||||
--- build/vs_toolchain.py
|
||||
+++ build/vs_toolchain.py
|
||||
@@ -79,11 +79,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||
@@ -114,7 +114,7 @@ index bb8f96c..6902237 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 1f9a1fc..aa69e8c 100644
|
||||
index 1f9a1fc9a687..aa69e8c98648 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -245,7 +245,7 @@ template("chrome_paks") {
|
||||
@@ -127,7 +127,7 @@ index 1f9a1fc..aa69e8c 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 2afab1a..c8791ea 100644
|
||||
index 2afab1a3c6a3..c8791ea51be2 100644
|
||||
--- chrome/installer/mini_installer/BUILD.gn
|
||||
+++ chrome/installer/mini_installer/BUILD.gn
|
||||
@@ -128,7 +128,7 @@ template("generate_mini_installer") {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids
|
||||
index 25abc65..04e8eab 100644
|
||||
index 25abc655bf84..04e8eab17596 100644
|
||||
--- tools/gritsettings/resource_ids
|
||||
+++ tools/gritsettings/resource_ids
|
||||
@@ -371,4 +371,11 @@
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git ui/base/ime/input_method_win.cc ui/base/ime/input_method_win.cc
|
||||
index e2bb528..3e851e5 100644
|
||||
index e2bb52868157..3e851e5dbe03 100644
|
||||
--- ui/base/ime/input_method_win.cc
|
||||
+++ ui/base/ime/input_method_win.cc
|
||||
@@ -682,8 +682,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
|
||||
|
17
patch/patches/linux_build.patch
Normal file
17
patch/patches/linux_build.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git chrome/browser/ui/libgtkui/gtk_ui.cc chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
index 7df1d0c511c1..3dd32090eb8d 100644
|
||||
--- chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
+++ chrome/browser/ui/libgtkui/gtk_ui.cc
|
||||
@@ -320,8 +320,12 @@ float GetRawDeviceScaleFactor() {
|
||||
return display::Display::GetForcedDeviceScaleFactor();
|
||||
|
||||
GdkScreen* screen = gdk_screen_get_default();
|
||||
+#if GTK_MAJOR_VERSION == 3
|
||||
gint scale = gdk_screen_get_monitor_scale_factor(
|
||||
screen, gdk_screen_get_primary_monitor(screen));
|
||||
+#else
|
||||
+ gint scale = 1;
|
||||
+#endif
|
||||
gdouble resolution = gdk_screen_get_resolution(screen);
|
||||
return resolution <= 0 ? scale : resolution * scale / kDefaultDPI;
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h
|
||||
index fa25e78..cd62826 100644
|
||||
index fa25e78f6d38..cd62826e366d 100644
|
||||
--- base/message_loop/message_loop.h
|
||||
+++ base/message_loop/message_loop.h
|
||||
@@ -288,6 +288,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
|
||||
@@ -33,7 +33,7 @@ index fa25e78..cd62826 100644
|
||||
// if type_ is TYPE_CUSTOM and pump_ is null.
|
||||
MessagePumpFactoryCallback pump_factory_;
|
||||
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
|
||||
index 6f48da1..e427941 100644
|
||||
index 6f48da1c744e..e427941bfd06 100644
|
||||
--- base/message_loop/message_pump_win.cc
|
||||
+++ base/message_loop/message_pump_win.cc
|
||||
@@ -366,20 +366,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git net/base/network_delegate.h net/base/network_delegate.h
|
||||
index eaa1e30..18b486d 100644
|
||||
index eaa1e3061c64..18b486d3e35a 100644
|
||||
--- net/base/network_delegate.h
|
||||
+++ net/base/network_delegate.h
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -22,7 +22,7 @@ index eaa1e30..18b486d 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 050ba28..05684c8 100644
|
||||
index 050ba283f66a..05684c8d67da 100644
|
||||
--- net/url_request/url_request_job.cc
|
||||
+++ net/url_request/url_request_job.cc
|
||||
@@ -499,6 +499,12 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git net/cert/ct_policy_enforcer.cc net/cert/ct_policy_enforcer.cc
|
||||
index 42f631e..b02edb0 100644
|
||||
index 42f631eaa53d..b02edb027b94 100644
|
||||
--- net/cert/ct_policy_enforcer.cc
|
||||
+++ net/cert/ct_policy_enforcer.cc
|
||||
@@ -36,15 +36,6 @@ namespace net {
|
||||
@@ -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 7111970..f751d6c 100644
|
||||
index 7111970e29d6..f751d6c6a923 100644
|
||||
--- net/cert/ct_policy_enforcer.h
|
||||
+++ net/cert/ct_policy_enforcer.h
|
||||
@@ -101,6 +101,17 @@ class NET_EXPORT CTPolicyEnforcer {
|
||||
@@ -55,11 +55,11 @@ index 7111970..f751d6c 100644
|
||||
|
||||
} // namespace net
|
||||
diff --git net/http/transport_security_state.cc net/http/transport_security_state.cc
|
||||
index e838cbe..d2f6f0f 100644
|
||||
index 3971eb387429..fa4df8080e7c 100644
|
||||
--- net/http/transport_security_state.cc
|
||||
+++ net/http/transport_security_state.cc
|
||||
@@ -1537,8 +1537,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
|
||||
sent_expect_ct_reports_cache_.Clear();
|
||||
@@ -1504,8 +1504,10 @@ void TransportSecurityState::SetShouldRequireCTForTesting(bool* required) {
|
||||
g_ct_required_for_testing = *required ? 1 : -1;
|
||||
}
|
||||
|
||||
-// static
|
||||
@@ -72,12 +72,12 @@ index e838cbe..d2f6f0f 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 19ba839..a0b9810 100644
|
||||
index 7ce883a952a2..80b1ae091efe 100644
|
||||
--- net/http/transport_security_state.h
|
||||
+++ net/http/transport_security_state.h
|
||||
@@ -576,6 +576,10 @@ class NET_EXPORT TransportSecurityState
|
||||
// Expect-CT reports.
|
||||
void ClearReportCachesForTesting();
|
||||
@@ -572,6 +572,10 @@ class NET_EXPORT TransportSecurityState
|
||||
// unless a RequireCTDelegate overrides). Set to nullptr to reset.
|
||||
static void SetShouldRequireCTForTesting(bool* required);
|
||||
|
||||
+ void set_enforce_net_security_expiration(bool enforce) {
|
||||
+ enforce_net_security_expiration_ = enforce;
|
||||
@@ -86,7 +86,7 @@ index 19ba839..a0b9810 100644
|
||||
private:
|
||||
friend class TransportSecurityStateTest;
|
||||
friend class TransportSecurityStateStaticFuzzer;
|
||||
@@ -596,7 +600,7 @@ class NET_EXPORT TransportSecurityState
|
||||
@@ -587,7 +591,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 19ba839..a0b9810 100644
|
||||
|
||||
// Helper method for actually checking pins.
|
||||
PKPStatus CheckPublicKeyPinsImpl(
|
||||
@@ -704,6 +708,8 @@ class NET_EXPORT TransportSecurityState
|
||||
@@ -687,6 +691,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,5 +1,5 @@
|
||||
diff --git net/url_request/url_request.h net/url_request/url_request.h
|
||||
index 95a2667..68d7bfb 100644
|
||||
index 95a26676dcae..68d7bfb95914 100644
|
||||
--- net/url_request/url_request.h
|
||||
+++ net/url_request/url_request.h
|
||||
@@ -657,10 +657,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
|
||||
|
@@ -1,136 +0,0 @@
|
||||
diff --git net/base/network_change_notifier_win.cc net/base/network_change_notifier_win.cc
|
||||
index 9b2b35e..1dc2038 100644
|
||||
--- net/base/network_change_notifier_win.cc
|
||||
+++ net/base/network_change_notifier_win.cc
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
+#include "base/task_runner_util.h"
|
||||
#include "base/threading/thread.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/time/time.h"
|
||||
@@ -136,8 +137,6 @@ NetworkChangeNotifierWin::NetworkChangeCalculatorParamsWin() {
|
||||
//
|
||||
NetworkChangeNotifier::ConnectionType
|
||||
NetworkChangeNotifierWin::RecomputeCurrentConnectionType() const {
|
||||
- DCHECK(CalledOnValidThread());
|
||||
-
|
||||
EnsureWinsockInit();
|
||||
|
||||
// The following code was adapted from:
|
||||
@@ -205,6 +204,18 @@ NetworkChangeNotifierWin::RecomputeCurrentConnectionType() const {
|
||||
: NetworkChangeNotifier::CONNECTION_NONE;
|
||||
}
|
||||
|
||||
+void NetworkChangeNotifierWin::RecomputeCurrentConnectionTypeOnDnsThread(
|
||||
+ base::Callback<void(ConnectionType)> reply_callback) const {
|
||||
+ // Unretained is safe in this call because this object owns the thread and the
|
||||
+ // thread is stopped in this object's destructor.
|
||||
+ base::PostTaskAndReplyWithResult(
|
||||
+ dns_config_service_thread_->message_loop()->task_runner().get(),
|
||||
+ FROM_HERE,
|
||||
+ base::Bind(&NetworkChangeNotifierWin::RecomputeCurrentConnectionType,
|
||||
+ base::Unretained(this)),
|
||||
+ reply_callback);
|
||||
+}
|
||||
+
|
||||
NetworkChangeNotifier::ConnectionType
|
||||
NetworkChangeNotifierWin::GetCurrentConnectionType() const {
|
||||
base::AutoLock auto_lock(last_computed_connection_type_lock_);
|
||||
@@ -225,12 +236,13 @@ void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) {
|
||||
// Start watching for the next address change.
|
||||
WatchForAddressChange();
|
||||
|
||||
- NotifyObservers();
|
||||
+ RecomputeCurrentConnectionTypeOnDnsThread(base::Bind(
|
||||
+ &NetworkChangeNotifierWin::NotifyObservers, weak_factory_.GetWeakPtr()));
|
||||
}
|
||||
|
||||
-void NetworkChangeNotifierWin::NotifyObservers() {
|
||||
+void NetworkChangeNotifierWin::NotifyObservers(ConnectionType connection_type) {
|
||||
DCHECK(CalledOnValidThread());
|
||||
- SetCurrentConnectionType(RecomputeCurrentConnectionType());
|
||||
+ SetCurrentConnectionType(connection_type);
|
||||
NotifyObserversOfIPAddressChange();
|
||||
|
||||
// Calling GetConnectionType() at this very moment is likely to give
|
||||
@@ -274,8 +286,11 @@ void NetworkChangeNotifierWin::WatchForAddressChange() {
|
||||
// Treat the transition from NotifyAddrChange failing to succeeding as a
|
||||
// network change event, since network changes were not being observed in
|
||||
// that interval.
|
||||
- if (sequential_failures_ > 0)
|
||||
- NotifyObservers();
|
||||
+ if (sequential_failures_ > 0) {
|
||||
+ RecomputeCurrentConnectionTypeOnDnsThread(
|
||||
+ base::Bind(&NetworkChangeNotifierWin::NotifyObservers,
|
||||
+ weak_factory_.GetWeakPtr()));
|
||||
+ }
|
||||
|
||||
if (sequential_failures_ < 2000) {
|
||||
UMA_HISTOGRAM_COUNTS_10000("Net.NotifyAddrChangeFailures",
|
||||
@@ -305,7 +320,14 @@ bool NetworkChangeNotifierWin::WatchForAddressChangeInternal() {
|
||||
}
|
||||
|
||||
void NetworkChangeNotifierWin::NotifyParentOfConnectionTypeChange() {
|
||||
- SetCurrentConnectionType(RecomputeCurrentConnectionType());
|
||||
+ RecomputeCurrentConnectionTypeOnDnsThread(base::Bind(
|
||||
+ &NetworkChangeNotifierWin::NotifyParentOfConnectionTypeChangeImpl,
|
||||
+ weak_factory_.GetWeakPtr()));
|
||||
+}
|
||||
+
|
||||
+void NetworkChangeNotifierWin::NotifyParentOfConnectionTypeChangeImpl(
|
||||
+ ConnectionType connection_type) {
|
||||
+ SetCurrentConnectionType(connection_type);
|
||||
bool current_offline = IsOffline();
|
||||
offline_polls_++;
|
||||
// If we continue to appear offline, delay sending out the notification in
|
||||
@@ -323,10 +345,10 @@ void NetworkChangeNotifierWin::NotifyParentOfConnectionTypeChange() {
|
||||
|
||||
NotifyObserversOfConnectionTypeChange();
|
||||
double max_bandwidth_mbps = 0.0;
|
||||
- ConnectionType connection_type = CONNECTION_NONE;
|
||||
+ ConnectionType max_connection_type = CONNECTION_NONE;
|
||||
GetCurrentMaxBandwidthAndConnectionType(&max_bandwidth_mbps,
|
||||
- &connection_type);
|
||||
- NotifyObserversOfMaxBandwidthChange(max_bandwidth_mbps, connection_type);
|
||||
+ &max_connection_type);
|
||||
+ NotifyObserversOfMaxBandwidthChange(max_bandwidth_mbps, max_connection_type);
|
||||
}
|
||||
|
||||
} // namespace net
|
||||
diff --git net/base/network_change_notifier_win.h net/base/network_change_notifier_win.h
|
||||
index 94bab7f..6871499 100644
|
||||
--- net/base/network_change_notifier_win.h
|
||||
+++ net/base/network_change_notifier_win.h
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
+#include "base/callback.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
@@ -62,15 +63,21 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierWin
|
||||
// It is not thread safe, see crbug.com/324913.
|
||||
virtual ConnectionType RecomputeCurrentConnectionType() const;
|
||||
|
||||
+ // Calls RecomputeCurrentConnectionTypeImpl on the DNS thread and runs
|
||||
+ // |reply_callback| with the type on the calling thread.
|
||||
+ virtual void RecomputeCurrentConnectionTypeOnDnsThread(
|
||||
+ base::Callback<void(ConnectionType)> reply_callback) const;
|
||||
+
|
||||
void SetCurrentConnectionType(ConnectionType connection_type);
|
||||
|
||||
// Notifies IP address change observers of a change immediately, and notifies
|
||||
// network state change observers on a delay. Must only be called on the
|
||||
// thread |this| was created on.
|
||||
- void NotifyObservers();
|
||||
+ void NotifyObservers(ConnectionType connection_type);
|
||||
|
||||
// Forwards connection type notifications to parent class.
|
||||
void NotifyParentOfConnectionTypeChange();
|
||||
+ void NotifyParentOfConnectionTypeChangeImpl(ConnectionType connection_type);
|
||||
|
||||
// Tries to start listening for a single subsequent address change. Returns
|
||||
// false on failure. The caller is responsible for updating |is_watching_|.
|
@@ -1,5 +1,5 @@
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 5802752..94c247e 100644
|
||||
index 5802752af..94c247e04 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -222,6 +222,10 @@ static_library("pdfium") {
|
||||
@@ -14,7 +14,7 @@ index 5802752..94c247e 100644
|
||||
|
||||
static_library("test_support") {
|
||||
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
|
||||
index f20e8ab..bc34b85 100644
|
||||
index f20e8ab9f..bc34b858d 100644
|
||||
--- fpdfsdk/fpdfview.cpp
|
||||
+++ fpdfsdk/fpdfview.cpp
|
||||
@@ -35,6 +35,7 @@
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h
|
||||
index 5ff2bb0..a1a62f2 100644
|
||||
index e0f025b87b62..b69125110799 100644
|
||||
--- content/public/common/common_param_traits_macros.h
|
||||
+++ content/public/common/common_param_traits_macros.h
|
||||
@@ -205,6 +205,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
@@ -207,6 +207,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,7 +11,7 @@ index 5ff2bb0..a1a62f2 100644
|
||||
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
|
||||
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
|
||||
diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc
|
||||
index 1e00ba5..d829b4f 100644
|
||||
index 1e00ba53c4af..d829b4f8bdc5 100644
|
||||
--- content/public/common/web_preferences.cc
|
||||
+++ content/public/common/web_preferences.cc
|
||||
@@ -171,6 +171,7 @@ WebPreferences::WebPreferences()
|
||||
@@ -23,10 +23,10 @@ index 1e00ba5..d829b4f 100644
|
||||
inert_visual_viewport(false),
|
||||
record_whole_document(false),
|
||||
diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h
|
||||
index 80816ae..46de601 100644
|
||||
index 41f7a69d1d71..d04e476ab383 100644
|
||||
--- content/public/common/web_preferences.h
|
||||
+++ content/public/common/web_preferences.h
|
||||
@@ -190,6 +190,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
@@ -191,6 +191,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
bool spatial_navigation_enabled;
|
||||
bool use_solid_color_scrollbars;
|
||||
bool navigate_on_drag_drop;
|
||||
@@ -35,10 +35,10 @@ index 80816ae..46de601 100644
|
||||
bool inert_visual_viewport;
|
||||
bool record_whole_document;
|
||||
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
|
||||
index de3e891..d703c8e 100644
|
||||
index d9a7e20f21cc..a1e971c14ba5 100644
|
||||
--- content/renderer/render_view_impl.cc
|
||||
+++ content/renderer/render_view_impl.cc
|
||||
@@ -1396,6 +1396,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
|
||||
@@ -1400,6 +1400,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
|
||||
blink::WebView* web_view,
|
||||
CompositorDependencies* compositor_deps) {
|
||||
ApplyWebPreferences(prefs, web_view);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/cocoa/applescript/tab_applescript.mm chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||
index 0cd84f3..2f872dd 100644
|
||||
index 0cd84f38c229..2f872dd3dfe2 100644
|
||||
--- chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||
+++ chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||
@@ -9,7 +9,6 @@
|
||||
@@ -41,7 +41,7 @@ index 0cd84f3..2f872dd 100644
|
||||
|
||||
- (void)handlesSaveScriptCommand:(NSScriptCommand*)command {
|
||||
diff --git chrome/common/chrome_utility_printing_messages.h chrome/common/chrome_utility_printing_messages.h
|
||||
index f5712a7..11c0366 100644
|
||||
index f5712a7a5bb8..11c03661412b 100644
|
||||
--- chrome/common/chrome_utility_printing_messages.h
|
||||
+++ chrome/common/chrome_utility_printing_messages.h
|
||||
@@ -26,7 +26,6 @@
|
||||
@@ -61,7 +61,7 @@ index f5712a7..11c0366 100644
|
||||
IPC_STRUCT_TRAITS_MEMBER(printer_capabilities)
|
||||
IPC_STRUCT_TRAITS_MEMBER(caps_mime_type)
|
||||
diff --git components/printing/common/print_messages.cc components/printing/common/print_messages.cc
|
||||
index de03634..76ee3a7 100644
|
||||
index de036345130c..76ee3a748007 100644
|
||||
--- components/printing/common/print_messages.cc
|
||||
+++ components/printing/common/print_messages.cc
|
||||
@@ -105,7 +105,6 @@ void PrintMsg_PrintPages_Params::Reset() {
|
||||
@@ -78,7 +78,7 @@ index de03634..76ee3a7 100644
|
||||
}
|
||||
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h
|
||||
index 32b0451..9ccb733 100644
|
||||
index 32b0451b60dd..9ccb7332bec6 100644
|
||||
--- components/printing/common/print_messages.h
|
||||
+++ components/printing/common/print_messages.h
|
||||
@@ -74,7 +74,6 @@ struct PrintMsg_PrintPages_Params {
|
||||
@@ -198,7 +198,7 @@ index 32b0451..9ccb733 100644
|
||||
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 3c3c4b1..b07223d 100644
|
||||
index 829b2dc1c65e..df3fc296ae7c 100644
|
||||
--- components/printing/renderer/print_web_view_helper.cc
|
||||
+++ components/printing/renderer/print_web_view_helper.cc
|
||||
@@ -320,7 +320,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
|
||||
@@ -233,7 +233,7 @@ index 3c3c4b1..b07223d 100644
|
||||
|
||||
// Helper function to scale and round an integer value with a double valued
|
||||
// scaling.
|
||||
@@ -916,6 +912,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderFrame* render_frame,
|
||||
@@ -932,6 +928,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderFrame* render_frame,
|
||||
print_for_preview_(false),
|
||||
delegate_(std::move(delegate)),
|
||||
print_node_in_progress_(false),
|
||||
@@ -241,7 +241,7 @@ index 3c3c4b1..b07223d 100644
|
||||
is_loading_(false),
|
||||
is_scripted_preview_delayed_(false),
|
||||
ipc_nesting_level_(0),
|
||||
@@ -978,10 +975,8 @@ void PrintWebViewHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -994,10 +991,8 @@ void PrintWebViewHelper::ScriptedPrint(bool user_initiated) {
|
||||
return;
|
||||
|
||||
if (g_is_preview_enabled) {
|
||||
@@ -252,7 +252,7 @@ index 3c3c4b1..b07223d 100644
|
||||
} else {
|
||||
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
Print(web_frame, blink::WebNode(), true /* is_scripted? */);
|
||||
@@ -1007,14 +1002,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
|
||||
@@ -1023,14 +1018,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)
|
||||
@@ -267,7 +267,7 @@ index 3c3c4b1..b07223d 100644
|
||||
IPC_MESSAGE_HANDLER(PrintMsg_SetPrintingEnabled, OnSetPrintingEnabled)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
IPC_END_MESSAGE_MAP()
|
||||
@@ -1062,7 +1053,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
|
||||
@@ -1078,7 +1069,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
|
||||
@@ -275,7 +275,7 @@ index 3c3c4b1..b07223d 100644
|
||||
void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||
const base::DictionaryValue& job_settings) {
|
||||
CHECK_LE(ipc_nesting_level_, 1);
|
||||
@@ -1122,7 +1112,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||
@@ -1138,7 +1128,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||
DidFinishPrinting(FAIL_PRINT);
|
||||
}
|
||||
}
|
||||
@@ -283,7 +283,7 @@ index 3c3c4b1..b07223d 100644
|
||||
|
||||
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
|
||||
const PageSizeMargins& page_layout_in_points,
|
||||
@@ -1147,7 +1136,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
|
||||
@@ -1163,7 +1152,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
|
||||
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ index 3c3c4b1..b07223d 100644
|
||||
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
@@ -1342,7 +1330,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
|
||||
@@ -1358,7 +1346,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ index 3c3c4b1..b07223d 100644
|
||||
bool PrintWebViewHelper::RenderPreviewPage(
|
||||
int page_number,
|
||||
const PrintMsg_Print_Params& print_params) {
|
||||
@@ -1371,7 +1359,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
|
||||
@@ -1387,7 +1375,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
|
||||
}
|
||||
return PreviewPageRendered(page_number, draft_metafile.get());
|
||||
}
|
||||
@@ -309,7 +309,7 @@ index 3c3c4b1..b07223d 100644
|
||||
|
||||
bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||
DCHECK(!is_print_ready_metafile_sent_);
|
||||
@@ -1401,7 +1389,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||
@@ -1417,7 +1405,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
|
||||
return true;
|
||||
}
|
||||
@@ -317,7 +317,7 @@ index 3c3c4b1..b07223d 100644
|
||||
|
||||
void PrintWebViewHelper::OnPrintingDone(bool success) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
@@ -1416,7 +1403,6 @@ void PrintWebViewHelper::OnSetPrintingEnabled(bool enabled) {
|
||||
@@ -1432,7 +1419,6 @@ void PrintWebViewHelper::OnSetPrintingEnabled(bool enabled) {
|
||||
is_printing_enabled_ = enabled;
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ index 3c3c4b1..b07223d 100644
|
||||
void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
@@ -1427,7 +1413,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
@@ -1443,7 +1429,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
// that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
if (!plugin.IsNull()) {
|
||||
@@ -335,7 +335,7 @@ index 3c3c4b1..b07223d 100644
|
||||
return;
|
||||
}
|
||||
print_preview_context_.InitWithFrame(frame);
|
||||
@@ -1435,7 +1423,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
@@ -1451,7 +1439,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
? PRINT_PREVIEW_USER_INITIATED_SELECTION
|
||||
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
|
||||
}
|
||||
@@ -343,7 +343,7 @@ index 3c3c4b1..b07223d 100644
|
||||
|
||||
bool PrintWebViewHelper::IsPrintingEnabled() const {
|
||||
return is_printing_enabled_;
|
||||
@@ -1457,11 +1444,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1473,11 +1460,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
print_node_in_progress_ = true;
|
||||
|
||||
@@ -356,7 +356,7 @@ index 3c3c4b1..b07223d 100644
|
||||
} else {
|
||||
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
// Make a copy of the node, in case RenderView::OnContextMenuClosed() resets
|
||||
@@ -1550,7 +1535,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
@@ -1566,7 +1551,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -364,7 +364,7 @@ index 3c3c4b1..b07223d 100644
|
||||
case FAIL_PREVIEW:
|
||||
int cookie =
|
||||
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
|
||||
@@ -1562,7 +1546,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
@@ -1578,7 +1562,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
}
|
||||
print_preview_context_.Failed(notify_browser_of_print_failure_);
|
||||
break;
|
||||
@@ -372,7 +372,7 @@ index 3c3c4b1..b07223d 100644
|
||||
}
|
||||
prep_frame_view_.reset();
|
||||
print_pages_params_.reset();
|
||||
@@ -1695,7 +1678,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
@@ -1711,7 +1694,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ index 3c3c4b1..b07223d 100644
|
||||
bool PrintWebViewHelper::SetOptionsFromPdfDocument(
|
||||
PrintHostMsg_SetOptionsFromDocument_Params* options) {
|
||||
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
|
||||
@@ -1802,7 +1784,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
|
||||
@@ -1818,7 +1800,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
|
||||
print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS);
|
||||
return false;
|
||||
}
|
||||
@@ -388,7 +388,7 @@ index 3c3c4b1..b07223d 100644
|
||||
|
||||
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
|
||||
void PrintWebViewHelper::GetPrintSettingsFromUser(
|
||||
@@ -1960,7 +1941,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
@@ -1976,7 +1957,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ index 3c3c4b1..b07223d 100644
|
||||
void PrintWebViewHelper::ShowScriptedPrintPreview() {
|
||||
if (is_scripted_preview_delayed_) {
|
||||
is_scripted_preview_delayed_ = false;
|
||||
@@ -2091,7 +2071,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
|
||||
@@ -2107,7 +2087,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
|
||||
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
|
||||
return true;
|
||||
}
|
||||
@@ -405,7 +405,7 @@ index 3c3c4b1..b07223d 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 c4339d4..433fb26 100644
|
||||
index c4339d474adb..433fb26ae269 100644
|
||||
--- components/printing/renderer/print_web_view_helper.h
|
||||
+++ components/printing/renderer/print_web_view_helper.h
|
||||
@@ -153,9 +153,7 @@ class PrintWebViewHelper
|
||||
@@ -486,7 +486,7 @@ index c4339d4..433fb26 100644
|
||||
bool is_loading_;
|
||||
bool is_scripted_preview_delayed_;
|
||||
diff --git components/printing/renderer/print_web_view_helper_mac.mm components/printing/renderer/print_web_view_helper_mac.mm
|
||||
index a00cfa0..4608dc0 100644
|
||||
index a00cfa0a95f1..4608dc001172 100644
|
||||
--- components/printing/renderer/print_web_view_helper_mac.mm
|
||||
+++ components/printing/renderer/print_web_view_helper_mac.mm
|
||||
@@ -76,7 +76,6 @@ void PrintWebViewHelper::PrintPagesInternal(
|
||||
|
41
patch/patches/printing_context_2196.patch
Normal file
41
patch/patches/printing_context_2196.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
|
||||
index 07850f544b6a..2127e4969ce1 100644
|
||||
--- chrome/browser/printing/print_job_worker.cc
|
||||
+++ chrome/browser/printing/print_job_worker.cc
|
||||
@@ -121,6 +121,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id,
|
||||
printing_context_delegate_ = base::MakeUnique<PrintingContextDelegate>(
|
||||
render_process_id, render_frame_id);
|
||||
printing_context_ = PrintingContext::Create(printing_context_delegate_.get());
|
||||
+ printing_context_->set_render_ids(render_process_id, render_frame_id);
|
||||
}
|
||||
|
||||
PrintJobWorker::~PrintJobWorker() {
|
||||
diff --git printing/printing_context.h printing/printing_context.h
|
||||
index 7054654260a7..ed5b664f86a7 100644
|
||||
--- printing/printing_context.h
|
||||
+++ printing/printing_context.h
|
||||
@@ -127,6 +127,13 @@ class PRINTING_EXPORT PrintingContext {
|
||||
|
||||
int job_id() const { return job_id_; }
|
||||
|
||||
+ void set_render_ids(int render_process_id, int render_frame_id) {
|
||||
+ render_process_id_ = render_process_id;
|
||||
+ render_frame_id_ = render_frame_id;
|
||||
+ }
|
||||
+ int render_process_id() const { return render_process_id_; }
|
||||
+ int render_frame_id() const { return render_frame_id_; }
|
||||
+
|
||||
protected:
|
||||
explicit PrintingContext(Delegate* delegate);
|
||||
|
||||
@@ -151,6 +158,10 @@ class PRINTING_EXPORT PrintingContext {
|
||||
// The job id for the current job. The value is 0 if no jobs are active.
|
||||
int job_id_;
|
||||
|
||||
+ // Routing IDs for the frame that owns this object.
|
||||
+ int render_process_id_ = 0;
|
||||
+ int render_frame_id_ = 0;
|
||||
+
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(PrintingContext);
|
||||
};
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/renderer_host/render_view_host_impl.h content/browser/renderer_host/render_view_host_impl.h
|
||||
index c36ebdd..48aa3571 100644
|
||||
index c36ebdd04698..48aa3571b85f 100644
|
||||
--- content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -154,6 +154,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git ui/latency/latency_histogram_macros.h ui/latency/latency_histogram_macros.h
|
||||
index 77e3eee..f8dd635 100644
|
||||
index 77e3eeef70ba..f8dd6350c120 100644
|
||||
--- ui/latency/latency_histogram_macros.h
|
||||
+++ ui/latency/latency_histogram_macros.h
|
||||
@@ -10,8 +10,7 @@
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc
|
||||
index 7296a04..c702d31 100644
|
||||
index 7296a04a56cc..c702d3178eb6 100644
|
||||
--- chrome/browser/renderer_preferences_util.cc
|
||||
+++ chrome/browser/renderer_preferences_util.cc
|
||||
@@ -32,7 +32,8 @@
|
||||
|
@@ -1,8 +1,22 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index e327836..17f65e1 100644
|
||||
index e32783644331..716c73e3b971 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -747,8 +747,10 @@ void RenderWidgetHostViewAura::UpdateBackgroundColorFromRenderer(
|
||||
@@ -419,13 +419,6 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host,
|
||||
selection_controller_client_.reset(
|
||||
new TouchSelectionControllerClientAura(this));
|
||||
CreateSelectionController();
|
||||
-
|
||||
- RenderViewHost* rvh = RenderViewHost::From(host_);
|
||||
- if (rvh) {
|
||||
- // TODO(mostynb): actually use prefs. Landing this as a separate CL
|
||||
- // first to rebaseline some unreliable layout tests.
|
||||
- ignore_result(rvh->GetWebkitPreferences());
|
||||
- }
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -747,8 +740,10 @@ void RenderWidgetHostViewAura::UpdateBackgroundColorFromRenderer(
|
||||
background_color_ = color;
|
||||
|
||||
bool opaque = SkColorGetA(color) == SK_AlphaOPAQUE;
|
||||
@@ -15,3 +29,19 @@ index e327836..17f65e1 100644
|
||||
}
|
||||
|
||||
bool RenderWidgetHostViewAura::IsMouseLocked() {
|
||||
@@ -1924,6 +1919,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
window_->Init(ui::LAYER_SOLID_COLOR);
|
||||
window_->layer()->SetColor(background_color_);
|
||||
|
||||
+ // Do this after |window_| is created to avoid crashes on Win10.
|
||||
+ // See https://crbug.com/761389.
|
||||
+ RenderViewHost* rvh = RenderViewHost::From(host_);
|
||||
+ if (rvh) {
|
||||
+ // TODO(mostynb): actually use prefs. Landing this as a separate CL
|
||||
+ // first to rebaseline some unreliable layout tests.
|
||||
+ ignore_result(rvh->GetWebkitPreferences());
|
||||
+ }
|
||||
+
|
||||
if (!IsMus())
|
||||
return;
|
||||
|
||||
|
14
patch/patches/sandbox_2220.patch
Normal file
14
patch/patches/sandbox_2220.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git base/allocator/BUILD.gn base/allocator/BUILD.gn
|
||||
index 6ebbc1163e5c..b66706466572 100644
|
||||
--- base/allocator/BUILD.gn
|
||||
+++ base/allocator/BUILD.gn
|
||||
@@ -15,8 +15,7 @@ declare_args() {
|
||||
|
||||
# The Windows-only allocator shim is only enabled for Release static builds, and
|
||||
# is mutually exclusive with the generalized shim.
|
||||
-win_use_allocator_shim = is_win && !is_component_build && !is_debug &&
|
||||
- !use_allocator_shim && !is_asan
|
||||
+win_use_allocator_shim = false
|
||||
|
||||
# This "allocator" meta-target will forward to the default allocator according
|
||||
# to the build settings.
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/spellchecker/spellcheck_factory.cc chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
index 9d94c21..990046f 100644
|
||||
index 9d94c21c4201..990046f0a8bf 100644
|
||||
--- chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
+++ chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
@@ -17,6 +17,13 @@
|
||||
@@ -26,7 +26,7 @@ index 9d94c21..990046f 100644
|
||||
|
||||
SpellcheckServiceFactory::SpellcheckServiceFactory()
|
||||
diff --git chrome/browser/spellchecker/spellcheck_factory.h chrome/browser/spellchecker/spellcheck_factory.h
|
||||
index e8eb9f7..2e1b7cf 100644
|
||||
index e8eb9f7e8aa6..2e1b7cf84081 100644
|
||||
--- chrome/browser/spellchecker/spellcheck_factory.h
|
||||
+++ chrome/browser/spellchecker/spellcheck_factory.h
|
||||
@@ -7,7 +7,7 @@
|
||||
@@ -48,7 +48,7 @@ index e8eb9f7..2e1b7cf 100644
|
||||
SpellcheckServiceFactory();
|
||||
~SpellcheckServiceFactory() override;
|
||||
diff --git chrome/browser/supervised_user/supervised_user_settings_service_factory.cc chrome/browser/supervised_user/supervised_user_settings_service_factory.cc
|
||||
index 173ac31..473e561 100644
|
||||
index 173ac3132161..473e56161cca 100644
|
||||
--- chrome/browser/supervised_user/supervised_user_settings_service_factory.cc
|
||||
+++ chrome/browser/supervised_user/supervised_user_settings_service_factory.cc
|
||||
@@ -9,6 +9,13 @@
|
||||
@@ -75,7 +75,7 @@ index 173ac31..473e561 100644
|
||||
|
||||
SupervisedUserSettingsServiceFactory::SupervisedUserSettingsServiceFactory()
|
||||
diff --git chrome/browser/supervised_user/supervised_user_settings_service_factory.h chrome/browser/supervised_user/supervised_user_settings_service_factory.h
|
||||
index 2907619..f941fba 100644
|
||||
index 2907619549ba..f941fba363b5 100644
|
||||
--- chrome/browser/supervised_user/supervised_user_settings_service_factory.h
|
||||
+++ chrome/browser/supervised_user/supervised_user_settings_service_factory.h
|
||||
@@ -5,7 +5,7 @@
|
||||
@@ -97,7 +97,7 @@ index 2907619..f941fba 100644
|
||||
|
||||
SupervisedUserSettingsServiceFactory();
|
||||
diff --git chrome/browser/ui/prefs/prefs_tab_helper.cc chrome/browser/ui/prefs/prefs_tab_helper.cc
|
||||
index 175e4db..e5361c5 100644
|
||||
index 175e4db36ae2..e5361c596b17 100644
|
||||
--- chrome/browser/ui/prefs/prefs_tab_helper.cc
|
||||
+++ chrome/browser/ui/prefs/prefs_tab_helper.cc
|
||||
@@ -11,8 +11,8 @@
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git services/service_manager/embedder/main.cc services/service_manager/embedder/main.cc
|
||||
index e661492..8a282fd 100644
|
||||
index 8667ae76348b..8418e52b710f 100644
|
||||
--- services/service_manager/embedder/main.cc
|
||||
+++ services/service_manager/embedder/main.cc
|
||||
@@ -325,13 +325,30 @@ int RunService(MainDelegate* delegate) {
|
||||
@@ -95,7 +95,7 @@ index e661492..8a282fd 100644
|
||||
if (tracker) {
|
||||
if (exit_code == 0) {
|
||||
tracker->SetProcessPhaseIfEnabled(
|
||||
@@ -481,14 +494,39 @@ int Main(const MainParams& params) {
|
||||
@@ -481,13 +494,38 @@ int Main(const MainParams& params) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,6 @@ index e661492..8a282fd 100644
|
||||
delegate->ShutDownEmbedderProcess();
|
||||
+}
|
||||
|
||||
- return exit_code;
|
||||
+int Main(MainParams& params) {
|
||||
+#if defined(OS_MACOSX)
|
||||
+ // We need this pool for all the objects created before we get to the event
|
||||
@@ -133,12 +132,11 @@ index e661492..8a282fd 100644
|
||||
+ return exit_code;
|
||||
+ exit_code = MainRun(params);
|
||||
+ MainShutdown(params);
|
||||
+ return exit_code;
|
||||
return exit_code;
|
||||
}
|
||||
|
||||
} // namespace service_manager
|
||||
diff --git services/service_manager/embedder/main.h services/service_manager/embedder/main.h
|
||||
index e86697a..771acd8 100644
|
||||
index e86697a26d0f..771acd80a3e1 100644
|
||||
--- services/service_manager/embedder/main.h
|
||||
+++ services/service_manager/embedder/main.h
|
||||
@@ -5,9 +5,15 @@
|
||||
@@ -180,7 +178,7 @@ index e86697a..771acd8 100644
|
||||
} // namespace service_manager
|
||||
|
||||
diff --git services/service_manager/embedder/set_process_title.cc services/service_manager/embedder/set_process_title.cc
|
||||
index 80b9a0a..5162354 100644
|
||||
index 80b9a0ab2ffc..5162354006b0 100644
|
||||
--- services/service_manager/embedder/set_process_title.cc
|
||||
+++ services/service_manager/embedder/set_process_title.cc
|
||||
@@ -44,7 +44,7 @@ void SetProcessTitleFromCommandLine(const char** main_argv) {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc
|
||||
index e9ad038..2a10c80 100644
|
||||
index e9ad038d9f8f..2a10c80a2f03 100644
|
||||
--- content/browser/appcache/appcache_internals_ui.cc
|
||||
+++ content/browser/appcache/appcache_internals_ui.cc
|
||||
@@ -369,8 +369,8 @@ void AppCacheInternalsUI::CreateProxyForPartition(
|
||||
@@ -14,7 +14,7 @@ index e9ad038..2a10c80 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc
|
||||
index 92a2e89..e4cacfe 100644
|
||||
index 92a2e8941c0f..e4cacfed1952 100644
|
||||
--- content/browser/blob_storage/chrome_blob_storage_context.cc
|
||||
+++ content/browser/blob_storage/chrome_blob_storage_context.cc
|
||||
@@ -76,6 +76,11 @@ class BlobHandleImpl : public BlobHandle {
|
||||
@@ -30,7 +30,7 @@ index 92a2e89..e4cacfe 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 ad4a2a2..7c4212c 100644
|
||||
index ad4a2a2c58a5..7c4212c63b69 100644
|
||||
--- content/browser/blob_storage/chrome_blob_storage_context.h
|
||||
+++ content/browser/blob_storage/chrome_blob_storage_context.h
|
||||
@@ -45,6 +45,7 @@ class CONTENT_EXPORT ChromeBlobStorageContext
|
||||
@@ -42,7 +42,7 @@ index ad4a2a2..7c4212c 100644
|
||||
BrowserContext* browser_context);
|
||||
|
||||
diff --git content/browser/bluetooth/web_bluetooth_service_impl.cc content/browser/bluetooth/web_bluetooth_service_impl.cc
|
||||
index 36d4ea7..f696c5b 100644
|
||||
index 36d4ea7d63ac..f696c5be0d8f 100644
|
||||
--- content/browser/bluetooth/web_bluetooth_service_impl.cc
|
||||
+++ content/browser/bluetooth/web_bluetooth_service_impl.cc
|
||||
@@ -1194,9 +1194,9 @@ url::Origin WebBluetoothServiceImpl::GetOrigin() {
|
||||
@@ -58,7 +58,7 @@ index 36d4ea7..f696c5b 100644
|
||||
partition->GetBluetoothAllowedDevicesMap();
|
||||
return allowed_devices_map->GetOrCreateAllowedDevices(GetOrigin());
|
||||
diff --git content/browser/browser_context.cc content/browser/browser_context.cc
|
||||
index 0f23bbe..b21982f 100644
|
||||
index 0f23bbece4ea..b21982f717b5 100644
|
||||
--- content/browser/browser_context.cc
|
||||
+++ content/browser/browser_context.cc
|
||||
@@ -125,7 +125,14 @@ StoragePartition* GetStoragePartitionFromConfig(
|
||||
@@ -90,7 +90,7 @@ index 0f23bbe..b21982f 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 242d33e..4dfb463 100644
|
||||
index 31abe59123ef..849745cd5403 100644
|
||||
--- content/browser/devtools/protocol/service_worker_handler.cc
|
||||
+++ content/browser/devtools/protocol/service_worker_handler.cc
|
||||
@@ -321,10 +321,9 @@ Response ServiceWorkerHandler::DispatchSyncEvent(
|
||||
@@ -107,7 +107,7 @@ index 242d33e..4dfb463 100644
|
||||
|
||||
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
|
||||
diff --git content/browser/loader/navigation_url_loader_network_service.cc content/browser/loader/navigation_url_loader_network_service.cc
|
||||
index f32156a..c2373f8 100644
|
||||
index f32156a4074b..c2373f84c2c2 100644
|
||||
--- content/browser/loader/navigation_url_loader_network_service.cc
|
||||
+++ content/browser/loader/navigation_url_loader_network_service.cc
|
||||
@@ -196,8 +196,8 @@ NavigationURLLoaderNetworkService::NavigationURLLoaderNetworkService(
|
||||
@@ -122,7 +122,7 @@ index f32156a..c2373f8 100644
|
||||
request_info_->frame_tree_node_id),
|
||||
base::Passed(std::move(loader_associated_request)),
|
||||
diff --git content/browser/payments/payment_app_provider_impl.cc content/browser/payments/payment_app_provider_impl.cc
|
||||
index 73f3cba..55d488b 100644
|
||||
index 73f3cbac6682..55d488b0f3aa 100644
|
||||
--- content/browser/payments/payment_app_provider_impl.cc
|
||||
+++ content/browser/payments/payment_app_provider_impl.cc
|
||||
@@ -153,8 +153,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps(
|
||||
@@ -152,10 +152,10 @@ index 73f3cba..55d488b 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 ec0d400..49261d1 100644
|
||||
index 7db804cc0fc2..4ce5bcf80f74 100644
|
||||
--- content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -482,7 +482,7 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
|
||||
@@ -483,7 +483,7 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
|
||||
// own non-shared process.
|
||||
if (partition != default_partition || is_for_guests_only) {
|
||||
RenderProcessHostImpl* host = new RenderProcessHostImpl(
|
||||
@@ -164,7 +164,7 @@ index ec0d400..49261d1 100644
|
||||
is_for_guests_only);
|
||||
host->SetIsNeverSuitableForReuse();
|
||||
return host;
|
||||
@@ -494,7 +494,7 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
|
||||
@@ -495,7 +495,7 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data,
|
||||
return host_;
|
||||
|
||||
host_ = new RenderProcessHostImpl(
|
||||
@@ -173,7 +173,7 @@ index ec0d400..49261d1 100644
|
||||
false /* for guests only */);
|
||||
host_->SetIsNeverSuitableForReuse();
|
||||
host_->AddObserver(this);
|
||||
@@ -907,7 +907,7 @@ void RenderProcessHost::SetMaxRendererProcessCount(size_t count) {
|
||||
@@ -915,7 +915,7 @@ void RenderProcessHost::SetMaxRendererProcessCount(size_t count) {
|
||||
|
||||
RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
BrowserContext* browser_context,
|
||||
@@ -182,7 +182,7 @@ index ec0d400..49261d1 100644
|
||||
bool is_for_guests_only)
|
||||
: fast_shutdown_started_(false),
|
||||
deleting_soon_(false),
|
||||
@@ -939,7 +939,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
@@ -947,7 +947,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
indexed_db_factory_(new IndexedDBDispatcherHost(
|
||||
id_,
|
||||
storage_partition_impl_->GetURLRequestContext(),
|
||||
@@ -192,7 +192,7 @@ index ec0d400..49261d1 100644
|
||||
ChromeBlobStorageContext::GetFor(browser_context_))),
|
||||
channel_connected_(false),
|
||||
sent_render_process_ready_(false),
|
||||
@@ -970,7 +971,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
@@ -980,7 +981,8 @@ RenderProcessHostImpl::RenderProcessHostImpl(
|
||||
}
|
||||
|
||||
push_messaging_manager_.reset(new PushMessagingManager(
|
||||
@@ -202,7 +202,7 @@ index ec0d400..49261d1 100644
|
||||
|
||||
AddObserver(indexed_db_factory_.get());
|
||||
#if defined(OS_MACOSX)
|
||||
@@ -1176,7 +1178,7 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1186,7 +1188,7 @@ bool RenderProcessHostImpl::Init() {
|
||||
}
|
||||
|
||||
void RenderProcessHostImpl::EnableSendQueue() {
|
||||
@@ -211,7 +211,7 @@ index ec0d400..49261d1 100644
|
||||
InitializeChannelProxy();
|
||||
}
|
||||
|
||||
@@ -1273,6 +1275,22 @@ void RenderProcessHostImpl::ResetChannelProxy() {
|
||||
@@ -1283,6 +1285,22 @@ void RenderProcessHostImpl::ResetChannelProxy() {
|
||||
|
||||
void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
@@ -234,7 +234,7 @@ index ec0d400..49261d1 100644
|
||||
AddFilter(new ResourceSchedulerFilter(GetID()));
|
||||
MediaInternals* media_internals = MediaInternals::GetInstance();
|
||||
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
|
||||
@@ -1287,8 +1305,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1297,8 +1315,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
new RenderMessageFilter(
|
||||
GetID(), GetBrowserContext(), request_context.get(),
|
||||
widget_helper_.get(), media_internals,
|
||||
@@ -245,7 +245,7 @@ index ec0d400..49261d1 100644
|
||||
AddFilter(render_message_filter.get());
|
||||
|
||||
render_frame_message_filter_ = new RenderFrameMessageFilter(
|
||||
@@ -1317,10 +1335,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1327,10 +1345,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
ChromeBlobStorageContext::GetFor(browser_context);
|
||||
|
||||
resource_message_filter_ = new ResourceMessageFilter(
|
||||
@@ -258,7 +258,7 @@ index ec0d400..49261d1 100644
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
|
||||
|
||||
AddFilter(resource_message_filter_.get());
|
||||
@@ -1344,10 +1362,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1354,10 +1372,10 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
AddFilter(
|
||||
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service()));
|
||||
AddFilter(new AppCacheDispatcherHost(
|
||||
@@ -271,7 +271,7 @@ index ec0d400..49261d1 100644
|
||||
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
peer_connection_tracker_host_ = new PeerConnectionTrackerHost(
|
||||
@@ -1386,13 +1404,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1396,13 +1414,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
|
||||
scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter =
|
||||
new CacheStorageDispatcherHost();
|
||||
@@ -287,7 +287,7 @@ index ec0d400..49261d1 100644
|
||||
AddFilter(service_worker_filter.get());
|
||||
|
||||
AddFilter(new SharedWorkerMessageFilter(
|
||||
@@ -1400,12 +1417,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1410,12 +1427,12 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
WorkerStoragePartition(
|
||||
storage_partition_impl_->GetURLRequestContext(),
|
||||
storage_partition_impl_->GetMediaURLRequestContext(),
|
||||
@@ -303,7 +303,7 @@ index ec0d400..49261d1 100644
|
||||
base::Bind(&RenderWidgetHelper::GetNextRoutingID,
|
||||
base::Unretained(widget_helper_.get()))));
|
||||
|
||||
@@ -1421,11 +1438,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1431,11 +1448,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
GetID(), storage_partition_impl_->GetQuotaManager(),
|
||||
GetContentClient()->browser()->CreateQuotaPermissionContext()));
|
||||
|
||||
@@ -316,7 +316,7 @@ index ec0d400..49261d1 100644
|
||||
resource_context, service_worker_context, browser_context);
|
||||
AddFilter(notification_message_filter_.get());
|
||||
|
||||
@@ -1441,6 +1455,11 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
@@ -1451,6 +1465,11 @@ void RenderProcessHostImpl::CreateMessageFilters() {
|
||||
void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
auto registry = base::MakeUnique<service_manager::BinderRegistry>();
|
||||
|
||||
@@ -328,7 +328,7 @@ index ec0d400..49261d1 100644
|
||||
channel_->AddAssociatedInterfaceForIOThread(
|
||||
base::Bind(&IndexedDBDispatcherHost::AddBinding,
|
||||
base::Unretained(indexed_db_factory_.get())));
|
||||
@@ -1488,8 +1507,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
@@ -1503,8 +1522,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
||||
AddUIThreadInterface(
|
||||
registry.get(),
|
||||
base::Bind(&PlatformNotificationContextImpl::CreateService,
|
||||
@@ -338,7 +338,7 @@ index ec0d400..49261d1 100644
|
||||
GetID()));
|
||||
AddUIThreadInterface(
|
||||
registry.get(),
|
||||
@@ -1725,6 +1743,7 @@ void RenderProcessHostImpl::ForceReleaseWorkerRefCounts() {
|
||||
@@ -1746,6 +1764,7 @@ void RenderProcessHostImpl::ForceReleaseWorkerRefCounts() {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
DCHECK(!is_worker_ref_count_disabled_);
|
||||
is_worker_ref_count_disabled_ = true;
|
||||
@@ -346,7 +346,7 @@ index ec0d400..49261d1 100644
|
||||
if (!GetWorkerRefCount())
|
||||
return;
|
||||
service_worker_ref_count_ = 0;
|
||||
@@ -3064,8 +3083,8 @@ RenderProcessHost* RenderProcessHostImpl::GetProcessHostForSiteInstance(
|
||||
@@ -3088,8 +3107,8 @@ RenderProcessHost* RenderProcessHostImpl::GetProcessHostForSiteInstance(
|
||||
g_render_process_host_factory_->CreateRenderProcessHost(
|
||||
browser_context, site_instance);
|
||||
} else {
|
||||
@@ -358,10 +358,10 @@ index ec0d400..49261d1 100644
|
||||
browser_context, partition, is_for_guests_only);
|
||||
}
|
||||
diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h
|
||||
index 8d5033e..45b8a7c 100644
|
||||
index 861012ff196a..5221a19d70da 100644
|
||||
--- content/browser/renderer_host/render_process_host_impl.h
|
||||
+++ content/browser/renderer_host/render_process_host_impl.h
|
||||
@@ -80,7 +80,6 @@ class RenderWidgetHostImpl;
|
||||
@@ -81,7 +81,6 @@ class RenderWidgetHostImpl;
|
||||
class ResourceMessageFilter;
|
||||
class SiteInstanceImpl;
|
||||
class StoragePartition;
|
||||
@@ -369,7 +369,7 @@ index 8d5033e..45b8a7c 100644
|
||||
|
||||
typedef base::Thread* (*RendererMainThreadFactoryFunction)(
|
||||
const InProcessChildThreadParams& params);
|
||||
@@ -112,7 +111,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
@@ -113,7 +112,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider) {
|
||||
public:
|
||||
RenderProcessHostImpl(BrowserContext* browser_context,
|
||||
@@ -378,7 +378,7 @@ index 8d5033e..45b8a7c 100644
|
||||
bool is_for_guests_only);
|
||||
~RenderProcessHostImpl() override;
|
||||
|
||||
@@ -581,10 +580,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
@@ -588,10 +587,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
||||
// called.
|
||||
int instance_id_ = 1;
|
||||
|
||||
@@ -392,7 +392,7 @@ index 8d5033e..45b8a7c 100644
|
||||
// The observers watching our lifetime.
|
||||
base::ObserverList<RenderProcessHostObserver> observers_;
|
||||
diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h
|
||||
index 58a6de1..4835648 100644
|
||||
index 58a6de1bd4f7..48356486831e 100644
|
||||
--- content/browser/storage_partition_impl.h
|
||||
+++ content/browser/storage_partition_impl.h
|
||||
@@ -110,12 +110,11 @@ class CONTENT_EXPORT StoragePartitionImpl
|
||||
@@ -440,7 +440,7 @@ index 58a6de1..4835648 100644
|
||||
struct DataDeletionHelper;
|
||||
struct QuotaManagedDataDeletionHelper;
|
||||
diff --git content/browser/streams/stream_context.cc content/browser/streams/stream_context.cc
|
||||
index 22e3c06..883114d 100644
|
||||
index 22e3c0620c74..883114d11e42 100644
|
||||
--- content/browser/streams/stream_context.cc
|
||||
+++ content/browser/streams/stream_context.cc
|
||||
@@ -22,6 +22,11 @@ namespace content {
|
||||
@@ -456,7 +456,7 @@ index 22e3c06..883114d 100644
|
||||
if (!context->GetUserData(kStreamContextKeyName)) {
|
||||
scoped_refptr<StreamContext> stream = new StreamContext();
|
||||
diff --git content/browser/streams/stream_context.h content/browser/streams/stream_context.h
|
||||
index 075ae3e..57fb5fd 100644
|
||||
index 075ae3e7431e..57fb5fd2c4a8 100644
|
||||
--- content/browser/streams/stream_context.h
|
||||
+++ content/browser/streams/stream_context.h
|
||||
@@ -29,6 +29,7 @@ class StreamContext
|
||||
@@ -468,7 +468,7 @@ index 075ae3e..57fb5fd 100644
|
||||
|
||||
void InitializeOnIOThread();
|
||||
diff --git content/browser/webui/web_ui_url_loader_factory.cc content/browser/webui/web_ui_url_loader_factory.cc
|
||||
index e85627c..3f55353 100644
|
||||
index e85627cb907a..3f55353b2f9b 100644
|
||||
--- content/browser/webui/web_ui_url_loader_factory.cc
|
||||
+++ content/browser/webui/web_ui_url_loader_factory.cc
|
||||
@@ -18,7 +18,6 @@
|
||||
@@ -508,7 +508,7 @@ index e85627c..3f55353 100644
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(WebUIURLLoaderFactory);
|
||||
diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h
|
||||
index 7a895f2..687da7c 100644
|
||||
index 7a895f23a7d3..687da7ce0aba 100644
|
||||
--- content/public/browser/browser_context.h
|
||||
+++ content/public/browser/browser_context.h
|
||||
@@ -185,6 +185,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
|
||||
@@ -536,7 +536,7 @@ index 7a895f2..687da7c 100644
|
||||
|
||||
// Registers per-browser-context services to be loaded in the browser process
|
||||
diff --git content/public/browser/storage_partition.h content/public/browser/storage_partition.h
|
||||
index 60e5c7d..14f50b3 100644
|
||||
index 60e5c7dc3574..14f50b3475fa 100644
|
||||
--- content/public/browser/storage_partition.h
|
||||
+++ content/public/browser/storage_partition.h
|
||||
@@ -13,6 +13,7 @@
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git base/supports_user_data.h base/supports_user_data.h
|
||||
index 56522e2..b945297 100644
|
||||
index 56522e263932..b9452972674d 100644
|
||||
--- base/supports_user_data.h
|
||||
+++ base/supports_user_data.h
|
||||
@@ -37,9 +37,9 @@ class BASE_EXPORT SupportsUserData {
|
||||
|
26
patch/patches/swiftshader_729532.patch
Normal file
26
patch/patches/swiftshader_729532.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 694942a7..52a78e89 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -12,6 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
+import("//build/config/compiler/compiler.gni")
|
||||
+
|
||||
config("swiftshader_config") {
|
||||
defines = [ "STRICT_CONFORMANCE" ] # Disables OpenGL ES 3.0
|
||||
|
||||
@@ -87,6 +89,12 @@ config("swiftshader_config") {
|
||||
"-Wl,--hash-style=both",
|
||||
"-Wl,--gc-sections",
|
||||
]
|
||||
+ # A bug in the gold linker prevents using ICF on 32-bit (crbug.com/729532)
|
||||
+ if (use_gold && target_cpu == "x86") {
|
||||
+ ldflags += [
|
||||
+ "-Wl,--icf=none",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
diff --git ui/base/dragdrop/os_exchange_data_provider_aurax11.cc ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
|
||||
index 2e4b975..d0cb122 100644
|
||||
index 2e4b975ec3d5..d0cb122970b6 100644
|
||||
--- ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
|
||||
+++ ui/base/dragdrop/os_exchange_data_provider_aurax11.cc
|
||||
@@ -162,7 +162,8 @@ void OSExchangeDataProviderAuraX11::SetURL(const GURL& url,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git ui/base/cocoa/underlay_opengl_hosting_window.h ui/base/cocoa/underlay_opengl_hosting_window.h
|
||||
index d673c31..806d134 100644
|
||||
index d673c31a0f31..806d1341567b 100644
|
||||
--- ui/base/cocoa/underlay_opengl_hosting_window.h
|
||||
+++ ui/base/cocoa/underlay_opengl_hosting_window.h
|
||||
@@ -12,7 +12,7 @@
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h
|
||||
index 0755f27..0322b8c 100644
|
||||
index 0755f2752f1d..0322b8c638e7 100644
|
||||
--- ui/base/models/menu_model.h
|
||||
+++ ui/base/models/menu_model.h
|
||||
@@ -15,6 +15,7 @@
|
||||
@@ -39,7 +39,7 @@ index 0755f27..0322b8c 100644
|
||||
virtual void MenuWillShow() {}
|
||||
|
||||
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
|
||||
index 97b6c8f..84b9387 100644
|
||||
index 97b6c8fb82f3..84b93871c95d 100644
|
||||
--- ui/gfx/render_text.cc
|
||||
+++ ui/gfx/render_text.cc
|
||||
@@ -567,6 +567,14 @@ void RenderText::SetElideBehavior(ElideBehavior elide_behavior) {
|
||||
@@ -78,7 +78,7 @@ index 97b6c8f..84b9387 100644
|
||||
}
|
||||
|
||||
diff --git ui/gfx/render_text.h ui/gfx/render_text.h
|
||||
index 00fe00c..bc4fd59 100644
|
||||
index 00fe00c8e734..bc4fd59abcf4 100644
|
||||
--- ui/gfx/render_text.h
|
||||
+++ ui/gfx/render_text.h
|
||||
@@ -312,6 +312,10 @@ class GFX_EXPORT RenderText {
|
||||
@@ -102,7 +102,7 @@ index 00fe00c..bc4fd59 100644
|
||||
};
|
||||
|
||||
diff --git ui/views/animation/ink_drop_host_view.h ui/views/animation/ink_drop_host_view.h
|
||||
index 68e5b60..3861921 100644
|
||||
index 68e5b60b90ed..386192193f4f 100644
|
||||
--- ui/views/animation/ink_drop_host_view.h
|
||||
+++ ui/views/animation/ink_drop_host_view.h
|
||||
@@ -130,6 +130,8 @@ class VIEWS_EXPORT InkDropHostView : public View, public InkDropHost {
|
||||
@@ -115,10 +115,10 @@ index 68e5b60..3861921 100644
|
||||
class InkDropGestureHandler;
|
||||
friend class InkDropGestureHandler;
|
||||
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
|
||||
index aa8dae7..05c89b3 100644
|
||||
index f049ca8a057d..631fd1638704 100644
|
||||
--- ui/views/controls/button/label_button.cc
|
||||
+++ ui/views/controls/button/label_button.cc
|
||||
@@ -192,6 +192,7 @@ gfx::Size LabelButton::GetPreferredSize() const {
|
||||
@@ -192,6 +192,7 @@ gfx::Size LabelButton::CalculatePreferredSize() const {
|
||||
Label label(GetText(), {label_->font_list()});
|
||||
label.SetLineHeight(label_->line_height());
|
||||
label.SetShadows(label_->shadows());
|
||||
@@ -126,12 +126,13 @@ index aa8dae7..05c89b3 100644
|
||||
|
||||
if (style_ == STYLE_BUTTON && PlatformStyle::kDefaultLabelButtonHasBoldFont) {
|
||||
// Some text appears wider when rendered normally than when rendered bold.
|
||||
@@ -404,6 +405,11 @@ std::unique_ptr<views::InkDropHighlight> LabelButton::CreateInkDropHighlight()
|
||||
@@ -404,6 +405,12 @@ std::unique_ptr<views::InkDropHighlight> LabelButton::CreateInkDropHighlight()
|
||||
gfx::RectF(image()->GetMirroredBounds()).CenterPoint());
|
||||
}
|
||||
|
||||
+void LabelButton::SetFontList(const gfx::FontList& font_list) {
|
||||
+ cached_normal_font_list_ = font_list;
|
||||
+ cached_default_button_font_list_ = font_list;
|
||||
+ label_->SetFontList(cached_normal_font_list_);
|
||||
+}
|
||||
+
|
||||
@@ -139,7 +140,7 @@ index aa8dae7..05c89b3 100644
|
||||
const gfx::Size previous_image_size(image_->GetPreferredSize());
|
||||
UpdateImage();
|
||||
diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h
|
||||
index 8495c43..da7997e 100644
|
||||
index a608594ca51a..fadd999ec6fc 100644
|
||||
--- ui/views/controls/button/label_button.h
|
||||
+++ ui/views/controls/button/label_button.h
|
||||
@@ -109,6 +109,9 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
|
||||
@@ -153,12 +154,12 @@ index 8495c43..da7997e 100644
|
||||
ImageView* image() const { return image_; }
|
||||
Label* label() const { return label_; }
|
||||
diff --git ui/views/controls/button/menu_button.cc ui/views/controls/button/menu_button.cc
|
||||
index 33740d8..42c4cbc 100644
|
||||
index 74188e44dc53..541397e473fc 100644
|
||||
--- ui/views/controls/button/menu_button.cc
|
||||
+++ ui/views/controls/button/menu_button.cc
|
||||
@@ -194,7 +194,7 @@ void MenuButton::OnPaint(gfx::Canvas* canvas) {
|
||||
gfx::Size MenuButton::GetPreferredSize() const {
|
||||
gfx::Size prefsize = LabelButton::GetPreferredSize();
|
||||
gfx::Size MenuButton::CalculatePreferredSize() const {
|
||||
gfx::Size prefsize = LabelButton::CalculatePreferredSize();
|
||||
if (show_menu_marker_) {
|
||||
- prefsize.Enlarge(menu_marker_->width() + kMenuMarkerPaddingLeft +
|
||||
+ prefsize.Enlarge(menu_marker_->width() + GetMarkerPaddingLeft() +
|
||||
@@ -186,7 +187,7 @@ index 33740d8..42c4cbc 100644
|
||||
+
|
||||
} // namespace views
|
||||
diff --git ui/views/controls/button/menu_button.h ui/views/controls/button/menu_button.h
|
||||
index 0d87c31..bcaa1ec 100644
|
||||
index 0d4af712d404..6c70762739e3 100644
|
||||
--- ui/views/controls/button/menu_button.h
|
||||
+++ ui/views/controls/button/menu_button.h
|
||||
@@ -57,6 +57,9 @@ class VIEWS_EXPORT MenuButton : public LabelButton {
|
||||
@@ -210,7 +211,7 @@ index 0d87c31..bcaa1ec 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 ui/views/controls/label.cc ui/views/controls/label.cc
|
||||
index 2523f9a..ef64aac 100644
|
||||
index c5e3fc5e4d6f..753bbf501a17 100644
|
||||
--- ui/views/controls/label.cc
|
||||
+++ ui/views/controls/label.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -280,7 +281,7 @@ index 2523f9a..ef64aac 100644
|
||||
}
|
||||
|
||||
diff --git ui/views/controls/label.h ui/views/controls/label.h
|
||||
index 0fa4db8..6d48a9b 100644
|
||||
index 0881558cacb2..be413f3420c2 100644
|
||||
--- ui/views/controls/label.h
|
||||
+++ ui/views/controls/label.h
|
||||
@@ -144,6 +144,10 @@ class VIEWS_EXPORT Label : public View,
|
||||
@@ -303,7 +304,7 @@ index 0fa4db8..6d48a9b 100644
|
||||
// TODO(ckocagil): Remove is_first_paint_text_ before crbug.com/441028 is
|
||||
// closed.
|
||||
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
|
||||
index 7c44dd17..2da694b 100644
|
||||
index 7c44dd17258f..2da694b8b49b 100644
|
||||
--- ui/views/controls/menu/menu_controller.cc
|
||||
+++ ui/views/controls/menu/menu_controller.cc
|
||||
@@ -2259,8 +2259,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem(
|
||||
@@ -334,7 +335,7 @@ index 7c44dd17..2da694b 100644
|
||||
SetSelection(item, SELECTION_UPDATE_IMMEDIATELY);
|
||||
else if (item->GetParentMenuItem()->GetParentMenuItem())
|
||||
diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h
|
||||
index 4dea63f..ef50b71 100644
|
||||
index 4dea63f9f286..ef50b710c5af 100644
|
||||
--- ui/views/controls/menu/menu_delegate.h
|
||||
+++ ui/views/controls/menu/menu_delegate.h
|
||||
@@ -10,6 +10,7 @@
|
||||
@@ -381,7 +382,7 @@ index 4dea63f..ef50b71 100644
|
||||
virtual int GetMaxWidthForMenu(MenuItemView* menu);
|
||||
|
||||
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
|
||||
index c2d98e2..8d12a05 100644
|
||||
index 5b15552fc8fc..5c0fdbe7c128 100644
|
||||
--- ui/views/controls/menu/menu_item_view.cc
|
||||
+++ ui/views/controls/menu/menu_item_view.cc
|
||||
@@ -761,7 +761,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
|
||||
@@ -413,7 +414,7 @@ index c2d98e2..8d12a05 100644
|
||||
minor ? ui::NativeTheme::kColorId_MenuItemSubtitleColor
|
||||
: ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor;
|
||||
diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc
|
||||
index 06a9d3c..c602a13 100644
|
||||
index 06a9d3cfda9b..c602a13efd6a 100644
|
||||
--- ui/views/controls/menu/menu_model_adapter.cc
|
||||
+++ ui/views/controls/menu/menu_model_adapter.cc
|
||||
@@ -245,6 +245,77 @@ void MenuModelAdapter::SelectionChanged(MenuItemView* menu) {
|
||||
@@ -495,7 +496,7 @@ index 06a9d3c..c602a13 100644
|
||||
// Look up the menu model for this menu.
|
||||
const std::map<MenuItemView*, ui::MenuModel*>::const_iterator map_iterator =
|
||||
diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h
|
||||
index 0ac493c..741769e 100644
|
||||
index 0ac493c3c6a0..741769e90eb0 100644
|
||||
--- ui/views/controls/menu/menu_model_adapter.h
|
||||
+++ ui/views/controls/menu/menu_model_adapter.h
|
||||
@@ -76,6 +76,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate {
|
||||
@@ -520,7 +521,7 @@ index 0ac493c..741769e 100644
|
||||
void WillHideMenu(MenuItemView* menu) override;
|
||||
void OnMenuClosed(MenuItemView* menu) override;
|
||||
diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
index 124442a..c5cfe8b 100644
|
||||
index a0a74eb97e8e..cf2044ba2b9b 100644
|
||||
--- ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
+++ ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
@@ -184,6 +184,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
|
||||
@@ -536,7 +537,7 @@ index 124442a..c5cfe8b 100644
|
||||
content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition());
|
||||
|
||||
diff --git ui/views/test/ui_controls_factory_desktop_aurax11.cc ui/views/test/ui_controls_factory_desktop_aurax11.cc
|
||||
index 117a268..6065c73 100644
|
||||
index 117a268df4d5..6065c73fd230 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 {
|
||||
@@ -551,7 +552,7 @@ index 117a268..6065c73 100644
|
||||
// Move the cursor because EnterNotify/LeaveNotify are generated with the
|
||||
// current mouse position as a result of XGrabPointer()
|
||||
diff --git ui/views/view.h ui/views/view.h
|
||||
index 410e2a5..0ba4765 100644
|
||||
index 9c78e1967ce6..8e034342e3c9 100644
|
||||
--- ui/views/view.h
|
||||
+++ ui/views/view.h
|
||||
@@ -18,6 +18,7 @@
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index 527e5ea..de52a1e 100644
|
||||
index 98460d7a89e9..ffbfa04f40b6 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -299,6 +299,14 @@ void RenderWidgetHostViewBase::FocusedNodeTouched(
|
||||
@@ -298,6 +298,14 @@ void RenderWidgetHostViewBase::FocusedNodeTouched(
|
||||
DVLOG(1) << "FocusedNodeTouched: " << editable;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ index 527e5ea..de52a1e 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 904897a..38f6e28 100644
|
||||
index fd1e9993179c..0e794a902fdd 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -72,6 +72,7 @@ class BrowserAccessibilityDelegate;
|
||||
@@ -29,7 +29,17 @@ index 904897a..38f6e28 100644
|
||||
class SyntheticGestureTarget;
|
||||
class TextInputManager;
|
||||
class TouchSelectionControllerClientManager;
|
||||
@@ -119,6 +120,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
@@ -88,6 +89,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
float current_device_scale_factor() const {
|
||||
return current_device_scale_factor_;
|
||||
}
|
||||
+ void set_current_device_scale_factor(float scale_factor) {
|
||||
+ current_device_scale_factor_ = scale_factor;
|
||||
+ }
|
||||
|
||||
// Returns the focused RenderWidgetHost inside this |view|'s RWH.
|
||||
RenderWidgetHostImpl* GetFocusedWidget() const;
|
||||
@@ -119,6 +123,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
void EndFrameSubscription() override;
|
||||
void FocusedNodeTouched(const gfx::Point& location_dips_screen,
|
||||
bool editable) override;
|
||||
@@ -38,7 +48,7 @@ index 904897a..38f6e28 100644
|
||||
|
||||
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
|
||||
// that handle content embedded within other RenderWidgetHostViews.
|
||||
@@ -355,6 +358,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
@@ -359,6 +365,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
// helps to position the full screen widget on the correct monitor.
|
||||
virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0;
|
||||
|
||||
@@ -51,7 +61,7 @@ index 904897a..38f6e28 100644
|
||||
// Sets the cursor to the one associated with the specified cursor_type
|
||||
virtual void UpdateCursor(const WebCursor& cursor) = 0;
|
||||
|
||||
@@ -469,6 +478,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
@@ -473,6 +485,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
|
||||
const bool wheel_scroll_latching_enabled_;
|
||||
|
||||
@@ -63,7 +73,7 @@ index 904897a..38f6e28 100644
|
||||
gfx::Rect current_display_area_;
|
||||
|
||||
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 0401ce6..99e85e9 100644
|
||||
index 0401ce699cc8..99e85e908805 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 @@
|
||||
@@ -77,10 +87,11 @@ index 0401ce6..99e85e9 100644
|
||||
#if defined(OS_WIN)
|
||||
#include "content/browser/frame_host/render_frame_host_impl.h"
|
||||
#include "content/public/common/context_menu_params.h"
|
||||
@@ -847,6 +851,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
|
||||
@@ -846,6 +850,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
|
||||
::SetFocus(hwnd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
+#if defined(OS_LINUX)
|
||||
+ if (host_view_->HasExternalParent() &&
|
||||
+ window_ && window_->delegate()->CanFocus()) {
|
||||
@@ -88,12 +99,11 @@ index 0401ce6..99e85e9 100644
|
||||
+ if (host)
|
||||
+ host->Show();
|
||||
+ }
|
||||
+#endif
|
||||
#endif
|
||||
// TODO(wjmaclean): can host_ ever be null?
|
||||
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 e295ef2..dcce231 100644
|
||||
index e295ef252fab..dcce231ad71b 100644
|
||||
--- content/public/browser/render_widget_host_view.h
|
||||
+++ content/public/browser/render_widget_host_view.h
|
||||
@@ -234,6 +234,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
|
||||
@@ -112,7 +122,7 @@ index e295ef2..dcce231 100644
|
||||
// Return the accelerated widget which hosts the CALayers that draw the
|
||||
// content of the view in GetNativeView. This may be null.
|
||||
diff --git ui/views/widget/desktop_aura/desktop_screen_win.cc ui/views/widget/desktop_aura/desktop_screen_win.cc
|
||||
index f772f64..7d13f9f 100644
|
||||
index f772f64d656e..7d13f9f81b6c 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_screen_win.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_screen_win.cc
|
||||
@@ -32,6 +32,8 @@ display::Display DesktopScreenWin::GetDisplayMatching(
|
||||
@@ -125,7 +135,7 @@ index f772f64..7d13f9f 100644
|
||||
return host ? host->GetAcceleratedWidget() : NULL;
|
||||
}
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index e99be28..4d3fec5 100644
|
||||
index e99be28d8785..4d3fec5bda8d 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -85,6 +85,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
|
||||
@@ -169,7 +179,7 @@ index e99be28..4d3fec5 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 12d0616..ec5742a 100644
|
||||
index 12d061646707..ec5742a366f7 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
@@ -256,6 +256,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
@@ -184,7 +194,7 @@ index 12d0616..ec5742a 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 e7fd89c..d3b2621 100644
|
||||
index a5011125472d..04645cdd25f2 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
@@ -198,6 +198,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
@@ -231,7 +241,7 @@ index e7fd89c..d3b2621 100644
|
||||
return ToDIPRect(bounds_in_pixels_);
|
||||
}
|
||||
|
||||
@@ -1296,6 +1303,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
|
||||
@@ -1303,6 +1310,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels(
|
||||
}
|
||||
|
||||
gfx::Point DesktopWindowTreeHostX11::GetLocationOnScreenInPixels() const {
|
||||
@@ -240,7 +250,7 @@ index e7fd89c..d3b2621 100644
|
||||
return bounds_in_pixels_.origin();
|
||||
}
|
||||
|
||||
@@ -1422,9 +1431,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
@@ -1429,9 +1438,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
attribute_mask |= CWBorderPixel;
|
||||
swa.border_pixel = 0;
|
||||
|
||||
@@ -257,7 +267,7 @@ index e7fd89c..d3b2621 100644
|
||||
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
|
||||
bounds_in_pixels_.height(),
|
||||
0, // border width
|
||||
@@ -2042,6 +2057,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
@@ -2049,6 +2064,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -269,7 +279,7 @@ index e7fd89c..d3b2621 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 757b780..45d57ae 100644
|
||||
index 757b7808e08c..45d57ae57988 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
@@ -87,6 +87,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -317,7 +327,7 @@ index 757b780..45d57ae 100644
|
||||
base::WeakPtrFactory<DesktopWindowTreeHostX11> weak_factory_;
|
||||
|
||||
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
|
||||
index fbce29e..0538a4c 100644
|
||||
index fbce29ee69aa..0538a4c1ee4f 100644
|
||||
--- ui/views/widget/widget.cc
|
||||
+++ ui/views/widget/widget.cc
|
||||
@@ -131,6 +131,7 @@ Widget::InitParams::InitParams(Type type)
|
||||
@@ -352,7 +362,7 @@ index fbce29e..0538a4c 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 63fcb9d..7237ae6 100644
|
||||
index 63fcb9d611e8..7237ae60007f 100644
|
||||
--- ui/views/widget/widget.h
|
||||
+++ ui/views/widget/widget.h
|
||||
@@ -253,6 +253,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
@@ -364,7 +374,7 @@ index 63fcb9d..7237ae6 100644
|
||||
// the NativeWidget may specify a default size. If the parent is specified,
|
||||
// |bounds| is in the parent's coordinate system. If the parent is not
|
||||
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
|
||||
index 3c67457..e34a9a6 100644
|
||||
index 3c67457a6421..e34a9a6b9f41 100644
|
||||
--- ui/views/win/hwnd_message_handler.cc
|
||||
+++ ui/views/win/hwnd_message_handler.cc
|
||||
@@ -2670,8 +2670,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
|
||||
index 627a0e5..21c6210 100644
|
||||
index 1dd24658e82f..5e77e8c29fb0 100644
|
||||
--- content/browser/web_contents/web_contents_impl.cc
|
||||
+++ content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -1692,6 +1692,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -23,7 +23,7 @@ index 627a0e5..21c6210 100644
|
||||
|
||||
if (browser_plugin_guest_ && !GuestMode::IsCrossProcessFrameGuest(this)) {
|
||||
view_.reset(new WebContentsViewGuest(this, browser_plugin_guest_.get(),
|
||||
@@ -2259,6 +2266,15 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -2255,6 +2262,15 @@ void WebContentsImpl::CreateNewWindow(
|
||||
create_params.renderer_initiated_creation =
|
||||
main_frame_route_id != MSG_ROUTING_NONE;
|
||||
|
||||
@@ -39,7 +39,7 @@ index 627a0e5..21c6210 100644
|
||||
WebContentsImpl* new_contents = NULL;
|
||||
if (!is_guest) {
|
||||
create_params.context = view_->GetNativeView();
|
||||
@@ -2288,7 +2304,7 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -2284,7 +2300,7 @@ void WebContentsImpl::CreateNewWindow(
|
||||
// TODO(brettw): It seems bogus that we have to call this function on the
|
||||
// newly created object and give it one of its own member variables.
|
||||
new_view->CreateViewForWidget(
|
||||
@@ -48,7 +48,7 @@ index 627a0e5..21c6210 100644
|
||||
}
|
||||
// Save the created window associated with the route so we can show it
|
||||
// later.
|
||||
@@ -5182,7 +5198,7 @@ NavigationEntry*
|
||||
@@ -5210,7 +5226,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() {
|
||||
void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager(
|
||||
RenderViewHost* render_view_host) {
|
||||
RenderWidgetHostViewBase* rwh_view =
|
||||
@@ -58,7 +58,7 @@ index 627a0e5..21c6210 100644
|
||||
// Now that the RenderView has been created, we need to tell it its size.
|
||||
if (rwh_view)
|
||||
diff --git content/public/browser/web_contents.cc content/public/browser/web_contents.cc
|
||||
index fa0afb5..d677b31 100644
|
||||
index fa0afb545df9..d677b310e5ec 100644
|
||||
--- content/public/browser/web_contents.cc
|
||||
+++ content/public/browser/web_contents.cc
|
||||
@@ -29,7 +29,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context,
|
||||
@@ -73,7 +73,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 ebd18a0..549329f 100644
|
||||
index 930880ca54f8..41ba4622b203 100644
|
||||
--- content/public/browser/web_contents.h
|
||||
+++ content/public/browser/web_contents.h
|
||||
@@ -67,9 +67,11 @@ class PageState;
|
||||
@@ -100,7 +100,7 @@ index ebd18a0..549329f 100644
|
||||
|
||||
// Creates a new WebContents.
|
||||
diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h
|
||||
index 9176c4b..7d73b9d 100644
|
||||
index 9176c4bcee6c..7d73b9decda2 100644
|
||||
--- content/public/browser/web_contents_delegate.h
|
||||
+++ content/public/browser/web_contents_delegate.h
|
||||
@@ -43,10 +43,12 @@ class ColorChooser;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git third_party/WebKit/Source/core/dom/DOMImplementation.cpp third_party/WebKit/Source/core/dom/DOMImplementation.cpp
|
||||
index 372b21d..78107f3 100644
|
||||
index 372b21d40782..78107f391847 100644
|
||||
--- third_party/WebKit/Source/core/dom/DOMImplementation.cpp
|
||||
+++ third_party/WebKit/Source/core/dom/DOMImplementation.cpp
|
||||
@@ -242,10 +242,11 @@ Document* DOMImplementation::createDocument(const String& type,
|
||||
@@ -17,7 +17,7 @@ index 372b21d..78107f3 100644
|
||||
.Top()
|
||||
.GetSecurityContext()
|
||||
diff --git third_party/WebKit/Source/core/frame/LocalFrame.cpp third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
||||
index 9c6d497..6296f53 100644
|
||||
index 97a5393d40b4..21da4ee7d27c 100644
|
||||
--- third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
||||
+++ third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
||||
@@ -930,7 +930,7 @@ ContentSettingsClient* LocalFrame::GetContentSettingsClient() {
|
||||
@@ -30,7 +30,7 @@ index 9c6d497..6296f53 100644
|
||||
}
|
||||
|
||||
diff --git third_party/WebKit/Source/core/page/Page.cpp third_party/WebKit/Source/core/page/Page.cpp
|
||||
index 6dc4b21..41d56b5 100644
|
||||
index 6dc4b2180bc2..41d56b50887b 100644
|
||||
--- third_party/WebKit/Source/core/page/Page.cpp
|
||||
+++ third_party/WebKit/Source/core/page/Page.cpp
|
||||
@@ -289,16 +289,30 @@ void Page::RefreshPlugins() {
|
||||
@@ -72,7 +72,7 @@ index 6dc4b21..41d56b5 100644
|
||||
|
||||
void Page::SetValidationMessageClient(ValidationMessageClient* client) {
|
||||
diff --git third_party/WebKit/Source/core/page/Page.h third_party/WebKit/Source/core/page/Page.h
|
||||
index e644faa..2fe0d37 100644
|
||||
index e644faaeae13..2fe0d37974c9 100644
|
||||
--- third_party/WebKit/Source/core/page/Page.h
|
||||
+++ third_party/WebKit/Source/core/page/Page.h
|
||||
@@ -132,7 +132,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
|
||||
@@ -96,7 +96,7 @@ index e644faa..2fe0d37 100644
|
||||
EditorClient* const editor_client_;
|
||||
SpellCheckerClient* const spell_checker_client_;
|
||||
diff --git third_party/WebKit/Source/platform/plugins/PluginData.cpp third_party/WebKit/Source/platform/plugins/PluginData.cpp
|
||||
index 03618f6..5ac59e8 100644
|
||||
index 03618f6a3d96..5ac59e858c9d 100644
|
||||
--- third_party/WebKit/Source/platform/plugins/PluginData.cpp
|
||||
+++ third_party/WebKit/Source/platform/plugins/PluginData.cpp
|
||||
@@ -30,11 +30,12 @@
|
||||
@@ -126,7 +126,7 @@ index 03618f6..5ac59e8 100644
|
||||
}
|
||||
|
||||
diff --git third_party/WebKit/Source/platform/plugins/PluginData.h third_party/WebKit/Source/platform/plugins/PluginData.h
|
||||
index cdf3381..671f17c 100644
|
||||
index cdf3381cedec..671f17c752a1 100644
|
||||
--- third_party/WebKit/Source/platform/plugins/PluginData.h
|
||||
+++ third_party/WebKit/Source/platform/plugins/PluginData.h
|
||||
@@ -52,8 +52,9 @@ class PLATFORM_EXPORT PluginData : public RefCounted<PluginData> {
|
||||
@@ -157,7 +157,7 @@ index cdf3381..671f17c 100644
|
||||
};
|
||||
|
||||
diff --git third_party/WebKit/public/platform/Platform.h third_party/WebKit/public/platform/Platform.h
|
||||
index f7360bf6..f7599cc 100644
|
||||
index f7360bf6cb93..f7599ccd143c 100644
|
||||
--- third_party/WebKit/public/platform/Platform.h
|
||||
+++ third_party/WebKit/public/platform/Platform.h
|
||||
@@ -363,6 +363,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git third_party/WebKit/Source/core/exported/WebViewBase.h third_party/WebKit/Source/core/exported/WebViewBase.h
|
||||
index ed45829..a43bd1e 100644
|
||||
index ed4582968a2c..a43bd1e3fac5 100644
|
||||
--- third_party/WebKit/Source/core/exported/WebViewBase.h
|
||||
+++ third_party/WebKit/Source/core/exported/WebViewBase.h
|
||||
@@ -151,7 +151,7 @@ class WebViewBase : public WebView, public RefCounted<WebViewBase> {
|
||||
@@ -12,10 +12,10 @@ index ed45829..a43bd1e 100644
|
||||
virtual GraphicsLayer* RootGraphicsLayer() = 0;
|
||||
virtual void RegisterViewportLayersWithCompositor() = 0;
|
||||
diff --git third_party/WebKit/Source/web/ChromeClientImpl.cpp third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
||||
index 2a35f2c..dded520 100644
|
||||
index 9ff6994c1267..d310a8750cb3 100644
|
||||
--- third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
||||
+++ third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
||||
@@ -935,7 +935,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
||||
@@ -928,7 +928,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
|
||||
return nullptr;
|
||||
|
||||
NotifyPopupOpeningObservers();
|
||||
@@ -25,10 +25,10 @@ index 2a35f2c..dded520 100644
|
||||
|
||||
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
|
||||
diff --git third_party/WebKit/Source/web/WebViewImpl.cpp third_party/WebKit/Source/web/WebViewImpl.cpp
|
||||
index dccdd58..a2a7ab9 100644
|
||||
index 3e586378a0d6..6d89fa162e84 100644
|
||||
--- third_party/WebKit/Source/web/WebViewImpl.cpp
|
||||
+++ third_party/WebKit/Source/web/WebViewImpl.cpp
|
||||
@@ -355,6 +355,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
|
||||
@@ -354,6 +354,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
|
||||
enable_fake_page_scale_animation_for_testing_(false),
|
||||
fake_page_scale_animation_page_scale_factor_(0),
|
||||
fake_page_scale_animation_use_anchor_(false),
|
||||
@@ -36,7 +36,7 @@ index dccdd58..a2a7ab9 100644
|
||||
compositor_device_scale_factor_override_(0),
|
||||
suppress_next_keypress_event_(false),
|
||||
ime_accept_events_(true),
|
||||
@@ -3693,12 +3694,13 @@ void WebViewImpl::MainFrameScrollOffsetChanged() {
|
||||
@@ -3694,12 +3695,13 @@ void WebViewImpl::MainFrameScrollOffsetChanged() {
|
||||
dev_tools_emulator_->MainFrameScrollOrScaleChanged();
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ index dccdd58..a2a7ab9 100644
|
||||
|
||||
void WebViewImpl::SetBackgroundColorOverride(WebColor color) {
|
||||
diff --git third_party/WebKit/Source/web/WebViewImpl.h third_party/WebKit/Source/web/WebViewImpl.h
|
||||
index ba65d8f..490e451 100644
|
||||
index 591da9f40545..df2c787f935b 100644
|
||||
--- third_party/WebKit/Source/web/WebViewImpl.h
|
||||
+++ third_party/WebKit/Source/web/WebViewImpl.h
|
||||
@@ -357,7 +357,8 @@ class WEB_EXPORT WebViewImpl final
|
||||
@@ -78,10 +78,10 @@ index ba65d8f..490e451 100644
|
||||
TransformationMatrix device_emulation_transform_;
|
||||
|
||||
diff --git third_party/WebKit/public/web/WebView.h third_party/WebKit/public/web/WebView.h
|
||||
index c55118b..56d8896 100644
|
||||
index e790df6eb89b..4e57f29f2883 100644
|
||||
--- third_party/WebKit/public/web/WebView.h
|
||||
+++ third_party/WebKit/public/web/WebView.h
|
||||
@@ -399,6 +399,7 @@ class WebView : protected WebWidget {
|
||||
@@ -398,6 +398,7 @@ class WebView : protected WebWidget {
|
||||
|
||||
// Sets whether select popup menus should be rendered by the browser.
|
||||
BLINK_EXPORT static void SetUseExternalPopupMenus(bool);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/webui/net_internals/net_internals_ui.cc chrome/browser/ui/webui/net_internals/net_internals_ui.cc
|
||||
index 2fa6e2a..f7bb035 100644
|
||||
index 2fa6e2ae7576..f7bb03539496 100644
|
||||
--- chrome/browser/ui/webui/net_internals/net_internals_ui.cc
|
||||
+++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc
|
||||
@@ -526,8 +526,7 @@ void NetInternalsMessageHandler::OnGetSessionNetworkStats(
|
||||
@@ -47,7 +47,7 @@ index 2fa6e2a..f7bb035 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 141a083..b16b4d6 100644
|
||||
index 141a08305332..b16b4d61988d 100644
|
||||
--- content/browser/resource_context_impl.cc
|
||||
+++ content/browser/resource_context_impl.cc
|
||||
@@ -58,6 +58,10 @@ URLDataManagerBackend* GetURLDataManagerForResourceContext(
|
||||
@@ -62,7 +62,7 @@ index 141a083..b16b4d6 100644
|
||||
ResourceContext* resource_context = browser_context->GetResourceContext();
|
||||
|
||||
diff --git content/browser/resource_context_impl.h content/browser/resource_context_impl.h
|
||||
index 903cc54..56ee4ea 100644
|
||||
index 903cc543a242..56ee4ea7bfb4 100644
|
||||
--- content/browser/resource_context_impl.h
|
||||
+++ content/browser/resource_context_impl.h
|
||||
@@ -28,6 +28,8 @@ CONTENT_EXPORT StreamContext* GetStreamContextForResourceContext(
|
||||
@@ -75,23 +75,23 @@ 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 5681ff5..7d96c24 100644
|
||||
index 5681ff549fd4..7d96c24fab2f 100644
|
||||
--- content/browser/webui/url_data_manager.cc
|
||||
+++ content/browser/webui/url_data_manager.cc
|
||||
@@ -153,6 +153,11 @@ void URLDataManager::UpdateWebUIDataSource(
|
||||
@@ -152,6 +152,11 @@ void URLDataManager::UpdateWebUIDataSource(
|
||||
->UpdateWebUIDataSource(source_name, std::move(update));
|
||||
}
|
||||
|
||||
// static
|
||||
+// static
|
||||
+const void* URLDataManager::GetUserDataKey() {
|
||||
+ return kURLDataManagerKeyName;
|
||||
+}
|
||||
+
|
||||
+// static
|
||||
// static
|
||||
bool URLDataManager::IsScheduledForDeletion(
|
||||
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 5ceb74d..0c584d6 100644
|
||||
index 5ceb74d411fc..0c584d6e69b5 100644
|
||||
--- content/browser/webui/url_data_manager.h
|
||||
+++ content/browser/webui/url_data_manager.h
|
||||
@@ -69,6 +69,8 @@ class CONTENT_EXPORT URLDataManager : public base::SupportsUserData::Data {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd
|
||||
index 3ff9d30..5b53c44 100644
|
||||
index c79a92e22949..e619f312b701 100644
|
||||
--- chrome/app/generated_resources.grd
|
||||
+++ chrome/app/generated_resources.grd
|
||||
@@ -5158,7 +5158,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git third_party/zlib/contrib/minizip/unzip.c third_party/zlib/contrib/minizip/unzip.c
|
||||
index 199b472..be42478 100644
|
||||
index 199b4723fcfc..be424783fece 100644
|
||||
--- third_party/zlib/contrib/minizip/unzip.c
|
||||
+++ third_party/zlib/contrib/minizip/unzip.c
|
||||
@@ -69,7 +69,7 @@
|
||||
|
@@ -249,6 +249,11 @@ if(OS_WINDOWS)
|
||||
add_dependencies(${CEF_TARGET} libcef_dll_wrapper)
|
||||
target_link_libraries(${CEF_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS} glu32.lib imm32.lib opengl32.lib)
|
||||
|
||||
if(USE_ATL)
|
||||
# Required by VS2013 to link accessibility API functions.
|
||||
target_link_libraries(${CEF_TARGET} oleacc.lib)
|
||||
endif()
|
||||
|
||||
if(USE_SANDBOX)
|
||||
# Logical target used to link the cef_sandbox library.
|
||||
ADD_LOGICAL_TARGET("cef_sandbox_lib" "${CEF_SANDBOX_LIB_DEBUG}" "${CEF_SANDBOX_LIB_RELEASE}")
|
||||
|
@@ -4,7 +4,10 @@
|
||||
|
||||
#include "tests/cefclient/browser/client_browser.h"
|
||||
|
||||
#include "include/cef_command_line.h"
|
||||
#include "include/cef_crash_util.h"
|
||||
#include "include/cef_file_util.h"
|
||||
#include "tests/shared/common/client_switches.h"
|
||||
|
||||
namespace client {
|
||||
namespace browser {
|
||||
@@ -23,6 +26,14 @@ class ClientBrowserDelegate : public ClientAppBrowser::Delegate {
|
||||
CefSetCrashKeyValue("testkey2", "value2_browser");
|
||||
CefSetCrashKeyValue("testkey3", "value3_browser");
|
||||
}
|
||||
|
||||
const std::string& crl_sets_path =
|
||||
CefCommandLine::GetGlobalCommandLine()->GetSwitchValue(
|
||||
switches::kCRLSetsPath);
|
||||
if (!crl_sets_path.empty()) {
|
||||
// Load the CRLSets file from the specified path.
|
||||
CefLoadCRLSetsFile(crl_sets_path);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -140,7 +140,7 @@ MainMessageLoopMultithreadedWin::MessageWndProc(HWND hWnd,
|
||||
task->Release();
|
||||
} else {
|
||||
switch (message) {
|
||||
case WM_DESTROY:
|
||||
case WM_NCDESTROY:
|
||||
// Clear the reference to |self|.
|
||||
SetUserDataPtr(hWnd, NULL);
|
||||
break;
|
||||
|
@@ -680,6 +680,9 @@ CefNativeAccessible* OsrAXNode::GetNativeAccessibleObject(OsrAXNode* parent) {
|
||||
|
||||
namespace client {
|
||||
|
||||
void OsrAXNode::NotifyAccessibilityEvent(std::string event_type) const {
|
||||
}
|
||||
|
||||
void OsrAXNode::Destroy() {}
|
||||
|
||||
CefNativeAccessible* OsrAXNode::GetNativeAccessibleObject(OsrAXNode* parent) {
|
||||
|
@@ -7,10 +7,15 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk/gtkunixprint.h>
|
||||
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/wrapper/cef_helpers.h"
|
||||
|
||||
#include "tests/cefclient/browser/root_window.h"
|
||||
|
||||
namespace client {
|
||||
|
||||
namespace {
|
||||
@@ -267,161 +272,339 @@ void InitPrintSettings(GtkPrintSettings* settings,
|
||||
|
||||
} // namespace
|
||||
|
||||
ClientPrintHandlerGtk::ClientPrintHandlerGtk()
|
||||
: dialog_(NULL), gtk_settings_(NULL), page_setup_(NULL), printer_(NULL) {}
|
||||
struct ClientPrintHandlerGtk::PrintHandler {
|
||||
PrintHandler(CefRefPtr<CefBrowser> browser)
|
||||
: browser_(browser),
|
||||
dialog_(NULL),
|
||||
gtk_settings_(NULL),
|
||||
page_setup_(NULL),
|
||||
printer_(NULL) {}
|
||||
|
||||
void ClientPrintHandlerGtk::OnPrintStart(CefRefPtr<CefBrowser> browser) {}
|
||||
|
||||
void ClientPrintHandlerGtk::OnPrintSettings(
|
||||
CefRefPtr<CefPrintSettings> settings,
|
||||
bool get_defaults) {
|
||||
if (get_defaults) {
|
||||
DCHECK(!page_setup_);
|
||||
DCHECK(!printer_);
|
||||
|
||||
// |gtk_settings_| is a new copy.
|
||||
gtk_settings_ = gtk_print_settings_copy(GetLastUsedSettings()->settings());
|
||||
page_setup_ = gtk_page_setup_new();
|
||||
} else {
|
||||
if (!gtk_settings_) {
|
||||
gtk_settings_ =
|
||||
gtk_print_settings_copy(GetLastUsedSettings()->settings());
|
||||
~PrintHandler() {
|
||||
if (dialog_) {
|
||||
gtk_widget_destroy(dialog_);
|
||||
dialog_ = NULL;
|
||||
}
|
||||
if (gtk_settings_) {
|
||||
g_object_unref(gtk_settings_);
|
||||
gtk_settings_ = NULL;
|
||||
}
|
||||
if (page_setup_) {
|
||||
g_object_unref(page_setup_);
|
||||
page_setup_ = NULL;
|
||||
}
|
||||
|
||||
GtkPrinterList* printer_list = new GtkPrinterList;
|
||||
printer_ = printer_list->GetPrinterWithName(settings->GetDeviceName());
|
||||
if (printer_) {
|
||||
g_object_ref(printer_);
|
||||
gtk_print_settings_set_printer(gtk_settings_,
|
||||
gtk_printer_get_name(printer_));
|
||||
if (!page_setup_) {
|
||||
page_setup_ = gtk_printer_get_default_page_size(printer_);
|
||||
}
|
||||
g_object_unref(printer_);
|
||||
printer_ = NULL;
|
||||
}
|
||||
|
||||
gtk_print_settings_set_n_copies(gtk_settings_, settings->GetCopies());
|
||||
gtk_print_settings_set_collate(gtk_settings_, settings->WillCollate());
|
||||
|
||||
std::string color_value;
|
||||
std::string color_setting_name;
|
||||
GetColorModelForMode(settings->GetColorModel(), &color_setting_name,
|
||||
&color_value);
|
||||
gtk_print_settings_set(gtk_settings_, color_setting_name.c_str(),
|
||||
color_value.c_str());
|
||||
|
||||
if (settings->GetDuplexMode() != DUPLEX_MODE_UNKNOWN) {
|
||||
const char* cups_duplex_mode = NULL;
|
||||
switch (settings->GetDuplexMode()) {
|
||||
case DUPLEX_MODE_LONG_EDGE:
|
||||
cups_duplex_mode = kDuplexNoTumble;
|
||||
break;
|
||||
case DUPLEX_MODE_SHORT_EDGE:
|
||||
cups_duplex_mode = kDuplexTumble;
|
||||
break;
|
||||
case DUPLEX_MODE_SIMPLEX:
|
||||
cups_duplex_mode = kDuplexNone;
|
||||
break;
|
||||
default: // UNKNOWN_DUPLEX_MODE
|
||||
NOTREACHED();
|
||||
break;
|
||||
}
|
||||
gtk_print_settings_set(gtk_settings_, kCUPSDuplex, cups_duplex_mode);
|
||||
}
|
||||
|
||||
if (!page_setup_)
|
||||
page_setup_ = gtk_page_setup_new();
|
||||
|
||||
gtk_print_settings_set_orientation(
|
||||
gtk_settings_, settings->IsLandscape() ? GTK_PAGE_ORIENTATION_LANDSCAPE
|
||||
: GTK_PAGE_ORIENTATION_PORTRAIT);
|
||||
|
||||
delete printer_list;
|
||||
}
|
||||
|
||||
InitPrintSettings(gtk_settings_, page_setup_, settings);
|
||||
void OnPrintSettings(CefRefPtr<CefPrintSettings> settings,
|
||||
bool get_defaults) {
|
||||
if (get_defaults) {
|
||||
DCHECK(!page_setup_);
|
||||
DCHECK(!printer_);
|
||||
|
||||
// |gtk_settings_| is a new copy.
|
||||
gtk_settings_ =
|
||||
gtk_print_settings_copy(GetLastUsedSettings()->settings());
|
||||
page_setup_ = gtk_page_setup_new();
|
||||
} else {
|
||||
if (!gtk_settings_) {
|
||||
gtk_settings_ =
|
||||
gtk_print_settings_copy(GetLastUsedSettings()->settings());
|
||||
}
|
||||
|
||||
GtkPrinterList* printer_list = new GtkPrinterList;
|
||||
printer_ = printer_list->GetPrinterWithName(settings->GetDeviceName());
|
||||
if (printer_) {
|
||||
g_object_ref(printer_);
|
||||
gtk_print_settings_set_printer(gtk_settings_,
|
||||
gtk_printer_get_name(printer_));
|
||||
if (!page_setup_) {
|
||||
page_setup_ = gtk_printer_get_default_page_size(printer_);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_print_settings_set_n_copies(gtk_settings_, settings->GetCopies());
|
||||
gtk_print_settings_set_collate(gtk_settings_, settings->WillCollate());
|
||||
|
||||
std::string color_value;
|
||||
std::string color_setting_name;
|
||||
GetColorModelForMode(settings->GetColorModel(), &color_setting_name,
|
||||
&color_value);
|
||||
gtk_print_settings_set(gtk_settings_, color_setting_name.c_str(),
|
||||
color_value.c_str());
|
||||
|
||||
if (settings->GetDuplexMode() != DUPLEX_MODE_UNKNOWN) {
|
||||
const char* cups_duplex_mode = NULL;
|
||||
switch (settings->GetDuplexMode()) {
|
||||
case DUPLEX_MODE_LONG_EDGE:
|
||||
cups_duplex_mode = kDuplexNoTumble;
|
||||
break;
|
||||
case DUPLEX_MODE_SHORT_EDGE:
|
||||
cups_duplex_mode = kDuplexTumble;
|
||||
break;
|
||||
case DUPLEX_MODE_SIMPLEX:
|
||||
cups_duplex_mode = kDuplexNone;
|
||||
break;
|
||||
default: // UNKNOWN_DUPLEX_MODE
|
||||
NOTREACHED();
|
||||
break;
|
||||
}
|
||||
gtk_print_settings_set(gtk_settings_, kCUPSDuplex, cups_duplex_mode);
|
||||
}
|
||||
|
||||
if (!page_setup_)
|
||||
page_setup_ = gtk_page_setup_new();
|
||||
|
||||
gtk_print_settings_set_orientation(gtk_settings_,
|
||||
settings->IsLandscape()
|
||||
? GTK_PAGE_ORIENTATION_LANDSCAPE
|
||||
: GTK_PAGE_ORIENTATION_PORTRAIT);
|
||||
|
||||
delete printer_list;
|
||||
}
|
||||
|
||||
InitPrintSettings(gtk_settings_, page_setup_, settings);
|
||||
}
|
||||
|
||||
bool OnPrintDialog(bool has_selection,
|
||||
CefRefPtr<CefPrintDialogCallback> callback) {
|
||||
dialog_callback_ = callback;
|
||||
|
||||
GtkWindow* parent = GetWindow();
|
||||
// TODO(estade): We need a window title here.
|
||||
dialog_ = gtk_print_unix_dialog_new(NULL, parent);
|
||||
g_signal_connect(dialog_, "delete-event",
|
||||
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
|
||||
|
||||
// Set modal so user cannot focus the same tab and press print again.
|
||||
gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE);
|
||||
|
||||
// Since we only generate PDF, only show printers that support PDF.
|
||||
// TODO(thestig) Add more capabilities to support?
|
||||
GtkPrintCapabilities cap = static_cast<GtkPrintCapabilities>(
|
||||
GTK_PRINT_CAPABILITY_GENERATE_PDF | GTK_PRINT_CAPABILITY_PAGE_SET |
|
||||
GTK_PRINT_CAPABILITY_COPIES | GTK_PRINT_CAPABILITY_COLLATE |
|
||||
GTK_PRINT_CAPABILITY_REVERSE);
|
||||
gtk_print_unix_dialog_set_manual_capabilities(
|
||||
GTK_PRINT_UNIX_DIALOG(dialog_), cap);
|
||||
gtk_print_unix_dialog_set_embed_page_setup(GTK_PRINT_UNIX_DIALOG(dialog_),
|
||||
TRUE);
|
||||
gtk_print_unix_dialog_set_support_selection(GTK_PRINT_UNIX_DIALOG(dialog_),
|
||||
TRUE);
|
||||
gtk_print_unix_dialog_set_has_selection(GTK_PRINT_UNIX_DIALOG(dialog_),
|
||||
has_selection);
|
||||
gtk_print_unix_dialog_set_settings(GTK_PRINT_UNIX_DIALOG(dialog_),
|
||||
gtk_settings_);
|
||||
g_signal_connect(dialog_, "response", G_CALLBACK(OnDialogResponseThunk),
|
||||
this);
|
||||
gtk_widget_show(dialog_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnPrintJob(const CefString& document_name,
|
||||
const CefString& pdf_file_path,
|
||||
CefRefPtr<CefPrintJobCallback> callback) {
|
||||
// If |printer_| is NULL then somehow the GTK printer list changed out under
|
||||
// us. In which case, just bail out.
|
||||
if (!printer_)
|
||||
return false;
|
||||
|
||||
job_callback_ = callback;
|
||||
|
||||
// Save the settings for next time.
|
||||
GetLastUsedSettings()->SetLastUsedSettings(gtk_settings_);
|
||||
|
||||
GtkPrintJob* print_job = gtk_print_job_new(
|
||||
document_name.ToString().c_str(), printer_, gtk_settings_, page_setup_);
|
||||
gtk_print_job_set_source_file(print_job, pdf_file_path.ToString().c_str(),
|
||||
NULL);
|
||||
gtk_print_job_send(print_job, OnJobCompletedThunk, this, NULL);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
// Returns the GtkWindow* for the browser. Will return NULL when using the
|
||||
// Views framework.
|
||||
GtkWindow* GetWindow() {
|
||||
scoped_refptr<RootWindow> root_window =
|
||||
RootWindow::GetForBrowser(browser_->GetIdentifier());
|
||||
if (root_window)
|
||||
return GTK_WINDOW(root_window->GetWindowHandle());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void OnDialogResponse(GtkDialog* dialog, gint response_id) {
|
||||
int num_matched_handlers = g_signal_handlers_disconnect_by_func(
|
||||
dialog_, reinterpret_cast<gpointer>(&OnDialogResponseThunk), this);
|
||||
DCHECK_EQ(1, num_matched_handlers);
|
||||
|
||||
gtk_widget_hide(dialog_);
|
||||
|
||||
switch (response_id) {
|
||||
case GTK_RESPONSE_OK: {
|
||||
if (gtk_settings_)
|
||||
g_object_unref(gtk_settings_);
|
||||
gtk_settings_ =
|
||||
gtk_print_unix_dialog_get_settings(GTK_PRINT_UNIX_DIALOG(dialog_));
|
||||
|
||||
if (printer_)
|
||||
g_object_unref(printer_);
|
||||
printer_ = gtk_print_unix_dialog_get_selected_printer(
|
||||
GTK_PRINT_UNIX_DIALOG(dialog_));
|
||||
g_object_ref(printer_);
|
||||
|
||||
if (page_setup_)
|
||||
g_object_unref(page_setup_);
|
||||
page_setup_ = gtk_print_unix_dialog_get_page_setup(
|
||||
GTK_PRINT_UNIX_DIALOG(dialog_));
|
||||
g_object_ref(page_setup_);
|
||||
|
||||
// Handle page ranges.
|
||||
CefPrintSettings::PageRangeList ranges_vector;
|
||||
gint num_ranges;
|
||||
bool print_selection_only = false;
|
||||
switch (gtk_print_settings_get_print_pages(gtk_settings_)) {
|
||||
case GTK_PRINT_PAGES_RANGES: {
|
||||
GtkPageRange* gtk_range =
|
||||
gtk_print_settings_get_page_ranges(gtk_settings_, &num_ranges);
|
||||
if (gtk_range) {
|
||||
for (int i = 0; i < num_ranges; ++i) {
|
||||
ranges_vector.push_back(
|
||||
CefRange(gtk_range[i].start, gtk_range[i].end));
|
||||
}
|
||||
g_free(gtk_range);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GTK_PRINT_PAGES_SELECTION:
|
||||
print_selection_only = true;
|
||||
break;
|
||||
case GTK_PRINT_PAGES_ALL:
|
||||
// Leave |ranges_vector| empty to indicate print all pages.
|
||||
break;
|
||||
case GTK_PRINT_PAGES_CURRENT:
|
||||
default:
|
||||
NOTREACHED();
|
||||
break;
|
||||
}
|
||||
|
||||
CefRefPtr<CefPrintSettings> settings = CefPrintSettings::Create();
|
||||
settings->SetPageRanges(ranges_vector);
|
||||
settings->SetSelectionOnly(print_selection_only);
|
||||
InitPrintSettings(gtk_settings_, page_setup_, settings);
|
||||
dialog_callback_->Continue(settings);
|
||||
dialog_callback_ = NULL;
|
||||
return;
|
||||
}
|
||||
case GTK_RESPONSE_DELETE_EVENT: // Fall through.
|
||||
case GTK_RESPONSE_CANCEL: {
|
||||
dialog_callback_->Cancel();
|
||||
dialog_callback_ = NULL;
|
||||
return;
|
||||
}
|
||||
case GTK_RESPONSE_APPLY:
|
||||
default: { NOTREACHED(); }
|
||||
}
|
||||
}
|
||||
|
||||
void OnJobCompleted(GtkPrintJob* print_job, GError* error) {
|
||||
job_callback_->Continue();
|
||||
job_callback_ = NULL;
|
||||
}
|
||||
|
||||
static void OnDialogResponseThunk(GtkDialog* dialog,
|
||||
gint response_id,
|
||||
PrintHandler* handler) {
|
||||
handler->OnDialogResponse(dialog, response_id);
|
||||
}
|
||||
|
||||
static void OnJobCompletedThunk(GtkPrintJob* print_job,
|
||||
void* handler,
|
||||
GError* error) {
|
||||
static_cast<PrintHandler*>(handler)->OnJobCompleted(print_job, error);
|
||||
}
|
||||
|
||||
CefRefPtr<CefBrowser> browser_;
|
||||
|
||||
GtkWidget* dialog_; // Owned.
|
||||
GtkPrintSettings* gtk_settings_; // Referenced.
|
||||
GtkPageSetup* page_setup_; // Referenced.
|
||||
GtkPrinter* printer_; // Referenced.
|
||||
|
||||
CefRefPtr<CefPrintDialogCallback> dialog_callback_;
|
||||
CefRefPtr<CefPrintJobCallback> job_callback_;
|
||||
};
|
||||
|
||||
ClientPrintHandlerGtk::ClientPrintHandlerGtk() {}
|
||||
|
||||
ClientPrintHandlerGtk::~ClientPrintHandlerGtk() {
|
||||
DCHECK(print_handler_map_.empty());
|
||||
}
|
||||
|
||||
void ClientPrintHandlerGtk::OnPrintStart(CefRefPtr<CefBrowser> browser) {
|
||||
CEF_REQUIRE_UI_THREAD();
|
||||
|
||||
const int browser_id = browser->GetIdentifier();
|
||||
|
||||
#ifndef _NDEBUG
|
||||
// Print handler should not already exist for the browser.
|
||||
PrintHandlerMap::const_iterator it = print_handler_map_.find(browser_id);
|
||||
DCHECK(it == print_handler_map_.end());
|
||||
#endif
|
||||
|
||||
// Create a new print handler.
|
||||
PrintHandler* ph = new PrintHandler(browser);
|
||||
print_handler_map_.insert(std::make_pair(browser_id, ph));
|
||||
}
|
||||
|
||||
void ClientPrintHandlerGtk::OnPrintSettings(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefPrintSettings> settings,
|
||||
bool get_defaults) {
|
||||
CEF_REQUIRE_UI_THREAD();
|
||||
|
||||
GetPrintHandler(browser)->OnPrintSettings(settings, get_defaults);
|
||||
}
|
||||
|
||||
bool ClientPrintHandlerGtk::OnPrintDialog(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
bool has_selection,
|
||||
CefRefPtr<CefPrintDialogCallback> callback) {
|
||||
dialog_callback_ = callback;
|
||||
CEF_REQUIRE_UI_THREAD();
|
||||
|
||||
// TODO(cef): Identify the correct parent window.
|
||||
GtkWindow* parent = NULL;
|
||||
// TODO(estade): We need a window title here.
|
||||
dialog_ = gtk_print_unix_dialog_new(NULL, parent);
|
||||
g_signal_connect(dialog_, "delete-event",
|
||||
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
|
||||
|
||||
// Set modal so user cannot focus the same tab and press print again.
|
||||
gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE);
|
||||
|
||||
// Since we only generate PDF, only show printers that support PDF.
|
||||
// TODO(thestig) Add more capabilities to support?
|
||||
GtkPrintCapabilities cap = static_cast<GtkPrintCapabilities>(
|
||||
GTK_PRINT_CAPABILITY_GENERATE_PDF | GTK_PRINT_CAPABILITY_PAGE_SET |
|
||||
GTK_PRINT_CAPABILITY_COPIES | GTK_PRINT_CAPABILITY_COLLATE |
|
||||
GTK_PRINT_CAPABILITY_REVERSE);
|
||||
gtk_print_unix_dialog_set_manual_capabilities(GTK_PRINT_UNIX_DIALOG(dialog_),
|
||||
cap);
|
||||
gtk_print_unix_dialog_set_embed_page_setup(GTK_PRINT_UNIX_DIALOG(dialog_),
|
||||
TRUE);
|
||||
gtk_print_unix_dialog_set_support_selection(GTK_PRINT_UNIX_DIALOG(dialog_),
|
||||
TRUE);
|
||||
gtk_print_unix_dialog_set_has_selection(GTK_PRINT_UNIX_DIALOG(dialog_),
|
||||
has_selection);
|
||||
gtk_print_unix_dialog_set_settings(GTK_PRINT_UNIX_DIALOG(dialog_),
|
||||
gtk_settings_);
|
||||
g_signal_connect(dialog_, "response", G_CALLBACK(OnDialogResponseThunk),
|
||||
this);
|
||||
gtk_widget_show(dialog_);
|
||||
|
||||
return true;
|
||||
return GetPrintHandler(browser)->OnPrintDialog(has_selection, callback);
|
||||
}
|
||||
|
||||
bool ClientPrintHandlerGtk::OnPrintJob(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
const CefString& document_name,
|
||||
const CefString& pdf_file_path,
|
||||
CefRefPtr<CefPrintJobCallback> callback) {
|
||||
// If |printer_| is NULL then somehow the GTK printer list changed out under
|
||||
// us. In which case, just bail out.
|
||||
if (!printer_)
|
||||
return false;
|
||||
CEF_REQUIRE_UI_THREAD();
|
||||
|
||||
job_callback_ = callback;
|
||||
|
||||
// Save the settings for next time.
|
||||
GetLastUsedSettings()->SetLastUsedSettings(gtk_settings_);
|
||||
|
||||
GtkPrintJob* print_job = gtk_print_job_new(
|
||||
document_name.ToString().c_str(), printer_, gtk_settings_, page_setup_);
|
||||
gtk_print_job_set_source_file(print_job, pdf_file_path.ToString().c_str(),
|
||||
NULL);
|
||||
gtk_print_job_send(print_job, OnJobCompletedThunk, this, NULL);
|
||||
|
||||
return true;
|
||||
return GetPrintHandler(browser)->OnPrintJob(document_name, pdf_file_path,
|
||||
callback);
|
||||
}
|
||||
|
||||
void ClientPrintHandlerGtk::OnPrintReset() {
|
||||
if (dialog_) {
|
||||
gtk_widget_destroy(dialog_);
|
||||
dialog_ = NULL;
|
||||
}
|
||||
if (gtk_settings_) {
|
||||
g_object_unref(gtk_settings_);
|
||||
gtk_settings_ = NULL;
|
||||
}
|
||||
if (page_setup_) {
|
||||
g_object_unref(page_setup_);
|
||||
page_setup_ = NULL;
|
||||
}
|
||||
if (printer_) {
|
||||
g_object_unref(printer_);
|
||||
printer_ = NULL;
|
||||
}
|
||||
void ClientPrintHandlerGtk::OnPrintReset(CefRefPtr<CefBrowser> browser) {
|
||||
CEF_REQUIRE_UI_THREAD();
|
||||
|
||||
// Delete the print handler.
|
||||
PrintHandlerMap::iterator it =
|
||||
print_handler_map_.find(browser->GetIdentifier());
|
||||
DCHECK(it != print_handler_map_.end());
|
||||
delete it->second;
|
||||
print_handler_map_.erase(it);
|
||||
}
|
||||
|
||||
CefSize ClientPrintHandlerGtk::GetPdfPaperSize(int device_units_per_inch) {
|
||||
CEF_REQUIRE_UI_THREAD();
|
||||
|
||||
GtkPageSetup* page_setup = gtk_page_setup_new();
|
||||
|
||||
float width = gtk_page_setup_get_paper_width(page_setup, GTK_UNIT_INCH);
|
||||
@@ -432,85 +615,12 @@ CefSize ClientPrintHandlerGtk::GetPdfPaperSize(int device_units_per_inch) {
|
||||
return CefSize(width * device_units_per_inch, height * device_units_per_inch);
|
||||
}
|
||||
|
||||
void ClientPrintHandlerGtk::OnDialogResponse(GtkDialog* dialog,
|
||||
gint response_id) {
|
||||
int num_matched_handlers = g_signal_handlers_disconnect_by_func(
|
||||
dialog_, reinterpret_cast<gpointer>(&OnDialogResponseThunk), this);
|
||||
DCHECK_EQ(1, num_matched_handlers);
|
||||
|
||||
gtk_widget_hide(dialog_);
|
||||
|
||||
switch (response_id) {
|
||||
case GTK_RESPONSE_OK: {
|
||||
if (gtk_settings_)
|
||||
g_object_unref(gtk_settings_);
|
||||
gtk_settings_ =
|
||||
gtk_print_unix_dialog_get_settings(GTK_PRINT_UNIX_DIALOG(dialog_));
|
||||
|
||||
if (printer_)
|
||||
g_object_unref(printer_);
|
||||
printer_ = gtk_print_unix_dialog_get_selected_printer(
|
||||
GTK_PRINT_UNIX_DIALOG(dialog_));
|
||||
g_object_ref(printer_);
|
||||
|
||||
if (page_setup_)
|
||||
g_object_unref(page_setup_);
|
||||
page_setup_ =
|
||||
gtk_print_unix_dialog_get_page_setup(GTK_PRINT_UNIX_DIALOG(dialog_));
|
||||
g_object_ref(page_setup_);
|
||||
|
||||
// Handle page ranges.
|
||||
CefPrintSettings::PageRangeList ranges_vector;
|
||||
gint num_ranges;
|
||||
bool print_selection_only = false;
|
||||
switch (gtk_print_settings_get_print_pages(gtk_settings_)) {
|
||||
case GTK_PRINT_PAGES_RANGES: {
|
||||
GtkPageRange* gtk_range =
|
||||
gtk_print_settings_get_page_ranges(gtk_settings_, &num_ranges);
|
||||
if (gtk_range) {
|
||||
for (int i = 0; i < num_ranges; ++i) {
|
||||
ranges_vector.push_back(
|
||||
CefRange(gtk_range[i].start, gtk_range[i].end));
|
||||
}
|
||||
g_free(gtk_range);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GTK_PRINT_PAGES_SELECTION:
|
||||
print_selection_only = true;
|
||||
break;
|
||||
case GTK_PRINT_PAGES_ALL:
|
||||
// Leave |ranges_vector| empty to indicate print all pages.
|
||||
break;
|
||||
case GTK_PRINT_PAGES_CURRENT:
|
||||
default:
|
||||
NOTREACHED();
|
||||
break;
|
||||
}
|
||||
|
||||
CefRefPtr<CefPrintSettings> settings = CefPrintSettings::Create();
|
||||
settings->SetPageRanges(ranges_vector);
|
||||
settings->SetSelectionOnly(print_selection_only);
|
||||
InitPrintSettings(gtk_settings_, page_setup_, settings);
|
||||
dialog_callback_->Continue(settings);
|
||||
dialog_callback_ = NULL;
|
||||
return;
|
||||
}
|
||||
case GTK_RESPONSE_DELETE_EVENT: // Fall through.
|
||||
case GTK_RESPONSE_CANCEL: {
|
||||
dialog_callback_->Cancel();
|
||||
dialog_callback_ = NULL;
|
||||
return;
|
||||
}
|
||||
case GTK_RESPONSE_APPLY:
|
||||
default: { NOTREACHED(); }
|
||||
}
|
||||
}
|
||||
|
||||
void ClientPrintHandlerGtk::OnJobCompleted(GtkPrintJob* print_job,
|
||||
GError* error) {
|
||||
job_callback_->Continue();
|
||||
job_callback_ = NULL;
|
||||
ClientPrintHandlerGtk::PrintHandler* ClientPrintHandlerGtk::GetPrintHandler(
|
||||
CefRefPtr<CefBrowser> browser) {
|
||||
PrintHandlerMap::const_iterator it =
|
||||
print_handler_map_.find(browser->GetIdentifier());
|
||||
DCHECK(it != print_handler_map_.end());
|
||||
return it->second;
|
||||
}
|
||||
|
||||
} // namespace client
|
||||
|
@@ -7,8 +7,7 @@
|
||||
#define CEF_TESTS_CEFCLIENT_BROWSER_PRINT_HANDLER_GTK_H_
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk/gtkunixprint.h>
|
||||
#include <map>
|
||||
|
||||
#include "include/cef_print_handler.h"
|
||||
|
||||
@@ -17,44 +16,31 @@ namespace client {
|
||||
class ClientPrintHandlerGtk : public CefPrintHandler {
|
||||
public:
|
||||
ClientPrintHandlerGtk();
|
||||
virtual ~ClientPrintHandlerGtk();
|
||||
|
||||
// CefPrintHandler methods.
|
||||
void OnPrintStart(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
void OnPrintSettings(CefRefPtr<CefPrintSettings> settings,
|
||||
void OnPrintSettings(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefPrintSettings> settings,
|
||||
bool get_defaults) OVERRIDE;
|
||||
bool OnPrintDialog(bool has_selection,
|
||||
bool OnPrintDialog(CefRefPtr<CefBrowser> browser,
|
||||
bool has_selection,
|
||||
CefRefPtr<CefPrintDialogCallback> callback) OVERRIDE;
|
||||
bool OnPrintJob(const CefString& document_name,
|
||||
bool OnPrintJob(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& document_name,
|
||||
const CefString& pdf_file_path,
|
||||
CefRefPtr<CefPrintJobCallback> callback) OVERRIDE;
|
||||
void OnPrintReset() OVERRIDE;
|
||||
void OnPrintReset(CefRefPtr<CefBrowser> browser) OVERRIDE;
|
||||
CefSize GetPdfPaperSize(int device_units_per_inch) OVERRIDE;
|
||||
|
||||
private:
|
||||
void OnDialogResponse(GtkDialog* dialog, gint response_id);
|
||||
void OnJobCompleted(GtkPrintJob* print_job, GError* error);
|
||||
// Print handler.
|
||||
struct PrintHandler;
|
||||
PrintHandler* GetPrintHandler(CefRefPtr<CefBrowser> browser);
|
||||
|
||||
static void OnDialogResponseThunk(GtkDialog* dialog,
|
||||
gint response_id,
|
||||
ClientPrintHandlerGtk* handler) {
|
||||
handler->OnDialogResponse(dialog, response_id);
|
||||
}
|
||||
static void OnJobCompletedThunk(GtkPrintJob* print_job,
|
||||
void* handler,
|
||||
GError* error) {
|
||||
static_cast<ClientPrintHandlerGtk*>(handler)->OnJobCompleted(print_job,
|
||||
error);
|
||||
}
|
||||
|
||||
// Print dialog settings. ClientPrintHandlerGtk owns |dialog_| and holds
|
||||
// references to the other objects.
|
||||
GtkWidget* dialog_;
|
||||
GtkPrintSettings* gtk_settings_;
|
||||
GtkPageSetup* page_setup_;
|
||||
GtkPrinter* printer_;
|
||||
|
||||
CefRefPtr<CefPrintDialogCallback> dialog_callback_;
|
||||
CefRefPtr<CefPrintJobCallback> job_callback_;
|
||||
// Map of browser ID to print handler.
|
||||
typedef std::map<int, PrintHandler*> PrintHandlerMap;
|
||||
PrintHandlerMap print_handler_map_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(ClientPrintHandlerGtk);
|
||||
DISALLOW_COPY_AND_ASSIGN(ClientPrintHandlerGtk);
|
||||
|
@@ -614,7 +614,7 @@ LRESULT CALLBACK RootWindowWin::RootWndProc(HWND hWnd,
|
||||
SetUserDataPtr(hWnd, NULL);
|
||||
self->hwnd_ = NULL;
|
||||
self->OnDestroyed();
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
|
@@ -16,17 +16,17 @@ namespace {
|
||||
const char kTestUrl[] = "https://tests/AccessibilityTestHandler";
|
||||
const char kTipText[] = "Also known as User ID";
|
||||
|
||||
// default osr widget size
|
||||
// Default OSR widget size.
|
||||
const int kOsrWidth = 600;
|
||||
const int kOsrHeight = 400;
|
||||
|
||||
// test type
|
||||
// Test type.
|
||||
enum AccessibilityTestType {
|
||||
// Enabling Accessibility should trigger the AccessibilityHandler callback
|
||||
// with Accessibility tree details
|
||||
TEST_ENABLE_ACCESSIBILITY,
|
||||
TEST_ENABLE,
|
||||
// Disabling Accessibility should disable accessibility notification changes
|
||||
TEST_DISABLE_ACCESSIBILITY,
|
||||
TEST_DISABLE,
|
||||
// Focus change on element should trigger Accessibility focus event
|
||||
TEST_FOCUS_CHANGE,
|
||||
// Hide/Show etc should trigger Location Change callbacks
|
||||
@@ -44,10 +44,10 @@ class AccessibilityTestHandler : public TestHandler,
|
||||
return this;
|
||||
}
|
||||
|
||||
CefRefPtr<CefRenderHandler> GetRenderHandler() OVERRIDE { return this; }
|
||||
CefRefPtr<CefRenderHandler> GetRenderHandler() override { return this; }
|
||||
|
||||
// Cef Renderer Handler Methods
|
||||
bool GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect) OVERRIDE {
|
||||
bool GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect) override {
|
||||
rect = CefRect(0, 0, kOsrWidth, kOsrHeight);
|
||||
return true;
|
||||
}
|
||||
@@ -64,27 +64,10 @@ class AccessibilityTestHandler : public TestHandler,
|
||||
const CefRenderHandler::RectList& dirtyRects,
|
||||
const void* buffer,
|
||||
int width,
|
||||
int height) OVERRIDE {
|
||||
int height) override {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
// OSRTestHandler functions
|
||||
void CreateOSRBrowser(const CefString& url) {
|
||||
CefWindowInfo windowInfo;
|
||||
CefBrowserSettings settings;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
windowInfo.SetAsWindowless(GetDesktopWindow());
|
||||
#elif defined(OS_MACOSX)
|
||||
windowInfo.SetAsWindowless(kNullWindowHandle);
|
||||
#elif defined(OS_LINUX)
|
||||
windowInfo.SetAsWindowless(kNullWindowHandle);
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
CefBrowserHost::CreateBrowser(windowInfo, this, url, settings, NULL);
|
||||
}
|
||||
|
||||
void RunTest() override {
|
||||
std::string html =
|
||||
"<html><head><title>AccessibilityTest</title></head>"
|
||||
@@ -111,11 +94,11 @@ class AccessibilityTestHandler : public TestHandler,
|
||||
// Enable Accessibility
|
||||
browser->GetHost()->SetAccessibilityState(STATE_ENABLED);
|
||||
switch (test_type_) {
|
||||
case TEST_ENABLE_ACCESSIBILITY: {
|
||||
case TEST_ENABLE: {
|
||||
// This should trigger OnAccessibilityTreeChange
|
||||
// And update will be validated
|
||||
} break;
|
||||
case TEST_DISABLE_ACCESSIBILITY: {
|
||||
case TEST_DISABLE: {
|
||||
// Post a delayed task to disable Accessibility
|
||||
CefPostDelayedTask(
|
||||
TID_UI,
|
||||
@@ -131,12 +114,12 @@ class AccessibilityTestHandler : public TestHandler,
|
||||
}
|
||||
}
|
||||
|
||||
void OnAccessibilityTreeChange(CefRefPtr<CefValue> value) OVERRIDE {
|
||||
void OnAccessibilityTreeChange(CefRefPtr<CefValue> value) override {
|
||||
switch (test_type_) {
|
||||
case TEST_ENABLE_ACCESSIBILITY: {
|
||||
case TEST_ENABLE: {
|
||||
TestEnableAccessibilityUpdate(value);
|
||||
} break;
|
||||
case TEST_DISABLE_ACCESSIBILITY: {
|
||||
case TEST_DISABLE: {
|
||||
// Once Accessibility is disabled in the delayed Task
|
||||
// We should not reach here
|
||||
EXPECT_FALSE(accessibility_disabled_);
|
||||
@@ -217,7 +200,7 @@ class AccessibilityTestHandler : public TestHandler,
|
||||
}
|
||||
}
|
||||
|
||||
void OnAccessibilityLocationChange(CefRefPtr<CefValue> value) OVERRIDE {
|
||||
void OnAccessibilityLocationChange(CefRefPtr<CefValue> value) override {
|
||||
if (test_type_ == TEST_LOCATION_CHANGE) {
|
||||
EXPECT_TRUE(edit_box_id_ != -1);
|
||||
EXPECT_TRUE(value.get());
|
||||
@@ -259,6 +242,22 @@ class AccessibilityTestHandler : public TestHandler,
|
||||
}
|
||||
|
||||
private:
|
||||
void CreateOSRBrowser(const CefString& url) {
|
||||
CefWindowInfo windowInfo;
|
||||
CefBrowserSettings settings;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
windowInfo.SetAsWindowless(GetDesktopWindow());
|
||||
#elif defined(OS_MACOSX)
|
||||
windowInfo.SetAsWindowless(kNullWindowHandle);
|
||||
#elif defined(OS_LINUX)
|
||||
windowInfo.SetAsWindowless(kNullWindowHandle);
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
CefBrowserHost::CreateBrowser(windowInfo, this, url, settings, NULL);
|
||||
}
|
||||
|
||||
void HideEditBox(CefRefPtr<CefBrowser> browser) {
|
||||
// Set focus on edit box
|
||||
// This should trigger Location update if enabled
|
||||
@@ -426,34 +425,30 @@ class AccessibilityTestHandler : public TestHandler,
|
||||
|
||||
} // namespace
|
||||
|
||||
TEST(AccessibilityTest, EnableAccessibility) {
|
||||
TEST(OSRTest, AccessibilityEnable) {
|
||||
CefRefPtr<AccessibilityTestHandler> handler =
|
||||
new AccessibilityTestHandler(TEST_ENABLE_ACCESSIBILITY);
|
||||
new AccessibilityTestHandler(TEST_ENABLE);
|
||||
handler->ExecuteTest();
|
||||
EXPECT_TRUE(true);
|
||||
ReleaseAndWaitForDestructor(handler);
|
||||
}
|
||||
|
||||
TEST(AccessibilityTest, DisableAccessibility) {
|
||||
TEST(OSRTest, AccessibilityDisable) {
|
||||
CefRefPtr<AccessibilityTestHandler> handler =
|
||||
new AccessibilityTestHandler(TEST_DISABLE_ACCESSIBILITY);
|
||||
new AccessibilityTestHandler(TEST_DISABLE);
|
||||
handler->ExecuteTest();
|
||||
EXPECT_TRUE(true);
|
||||
ReleaseAndWaitForDestructor(handler);
|
||||
}
|
||||
|
||||
TEST(AccessibilityTest, FocusChange) {
|
||||
TEST(OSRTest, AccessibilityFocusChange) {
|
||||
CefRefPtr<AccessibilityTestHandler> handler =
|
||||
new AccessibilityTestHandler(TEST_FOCUS_CHANGE);
|
||||
handler->ExecuteTest();
|
||||
EXPECT_TRUE(true);
|
||||
ReleaseAndWaitForDestructor(handler);
|
||||
}
|
||||
|
||||
TEST(AccessibilityTest, LocationChange) {
|
||||
TEST(OSRTest, AccessibilityLocationChange) {
|
||||
CefRefPtr<AccessibilityTestHandler> handler =
|
||||
new AccessibilityTestHandler(TEST_LOCATION_CHANGE);
|
||||
handler->ExecuteTest();
|
||||
EXPECT_TRUE(true);
|
||||
ReleaseAndWaitForDestructor(handler);
|
||||
}
|
174
tests/ceftests/osr_display_unittest.cc
Normal file
174
tests/ceftests/osr_display_unittest.cc
Normal file
@@ -0,0 +1,174 @@
|
||||
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
|
||||
#include "include/base/cef_bind.h"
|
||||
#include "include/wrapper/cef_closure_task.h"
|
||||
|
||||
#include "tests/ceftests/routing_test_handler.h"
|
||||
#include "tests/gtest/include/gtest/gtest.h"
|
||||
|
||||
namespace {
|
||||
|
||||
const char kTestUrl1[] = "https://tests/DisplayTestHandler.START";
|
||||
const char kTestUrl2[] = "https://tests/DisplayTestHandler.NAVIGATE";
|
||||
const char kTestMsg[] = "DisplayTestHandler.Status";
|
||||
|
||||
// Default OSR widget size.
|
||||
const int kOsrWidth = 600;
|
||||
const int kOsrHeight = 400;
|
||||
|
||||
class DisplayTestHandler : public RoutingTestHandler, public CefRenderHandler {
|
||||
public:
|
||||
DisplayTestHandler() : status_(START) {}
|
||||
|
||||
CefRefPtr<CefRenderHandler> GetRenderHandler() override { return this; }
|
||||
|
||||
bool GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect) override {
|
||||
rect = CefRect(0, 0, kOsrWidth, kOsrHeight);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GetScreenInfo(CefRefPtr<CefBrowser> browser,
|
||||
CefScreenInfo& screen_info) override {
|
||||
screen_info.rect = CefRect(0, 0, kOsrWidth, kOsrHeight);
|
||||
screen_info.available_rect = screen_info.rect;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnPaint(CefRefPtr<CefBrowser> browser,
|
||||
CefRenderHandler::PaintElementType type,
|
||||
const CefRenderHandler::RectList& dirtyRects,
|
||||
const void* buffer,
|
||||
int width,
|
||||
int height) override {
|
||||
if (!got_paint_[status_]) {
|
||||
got_paint_[status_].yes();
|
||||
|
||||
if (status_ == START)
|
||||
OnStartIfDone();
|
||||
else if (status_ == SHOW)
|
||||
CefPostTask(TID_UI, base::Bind(&DisplayTestHandler::DestroyTest, this));
|
||||
else
|
||||
EXPECT_FALSE(true); // Not reached.
|
||||
}
|
||||
}
|
||||
|
||||
void RunTest() override {
|
||||
// Add the resources that we will navigate to/from.
|
||||
AddResource(kTestUrl1, GetPageContents("Page1", "START"), "text/html");
|
||||
AddResource(kTestUrl2, GetPageContents("Page2", "NAVIGATE"), "text/html");
|
||||
|
||||
// Create the browser.
|
||||
CreateOSRBrowser(kTestUrl1);
|
||||
|
||||
// Time out the test after a reasonable period of time.
|
||||
SetTestTimeout(5000);
|
||||
}
|
||||
|
||||
bool OnQuery(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
int64 query_id,
|
||||
const CefString& request,
|
||||
bool persistent,
|
||||
CefRefPtr<Callback> callback) override {
|
||||
const std::string& request_str = request.ToString();
|
||||
if (request_str.find(kTestMsg) == 0) {
|
||||
const std::string& status = request_str.substr(sizeof(kTestMsg));
|
||||
if (status == "START") {
|
||||
got_start_msg_.yes();
|
||||
OnStartIfDone();
|
||||
} else if (status == "NAVIGATE") {
|
||||
got_navigate_msg_.yes();
|
||||
// Wait a bit to verify no OnPaint callback.
|
||||
CefPostDelayedTask(
|
||||
TID_UI, base::Bind(&DisplayTestHandler::OnNavigate, this), 250);
|
||||
}
|
||||
}
|
||||
callback->Success("");
|
||||
return true;
|
||||
}
|
||||
|
||||
void DestroyTest() override {
|
||||
EXPECT_TRUE(got_paint_[START]);
|
||||
EXPECT_FALSE(got_paint_[NAVIGATE]);
|
||||
EXPECT_TRUE(got_paint_[SHOW]);
|
||||
|
||||
EXPECT_TRUE(got_start_msg_);
|
||||
EXPECT_TRUE(got_navigate_msg_);
|
||||
|
||||
EXPECT_EQ(status_, SHOW);
|
||||
|
||||
RoutingTestHandler::DestroyTest();
|
||||
}
|
||||
|
||||
private:
|
||||
void CreateOSRBrowser(const CefString& url) {
|
||||
CefWindowInfo windowInfo;
|
||||
CefBrowserSettings settings;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
windowInfo.SetAsWindowless(GetDesktopWindow());
|
||||
#else
|
||||
windowInfo.SetAsWindowless(kNullWindowHandle);
|
||||
#endif
|
||||
|
||||
CefBrowserHost::CreateBrowser(windowInfo, this, url, settings, NULL);
|
||||
}
|
||||
|
||||
std::string GetPageContents(const std::string& name,
|
||||
const std::string& status) {
|
||||
return "<html><body>Page1<script>window.testQuery({request:'" +
|
||||
std::string(kTestMsg) + ":" + status + "'});</script></body></html>";
|
||||
}
|
||||
|
||||
void OnStartIfDone() {
|
||||
if (got_start_msg_ && got_paint_[START])
|
||||
CefPostTask(TID_UI, base::Bind(&DisplayTestHandler::OnStart, this));
|
||||
}
|
||||
|
||||
void OnStart() {
|
||||
EXPECT_EQ(status_, START);
|
||||
|
||||
// Hide the browser. OnPaint should not be called again until
|
||||
// WasHidden(false) is explicitly called.
|
||||
GetBrowser()->GetHost()->WasHidden(true);
|
||||
status_ = NAVIGATE;
|
||||
|
||||
GetBrowser()->GetMainFrame()->LoadURL(kTestUrl2);
|
||||
}
|
||||
|
||||
void OnNavigate() {
|
||||
EXPECT_EQ(status_, NAVIGATE);
|
||||
|
||||
// Show the browser.
|
||||
status_ = SHOW;
|
||||
GetBrowser()->GetHost()->WasHidden(false);
|
||||
|
||||
// Force a call to OnPaint.
|
||||
GetBrowser()->GetHost()->Invalidate(PET_VIEW);
|
||||
}
|
||||
|
||||
enum Status {
|
||||
START,
|
||||
NAVIGATE,
|
||||
SHOW,
|
||||
STATUS_COUNT,
|
||||
};
|
||||
Status status_;
|
||||
|
||||
TrackCallback got_paint_[STATUS_COUNT];
|
||||
TrackCallback got_start_msg_;
|
||||
TrackCallback got_navigate_msg_;
|
||||
|
||||
IMPLEMENT_REFCOUNTING(DisplayTestHandler);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
// Test that browser visibility is not changed due to navigation.
|
||||
TEST(OSRTest, NavigateWhileHidden) {
|
||||
CefRefPtr<DisplayTestHandler> handler = new DisplayTestHandler();
|
||||
handler->ExecuteTest();
|
||||
ReleaseAndWaitForDestructor(handler);
|
||||
}
|
@@ -7,7 +7,7 @@ Description:
|
||||
Fuzed (single header/source file) version of GoogleTest. Generated from the
|
||||
Chromium source checkout with the following command:
|
||||
|
||||
cd /path/to/chromium/src/testing/gtest/scripts
|
||||
cd /path/to/chromium/src/third_party/googletest/src/googletest/scripts
|
||||
./fuse_gtest_files.py <out_directory>
|
||||
|
||||
Local Modifications:
|
||||
|
@@ -37,6 +37,7 @@ const char kHideControls[] = "hide-controls";
|
||||
const char kHideTopMenu[] = "hide-top-menu";
|
||||
const char kWidevineCdmPath[] = "widevine-cdm-path";
|
||||
const char kSslClientCertificate[] = "ssl-client-certificate";
|
||||
const char kCRLSetsPath[] = "crl-sets-path";
|
||||
|
||||
} // namespace switches
|
||||
} // namespace client
|
||||
|
@@ -31,6 +31,7 @@ extern const char kHideControls[];
|
||||
extern const char kHideTopMenu[];
|
||||
extern const char kWidevineCdmPath[];
|
||||
extern const char kSslClientCertificate[];
|
||||
extern const char kCRLSetsPath[];
|
||||
|
||||
} // namespace switches
|
||||
} // namespace client
|
||||
|
@@ -510,6 +510,18 @@ parser.add_option(
|
||||
dest='clientdistribonly',
|
||||
default=False,
|
||||
help='Create a client CEF binary distribution only.')
|
||||
parser.add_option(
|
||||
'--sandbox-distrib',
|
||||
action='store_true',
|
||||
dest='sandboxdistrib',
|
||||
default=False,
|
||||
help='Create a cef_sandbox static library distribution.')
|
||||
parser.add_option(
|
||||
'--sandbox-distrib-only',
|
||||
action='store_true',
|
||||
dest='sandboxdistribonly',
|
||||
default=False,
|
||||
help='Create a cef_sandbox static library distribution only.')
|
||||
parser.add_option(
|
||||
'--no-distrib-docs',
|
||||
action='store_true',
|
||||
@@ -557,7 +569,7 @@ if (options.nochromiumupdate and options.forceupdate) or \
|
||||
if (options.noreleasebuild and \
|
||||
(options.minimaldistrib or options.minimaldistribonly or \
|
||||
options.clientdistrib or options.clientdistribonly)) or \
|
||||
(options.minimaldistribonly and options.clientdistribonly):
|
||||
(options.minimaldistribonly + options.clientdistribonly + options.sandboxdistribonly > 1):
|
||||
print 'Invalid combination of options.'
|
||||
parser.print_help(sys.stderr)
|
||||
sys.exit()
|
||||
@@ -600,13 +612,20 @@ if options.clientdistrib or options.clientdistribonly:
|
||||
parser.print_help(sys.stderr)
|
||||
sys.exit()
|
||||
|
||||
if platform != 'windows' and (options.sandboxdistrib or
|
||||
options.sandboxdistribonly):
|
||||
print 'The sandbox distribution is only supported on Windows.'
|
||||
sys.exit()
|
||||
|
||||
# CEF branch.
|
||||
if options.branch != 'trunk' and not options.branch.isdigit():
|
||||
print 'Invalid branch value: %s' % (options.branch)
|
||||
sys.exit()
|
||||
|
||||
cef_branch = options.branch
|
||||
|
||||
if cef_branch != 'trunk' and int(cef_branch) <= 1453:
|
||||
print 'The requested branch is too old to build using this tool'
|
||||
print 'The requested branch is too old to build using this tool.'
|
||||
sys.exit()
|
||||
|
||||
# True if the requested branch is 2272 or newer.
|
||||
@@ -1054,30 +1073,51 @@ if not options.nobuild and (chromium_checkout_changed or \
|
||||
if platform == 'windows' and options.x64build:
|
||||
build_dir_suffix = '_x64'
|
||||
|
||||
# Make a CEF Debug build.
|
||||
if not options.nodebugbuild:
|
||||
build_path = os.path.join('out', 'Debug' + build_dir_suffix)
|
||||
if use_gn:
|
||||
args_path = os.path.join(chromium_src_dir, build_path, 'args.gn')
|
||||
if os.path.exists(args_path):
|
||||
msg(args_path + ' contents:\n' + read_file(args_path))
|
||||
msg(args_path + ' contents:\n' + read_file(args_path))
|
||||
|
||||
# Make a CEF Debug build.
|
||||
run(command + build_path + target, chromium_src_dir, depot_tools_dir,
|
||||
os.path.join(download_dir, 'build-%s-debug.log' % (cef_branch)) \
|
||||
if options.buildlogfile else None)
|
||||
|
||||
if use_gn and platform == 'windows':
|
||||
# Make the separate cef_sandbox.lib build when GN is_official_build=true.
|
||||
build_path = os.path.join('out', 'Debug' + build_dir_suffix + '_sandbox')
|
||||
if os.path.exists(os.path.join(chromium_src_dir, build_path)):
|
||||
args_path = os.path.join(chromium_src_dir, build_path, 'args.gn')
|
||||
msg(args_path + ' contents:\n' + read_file(args_path))
|
||||
|
||||
run(command + build_path + ' cef_sandbox', chromium_src_dir, depot_tools_dir,
|
||||
os.path.join(download_dir, 'build-%s-debug-sandbox.log' % (cef_branch)) \
|
||||
if options.buildlogfile else None)
|
||||
|
||||
# Make a CEF Release build.
|
||||
if not options.noreleasebuild:
|
||||
build_path = os.path.join('out', 'Release' + build_dir_suffix)
|
||||
if use_gn:
|
||||
args_path = os.path.join(chromium_src_dir, build_path, 'args.gn')
|
||||
if os.path.exists(args_path):
|
||||
msg(args_path + ' contents:\n' + read_file(args_path))
|
||||
msg(args_path + ' contents:\n' + read_file(args_path))
|
||||
|
||||
# Make a CEF Release build.
|
||||
run(command + build_path + target, chromium_src_dir, depot_tools_dir,
|
||||
os.path.join(download_dir, 'build-%s-release.log' % (cef_branch)) \
|
||||
if options.buildlogfile else None)
|
||||
|
||||
if use_gn and platform == 'windows':
|
||||
# Make the separate cef_sandbox.lib build when GN is_official_build=true.
|
||||
build_path = os.path.join('out',
|
||||
'Release' + build_dir_suffix + '_sandbox')
|
||||
if os.path.exists(os.path.join(chromium_src_dir, build_path)):
|
||||
args_path = os.path.join(chromium_src_dir, build_path, 'args.gn')
|
||||
msg(args_path + ' contents:\n' + read_file(args_path))
|
||||
|
||||
run(command + build_path + ' cef_sandbox', chromium_src_dir, depot_tools_dir,
|
||||
os.path.join(download_dir, 'build-%s-release-sandbox.log' % (cef_branch)) \
|
||||
if options.buildlogfile else None)
|
||||
|
||||
elif not options.nobuild:
|
||||
msg('Not building. The source hashes have not changed and ' +
|
||||
'the output folder "%s" already exists' % (out_src_dir))
|
||||
@@ -1099,12 +1139,16 @@ if not options.nodistrib and (chromium_checkout_changed or \
|
||||
distrib_types.append('minimal')
|
||||
elif options.clientdistribonly:
|
||||
distrib_types.append('client')
|
||||
elif options.sandboxdistribonly:
|
||||
distrib_types.append('sandbox')
|
||||
else:
|
||||
distrib_types.append('standard')
|
||||
if options.minimaldistrib:
|
||||
distrib_types.append('minimal')
|
||||
if options.clientdistrib:
|
||||
distrib_types.append('client')
|
||||
if options.sandboxdistrib:
|
||||
distrib_types.append('sandbox')
|
||||
|
||||
cef_tools_dir = os.path.join(cef_src_dir, 'tools')
|
||||
|
||||
@@ -1124,6 +1168,8 @@ if not options.nodistrib and (chromium_checkout_changed or \
|
||||
path = path + ' --minimal'
|
||||
elif type == 'client':
|
||||
path = path + ' --client'
|
||||
elif type == 'sandbox':
|
||||
path = path + ' --sandbox'
|
||||
|
||||
if first_type:
|
||||
if options.nodistribdocs:
|
||||
|
14
tools/distrib/win/README.sandbox.txt
Normal file
14
tools/distrib/win/README.sandbox.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
CONTENTS
|
||||
--------
|
||||
|
||||
Debug Contains the Debug build of cef_sandbox.lib.
|
||||
|
||||
Release Contains the Release build of cef_sandbox.lib.
|
||||
|
||||
|
||||
USAGE
|
||||
-----
|
||||
|
||||
Please visit the CEF Website for usage information.
|
||||
|
||||
https://bitbucket.org/chromiumembedded/cef/
|
@@ -419,6 +419,28 @@ def GetConfigArgs(args, is_debug, cpu):
|
||||
return result
|
||||
|
||||
|
||||
def WinGetConfigArgsSandbox(args, is_debug, cpu):
|
||||
"""
|
||||
Return merged GN args for the Windows cef_sandbox.lib configuration and
|
||||
validate.
|
||||
"""
|
||||
add_args = {
|
||||
# Avoid libucrt.lib linker errors.
|
||||
'use_allocator_shim': False,
|
||||
|
||||
# Avoid /LTCG linker warnings and generate smaller lib files.
|
||||
'is_official_build': False
|
||||
}
|
||||
|
||||
result = MergeDicts(args, add_args, {
|
||||
'is_debug': is_debug,
|
||||
'target_cpu': cpu,
|
||||
})
|
||||
|
||||
ValidateArgs(result)
|
||||
return result
|
||||
|
||||
|
||||
def LinuxSysrootExists(cpu):
|
||||
"""
|
||||
Returns true if the sysroot for the specified |cpu| architecture exists.
|
||||
@@ -426,12 +448,13 @@ def LinuxSysrootExists(cpu):
|
||||
# Directory that contains sysroots.
|
||||
sysroot_root = os.path.join(src_dir, 'build', 'linux')
|
||||
# CPU-specific sysroot directory names.
|
||||
# Should match the values in build/config/sysroot.gni.
|
||||
if cpu == 'x86':
|
||||
sysroot_name = 'debian_wheezy_i386-sysroot'
|
||||
sysroot_name = 'debian_jessie_i386-sysroot'
|
||||
elif cpu == 'x64':
|
||||
sysroot_name = 'debian_wheezy_amd64-sysroot'
|
||||
sysroot_name = 'debian_jessie_amd64-sysroot'
|
||||
elif cpu == 'arm':
|
||||
sysroot_name = 'debian_wheezy_arm-sysroot'
|
||||
sysroot_name = 'debian_jessie_arm-sysroot'
|
||||
else:
|
||||
raise Exception('Unrecognized sysroot CPU: %s' % cpu)
|
||||
|
||||
@@ -480,6 +503,14 @@ def GetAllPlatformConfigs(build_args):
|
||||
result['Debug_GN_' + cpu] = GetConfigArgs(args, True, cpu)
|
||||
result['Release_GN_' + cpu] = GetConfigArgs(args, False, cpu)
|
||||
|
||||
if platform == 'windows' and GetArgValue(args, 'is_official_build'):
|
||||
# Build cef_sandbox.lib with a different configuration.
|
||||
if create_debug:
|
||||
result['Debug_GN_' + cpu + '_sandbox'] = WinGetConfigArgsSandbox(
|
||||
args, True, cpu)
|
||||
result['Release_GN_' + cpu + '_sandbox'] = WinGetConfigArgsSandbox(
|
||||
args, False, cpu)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
|
@@ -112,7 +112,10 @@ def create_readme():
|
||||
footer_data = get_readme_component('footer')
|
||||
|
||||
# format the file
|
||||
data = header_data + '\n\n' + mode_data + '\n\n' + redistrib_data + '\n\n' + footer_data
|
||||
data = header_data + '\n\n' + mode_data
|
||||
if mode != 'sandbox':
|
||||
data += '\n\n' + redistrib_data
|
||||
data += '\n\n' + footer_data
|
||||
data = data.replace('$CEF_URL$', cef_url)
|
||||
data = data.replace('$CEF_REV$', cef_rev)
|
||||
data = data.replace('$CEF_VER$', cef_ver)
|
||||
@@ -149,6 +152,10 @@ def create_readme():
|
||||
distrib_desc = 'This distribution contains a release build of the ' + client_app + ' sample application\n' \
|
||||
'for the ' + platform_str + ' platform. Please see the LICENSING section of this document for\n' \
|
||||
'licensing terms and conditions.'
|
||||
elif mode == 'sandbox':
|
||||
distrib_type = 'Sandbox'
|
||||
distrib_desc = 'This distribution contains only the cef_sandbox static library. Please see\n' \
|
||||
'the LICENSING section of this document for licensing terms and conditions.'
|
||||
|
||||
data = data.replace('$DISTRIB_TYPE$', distrib_type)
|
||||
data = data.replace('$DISTRIB_DESC$', distrib_desc)
|
||||
@@ -160,7 +167,8 @@ def create_readme():
|
||||
|
||||
def create_fuzed_gtest(tests_dir):
|
||||
""" Generate a fuzed version of gtest and build the expected directory structure. """
|
||||
src_gtest_dir = os.path.join(src_dir, 'testing', 'gtest')
|
||||
src_gtest_dir = os.path.join(src_dir, 'third_party', 'googletest', 'src',
|
||||
'googletest')
|
||||
run('%s fuse_gtest_files.py \"%s\"' % (sys.executable, tests_dir),
|
||||
os.path.join(src_gtest_dir, 'scripts'))
|
||||
|
||||
@@ -342,7 +350,7 @@ parser.add_option(
|
||||
action='store_true',
|
||||
dest='armbuild',
|
||||
default=False,
|
||||
help='create an ARM binary distribution')
|
||||
help='create an ARM binary distribution (Linux only)')
|
||||
parser.add_option(
|
||||
'--minimal',
|
||||
action='store_true',
|
||||
@@ -355,6 +363,12 @@ parser.add_option(
|
||||
dest='client',
|
||||
default=False,
|
||||
help='include only the sample application')
|
||||
parser.add_option(
|
||||
'--sandbox',
|
||||
action='store_true',
|
||||
dest='sandbox',
|
||||
default=False,
|
||||
help='include only the cef_sandbox static library (Windows only)')
|
||||
parser.add_option(
|
||||
'-q',
|
||||
'--quiet',
|
||||
@@ -392,6 +406,10 @@ if options.armbuild and platform != 'linux':
|
||||
print '--arm-build is only supported on Linux.'
|
||||
sys.exit()
|
||||
|
||||
if options.sandbox and platform != 'windows':
|
||||
print '--sandbox is only supported on Windows.'
|
||||
sys.exit()
|
||||
|
||||
if not options.ninjabuild:
|
||||
print 'Ninja build is required on all platforms'
|
||||
sys.exit()
|
||||
@@ -455,6 +473,9 @@ if options.minimal:
|
||||
elif options.client:
|
||||
mode = 'client'
|
||||
output_dir_name = output_dir_name + '_client'
|
||||
elif options.sandbox:
|
||||
mode = 'sandbox'
|
||||
output_dir_name = output_dir_name + '_sandbox'
|
||||
else:
|
||||
mode = 'standard'
|
||||
|
||||
@@ -644,15 +665,31 @@ if platform == 'windows':
|
||||
]
|
||||
|
||||
libcef_dll_file = 'libcef.dll.lib'
|
||||
cef_sandbox_lib = 'obj\\cef\\cef_sandbox.lib'
|
||||
sandbox_libs = [
|
||||
'obj\\base\\allocator\\unified_allocator_shim\\*.obj',
|
||||
'obj\\base\\base.lib',
|
||||
'obj\\base\\base_static.lib',
|
||||
'obj\\base\\third_party\\dynamic_annotations\\dynamic_annotations.lib',
|
||||
'obj\\cef\\cef_sandbox.lib',
|
||||
cef_sandbox_lib,
|
||||
'obj\\sandbox\\win\\sandbox.lib',
|
||||
]
|
||||
|
||||
# Generate the cef_sandbox.lib merged library. A separate *_sandbox build
|
||||
# should exist when GN is_official_build=true.
|
||||
if mode in ('standard', 'minimal', 'sandbox'):
|
||||
dirs = {
|
||||
'Debug': (build_dir_debug + '_sandbox', build_dir_debug),
|
||||
'Release': (build_dir_release + '_sandbox', build_dir_release)
|
||||
}
|
||||
for dir_name in dirs.keys():
|
||||
for src_dir in dirs[dir_name]:
|
||||
if path_exists(os.path.join(src_dir, cef_sandbox_lib)):
|
||||
dst_dir = os.path.join(output_dir, dir_name)
|
||||
make_dir(dst_dir, options.quiet)
|
||||
combine_libs(src_dir, sandbox_libs,
|
||||
os.path.join(dst_dir, 'cef_sandbox.lib'))
|
||||
break
|
||||
|
||||
valid_build_dir = None
|
||||
|
||||
if mode == 'standard':
|
||||
@@ -671,8 +708,6 @@ if platform == 'windows':
|
||||
os.path.join(dst_dir, os.path.basename(binary)), options.quiet)
|
||||
copy_file(os.path.join(build_dir, libcef_dll_file), os.path.join(dst_dir, 'libcef.lib'), \
|
||||
options.quiet)
|
||||
combine_libs(build_dir, sandbox_libs,
|
||||
os.path.join(dst_dir, 'cef_sandbox.lib'))
|
||||
|
||||
if not options.nosymbols:
|
||||
# create the symbol output directory
|
||||
@@ -685,39 +720,38 @@ if platform == 'windows':
|
||||
else:
|
||||
sys.stderr.write("No Debug build files.\n")
|
||||
|
||||
# transfer Release files
|
||||
build_dir = build_dir_release
|
||||
if not options.allowpartial or path_exists(
|
||||
os.path.join(build_dir, 'libcef.dll')):
|
||||
valid_build_dir = build_dir
|
||||
dst_dir = os.path.join(output_dir, 'Release')
|
||||
make_dir(dst_dir, options.quiet)
|
||||
copy_files(
|
||||
os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet)
|
||||
for binary in binaries:
|
||||
copy_file(
|
||||
os.path.join(build_dir, binary),
|
||||
os.path.join(dst_dir, os.path.basename(binary)), options.quiet)
|
||||
if mode != 'sandbox':
|
||||
# transfer Release files
|
||||
build_dir = build_dir_release
|
||||
if not options.allowpartial or path_exists(
|
||||
os.path.join(build_dir, 'libcef.dll')):
|
||||
valid_build_dir = build_dir
|
||||
dst_dir = os.path.join(output_dir, 'Release')
|
||||
make_dir(dst_dir, options.quiet)
|
||||
copy_files(
|
||||
os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet)
|
||||
for binary in binaries:
|
||||
copy_file(
|
||||
os.path.join(build_dir, binary),
|
||||
os.path.join(dst_dir, os.path.basename(binary)), options.quiet)
|
||||
|
||||
if mode != 'client':
|
||||
copy_file(os.path.join(build_dir, libcef_dll_file), os.path.join(dst_dir, 'libcef.lib'), \
|
||||
options.quiet)
|
||||
combine_libs(build_dir, sandbox_libs,
|
||||
os.path.join(dst_dir, 'cef_sandbox.lib'))
|
||||
if mode != 'client':
|
||||
copy_file(os.path.join(build_dir, libcef_dll_file), os.path.join(dst_dir, 'libcef.lib'), \
|
||||
options.quiet)
|
||||
else:
|
||||
copy_file(
|
||||
os.path.join(build_dir, 'cefclient.exe'), dst_dir, options.quiet)
|
||||
|
||||
if not options.nosymbols:
|
||||
# create the symbol output directory
|
||||
symbol_output_dir = create_output_dir(
|
||||
output_dir_name + '_release_symbols', options.outputdir)
|
||||
# transfer contents
|
||||
copy_file(
|
||||
os.path.join(build_dir, 'libcef.dll.pdb'), symbol_output_dir,
|
||||
options.quiet)
|
||||
else:
|
||||
copy_file(
|
||||
os.path.join(build_dir, 'cefclient.exe'), dst_dir, options.quiet)
|
||||
|
||||
if not options.nosymbols:
|
||||
# create the symbol output directory
|
||||
symbol_output_dir = create_output_dir(
|
||||
output_dir_name + '_release_symbols', options.outputdir)
|
||||
# transfer contents
|
||||
copy_file(
|
||||
os.path.join(build_dir, 'libcef.dll.pdb'), symbol_output_dir,
|
||||
options.quiet)
|
||||
else:
|
||||
sys.stderr.write("No Release build files.\n")
|
||||
sys.stderr.write("No Release build files.\n")
|
||||
|
||||
if not valid_build_dir is None:
|
||||
# transfer resource files
|
||||
|
Reference in New Issue
Block a user