mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-26 17:07:47 +01:00
Update to Chromium revision fc6aaca4 (#406441)
This commit is contained in:
parent
d92bc1d200
commit
98f59f47fd
14
BUILD.gn
14
BUILD.gn
@ -103,13 +103,15 @@ import("//build/config/features.gni")
|
||||
import("//build/config/locales.gni")
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//build/config/win/console_app.gni")
|
||||
import("//build/config/win/manifest.gni")
|
||||
import("//cef/cef_repack_locales.gni")
|
||||
import("//media/media_options.gni")
|
||||
import("//mojo/public/tools/bindings/mojom.gni")
|
||||
import("//third_party/widevine/cdm/widevine.gni")
|
||||
import("//tools/grit/repack.gni")
|
||||
import("//tools/grit/grit_rule.gni")
|
||||
if (is_clang) {
|
||||
import("//build/config/clang/clang.gni")
|
||||
}
|
||||
if (is_linux) {
|
||||
import("//build/config/linux/pkg_config.gni")
|
||||
}
|
||||
@ -119,6 +121,10 @@ if (is_mac) {
|
||||
import("//build/mac/tweak_info_plist.gni")
|
||||
import("//media/cdm/ppapi/cdm_paths.gni")
|
||||
}
|
||||
if (is_win) {
|
||||
import("//build/config/win/console_app.gni")
|
||||
import("//build/config/win/manifest.gni")
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
@ -1114,6 +1120,7 @@ make_pack_header("resources") {
|
||||
inputs = [
|
||||
"$root_gen_dir/blink/grit/devtools_resources.h",
|
||||
"$root_gen_dir/blink/public/resources/grit/blink_resources.h",
|
||||
"$root_gen_dir/cef/grit/cef_resources.h",
|
||||
"$root_gen_dir/chrome/grit/browser_resources.h",
|
||||
"$root_gen_dir/chrome/grit/common_resources.h",
|
||||
"$root_gen_dir/chrome/grit/component_extension_resources.h",
|
||||
@ -1125,7 +1132,6 @@ make_pack_header("resources") {
|
||||
"$root_gen_dir/ui/resources/grit/ui_resources.h",
|
||||
"$root_gen_dir/ui/resources/grit/webui_resources.h",
|
||||
"$root_gen_dir/ui/views/resources/grit/views_resources.h",
|
||||
"$root_gen_dir/cef/grit/cef_resources.h",
|
||||
]
|
||||
}
|
||||
|
||||
@ -1133,6 +1139,7 @@ make_pack_header("resources") {
|
||||
make_pack_header("strings") {
|
||||
header = "$root_out_dir/includes/include/cef_pack_strings.h"
|
||||
inputs = [
|
||||
"$root_gen_dir/cef/grit/cef_strings.h",
|
||||
"$root_gen_dir/chrome/grit/generated_resources.h",
|
||||
"$root_gen_dir/chrome/grit/locale_settings.h",
|
||||
"$root_gen_dir/chrome/grit/platform_locale_settings.h",
|
||||
@ -1140,7 +1147,6 @@ make_pack_header("strings") {
|
||||
"$root_gen_dir/content/app/strings/grit/content_strings.h",
|
||||
"$root_gen_dir/extensions/strings/grit/extensions_strings.h",
|
||||
"$root_gen_dir/ui/strings/grit/ui_strings.h",
|
||||
"$root_gen_dir/cef/grit/cef_strings.h",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': '68623971be0cfc492a2cb0427d7f478e7b214c24',
|
||||
'chromium_checkout': 'fc6aaca4ed6ff4f050e6f5c7fb19af85da8db574',
|
||||
}
|
||||
|
@ -942,11 +942,12 @@ typedef enum {
|
||||
} cef_cert_status_t;
|
||||
|
||||
///
|
||||
// The manner in which a link click should be opened.
|
||||
// The manner in which a link click should be opened. These constants match
|
||||
// their equivalents in Chromium's window_open_disposition.h and should not be
|
||||
// renumbered.
|
||||
///
|
||||
typedef enum {
|
||||
WOD_UNKNOWN,
|
||||
WOD_SUPPRESS_OPEN,
|
||||
WOD_CURRENT_TAB,
|
||||
WOD_SINGLETON_TAB,
|
||||
WOD_NEW_FOREGROUND_TAB,
|
||||
|
@ -424,8 +424,8 @@ net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
|
||||
url_request_getter_ = new CefURLRequestContextGetterImpl(
|
||||
settings_,
|
||||
GetPrefs(),
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
|
||||
protocol_handlers,
|
||||
std::move(proxy_config_service),
|
||||
std::move(request_interceptors));
|
||||
|
@ -396,7 +396,7 @@ void CefURLFetcherDelegate::OnURLFetchComplete(
|
||||
const net::URLFetcher* source) {
|
||||
// Complete asynchronously so as not to delete the URLFetcher while it's still
|
||||
// in the call stack.
|
||||
base::MessageLoop::current()->PostTask(FROM_HERE,
|
||||
base::MessageLoop::current()->task_runner()->PostTask(FROM_HERE,
|
||||
base::Bind(&CefBrowserURLRequest::Context::OnComplete, context_));
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ class CefGeolocationDelegate : public content::GeolocationDelegate {
|
||||
explicit CefGeolocationDelegate(net::URLRequestContextGetter* system_context)
|
||||
: system_context_(system_context) {}
|
||||
|
||||
content::AccessTokenStore* CreateAccessTokenStore() override {
|
||||
scoped_refptr<content::AccessTokenStore> CreateAccessTokenStore() override {
|
||||
return new CefAccessTokenStore(system_context_);
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ void CefCookieManagerImpl::Initialize(
|
||||
if (request_context.get()) {
|
||||
request_context_ = request_context;
|
||||
request_context_->GetRequestContextImpl(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefCookieManagerImpl::InitWithContext, this, callback));
|
||||
} else {
|
||||
SetStoragePath(path, persist_session_cookies, callback);
|
||||
@ -226,7 +226,7 @@ void CefCookieManagerImpl::SetSupportedSchemes(
|
||||
bool CefCookieManagerImpl::VisitAllCookies(
|
||||
CefRefPtr<CefCookieVisitor> visitor) {
|
||||
GetCookieStore(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefCookieManagerImpl::VisitAllCookiesInternal, this,
|
||||
visitor));
|
||||
return true;
|
||||
@ -237,7 +237,7 @@ bool CefCookieManagerImpl::VisitUrlCookies(
|
||||
bool includeHttpOnly,
|
||||
CefRefPtr<CefCookieVisitor> visitor) {
|
||||
GetCookieStore(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefCookieManagerImpl::VisitUrlCookiesInternal, this, url,
|
||||
includeHttpOnly, visitor));
|
||||
return true;
|
||||
@ -252,7 +252,7 @@ bool CefCookieManagerImpl::SetCookie(
|
||||
return false;
|
||||
|
||||
GetCookieStore(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefCookieManagerImpl::SetCookieInternal, this, gurl, cookie,
|
||||
callback));
|
||||
return true;
|
||||
@ -268,7 +268,7 @@ bool CefCookieManagerImpl::DeleteCookies(
|
||||
return false;
|
||||
|
||||
GetCookieStore(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefCookieManagerImpl::DeleteCookiesInternal, this, gurl,
|
||||
cookie_name, callback));
|
||||
return true;
|
||||
@ -314,8 +314,8 @@ bool CefCookieManagerImpl::SetStoragePath(
|
||||
persistent_store =
|
||||
new net::SQLitePersistentCookieStore(
|
||||
cookie_path,
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::DB),
|
||||
persist_session_cookies,
|
||||
NULL);
|
||||
} else {
|
||||
@ -341,7 +341,7 @@ bool CefCookieManagerImpl::SetStoragePath(
|
||||
bool CefCookieManagerImpl::FlushStore(
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
GetCookieStore(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefCookieManagerImpl::FlushStoreInternal, this, callback));
|
||||
return true;
|
||||
}
|
||||
@ -427,7 +427,7 @@ void CefCookieManagerImpl::RunMethodWithContext(
|
||||
} else if (request_context_.get()) {
|
||||
// Try again after the request context is initialized.
|
||||
request_context_->GetRequestContextImpl(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
method);
|
||||
} else {
|
||||
NOTREACHED();
|
||||
|
@ -132,6 +132,9 @@ CefDevToolsManagerDelegate::~CefDevToolsManagerDelegate() {
|
||||
|
||||
base::DictionaryValue* CefDevToolsManagerDelegate::HandleCommand(
|
||||
content::DevToolsAgentHost* agent_host,
|
||||
base::DictionaryValue* command) {
|
||||
return NULL;
|
||||
base::DictionaryValue* command_dict) {
|
||||
std::unique_ptr<base::DictionaryValue> result =
|
||||
devtools_discovery::DevToolsDiscoveryManager::GetInstance()
|
||||
->HandleNewTargetCommand(command_dict);
|
||||
return result.release(); // Caller takes ownership.
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ void CefDevToolsFrontend::InspectElementAt(int x, int y) {
|
||||
if (inspect_element_at_.x != x || inspect_element_at_.y != y)
|
||||
inspect_element_at_.Set(x, y);
|
||||
if (agent_host_)
|
||||
agent_host_->InspectElement(x, y);
|
||||
agent_host_->InspectElement(this, x, y);
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::Close() {
|
||||
|
@ -664,7 +664,7 @@ void CefMenuModelImpl::MenuClosed() {
|
||||
// Due to how menus work on the different platforms, ActivatedAt will be
|
||||
// called after this. It's more convenient for the delegate to be called
|
||||
// afterwards, though, so post a task.
|
||||
base::MessageLoop::current()->PostTask(
|
||||
base::MessageLoop::current()->task_runner()->PostTask(
|
||||
FROM_HERE,
|
||||
base::Bind(&CefMenuModelImpl::OnMenuClosed, this));
|
||||
}
|
||||
|
@ -287,8 +287,6 @@ void CefBrowserPlatformDelegateNativeLinux::TranslateKeyEvent(
|
||||
result.text[0] = key_event.character;
|
||||
result.unmodifiedText[0] = key_event.unmodified_character;
|
||||
|
||||
result.setKeyIdentifierFromWindowsKeyCode();
|
||||
|
||||
result.modifiers |= TranslateModifiers(key_event.modifiers);
|
||||
}
|
||||
|
||||
|
@ -406,8 +406,6 @@ void CefBrowserPlatformDelegateNativeWin::TranslateKeyEvent(
|
||||
result.text[0] = result.windowsKeyCode;
|
||||
result.unmodifiedText[0] = result.windowsKeyCode;
|
||||
}
|
||||
if (result.type != blink::WebInputEvent::Char)
|
||||
result.setKeyIdentifierFromWindowsKeyCode();
|
||||
|
||||
result.modifiers |= TranslateModifiers(key_event.modifiers);
|
||||
}
|
||||
|
@ -350,10 +350,7 @@ class Delegate : public InternalHandlerDelegate {
|
||||
CHROME_VERSION_BUILD,
|
||||
CHROME_VERSION_PATCH));
|
||||
parser.Add("OS", GetOSType());
|
||||
parser.Add("WEBKIT",
|
||||
base::StringPrintf("%d.%d",
|
||||
content::GetWebKitMajorVersion(),
|
||||
content::GetWebKitMinorVersion()));
|
||||
parser.Add("WEBKIT", content::GetWebKitVersion());
|
||||
parser.Add("JAVASCRIPT", v8::V8::GetVersion());
|
||||
parser.Add("FLASH", std::string()); // Value populated asynchronously.
|
||||
parser.Add("USERAGENT", CefContentClient::Get()->GetUserAgent());
|
||||
|
@ -124,7 +124,7 @@ CefURLRequestContextGetterImpl::CefURLRequestContextGetterImpl(
|
||||
std::swap(protocol_handlers_, *protocol_handlers);
|
||||
|
||||
auto io_thread_proxy =
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
|
||||
|
||||
quick_check_enabled_.Init(prefs::kQuickCheckEnabled, pref_service);
|
||||
quick_check_enabled_.MoveToThread(io_thread_proxy);
|
||||
@ -256,7 +256,7 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() {
|
||||
net::CACHE_BACKEND_DEFAULT,
|
||||
http_cache_path,
|
||||
0,
|
||||
BrowserThread::GetMessageLoopProxyForThread(
|
||||
BrowserThread::GetTaskRunnerForThread(
|
||||
BrowserThread::CACHE)));
|
||||
|
||||
net::HttpNetworkSession::Params network_session_params;
|
||||
@ -340,7 +340,7 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() {
|
||||
|
||||
scoped_refptr<base::SingleThreadTaskRunner>
|
||||
CefURLRequestContextGetterImpl::GetNetworkTaskRunner() const {
|
||||
return BrowserThread::GetMessageLoopProxyForThread(CEF_IOT);
|
||||
return BrowserThread::GetTaskRunnerForThread(CEF_IOT);
|
||||
}
|
||||
|
||||
net::HostResolver* CefURLRequestContextGetterImpl::GetHostResolver() const {
|
||||
@ -370,8 +370,8 @@ void CefURLRequestContextGetterImpl::SetCookieStoragePath(
|
||||
persistent_store =
|
||||
new net::SQLitePersistentCookieStore(
|
||||
cookie_path,
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::DB),
|
||||
persist_session_cookies,
|
||||
NULL);
|
||||
} else {
|
||||
|
@ -45,12 +45,6 @@ const float kDefaultScaleFactor = 1.0;
|
||||
// The maximum number of retry counts if frame capture fails.
|
||||
const int kFrameRetryLimit = 2;
|
||||
|
||||
// When accelerated compositing is enabled and a widget resize is pending,
|
||||
// we delay further resizes of the UI. The following constant is the maximum
|
||||
// length of time that we should delay further UI resizes while waiting for a
|
||||
// resized frame from a renderer.
|
||||
const int kResizeLockTimeoutMs = 67;
|
||||
|
||||
static blink::WebScreenInfo webScreenInfoFrom(const CefScreenInfo& src) {
|
||||
blink::WebScreenInfo webScreenInfo;
|
||||
webScreenInfo.deviceScaleFactor = src.device_scale_factor;
|
||||
@ -67,6 +61,14 @@ static blink::WebScreenInfo webScreenInfoFrom(const CefScreenInfo& src) {
|
||||
return webScreenInfo;
|
||||
}
|
||||
|
||||
#if !defined(OS_MACOSX)
|
||||
|
||||
// When accelerated compositing is enabled and a widget resize is pending,
|
||||
// we delay further resizes of the UI. The following constant is the maximum
|
||||
// length of time that we should delay further UI resizes while waiting for a
|
||||
// resized frame from a renderer.
|
||||
const int kResizeLockTimeoutMs = 67;
|
||||
|
||||
// Used to prevent further resizes while a resize is pending.
|
||||
class CefResizeLock : public content::ResizeLock {
|
||||
public:
|
||||
@ -124,6 +126,8 @@ class CefResizeLock : public content::ResizeLock {
|
||||
DISALLOW_COPY_AND_ASSIGN(CefResizeLock);
|
||||
};
|
||||
|
||||
#endif // !defined(OS_MACOSX)
|
||||
|
||||
} // namespace
|
||||
|
||||
// Used for managing copy requests when GPU compositing is enabled. Based on
|
||||
@ -202,8 +206,7 @@ class CefCopyFrameGenerator {
|
||||
damage_rect));
|
||||
|
||||
request->set_area(gfx::Rect(view_->GetPhysicalBackingSize()));
|
||||
view_->DelegatedFrameHostGetLayer()->RequestCopyOfOutput(
|
||||
std::move(request));
|
||||
view_->GetRootLayer()->RequestCopyOfOutput(std::move(request));
|
||||
}
|
||||
|
||||
void CopyFromCompositingSurfaceHasResult(
|
||||
@ -410,7 +413,7 @@ class CefBeginFrameTimer : public cc::DelayBasedTimeSourceClient {
|
||||
const base::Closure& callback)
|
||||
: callback_(callback) {
|
||||
time_source_.reset(new cc::DelayBasedTimeSource(
|
||||
content::BrowserThread::GetMessageLoopProxyForThread(CEF_UIT).get()));
|
||||
content::BrowserThread::GetTaskRunnerForThread(CEF_UIT).get()));
|
||||
time_source_->SetTimebaseAndInterval(
|
||||
base::TimeTicks(),
|
||||
base::TimeDelta::FromMilliseconds(frame_rate_threshold_ms));
|
||||
@ -1035,10 +1038,7 @@ CefRenderWidgetHostViewOSR::CreateSoftwareOutputDevice(
|
||||
return base::WrapUnique(software_output_device_);
|
||||
}
|
||||
|
||||
int CefRenderWidgetHostViewOSR::DelegatedFrameHostGetGpuMemoryBufferClientId()
|
||||
const {
|
||||
return render_widget_host_->GetProcess()->GetID();
|
||||
}
|
||||
#if !defined(OS_MACOSX)
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::DelegatedFrameHostGetLayer() const {
|
||||
return GetRootLayer();
|
||||
@ -1084,21 +1084,14 @@ void CefRenderWidgetHostViewOSR::DelegatedFrameHostResizeLockWasReleased() {
|
||||
return render_widget_host_->WasResized();
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::DelegatedFrameHostSendCompositorSwapAck(
|
||||
int output_surface_id,
|
||||
const cc::CompositorFrameAck& ack) {
|
||||
render_widget_host_->Send(new ViewMsg_SwapCompositorFrameAck(
|
||||
render_widget_host_->GetRoutingID(),
|
||||
output_surface_id, ack));
|
||||
}
|
||||
|
||||
void
|
||||
CefRenderWidgetHostViewOSR::DelegatedFrameHostSendReclaimCompositorResources(
|
||||
int output_surface_id,
|
||||
const cc::CompositorFrameAck& ack) {
|
||||
bool is_swap_ack,
|
||||
const cc::ReturnedResourceArray& resources) {
|
||||
render_widget_host_->Send(new ViewMsg_ReclaimCompositorResources(
|
||||
render_widget_host_->GetRoutingID(),
|
||||
output_surface_id, ack));
|
||||
render_widget_host_->GetRoutingID(), output_surface_id, is_swap_ack,
|
||||
resources));
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::DelegatedFrameHostOnLostCompositorResources() {
|
||||
@ -1118,6 +1111,12 @@ void CefRenderWidgetHostViewOSR::SetBeginFrameSource(
|
||||
// See https://codereview.chromium.org/1841083007.
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::IsAutoResizeEnabled() const {
|
||||
return render_widget_host_->auto_resize_enabled();
|
||||
}
|
||||
|
||||
#endif // !defined(OS_MACOSX)
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::InstallTransparency() {
|
||||
if (transparent_) {
|
||||
SetBackgroundColor(SkColor());
|
||||
@ -1332,18 +1331,20 @@ void CefRenderWidgetHostViewOSR::RemoveGuestHostView(
|
||||
}
|
||||
|
||||
#if !defined(OS_MACOSX)
|
||||
|
||||
ui::Compositor* CefRenderWidgetHostViewOSR::GetCompositor() const {
|
||||
return compositor_.get();
|
||||
}
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
|
||||
return root_layer_.get();
|
||||
}
|
||||
|
||||
content::DelegatedFrameHost* CefRenderWidgetHostViewOSR::GetDelegatedFrameHost()
|
||||
const {
|
||||
return delegated_frame_host_.get();
|
||||
}
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
|
||||
return root_layer_.get();
|
||||
}
|
||||
#endif // !defined(OS_MACOSX)
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetFrameRate() {
|
||||
|
@ -76,13 +76,16 @@ class CefWindowX11;
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
class AcceleratedWidgetMacNSViewHelper;
|
||||
class MacHelper;
|
||||
#endif
|
||||
|
||||
class CefRenderWidgetHostViewOSR
|
||||
: public content::RenderWidgetHostViewBase,
|
||||
public ui::CompositorDelegate,
|
||||
public content::DelegatedFrameHostClient {
|
||||
public ui::CompositorDelegate
|
||||
#if !defined(OS_MACOSX)
|
||||
, public content::DelegatedFrameHostClient
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
CefRenderWidgetHostViewOSR(const bool transparent,
|
||||
content::RenderWidgetHost* widget,
|
||||
@ -190,8 +193,8 @@ class CefRenderWidgetHostViewOSR
|
||||
std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice(
|
||||
ui::Compositor* compositor) override;
|
||||
|
||||
#if !defined(OS_MACOSX)
|
||||
// DelegatedFrameHostClient implementation.
|
||||
virtual int DelegatedFrameHostGetGpuMemoryBufferClientId() const override;
|
||||
ui::Layer* DelegatedFrameHostGetLayer() const override;
|
||||
bool DelegatedFrameHostIsVisible() const override;
|
||||
SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override;
|
||||
@ -200,17 +203,17 @@ class CefRenderWidgetHostViewOSR
|
||||
std::unique_ptr<content::ResizeLock> DelegatedFrameHostCreateResizeLock(
|
||||
bool defer_compositor_lock) override;
|
||||
void DelegatedFrameHostResizeLockWasReleased() override;
|
||||
void DelegatedFrameHostSendCompositorSwapAck(
|
||||
int output_surface_id,
|
||||
const cc::CompositorFrameAck& ack) override;
|
||||
void DelegatedFrameHostSendReclaimCompositorResources(
|
||||
int output_surface_id,
|
||||
const cc::CompositorFrameAck& ack) override;
|
||||
bool is_swap_ack,
|
||||
const cc::ReturnedResourceArray& resources) override;
|
||||
void DelegatedFrameHostOnLostCompositorResources() override;
|
||||
void DelegatedFrameHostUpdateVSyncParameters(
|
||||
const base::TimeTicks& timebase,
|
||||
const base::TimeDelta& interval) override;
|
||||
void SetBeginFrameSource(cc::BeginFrameSource* source) override;
|
||||
bool IsAutoResizeEnabled() const override;
|
||||
#endif // !defined(OS_MACOSX)
|
||||
|
||||
bool InstallTransparency();
|
||||
|
||||
@ -267,10 +270,10 @@ class CefRenderWidgetHostViewOSR
|
||||
ui::Compositor* GetCompositor() const;
|
||||
content::RenderWidgetHostImpl* render_widget_host() const
|
||||
{ return render_widget_host_; }
|
||||
ui::Layer* GetRootLayer() const;
|
||||
|
||||
private:
|
||||
content::DelegatedFrameHost* GetDelegatedFrameHost() const;
|
||||
ui::Layer* GetRootLayer() const;
|
||||
|
||||
void SetFrameRate();
|
||||
void SetDeviceScaleFactor();
|
||||
@ -286,7 +289,7 @@ class CefRenderWidgetHostViewOSR
|
||||
void OnScrollOffsetChanged();
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
friend class AcceleratedWidgetMacNSViewHelper;
|
||||
friend class MacHelper;
|
||||
|
||||
// Returns composition character boundary rectangle. The |range| is
|
||||
// composition based range. Also stores |actual_range| which is corresponding
|
||||
@ -334,7 +337,7 @@ class CefRenderWidgetHostViewOSR
|
||||
NSWindow* window_;
|
||||
CALayer* background_layer_;
|
||||
std::unique_ptr<content::BrowserCompositorMac> browser_compositor_;
|
||||
AcceleratedWidgetMacNSViewHelper* accelerated_widget_helper_;
|
||||
MacHelper* mac_helper_;
|
||||
#elif defined(USE_X11)
|
||||
CefWindowX11* window_;
|
||||
std::unique_ptr<ui::XScopedCursor> invisible_cursor_;
|
||||
|
@ -32,12 +32,62 @@ CefTextInputClientOSRMac* GetInputClientFromContext(
|
||||
} // namespace
|
||||
|
||||
|
||||
class AcceleratedWidgetMacNSViewHelper : public ui::AcceleratedWidgetMacNSView {
|
||||
class MacHelper :
|
||||
public content::BrowserCompositorMacClient,
|
||||
public ui::AcceleratedWidgetMacNSView {
|
||||
public:
|
||||
explicit AcceleratedWidgetMacNSViewHelper(CefRenderWidgetHostViewOSR* view)
|
||||
explicit MacHelper(CefRenderWidgetHostViewOSR* view)
|
||||
: view_(view) {
|
||||
}
|
||||
virtual ~AcceleratedWidgetMacNSViewHelper() {}
|
||||
virtual ~MacHelper() {}
|
||||
|
||||
// BrowserCompositorMacClient methods:
|
||||
|
||||
NSView* BrowserCompositorMacGetNSView() const override {
|
||||
// Intentionally return nil so that
|
||||
// BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP uses the layer
|
||||
// size instead of the NSView size.
|
||||
return nil;
|
||||
}
|
||||
|
||||
SkColor BrowserCompositorMacGetGutterColor(SkColor color) const override {
|
||||
// When making an element on the page fullscreen the element's background
|
||||
// may not match the page's, so use black as the gutter color to avoid
|
||||
// flashes of brighter colors during the transition.
|
||||
if (view_->render_widget_host()->delegate() &&
|
||||
view_->render_widget_host()->delegate()->IsFullscreenForCurrentTab()) {
|
||||
return SK_ColorBLACK;
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
void BrowserCompositorMacSendReclaimCompositorResources(
|
||||
int output_surface_id,
|
||||
bool is_swap_ack,
|
||||
const cc::ReturnedResourceArray& resources) override {
|
||||
view_->render_widget_host()->Send(new ViewMsg_ReclaimCompositorResources(
|
||||
view_->render_widget_host()->GetRoutingID(), output_surface_id,
|
||||
is_swap_ack, resources));
|
||||
}
|
||||
|
||||
void BrowserCompositorMacOnLostCompositorResources() override {
|
||||
view_->render_widget_host()->ScheduleComposite();
|
||||
}
|
||||
|
||||
void BrowserCompositorMacUpdateVSyncParameters(
|
||||
const base::TimeTicks& timebase,
|
||||
const base::TimeDelta& interval) override {
|
||||
view_->render_widget_host()->UpdateVSyncParameters(timebase, interval);
|
||||
}
|
||||
|
||||
void BrowserCompositorMacSendBeginFrame(
|
||||
const cc::BeginFrameArgs& args) override {
|
||||
view_->render_widget_host()->Send(
|
||||
new ViewMsg_BeginFrame(view_->render_widget_host()->GetRoutingID(),
|
||||
args));
|
||||
}
|
||||
|
||||
// AcceleratedWidgetMacNSView methods:
|
||||
|
||||
NSView* AcceleratedWidgetGetNSView() const override {
|
||||
return [view_->window_ contentView];
|
||||
@ -56,7 +106,7 @@ class AcceleratedWidgetMacNSViewHelper : public ui::AcceleratedWidgetMacNSView {
|
||||
// Guaranteed to outlive this object.
|
||||
CefRenderWidgetHostViewOSR* view_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AcceleratedWidgetMacNSViewHelper);
|
||||
DISALLOW_COPY_AND_ASSIGN(MacHelper);
|
||||
};
|
||||
|
||||
|
||||
@ -311,15 +361,15 @@ ui::Compositor* CefRenderWidgetHostViewOSR::GetCompositor() const {
|
||||
return browser_compositor_->GetCompositor();
|
||||
}
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
|
||||
return browser_compositor_->GetRootLayer();
|
||||
}
|
||||
|
||||
content::DelegatedFrameHost* CefRenderWidgetHostViewOSR::GetDelegatedFrameHost()
|
||||
const {
|
||||
return browser_compositor_->GetDelegatedFrameHost();
|
||||
}
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::GetRootLayer() const {
|
||||
return browser_compositor_->GetRootLayer();
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
||||
// Create a borderless non-visible 1x1 window.
|
||||
window_ = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 1, 1)
|
||||
@ -334,17 +384,14 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
||||
[content_view setLayer:background_layer_];
|
||||
[content_view setWantsLayer:YES];
|
||||
|
||||
accelerated_widget_helper_ = new AcceleratedWidgetMacNSViewHelper(this);
|
||||
mac_helper_ = new MacHelper(this);
|
||||
browser_compositor_.reset(new content::BrowserCompositorMac(
|
||||
accelerated_widget_helper_, this, render_widget_host_->is_hidden(),
|
||||
true));
|
||||
mac_helper_, mac_helper_, render_widget_host_->is_hidden(), true));
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
||||
DCHECK(window_);
|
||||
|
||||
browser_compositor_->Destroy();
|
||||
|
||||
[window_ close];
|
||||
window_ = nil;
|
||||
[background_layer_ release];
|
||||
@ -352,6 +399,6 @@ void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
||||
|
||||
browser_compositor_.reset();
|
||||
|
||||
delete accelerated_widget_helper_;
|
||||
accelerated_widget_helper_ = nullptr;
|
||||
delete mac_helper_;
|
||||
mac_helper_ = nullptr;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ PepperIsolatedFileSystemMessageFilter::OverrideTaskRunnerForMessage(
|
||||
const IPC::Message& msg) {
|
||||
// In order to reach ExtensionSystem, we need to get ProfileManager first.
|
||||
// ProfileManager lives in UI thread, so we need to do this in UI thread.
|
||||
return content::BrowserThread::GetMessageLoopProxyForThread(
|
||||
return content::BrowserThread::GetTaskRunnerForThread(
|
||||
content::BrowserThread::UI);
|
||||
}
|
||||
|
||||
|
@ -175,11 +175,13 @@ int CefPermissionManager::RequestPermission(
|
||||
PermissionType permission,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& requesting_origin,
|
||||
bool user_gesture,
|
||||
const base::Callback<void(PermissionStatus)>& callback) {
|
||||
return RequestPermissions(
|
||||
std::vector<PermissionType>(1, permission),
|
||||
render_frame_host,
|
||||
requesting_origin,
|
||||
user_gesture,
|
||||
base::Bind(&PermissionRequestResponseCallbackWrapper, callback));
|
||||
}
|
||||
|
||||
@ -187,6 +189,7 @@ int CefPermissionManager::RequestPermissions(
|
||||
const std::vector<PermissionType>& permissions,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& requesting_origin,
|
||||
bool user_gesture,
|
||||
const base::Callback<void(
|
||||
const std::vector<PermissionStatus>&)>& callback) {
|
||||
if (permissions.empty()) {
|
||||
|
@ -36,12 +36,14 @@ class CefPermissionManager : public KeyedService,
|
||||
content::PermissionType permission,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& requesting_origin,
|
||||
bool user_gesture,
|
||||
const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
|
||||
override;
|
||||
int RequestPermissions(
|
||||
const std::vector<content::PermissionType>& permissions,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& requesting_origin,
|
||||
bool user_gesture,
|
||||
const base::Callback<void(
|
||||
const std::vector<blink::mojom::PermissionStatus>&)>& callback)
|
||||
override;
|
||||
|
@ -146,12 +146,12 @@ CefPluginInfoMessageFilter::Context::Context(
|
||||
allow_outdated_plugins_.Init(prefs::kPluginsAllowOutdated,
|
||||
profile->GetPrefs());
|
||||
allow_outdated_plugins_.MoveToThread(
|
||||
content::BrowserThread::GetMessageLoopProxyForThread(
|
||||
content::BrowserThread::GetTaskRunnerForThread(
|
||||
content::BrowserThread::IO));
|
||||
always_authorize_plugins_.Init(prefs::kPluginsAlwaysAuthorize,
|
||||
profile->GetPrefs());
|
||||
always_authorize_plugins_.MoveToThread(
|
||||
content::BrowserThread::GetMessageLoopProxyForThread(
|
||||
content::BrowserThread::GetTaskRunnerForThread(
|
||||
content::BrowserThread::IO));
|
||||
}
|
||||
|
||||
@ -475,13 +475,9 @@ void CefPluginInfoMessageFilter::Context::GetPluginContentSetting(
|
||||
|
||||
// If there is a plugin-specific setting, we use it, unless the general
|
||||
// setting was set by policy, in which case it takes precedence.
|
||||
// TODO(tommycli): Remove once we deprecate the plugin ASK policy.
|
||||
bool legacy_ask_user = content_settings::ValueToContentSetting(
|
||||
general_setting.get()) == CONTENT_SETTING_ASK;
|
||||
bool use_policy =
|
||||
general_info.source == content_settings::SETTING_SOURCE_POLICY &&
|
||||
!legacy_ask_user;
|
||||
uses_plugin_specific_setting = specific_setting && !use_policy;
|
||||
uses_plugin_specific_setting =
|
||||
specific_setting &&
|
||||
general_info.source != content_settings::SETTING_SOURCE_POLICY;
|
||||
if (uses_plugin_specific_setting) {
|
||||
value = std::move(specific_setting);
|
||||
info = specific_info;
|
||||
|
@ -327,7 +327,7 @@ void CefPrintDialogLinux::OnPrintCancel() {
|
||||
|
||||
void CefPrintDialogLinux::OnJobCompleted() {
|
||||
base::FileUtilProxy::DeleteFile(
|
||||
content::BrowserThread::GetMessageLoopProxyForThread(
|
||||
content::BrowserThread::GetTaskRunnerForThread(
|
||||
BrowserThread::FILE).get(),
|
||||
path_to_pdf_,
|
||||
false,
|
||||
|
@ -239,7 +239,7 @@ void CefRequestContextImpl::GetRequestContextImpl(
|
||||
} else {
|
||||
// Need to initialize the browser context first.
|
||||
GetBrowserContextOnUIThread(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefRequestContextImpl::GetRequestContextImplOnIOThread,
|
||||
this, task_runner, callback));
|
||||
}
|
||||
@ -325,7 +325,7 @@ bool CefRequestContextImpl::RegisterSchemeHandlerFactory(
|
||||
const CefString& domain_name,
|
||||
CefRefPtr<CefSchemeHandlerFactory> factory) {
|
||||
GetRequestContextImpl(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefRequestContextImpl::RegisterSchemeHandlerFactoryInternal,
|
||||
this, scheme_name, domain_name, factory));
|
||||
return true;
|
||||
@ -333,7 +333,7 @@ bool CefRequestContextImpl::RegisterSchemeHandlerFactory(
|
||||
|
||||
bool CefRequestContextImpl::ClearSchemeHandlerFactories() {
|
||||
GetRequestContextImpl(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefRequestContextImpl::ClearSchemeHandlerFactoriesInternal,
|
||||
this));
|
||||
return true;
|
||||
@ -341,7 +341,7 @@ bool CefRequestContextImpl::ClearSchemeHandlerFactories() {
|
||||
|
||||
void CefRequestContextImpl::PurgePluginListCache(bool reload_pages) {
|
||||
GetBrowserContext(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
|
||||
base::Bind(&CefRequestContextImpl::PurgePluginListCacheInternal,
|
||||
this, reload_pages));
|
||||
}
|
||||
@ -474,7 +474,7 @@ bool CefRequestContextImpl::SetPreference(const CefString& name,
|
||||
void CefRequestContextImpl::ClearCertificateExceptions(
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
GetBrowserContext(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
|
||||
base::Bind(&CefRequestContextImpl::ClearCertificateExceptionsInternal,
|
||||
this, callback));
|
||||
}
|
||||
@ -482,7 +482,7 @@ void CefRequestContextImpl::ClearCertificateExceptions(
|
||||
void CefRequestContextImpl::CloseAllConnections(
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
GetRequestContextImpl(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefRequestContextImpl::CloseAllConnectionsInternal, this,
|
||||
callback));
|
||||
}
|
||||
@ -491,7 +491,7 @@ void CefRequestContextImpl::ResolveHost(
|
||||
const CefString& origin,
|
||||
CefRefPtr<CefResolveCallback> callback) {
|
||||
GetRequestContextImpl(
|
||||
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
||||
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
|
||||
base::Bind(&CefRequestContextImpl::ResolveHostInternal, this, origin,
|
||||
callback));
|
||||
}
|
||||
|
@ -37,3 +37,7 @@ CefBasicLabelButtonImpl::CefBasicLabelButtonImpl(CefRefPtr<CefButtonDelegate> de
|
||||
views::LabelButton* CefBasicLabelButtonImpl::CreateRootView() {
|
||||
return new CefBasicLabelButtonView(delegate());
|
||||
}
|
||||
|
||||
void CefBasicLabelButtonImpl::InitializeRootView() {
|
||||
static_cast<CefBasicLabelButtonView*>(root_view())->Initialize();
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ class CefBasicLabelButtonImpl :
|
||||
|
||||
// CefViewImpl methods:
|
||||
views::LabelButton* CreateRootView() override;
|
||||
void InitializeRootView() override;
|
||||
|
||||
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefBasicLabelButtonImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefBasicLabelButtonImpl);
|
||||
|
@ -28,3 +28,7 @@ CefBasicPanelImpl::CefBasicPanelImpl(CefRefPtr<CefPanelDelegate> delegate)
|
||||
views::View* CefBasicPanelImpl::CreateRootView() {
|
||||
return new CefBasicPanelView(delegate());
|
||||
}
|
||||
|
||||
void CefBasicPanelImpl::InitializeRootView() {
|
||||
static_cast<CefBasicPanelView*>(root_view())->Initialize();
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ class CefBasicPanelImpl :
|
||||
|
||||
// CefViewImpl methods:
|
||||
views::View* CreateRootView() override;
|
||||
void InitializeRootView() override;
|
||||
|
||||
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefBasicPanelImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefBasicPanelImpl);
|
||||
|
@ -163,3 +163,7 @@ void CefBrowserViewImpl::SetDefaults(const CefBrowserSettings& settings) {
|
||||
CefBrowserViewView* CefBrowserViewImpl::CreateRootView() {
|
||||
return new CefBrowserViewView(delegate(), this);
|
||||
}
|
||||
|
||||
void CefBrowserViewImpl::InitializeRootView() {
|
||||
static_cast<CefBrowserViewView*>(root_view())->Initialize();
|
||||
}
|
||||
|
@ -73,6 +73,7 @@ class CefBrowserViewImpl :
|
||||
|
||||
// CefViewImpl methods:
|
||||
CefBrowserViewView* CreateRootView() override;
|
||||
void InitializeRootView() override;
|
||||
|
||||
std::unique_ptr<CefBrowserHostImpl::CreateParams> pending_browser_create_params_;
|
||||
|
||||
|
@ -27,6 +27,11 @@ CEF_LABEL_BUTTON_VIEW_T class CefLabelButtonView : public CEF_BUTTON_VIEW_D {
|
||||
// |cef_delegate| may be nullptr.
|
||||
explicit CefLabelButtonView(CefViewDelegateClass* cef_delegate)
|
||||
: ParentClass(cef_delegate) {
|
||||
}
|
||||
|
||||
void Initialize() override {
|
||||
ParentClass::Initialize();
|
||||
|
||||
// Use our defaults instead of the Views framework defaults.
|
||||
ParentClass::SetFontList(gfx::FontList(view_util::kDefaultFontList));
|
||||
}
|
||||
|
@ -58,3 +58,7 @@ CefMenuButtonImpl::CefMenuButtonImpl(CefRefPtr<CefMenuButtonDelegate> delegate)
|
||||
views::MenuButton* CefMenuButtonImpl::CreateRootView() {
|
||||
return new CefMenuButtonView(delegate());
|
||||
}
|
||||
|
||||
void CefMenuButtonImpl::InitializeRootView() {
|
||||
static_cast<CefMenuButtonView*>(root_view())->Initialize();
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ class CefMenuButtonImpl :
|
||||
|
||||
// CefViewImpl methods:
|
||||
views::MenuButton* CreateRootView() override;
|
||||
void InitializeRootView() override;
|
||||
|
||||
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefMenuButtonImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefMenuButtonImpl);
|
||||
|
@ -86,3 +86,7 @@ CefScrollViewImpl::CefScrollViewImpl(CefRefPtr<CefViewDelegate> delegate)
|
||||
CefScrollViewView* CefScrollViewImpl::CreateRootView() {
|
||||
return new CefScrollViewView(delegate());
|
||||
}
|
||||
|
||||
void CefScrollViewImpl::InitializeRootView() {
|
||||
static_cast<CefScrollViewView*>(root_view())->Initialize();
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ class CefScrollViewImpl :
|
||||
|
||||
// CefViewImpl methods:
|
||||
CefScrollViewView* CreateRootView() override;
|
||||
void InitializeRootView() override;
|
||||
|
||||
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefScrollViewImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefScrollViewImpl);
|
||||
|
@ -212,3 +212,7 @@ CefTextfieldImpl::CefTextfieldImpl(CefRefPtr<CefTextfieldDelegate> delegate)
|
||||
CefTextfieldView* CefTextfieldImpl::CreateRootView() {
|
||||
return new CefTextfieldView(delegate());
|
||||
}
|
||||
|
||||
void CefTextfieldImpl::InitializeRootView() {
|
||||
static_cast<CefTextfieldView*>(root_view())->Initialize();
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ class CefTextfieldImpl :
|
||||
|
||||
// CefViewImpl methods:
|
||||
CefTextfieldView* CreateRootView() override;
|
||||
void InitializeRootView() override;
|
||||
|
||||
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefTextfieldImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(CefTextfieldImpl);
|
||||
|
@ -9,6 +9,10 @@
|
||||
CefTextfieldView::CefTextfieldView(CefTextfieldDelegate* cef_delegate)
|
||||
: ParentClass(cef_delegate) {
|
||||
set_controller(this);
|
||||
}
|
||||
|
||||
void CefTextfieldView::Initialize() {
|
||||
ParentClass::Initialize();
|
||||
|
||||
// Use our defaults instead of the Views framework defaults.
|
||||
SetFontList(gfx::FontList(view_util::kDefaultFontList));
|
||||
|
@ -23,6 +23,8 @@ class CefTextfieldView :
|
||||
// |cef_delegate| may be nullptr.
|
||||
explicit CefTextfieldView(CefTextfieldDelegate* cef_delegate);
|
||||
|
||||
void Initialize() override;
|
||||
|
||||
// Returns the CefTextfield associated with this view. See comments on
|
||||
// CefViewView::GetCefView.
|
||||
CefRefPtr<CefTextfield> GetCefTextfield() const {
|
||||
|
@ -427,11 +427,16 @@ CEF_VIEW_IMPL_T class CefViewImpl : public CefViewAdapter,
|
||||
DCHECK(root_view_.get());
|
||||
root_view_ref_ = root_view_.get();
|
||||
view_util::Register(this);
|
||||
InitializeRootView();
|
||||
}
|
||||
|
||||
// Create the root views::View object.
|
||||
virtual ViewsViewClass* CreateRootView() = 0;
|
||||
|
||||
// Perform required initialization of the root_view() object created by
|
||||
// CreateRootView(). Called after this object has been registered.
|
||||
virtual void InitializeRootView() = 0;
|
||||
|
||||
private:
|
||||
CefRefPtr<CefViewDelegateClass> delegate_;
|
||||
|
||||
|
@ -31,9 +31,19 @@ CEF_VIEW_VIEW_T class CefViewView : public ViewsViewClass {
|
||||
public:
|
||||
typedef ViewsViewClass ParentClass;
|
||||
|
||||
// |cef_delegate| may be nullptr.
|
||||
// Should be created from CreateRootView() in a CefViewImpl-derived class.
|
||||
// Do not call complex views::View-derived methods from a CefViewView-derived
|
||||
// constructor as they may attempt to call back into CefViewImpl before
|
||||
// registration has been performed. |cef_delegate| may be nullptr.
|
||||
explicit CefViewView(CefViewDelegateClass* cef_delegate)
|
||||
: cef_delegate_(cef_delegate) {
|
||||
}
|
||||
|
||||
// Should be called from InitializeRootView() in the CefViewImpl-derived
|
||||
// class that created this object. This method will be called after
|
||||
// CefViewImpl registration has completed so it is safe to call complex
|
||||
// views::View-derived methods here.
|
||||
virtual void Initialize() {
|
||||
// Use our defaults instead of the Views framework defaults.
|
||||
ParentClass::set_background(views::Background::CreateSolidBackground(
|
||||
view_util::kDefaultBackgroundColor));
|
||||
|
@ -484,6 +484,10 @@ CefWindowView* CefWindowImpl::CreateRootView() {
|
||||
return new CefWindowView(delegate(), this);
|
||||
}
|
||||
|
||||
void CefWindowImpl::InitializeRootView() {
|
||||
static_cast<CefWindowView*>(root_view())->Initialize();
|
||||
}
|
||||
|
||||
void CefWindowImpl::CreateWidget() {
|
||||
DCHECK(!widget_);
|
||||
|
||||
|
@ -114,6 +114,7 @@ class CefWindowImpl :
|
||||
|
||||
// CefViewImpl methods:
|
||||
CefWindowView* CreateRootView() override;
|
||||
void InitializeRootView() override;
|
||||
|
||||
// Initialize the Widget.
|
||||
void CreateWidget();
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include "extensions/common/common_manifest_handlers.h"
|
||||
#include "extensions/common/extension_urls.h"
|
||||
#include "extensions/common/features/api_feature.h"
|
||||
#include "extensions/common/features/base_feature_provider.h"
|
||||
#include "extensions/common/features/behavior_feature.h"
|
||||
#include "extensions/common/features/json_feature_provider.h"
|
||||
#include "extensions/common/features/json_feature_provider_source.h"
|
||||
#include "extensions/common/features/manifest_feature.h"
|
||||
#include "extensions/common/features/permission_feature.h"
|
||||
@ -75,16 +75,16 @@ std::unique_ptr<FeatureProvider> CefExtensionsClient::CreateFeatureProvider(
|
||||
std::unique_ptr<JSONFeatureProviderSource> source(
|
||||
CreateFeatureProviderSource(name));
|
||||
if (name == "api") {
|
||||
provider.reset(new BaseFeatureProvider(source->dictionary(),
|
||||
provider.reset(new JSONFeatureProvider(source->dictionary(),
|
||||
CreateFeature<APIFeature>));
|
||||
} else if (name == "manifest") {
|
||||
provider.reset(new BaseFeatureProvider(source->dictionary(),
|
||||
provider.reset(new JSONFeatureProvider(source->dictionary(),
|
||||
CreateFeature<ManifestFeature>));
|
||||
} else if (name == "permission") {
|
||||
provider.reset(new BaseFeatureProvider(source->dictionary(),
|
||||
provider.reset(new JSONFeatureProvider(source->dictionary(),
|
||||
CreateFeature<PermissionFeature>));
|
||||
} else if (name == "behavior") {
|
||||
provider.reset(new BaseFeatureProvider(source->dictionary(),
|
||||
provider.reset(new JSONFeatureProvider(source->dictionary(),
|
||||
CreateFeature<BehaviorFeature>));
|
||||
} else {
|
||||
NOTREACHED();
|
||||
|
@ -65,7 +65,7 @@ class BytesElementReader : public net::UploadBytesElementReader {
|
||||
};
|
||||
|
||||
base::TaskRunner* GetFileTaskRunner() {
|
||||
return content::BrowserThread::GetMessageLoopProxyForThread(
|
||||
return content::BrowserThread::GetTaskRunnerForThread(
|
||||
content::BrowserThread::FILE).get();
|
||||
}
|
||||
|
||||
@ -559,7 +559,6 @@ void CefRequestImpl::Set(const blink::WebURLRequest& request) {
|
||||
|
||||
void CefRequestImpl::Get(blink::WebURLRequest& request,
|
||||
int64& upload_data_size) const {
|
||||
request.initialize();
|
||||
base::AutoLock lock_scope(lock_);
|
||||
|
||||
request.setURL(GURL(url_.ToString()));
|
||||
@ -614,8 +613,6 @@ void CefRequestImpl::Get(blink::WebURLRequest& request,
|
||||
// static
|
||||
void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params,
|
||||
blink::WebURLRequest& request) {
|
||||
request.initialize();
|
||||
|
||||
request.setURL(params.url);
|
||||
if (!params.method.empty())
|
||||
request.setHTTPMethod(base::ASCIIToUTF16(params.method));
|
||||
|
@ -88,7 +88,7 @@ scoped_refptr<base::SequencedTaskRunner>
|
||||
if (id >= 0 && CefContentClient::Get() &&
|
||||
CefContentClient::Get()->browser() &&
|
||||
BrowserThread::IsMessageLoopValid(static_cast<BrowserThread::ID>(id))) {
|
||||
// Don't use BrowserThread::GetMessageLoopProxyForThread because it returns
|
||||
// Don't use BrowserThread::GetTaskRunnerForThread because it returns
|
||||
// a new MessageLoopProxy object for each call and makes pointer equality
|
||||
// testing impossible.
|
||||
base::MessageLoop* message_loop =
|
||||
|
@ -606,7 +606,9 @@ void CefBrowserImpl::OnRequest(const Cef_Request_Params& params) {
|
||||
} else if (base::LowerCaseEqualsASCII(command, "gettext")) {
|
||||
response = webkit_glue::DumpDocumentText(web_frame);
|
||||
success = true;
|
||||
} else if (web_frame->executeCommand(base::UTF8ToUTF16(command))) {
|
||||
} else if (web_frame->isWebLocalFrame() &&
|
||||
web_frame->toWebLocalFrame()->executeCommand(
|
||||
base::UTF8ToUTF16(command))) {
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "third_party/WebKit/public/web/WebDocument.h"
|
||||
#include "third_party/WebKit/public/web/WebElement.h"
|
||||
#include "third_party/WebKit/public/web/WebFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebNode.h"
|
||||
#include "third_party/WebKit/public/web/WebRange.h"
|
||||
|
||||
@ -92,17 +93,21 @@ CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetFocusedNode() {
|
||||
}
|
||||
|
||||
bool CefDOMDocumentImpl::HasSelection() {
|
||||
if (!VerifyContext())
|
||||
if (!VerifyContext() || !frame_->isWebLocalFrame())
|
||||
return false;
|
||||
|
||||
return frame_->hasSelection();
|
||||
return frame_->toWebLocalFrame()->hasSelection();
|
||||
}
|
||||
|
||||
int CefDOMDocumentImpl::GetSelectionStartOffset() {
|
||||
if (!VerifyContext() || !frame_->hasSelection())
|
||||
if (!VerifyContext() || !frame_->isWebLocalFrame())
|
||||
return 0;
|
||||
|
||||
const WebRange& range = frame_->selectionRange();
|
||||
blink::WebLocalFrame* local_frame = frame_->toWebLocalFrame();
|
||||
if (!!local_frame->hasSelection())
|
||||
return 0;
|
||||
|
||||
const WebRange& range = local_frame->selectionRange();
|
||||
if (range.isNull())
|
||||
return 0;
|
||||
|
||||
@ -110,10 +115,14 @@ int CefDOMDocumentImpl::GetSelectionStartOffset() {
|
||||
}
|
||||
|
||||
int CefDOMDocumentImpl::GetSelectionEndOffset() {
|
||||
if (!VerifyContext() || !frame_->hasSelection())
|
||||
if (!VerifyContext() || !frame_->isWebLocalFrame())
|
||||
return 0;
|
||||
|
||||
const WebRange& range = frame_->selectionRange();
|
||||
blink::WebLocalFrame* local_frame = frame_->toWebLocalFrame();
|
||||
if (!!local_frame->hasSelection())
|
||||
return 0;
|
||||
|
||||
const WebRange& range = local_frame->selectionRange();
|
||||
if (range.isNull())
|
||||
return 0;
|
||||
|
||||
@ -122,10 +131,14 @@ int CefDOMDocumentImpl::GetSelectionEndOffset() {
|
||||
|
||||
CefString CefDOMDocumentImpl::GetSelectionAsMarkup() {
|
||||
CefString str;
|
||||
if (!VerifyContext() || !frame_->hasSelection())
|
||||
if (!VerifyContext() || !frame_->isWebLocalFrame())
|
||||
return str;
|
||||
|
||||
const WebString& markup = frame_->selectionAsMarkup();
|
||||
blink::WebLocalFrame* local_frame = frame_->toWebLocalFrame();
|
||||
if (!!local_frame->hasSelection())
|
||||
return str;
|
||||
|
||||
const WebString& markup = local_frame->selectionAsMarkup();
|
||||
if (!markup.isNull())
|
||||
str = markup;
|
||||
|
||||
@ -134,10 +147,14 @@ CefString CefDOMDocumentImpl::GetSelectionAsMarkup() {
|
||||
|
||||
CefString CefDOMDocumentImpl::GetSelectionAsText() {
|
||||
CefString str;
|
||||
if (!VerifyContext() || !frame_->hasSelection())
|
||||
if (!VerifyContext() || !frame_->isWebLocalFrame())
|
||||
return str;
|
||||
|
||||
const WebString& text = frame_->selectionAsText();
|
||||
blink::WebLocalFrame* local_frame = frame_->toWebLocalFrame();
|
||||
if (!!local_frame->hasSelection())
|
||||
return str;
|
||||
|
||||
const WebString& text = local_frame->selectionAsText();
|
||||
if (!text.isNull())
|
||||
str = text;
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "third_party/WebKit/public/web/WebFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebFrameContentDumper.h"
|
||||
#include "third_party/WebKit/public/web/WebKit.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebView.h"
|
||||
#include "third_party/WebKit/public/web/WebScriptSource.h"
|
||||
|
||||
@ -50,45 +51,31 @@ bool CefFrameImpl::IsValid() {
|
||||
}
|
||||
|
||||
void CefFrameImpl::Undo() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
if (frame_)
|
||||
frame_->executeCommand(WebString::fromUTF8("Undo"));
|
||||
ExecuteCommand("Undo");
|
||||
}
|
||||
|
||||
void CefFrameImpl::Redo() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
if (frame_)
|
||||
frame_->executeCommand(WebString::fromUTF8("Redo"));
|
||||
ExecuteCommand("Redo");
|
||||
}
|
||||
|
||||
void CefFrameImpl::Cut() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
if (frame_)
|
||||
frame_->executeCommand(WebString::fromUTF8("Cut"));
|
||||
ExecuteCommand("Cut");
|
||||
}
|
||||
|
||||
void CefFrameImpl::Copy() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
if (frame_)
|
||||
frame_->executeCommand(WebString::fromUTF8("Copy"));
|
||||
ExecuteCommand("Copy");
|
||||
}
|
||||
|
||||
void CefFrameImpl::Paste() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
if (frame_)
|
||||
frame_->executeCommand(WebString::fromUTF8("Paste"));
|
||||
ExecuteCommand("Paste");
|
||||
}
|
||||
|
||||
void CefFrameImpl::Delete() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
if (frame_)
|
||||
frame_->executeCommand(WebString::fromUTF8("Delete"));
|
||||
ExecuteCommand("Delete");
|
||||
}
|
||||
|
||||
void CefFrameImpl::SelectAll() {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
if (frame_)
|
||||
frame_->executeCommand(WebString::fromUTF8("SelectAll"));
|
||||
ExecuteCommand("SelectAll");
|
||||
}
|
||||
|
||||
void CefFrameImpl::ViewSource() {
|
||||
@ -281,6 +268,12 @@ void CefFrameImpl::Detach() {
|
||||
frame_ = NULL;
|
||||
}
|
||||
|
||||
void CefFrameImpl::ExecuteCommand(const std::string& command) {
|
||||
CEF_REQUIRE_RT_RETURN_VOID();
|
||||
if (frame_ && frame_->isWebLocalFrame())
|
||||
frame_->toWebLocalFrame()->executeCommand(WebString::fromUTF8(command));
|
||||
}
|
||||
|
||||
|
||||
// Enable deprecation warnings for MSVC. See http://crbug.com/585142.
|
||||
#if defined(OS_WIN)
|
||||
|
@ -58,7 +58,9 @@ class CefFrameImpl : public CefFrame {
|
||||
|
||||
blink::WebFrame* web_frame() const { return frame_; }
|
||||
|
||||
protected:
|
||||
private:
|
||||
void ExecuteCommand(const std::string& command);
|
||||
|
||||
CefBrowserImpl* browser_;
|
||||
blink::WebFrame* frame_;
|
||||
int64 frame_id_;
|
||||
|
@ -60,7 +60,7 @@ CefPluginPlaceholder::CefPluginPlaceholder(
|
||||
status_(CefViewHostMsg_GetPluginInfo_Status::kAllowed),
|
||||
title_(title),
|
||||
context_menu_request_id_(0),
|
||||
ignore_updates_(false) {
|
||||
did_send_blocked_content_notification_(false) {
|
||||
RenderThread::Get()->AddObserver(this);
|
||||
}
|
||||
|
||||
@ -286,29 +286,10 @@ blink::WebPlugin* CefPluginPlaceholder::CreatePlugin() {
|
||||
GetPluginParams(), std::move(throttler));
|
||||
}
|
||||
|
||||
void CefPluginPlaceholder::OnLoadedRectUpdate(
|
||||
const gfx::Rect& unobscured_rect,
|
||||
content::RenderFrame::PeripheralContentStatus status) {
|
||||
// If the placeholder is in the blocked state, do nothing.
|
||||
if (ignore_updates_)
|
||||
void CefPluginPlaceholder::OnBlockedTinyContent() {
|
||||
if (did_send_blocked_content_notification_)
|
||||
return;
|
||||
|
||||
// This should only be called once.
|
||||
set_delayed(false);
|
||||
|
||||
// block tiny cross-origin - simply by not continuing the load chain.
|
||||
if (status ==
|
||||
content::RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_TINY) {
|
||||
ignore_updates_ = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// For essential content, powersaver can be turned off.
|
||||
if (status != content::RenderFrame::CONTENT_STATUS_PERIPHERAL)
|
||||
set_power_saver_enabled(false);
|
||||
|
||||
AllowLoading();
|
||||
LoadPlugin();
|
||||
did_send_blocked_content_notification_ = true;
|
||||
}
|
||||
|
||||
gin::ObjectTemplateBuilder CefPluginPlaceholder::GetObjectTemplateBuilder(
|
||||
|
@ -52,9 +52,7 @@ class CefPluginPlaceholder final
|
||||
|
||||
// content::LoadablePluginPlaceholder overrides:
|
||||
blink::WebPlugin* CreatePlugin() override;
|
||||
void OnLoadedRectUpdate(
|
||||
const gfx::Rect& unobscured_rect,
|
||||
content::RenderFrame::PeripheralContentStatus status) override;
|
||||
void OnBlockedTinyContent() override;
|
||||
|
||||
// gin::Wrappable (via PluginPlaceholder) method
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
@ -85,7 +83,7 @@ class CefPluginPlaceholder final
|
||||
int context_menu_request_id_; // Nonzero when request pending.
|
||||
base::string16 plugin_name_;
|
||||
|
||||
bool ignore_updates_;
|
||||
bool did_send_blocked_content_notification_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefPluginPlaceholder);
|
||||
};
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "core/dom/Document.h"
|
||||
#include "core/frame/Frame.h"
|
||||
#include "core/frame/LocalFrame.h"
|
||||
#include "bindings/core/v8/ScriptController.h"
|
||||
@ -42,7 +43,6 @@ MSVC_POP_WARNING();
|
||||
#include "third_party/WebKit/public/web/WebKit.h"
|
||||
#include "third_party/WebKit/public/web/WebFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
#include "third_party/WebKit/public/web/WebScriptController.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
namespace {
|
||||
@ -661,20 +661,15 @@ v8::MaybeLocal<v8::Value> CallV8Function(v8::Local<v8::Context> context,
|
||||
v8::Isolate* isolate) {
|
||||
v8::MaybeLocal<v8::Value> func_rv;
|
||||
|
||||
// Execute the function call using the ScriptController so that inspector
|
||||
// Execute the function call using the V8ScriptRunner so that inspector
|
||||
// instrumentation works.
|
||||
if (CEF_CURRENTLY_ON_RT()) {
|
||||
blink::LocalFrame* frame =
|
||||
toLocalFrame(blink::toFrameIfNotDetached(context));
|
||||
DCHECK(frame);
|
||||
if (frame &&
|
||||
frame->script().canExecuteScripts(blink::AboutToExecuteScript)) {
|
||||
func_rv = frame->script().callFunction(function, receiver, argc, args);
|
||||
}
|
||||
} else {
|
||||
func_rv = blink::ScriptController::callFunction(
|
||||
blink::toExecutionContext(context),
|
||||
function, receiver, argc, args, isolate);
|
||||
blink::LocalFrame* frame =
|
||||
toLocalFrame(blink::toFrameIfNotDetached(context));
|
||||
DCHECK(frame);
|
||||
if (frame &&
|
||||
frame->script().canExecuteScripts(blink::AboutToExecuteScript)) {
|
||||
func_rv = blink::V8ScriptRunner::callFunction(
|
||||
function, frame->document(), receiver, argc, args, isolate);
|
||||
}
|
||||
|
||||
return func_rv;
|
||||
@ -779,10 +774,8 @@ void MessageListenerCallbackImpl(v8::Handle<v8::Message> message,
|
||||
CefRefPtr<CefV8Exception> exception = new CefV8ExceptionImpl(
|
||||
static_cast<CefV8ContextImpl*>(context.get())->GetV8Context(), message);
|
||||
|
||||
if (CEF_CURRENTLY_ON_RT()) {
|
||||
handler->OnUncaughtException(context->GetBrowser(), context->GetFrame(),
|
||||
context, exception, stackTrace);
|
||||
}
|
||||
handler->OnUncaughtException(context->GetBrowser(), context->GetFrame(),
|
||||
context, exception, stackTrace);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@ -961,10 +954,6 @@ CefRefPtr<CefBrowser> CefV8ContextImpl::GetBrowser() {
|
||||
CefRefPtr<CefBrowser> browser;
|
||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(browser);
|
||||
|
||||
// Return NULL for WebWorkers.
|
||||
if (!CEF_CURRENTLY_ON_RT())
|
||||
return browser;
|
||||
|
||||
blink::WebFrame* webframe = GetWebFrame();
|
||||
if (webframe)
|
||||
browser = CefBrowserImpl::GetBrowserForMainFrame(webframe->top());
|
||||
@ -976,10 +965,6 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() {
|
||||
CefRefPtr<CefFrame> frame;
|
||||
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(frame);
|
||||
|
||||
// Return NULL for WebWorkers.
|
||||
if (!CEF_CURRENTLY_ON_RT())
|
||||
return frame;
|
||||
|
||||
blink::WebFrame* webframe = GetWebFrame();
|
||||
if (webframe) {
|
||||
CefRefPtr<CefBrowserImpl> browser =
|
||||
|
@ -17,14 +17,6 @@ patches = [
|
||||
# Move chrome target locales output to a chrome/ directory to avoid
|
||||
# conflicts with the CEF configuration.
|
||||
#
|
||||
# Add public_deps support to the GN repack template.
|
||||
# TODO(cef): Remove this once all grit includes are relative to the "gen"
|
||||
# directory.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=623085
|
||||
#
|
||||
# Use a unique output path for the compile_xibs template on Mac.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=623237
|
||||
#
|
||||
# Support custom VS toolchain on Windows.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=623342
|
||||
'name': 'gn_config',
|
||||
|
@ -1,8 +1,12 @@
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
index 552a56b..2a817d8 100644
|
||||
index 75651c4..e422ae7 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.h
|
||||
@@ -52,6 +52,7 @@ class BrowserCompositorMac {
|
||||
@@ -59,9 +59,11 @@ class BrowserCompositorMac : public cc::BeginFrameObserver,
|
||||
|
||||
// These will not return nullptr until Destroy is called.
|
||||
DelegatedFrameHost* GetDelegatedFrameHost();
|
||||
+ ui::Layer* GetRootLayer() { return root_layer_.get(); }
|
||||
|
||||
// This may return nullptr, if this has detached itself from its
|
||||
// ui::Compositor.
|
||||
@ -11,10 +15,10 @@ index 552a56b..2a817d8 100644
|
||||
|
||||
void SwapCompositorFrame(uint32_t output_surface_id,
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
index e9faa0a..931a92f 100644
|
||||
index 58d2a2f..69e3bbb 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
@@ -186,6 +186,12 @@ void BrowserCompositorMac::Destroy() {
|
||||
@@ -183,6 +183,12 @@ void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
|
||||
g_spare_recyclable_compositor.Get().reset();
|
||||
}
|
||||
|
||||
@ -27,3 +31,19 @@ index e9faa0a..931a92f 100644
|
||||
ui::AcceleratedWidgetMac* BrowserCompositorMac::GetAcceleratedWidgetMac() {
|
||||
if (recyclable_compositor_)
|
||||
return recyclable_compositor_->accelerated_widget_mac();
|
||||
@@ -400,8 +406,13 @@ void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
|
||||
}
|
||||
|
||||
gfx::Size BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP() const {
|
||||
- NSRect bounds = [client_->BrowserCompositorMacGetNSView() bounds];
|
||||
- return gfx::Size(bounds.size.width, bounds.size.height);
|
||||
+ // View will be nil with CEF OSR.
|
||||
+ NSView* view = client_->BrowserCompositorMacGetNSView();
|
||||
+ if (view) {
|
||||
+ NSRect bounds = [view bounds];
|
||||
+ return gfx::Size(bounds.size.width, bounds.size.height);
|
||||
+ }
|
||||
+ return root_layer_->bounds().size();
|
||||
}
|
||||
|
||||
bool BrowserCompositorMac::DelegatedFrameCanCreateResizeLock() const {
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
|
||||
index b4557c2..6cb6c5a 100644
|
||||
index 1297035..5f45202 100644
|
||||
--- render_widget_host_view_guest.cc
|
||||
+++ render_widget_host_view_guest.cc
|
||||
@@ -243,6 +243,9 @@ void RenderWidgetHostViewGuest::Destroy() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
|
||||
index 2f6fd0e..ab23a3c 100644
|
||||
index ceeaaa3..4ef1a54 100644
|
||||
--- browser/browser_plugin/browser_plugin_guest.cc
|
||||
+++ browser/browser_plugin/browser_plugin_guest.cc
|
||||
@@ -28,7 +28,7 @@
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git common.gypi common.gypi
|
||||
index f5d107d..e38c4ee 100644
|
||||
index 0935433..670db78 100644
|
||||
--- common.gypi
|
||||
+++ common.gypi
|
||||
@@ -9,6 +9,9 @@
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
|
||||
index 11d7ff4..1013b2ce 100644
|
||||
index 0e9c5ae..28fc90a 100644
|
||||
--- chrome/browser/chrome_browser_main_mac.mm
|
||||
+++ chrome/browser/chrome_browser_main_mac.mm
|
||||
@@ -186,7 +186,7 @@ void EnsureMetadataNeverIndexFile(const base::FilePath& user_data_dir) {
|
||||
@@ -182,7 +182,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit() {
|
||||
ChromeBrowserMainPartsPosix::PostProfileInit();
|
||||
|
||||
g_browser_process->metrics_service()->RecordBreakpadRegistration(
|
||||
@ -12,10 +12,10 @@ index 11d7ff4..1013b2ce 100644
|
||||
// TODO(calamity): Make this gated on first_run::IsChromeFirstRun() in M45.
|
||||
content::BrowserThread::PostAfterStartupTask(
|
||||
diff --git chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc
|
||||
index af1bbec..6b92a7c 100644
|
||||
index d62973e..fc2dfa4 100644
|
||||
--- chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc
|
||||
+++ chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc
|
||||
@@ -73,8 +73,6 @@ void CrashUploadListCrashpad::LoadUploadList(
|
||||
@@ -75,8 +75,6 @@ void CrashUploadListCrashpad::LoadUploadList(
|
||||
// database lives in the .exe, so we need to grab a pointer to a helper in the
|
||||
// exe to get our reports list.
|
||||
GetReportsThunk(&reports);
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
|
||||
index 57355af2..01cde06 100644
|
||||
index f67c51c..6d0a894 100644
|
||||
--- chrome/common/chrome_content_client.cc
|
||||
+++ chrome/common/chrome_content_client.cc
|
||||
@@ -76,7 +76,7 @@
|
||||
@ -11,4 +11,3 @@ index 57355af2..01cde06 100644
|
||||
#define WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT
|
||||
#include "chrome/common/widevine_cdm_constants.h"
|
||||
#endif
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
|
||||
index 841fea0..8939665 100644
|
||||
index 821f642..ae61f08 100644
|
||||
--- content/browser/compositor/gpu_process_transport_factory.cc
|
||||
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
||||
@@ -189,6 +189,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
|
||||
@@ -206,6 +206,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
|
||||
std::unique_ptr<cc::SoftwareOutputDevice>
|
||||
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
|
||||
ui::Compositor* compositor) {
|
||||
|
@ -39,10 +39,10 @@ index 9ad5aef..957ef88 100644
|
||||
// built in media player for the given |url|. Defaults to false.
|
||||
virtual bool ShouldUseMediaPlayerForURL(const GURL& url);
|
||||
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
|
||||
index e4abcb5..399348c 100644
|
||||
index aa0b905..90c705b 100644
|
||||
--- renderer/render_frame_impl.cc
|
||||
+++ renderer/render_frame_impl.cc
|
||||
@@ -4901,7 +4901,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
@@ -4928,7 +4928,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
(pending_navigation_params_ &&
|
||||
!pending_navigation_params_->request_params.redirects.empty());
|
||||
|
||||
@ -50,7 +50,7 @@ index e4abcb5..399348c 100644
|
||||
// The handlenavigation API is deprecated and will be removed once
|
||||
// crbug.com/325351 is resolved.
|
||||
if (GetContentClient()->renderer()->HandleNavigation(
|
||||
@@ -4910,7 +4909,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
@@ -4937,7 +4936,6 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
||||
is_redirect)) {
|
||||
return blink::WebNavigationPolicyIgnore;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git .gn .gn
|
||||
index 29bfe8c..a1e2af6 100644
|
||||
index 658f215..223e0f1 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -249,6 +249,8 @@ exec_script_whitelist = [
|
||||
@@ -252,6 +252,8 @@ exec_script_whitelist = [
|
||||
"//build/toolchain/win/BUILD.gn",
|
||||
"//build/util/branding.gni",
|
||||
"//build/util/version.gni",
|
||||
@ -12,10 +12,10 @@ index 29bfe8c..a1e2af6 100644
|
||||
"//chrome/browser/BUILD.gn",
|
||||
"//chrome/browser/chromeos/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 23e67d9..c3d4ec6 100644
|
||||
index 2bbc1eb..715fa70 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -259,6 +259,7 @@ group("both_gn_and_gyp") {
|
||||
@@ -260,6 +260,7 @@ group("both_gn_and_gyp") {
|
||||
# and whether there should be other targets that are iOS-only and missing.
|
||||
deps += [
|
||||
"//cc:cc_unittests",
|
||||
@ -23,26 +23,6 @@ index 23e67d9..c3d4ec6 100644
|
||||
"//chrome/test:telemetry_perf_unittests",
|
||||
"//chrome/test:unit_tests",
|
||||
"//components:components_browsertests",
|
||||
diff --git build/config/mac/base_rules.gni build/config/mac/base_rules.gni
|
||||
index 109710d..d2c442e 100644
|
||||
--- build/config/mac/base_rules.gni
|
||||
+++ build/config/mac/base_rules.gni
|
||||
@@ -366,13 +366,13 @@ template("compile_xibs") {
|
||||
script = "//build/config/mac/compile_xib.py"
|
||||
sources = invoker.sources
|
||||
outputs = [
|
||||
- "$target_gen_dir/{{source_name_part}}.nib",
|
||||
+ "$target_gen_dir/$target_name/{{source_name_part}}.nib",
|
||||
]
|
||||
args = [
|
||||
"--input",
|
||||
"{{source}}",
|
||||
"--output",
|
||||
- rebase_path("$target_gen_dir/{{source_name_part}}.nib"),
|
||||
+ rebase_path("$target_gen_dir/$target_name/{{source_name_part}}.nib"),
|
||||
] + ibtool_flags
|
||||
}
|
||||
}
|
||||
diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni
|
||||
index 5bfa9a7..5e6e05d 100644
|
||||
--- build/config/win/visual_studio_version.gni
|
||||
@ -100,10 +80,10 @@ index d58cb85..fd608ba 100644
|
||||
|
||||
|
||||
diff --git chrome/BUILD.gn chrome/BUILD.gn
|
||||
index 1c26c3f..556dd64 100644
|
||||
index 70a1759..7822a80 100644
|
||||
--- chrome/BUILD.gn
|
||||
+++ chrome/BUILD.gn
|
||||
@@ -651,7 +651,7 @@ if (is_win) {
|
||||
@@ -686,7 +686,7 @@ if (is_win) {
|
||||
]
|
||||
|
||||
foreach(locale, locales_as_mac_outputs) {
|
||||
@ -113,23 +93,23 @@ index 1c26c3f..556dd64 100644
|
||||
|
||||
outputs = [
|
||||
diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni
|
||||
index 9601dd4..9a7734a 100644
|
||||
index 54559c7..8ef1e66 100644
|
||||
--- chrome/chrome_repack_locales.gni
|
||||
+++ chrome/chrome_repack_locales.gni
|
||||
@@ -161,9 +161,9 @@ template("chrome_repack_locales") {
|
||||
|
||||
# Compute the output name. Mac uses a different location.
|
||||
if (is_mac || is_ios) {
|
||||
@@ -192,9 +192,9 @@ template("chrome_repack_locales") {
|
||||
if (defined(invoker.output_dir)) {
|
||||
output = "${invoker.output_dir}/${output_locale}.pak"
|
||||
} else if (is_mac || is_ios) {
|
||||
- output = "${root_gen_dir}/repack/locales/${output_locale}.pak"
|
||||
+ output = "${root_gen_dir}/chrome/repack/locales/${output_locale}.pak"
|
||||
} else {
|
||||
- output = "${root_out_dir}/locales/${output_locale}.pak"
|
||||
+ output = "${root_out_dir}/chrome/locales/${output_locale}.pak"
|
||||
}
|
||||
}
|
||||
|
||||
if (defined(invoker.additional_source_patterns)) {
|
||||
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
|
||||
index 699f56f..e2659fc 100644
|
||||
index 842a0b5..8814ec1 100644
|
||||
--- chrome/installer/mini_installer/BUILD.gn
|
||||
+++ chrome/installer/mini_installer/BUILD.gn
|
||||
@@ -125,7 +125,7 @@ template("generate_mini_installer") {
|
||||
@ -141,23 +121,3 @@ index 699f56f..e2659fc 100644
|
||||
"$root_out_dir/setup.exe",
|
||||
release_file,
|
||||
]
|
||||
diff --git tools/grit/repack.gni tools/grit/repack.gni
|
||||
index 42087f9..7dd1520 100644
|
||||
--- tools/grit/repack.gni
|
||||
+++ tools/grit/repack.gni
|
||||
@@ -18,6 +18,7 @@ declare_args() {
|
||||
# File name (single string) of the output file.
|
||||
#
|
||||
# deps [optional]
|
||||
+# public_deps [optional]
|
||||
# visibility [optional]
|
||||
# Normal meaning.
|
||||
template("repack") {
|
||||
@@ -25,6 +26,7 @@ template("repack") {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
"deps",
|
||||
+ "public_deps",
|
||||
"testonly",
|
||||
"visibility",
|
||||
])
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git resource_ids resource_ids
|
||||
index f45f57f..42754a9 100644
|
||||
index e681012..b54b107 100644
|
||||
--- resource_ids
|
||||
+++ resource_ids
|
||||
@@ -14,6 +14,12 @@
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git components/webmessaging.gypi components/webmessaging.gypi
|
||||
index 1ea14fb..8020b74 100644
|
||||
index 318f0db..cbe0bac 100644
|
||||
--- components/webmessaging.gypi
|
||||
+++ components/webmessaging.gypi
|
||||
@@ -48,12 +48,6 @@
|
||||
@@ -49,12 +49,6 @@
|
||||
'target_name': 'webmessaging_mojo_bindings_for_blink',
|
||||
'type': 'static_library',
|
||||
'sources': [ '<@(mojom_files)' ],
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome_elf/chrome_elf.gyp chrome_elf/chrome_elf.gyp
|
||||
index 7a49fe8..b4be214 100644
|
||||
index c9a412b..95a7fa6 100644
|
||||
--- chrome_elf/chrome_elf.gyp
|
||||
+++ chrome_elf/chrome_elf.gyp
|
||||
@@ -59,12 +59,6 @@
|
||||
@@ -65,12 +65,6 @@
|
||||
],
|
||||
# Set /SUBSYSTEM:WINDOWS.
|
||||
'SubSystem': '2',
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git message_loop.cc message_loop.cc
|
||||
index 9d37691..c8ff77e 100644
|
||||
index 93b9d0a..d150345 100644
|
||||
--- message_loop.cc
|
||||
+++ message_loop.cc
|
||||
@@ -143,12 +143,6 @@ MessageLoop::~MessageLoop() {
|
||||
@ -15,7 +15,7 @@ index 9d37691..c8ff77e 100644
|
||||
#if defined(OS_WIN)
|
||||
if (in_high_res_mode_)
|
||||
Time::ActivateHighResolutionTimer(false);
|
||||
@@ -390,6 +384,9 @@ MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory)
|
||||
@@ -392,6 +386,9 @@ MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory)
|
||||
in_high_res_mode_(false),
|
||||
#endif
|
||||
nestable_tasks_allowed_(true),
|
||||
@ -26,10 +26,10 @@ index 9d37691..c8ff77e 100644
|
||||
message_histogram_(NULL),
|
||||
run_loop_(NULL),
|
||||
diff --git message_loop.h message_loop.h
|
||||
index 1230f41..1eadc1e 100644
|
||||
index d8eae01..d80aba4 100644
|
||||
--- message_loop.h
|
||||
+++ message_loop.h
|
||||
@@ -373,6 +373,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
||||
@@ -383,6 +383,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
||||
void AddTaskObserver(TaskObserver* task_observer);
|
||||
void RemoveTaskObserver(TaskObserver* task_observer);
|
||||
|
||||
@ -46,7 +46,7 @@ index 1230f41..1eadc1e 100644
|
||||
// Can only be called from the thread that owns the MessageLoop.
|
||||
bool is_running() const;
|
||||
|
||||
@@ -520,6 +530,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
||||
@@ -530,6 +540,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
|
||||
// insider a (accidentally induced?) nested message pump.
|
||||
bool nestable_tasks_allowed_;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git mime_handler_view_guest.cc mime_handler_view_guest.cc
|
||||
index 13f7dc3..acbc1ca 100644
|
||||
index a58e021..2a20447 100644
|
||||
--- mime_handler_view_guest.cc
|
||||
+++ mime_handler_view_guest.cc
|
||||
@@ -134,6 +134,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
|
@ -45,10 +45,10 @@ index 78b8c34..387bea5 100644
|
||||
friend class GZipUnitTest;
|
||||
friend class SdchFilterChainingTest;
|
||||
diff --git url_request/url_request_job.cc url_request/url_request_job.cc
|
||||
index dc42edf..fb3ecf1 100644
|
||||
index b80c0b3..90d4331 100644
|
||||
--- url_request/url_request_job.cc
|
||||
+++ url_request/url_request_job.cc
|
||||
@@ -503,6 +503,9 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||
@@ -499,6 +499,9 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||
if (request_->status().is_success())
|
||||
filter_ = SetupFilter();
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git url_request.h url_request.h
|
||||
index 85eb2e4..08bb463 100644
|
||||
index 005ae29..28e201e0 100644
|
||||
--- url_request.h
|
||||
+++ url_request.h
|
||||
@@ -654,10 +654,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
|
||||
@@ -648,10 +648,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
|
||||
// or after the response headers are received.
|
||||
void GetConnectionAttempts(ConnectionAttempts* out) const;
|
||||
|
||||
|
@ -1,12 +1,27 @@
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index c9a5fdd..81fc17a 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -145,6 +145,10 @@ static_library("pdfium") {
|
||||
} else {
|
||||
libs += [ "freetype" ]
|
||||
}
|
||||
+
|
||||
+ include_dirs = [
|
||||
+ "//v8/include",
|
||||
+ ]
|
||||
}
|
||||
|
||||
source_set("test_support") {
|
||||
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
|
||||
index 646fb46..42e8bdf 100644
|
||||
index 34e7d23..d65ea13 100644
|
||||
--- fpdfsdk/fpdfview.cpp
|
||||
+++ fpdfsdk/fpdfview.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "fpdfsdk/include/fsdk_mgr.h"
|
||||
#include "fpdfsdk/include/fsdk_rendercontext.h"
|
||||
#include "fpdfsdk/javascript/ijs_runtime.h"
|
||||
+#include "fpdfsdk/jsapi/include/fxjs_v8.h"
|
||||
+#include "fxjs/include/fxjs_v8.h"
|
||||
#include "public/fpdf_ext.h"
|
||||
#include "public/fpdf_progressive.h"
|
||||
#include "third_party/base/numerics/safe_conversions_impl.h"
|
||||
|
@ -35,10 +35,10 @@ index 3fb1a79..b97ab57 100644
|
||||
bool inert_visual_viewport;
|
||||
bool record_whole_document;
|
||||
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
|
||||
index be61076..6397124 100644
|
||||
index bc6a4ee..015a22f 100644
|
||||
--- renderer/render_view_impl.cc
|
||||
+++ renderer/render_view_impl.cc
|
||||
@@ -1466,6 +1466,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
|
||||
@@ -1465,6 +1465,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
|
||||
blink::WebView* web_view,
|
||||
CompositorDependencies* compositor_deps) {
|
||||
ApplyWebPreferences(prefs, web_view);
|
||||
|
@ -12,7 +12,7 @@ index b43b88b..7779496 100644
|
||||
#include "chrome/browser/sessions/session_tab_helper.h"
|
||||
#include "chrome/browser/ui/cocoa/applescript/apple_event_util.h"
|
||||
#include "chrome/browser/ui/cocoa/applescript/error_applescript.h"
|
||||
@@ -227,11 +229,15 @@ - (void)handlesStopScriptCommand:(NSScriptCommand*)command {
|
||||
@@ -227,11 +229,15 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id,
|
||||
|
||||
- (void)handlesPrintScriptCommand:(NSScriptCommand*)command {
|
||||
AppleScript::LogAppleScriptUMA(AppleScript::AppleScriptCommand::TAB_PRINT);
|
||||
@ -166,10 +166,10 @@ index 705211b..a524333 100644
|
||||
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
|
||||
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
||||
diff --git components/printing/renderer/print_web_view_helper.cc components/printing/renderer/print_web_view_helper.cc
|
||||
index b25340c..47d419e 100644
|
||||
index 0169f36..c316ff2 100644
|
||||
--- components/printing/renderer/print_web_view_helper.cc
|
||||
+++ components/printing/renderer/print_web_view_helper.cc
|
||||
@@ -83,6 +83,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
|
||||
@@ -85,6 +85,9 @@ const float kPrintingMinimumShrinkFactor = 1.333f;
|
||||
|
||||
#if defined(ENABLE_PRINT_PREVIEW)
|
||||
bool g_is_preview_enabled = true;
|
||||
@ -179,7 +179,7 @@ index b25340c..47d419e 100644
|
||||
|
||||
const char kPageLoadScriptFormat[] =
|
||||
"document.open(); document.write(%s); document.close();";
|
||||
@@ -97,9 +100,6 @@ void ExecuteScript(blink::WebFrame* frame,
|
||||
@@ -99,9 +102,6 @@ void ExecuteScript(blink::WebFrame* frame,
|
||||
std::string script = base::StringPrintf(script_format, json.c_str());
|
||||
frame->executeScript(blink::WebString(base::UTF8ToUTF16(script)));
|
||||
}
|
||||
@ -189,7 +189,7 @@ index b25340c..47d419e 100644
|
||||
|
||||
int GetDPI(const PrintMsg_Print_Params* print_params) {
|
||||
#if defined(OS_MACOSX)
|
||||
@@ -309,7 +309,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
|
||||
@@ -311,7 +311,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
|
||||
return plugin && plugin->supportsPaginatedPrint();
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ index b25340c..47d419e 100644
|
||||
// Returns true if the current destination printer is PRINT_TO_PDF.
|
||||
bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) {
|
||||
bool print_to_pdf = false;
|
||||
@@ -331,7 +330,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebFrame* frame,
|
||||
@@ -333,7 +332,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame,
|
||||
}
|
||||
return frame_has_custom_page_size_style;
|
||||
}
|
||||
@ -205,7 +205,7 @@ index b25340c..47d419e 100644
|
||||
|
||||
// Disable scaling when either:
|
||||
// - The PDF specifies disabling scaling.
|
||||
@@ -378,7 +376,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
|
||||
@@ -380,7 +378,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -213,15 +213,15 @@ index b25340c..47d419e 100644
|
||||
bool FitToPageEnabled(const base::DictionaryValue& job_settings) {
|
||||
bool fit_to_paper_size = false;
|
||||
if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) {
|
||||
@@ -420,7 +417,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
|
||||
@@ -422,7 +419,6 @@ blink::WebPrintScalingOption GetPrintScalingOption(
|
||||
}
|
||||
return blink::WebPrintScalingOptionFitToPrintableArea;
|
||||
}
|
||||
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
||||
|
||||
PrintMsg_Print_Params CalculatePrintParamsForCss(
|
||||
blink::WebFrame* frame,
|
||||
@@ -504,7 +500,6 @@ blink::WebView* FrameReference::view() {
|
||||
blink::WebLocalFrame* frame,
|
||||
@@ -506,7 +502,6 @@ blink::WebView* FrameReference::view() {
|
||||
return view_;
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ index b25340c..47d419e 100644
|
||||
// static - Not anonymous so that platform implementations can use it.
|
||||
void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||
blink::WebCanvas* canvas,
|
||||
@@ -561,7 +556,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||
@@ -566,7 +561,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||
web_view->close();
|
||||
frame->close();
|
||||
}
|
||||
@ -237,7 +237,7 @@ index b25340c..47d419e 100644
|
||||
|
||||
// static - Not anonymous so that platform implementations can use it.
|
||||
float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame,
|
||||
@@ -842,6 +836,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
|
||||
@@ -852,6 +846,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
|
||||
print_for_preview_(false),
|
||||
delegate_(std::move(delegate)),
|
||||
print_node_in_progress_(false),
|
||||
@ -245,7 +245,7 @@ index b25340c..47d419e 100644
|
||||
is_loading_(false),
|
||||
is_scripted_preview_delayed_(false),
|
||||
ipc_nesting_level_(0),
|
||||
@@ -900,10 +895,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
|
||||
@@ -910,10 +905,8 @@ void PrintWebViewHelper::PrintPage(blink::WebLocalFrame* frame,
|
||||
return;
|
||||
|
||||
if (g_is_preview_enabled) {
|
||||
@ -256,7 +256,7 @@ index b25340c..47d419e 100644
|
||||
} else {
|
||||
#if defined(ENABLE_BASIC_PRINTING)
|
||||
Print(frame, blink::WebNode(), true);
|
||||
@@ -927,14 +920,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
|
||||
@@ -937,14 +930,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
|
||||
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
|
||||
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
|
||||
#endif // defined(ENABLE_BASIC_PRINTING)
|
||||
@ -271,7 +271,7 @@ index b25340c..47d419e 100644
|
||||
IPC_MESSAGE_HANDLER(PrintMsg_SetScriptedPrintingBlocked,
|
||||
SetScriptedPrintBlocked)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
@@ -990,7 +979,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
|
||||
@@ -999,7 +988,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
|
||||
}
|
||||
#endif // defined(ENABLE_BASIC_PRINTING)
|
||||
|
||||
@ -279,7 +279,7 @@ index b25340c..47d419e 100644
|
||||
void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||
const base::DictionaryValue& job_settings) {
|
||||
CHECK_LE(ipc_nesting_level_, 1);
|
||||
@@ -1055,7 +1043,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||
@@ -1064,7 +1052,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
|
||||
DidFinishPrinting(FAIL_PRINT);
|
||||
}
|
||||
}
|
||||
@ -287,7 +287,7 @@ index b25340c..47d419e 100644
|
||||
|
||||
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
|
||||
const PageSizeMargins& page_layout_in_points,
|
||||
@@ -1080,7 +1067,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
|
||||
@@ -1089,7 +1076,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
|
||||
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ index b25340c..47d419e 100644
|
||||
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
@@ -1241,7 +1227,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
|
||||
@@ -1250,7 +1236,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ index b25340c..47d419e 100644
|
||||
bool PrintWebViewHelper::RenderPreviewPage(
|
||||
int page_number,
|
||||
const PrintMsg_Print_Params& print_params) {
|
||||
@@ -1271,7 +1257,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
|
||||
@@ -1280,7 +1266,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
|
||||
}
|
||||
return PreviewPageRendered(page_number, draft_metafile.get());
|
||||
}
|
||||
@ -313,7 +313,7 @@ index b25340c..47d419e 100644
|
||||
|
||||
bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||
DCHECK(!is_print_ready_metafile_sent_);
|
||||
@@ -1301,7 +1287,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||
@@ -1310,7 +1296,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
||||
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
|
||||
return true;
|
||||
}
|
||||
@ -321,7 +321,7 @@ index b25340c..47d419e 100644
|
||||
|
||||
void PrintWebViewHelper::OnPrintingDone(bool success) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
@@ -1316,7 +1301,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
|
||||
@@ -1325,7 +1310,6 @@ void PrintWebViewHelper::SetScriptedPrintBlocked(bool blocked) {
|
||||
is_scripted_printing_blocked_ = blocked;
|
||||
}
|
||||
|
||||
@ -329,7 +329,7 @@ index b25340c..47d419e 100644
|
||||
void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
@@ -1327,7 +1311,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||
@@ -1336,7 +1320,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||
// that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
if (!plugin.isNull()) {
|
||||
@ -339,7 +339,7 @@ index b25340c..47d419e 100644
|
||||
return;
|
||||
}
|
||||
print_preview_context_.InitWithFrame(frame);
|
||||
@@ -1335,7 +1321,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||
@@ -1344,7 +1330,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||
? PRINT_PREVIEW_USER_INITIATED_SELECTION
|
||||
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
|
||||
}
|
||||
@ -347,7 +347,7 @@ index b25340c..47d419e 100644
|
||||
|
||||
bool PrintWebViewHelper::IsPrintingEnabled() {
|
||||
bool result = false;
|
||||
@@ -1361,11 +1346,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1370,11 +1355,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets
|
||||
// its |context_menu_node_|.
|
||||
@ -360,7 +360,7 @@ index b25340c..47d419e 100644
|
||||
} else {
|
||||
#if defined(ENABLE_BASIC_PRINTING)
|
||||
blink::WebNode duplicate_node(node);
|
||||
@@ -1431,7 +1414,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
@@ -1440,7 +1423,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
}
|
||||
break;
|
||||
|
||||
@ -368,7 +368,7 @@ index b25340c..47d419e 100644
|
||||
case FAIL_PREVIEW:
|
||||
int cookie =
|
||||
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
|
||||
@@ -1443,7 +1425,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
@@ -1452,7 +1434,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
||||
}
|
||||
print_preview_context_.Failed(notify_browser_of_print_failure_);
|
||||
break;
|
||||
@ -376,7 +376,7 @@ index b25340c..47d419e 100644
|
||||
}
|
||||
prep_frame_view_.reset();
|
||||
print_pages_params_.reset();
|
||||
@@ -1575,7 +1556,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
@@ -1584,7 +1565,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -384,7 +384,7 @@ index b25340c..47d419e 100644
|
||||
bool PrintWebViewHelper::SetOptionsFromPdfDocument(
|
||||
PrintHostMsg_SetOptionsFromDocument_Params* options) {
|
||||
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
|
||||
@@ -1684,7 +1664,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
|
||||
@@ -1693,7 +1673,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -392,7 +392,7 @@ index b25340c..47d419e 100644
|
||||
|
||||
#if defined(ENABLE_BASIC_PRINTING)
|
||||
bool PrintWebViewHelper::GetPrintSettingsFromUser(blink::WebLocalFrame* frame,
|
||||
@@ -1792,7 +1771,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
@@ -1801,7 +1780,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
|
||||
@ -400,7 +400,7 @@ index b25340c..47d419e 100644
|
||||
if (params.params.display_header_footer) {
|
||||
// TODO(thestig): Figure out why Linux needs this. It is almost certainly
|
||||
// |printingMinimumShrinkFactor| from Blink.
|
||||
@@ -1807,7 +1785,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
@@ -1816,7 +1794,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
scale_factor / fudge_factor, page_layout_in_points,
|
||||
params.params);
|
||||
}
|
||||
@ -408,7 +408,7 @@ index b25340c..47d419e 100644
|
||||
|
||||
float webkit_scale_factor =
|
||||
RenderPageContent(frame, params.page_number, canvas_area, content_area,
|
||||
@@ -1843,7 +1820,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
@@ -1852,7 +1829,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -416,7 +416,7 @@ index b25340c..47d419e 100644
|
||||
void PrintWebViewHelper::ShowScriptedPrintPreview() {
|
||||
if (is_scripted_preview_delayed_) {
|
||||
is_scripted_preview_delayed_ = false;
|
||||
@@ -1971,7 +1947,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
|
||||
@@ -1980,7 +1956,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
|
||||
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
|
||||
return true;
|
||||
}
|
||||
@ -425,10 +425,10 @@ index b25340c..47d419e 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 fe33d5e..3f1b7b5 100644
|
||||
index dd8d24d..7c73d38 100644
|
||||
--- components/printing/renderer/print_web_view_helper.h
|
||||
+++ components/printing/renderer/print_web_view_helper.h
|
||||
@@ -137,9 +137,7 @@ class PrintWebViewHelper
|
||||
@@ -138,9 +138,7 @@ class PrintWebViewHelper
|
||||
OK,
|
||||
FAIL_PRINT_INIT,
|
||||
FAIL_PRINT,
|
||||
@ -438,7 +438,7 @@ index fe33d5e..3f1b7b5 100644
|
||||
};
|
||||
|
||||
enum PrintPreviewErrorBuckets {
|
||||
@@ -174,10 +172,8 @@ class PrintWebViewHelper
|
||||
@@ -175,10 +173,8 @@ class PrintWebViewHelper
|
||||
void OnPrintForSystemDialog();
|
||||
void OnPrintForPrintPreview(const base::DictionaryValue& job_settings);
|
||||
#endif // defined(ENABLE_BASIC_PRINTING)
|
||||
@ -449,7 +449,7 @@ index fe33d5e..3f1b7b5 100644
|
||||
void OnPrintingDone(bool success);
|
||||
|
||||
// Get |page_size| and |content_area| information from
|
||||
@@ -190,7 +186,6 @@ class PrintWebViewHelper
|
||||
@@ -191,7 +187,6 @@ class PrintWebViewHelper
|
||||
// Update |ignore_css_margins_| based on settings.
|
||||
void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings);
|
||||
|
||||
@ -457,7 +457,7 @@ index fe33d5e..3f1b7b5 100644
|
||||
// Prepare frame for creating preview document.
|
||||
void PrepareFrameForPreviewDocument();
|
||||
|
||||
@@ -207,7 +202,6 @@ class PrintWebViewHelper
|
||||
@@ -208,7 +203,6 @@ class PrintWebViewHelper
|
||||
|
||||
// Finalize the print ready preview document.
|
||||
bool FinalizePrintReadyDocument();
|
||||
@ -465,7 +465,7 @@ index fe33d5e..3f1b7b5 100644
|
||||
|
||||
// Enable/Disable window.print calls. If |blocked| is true window.print
|
||||
// calls will silently fail. Call with |blocked| set to false to reenable.
|
||||
@@ -236,7 +230,6 @@ class PrintWebViewHelper
|
||||
@@ -237,7 +231,6 @@ class PrintWebViewHelper
|
||||
const blink::WebNode& node,
|
||||
int* number_of_pages);
|
||||
|
||||
@ -473,7 +473,7 @@ index fe33d5e..3f1b7b5 100644
|
||||
// Set options for print preset from source PDF document.
|
||||
bool SetOptionsFromPdfDocument(
|
||||
PrintHostMsg_SetOptionsFromDocument_Params* options);
|
||||
@@ -247,7 +240,6 @@ class PrintWebViewHelper
|
||||
@@ -248,7 +241,6 @@ class PrintWebViewHelper
|
||||
bool UpdatePrintSettings(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
const base::DictionaryValue& passed_job_settings);
|
||||
@ -481,7 +481,7 @@ index fe33d5e..3f1b7b5 100644
|
||||
|
||||
// Get final print settings from the user.
|
||||
// Return false if the user cancels or on error.
|
||||
@@ -322,7 +314,6 @@ class PrintWebViewHelper
|
||||
@@ -323,7 +315,6 @@ class PrintWebViewHelper
|
||||
const PrintMsg_PrintPages_Params& params,
|
||||
int page_count);
|
||||
|
||||
@ -489,7 +489,7 @@ index fe33d5e..3f1b7b5 100644
|
||||
// Given the |device| and |canvas| to draw on, prints the appropriate headers
|
||||
// and footers using strings from |header_footer_info| on to the canvas.
|
||||
static void PrintHeaderAndFooter(blink::WebCanvas* canvas,
|
||||
@@ -332,7 +323,6 @@ class PrintWebViewHelper
|
||||
@@ -333,7 +324,6 @@ class PrintWebViewHelper
|
||||
float webkit_scale_factor,
|
||||
const PageSizeMargins& page_layout_in_points,
|
||||
const PrintMsg_Print_Params& params);
|
||||
@ -497,7 +497,7 @@ index fe33d5e..3f1b7b5 100644
|
||||
|
||||
bool GetPrintFrame(blink::WebLocalFrame** frame);
|
||||
|
||||
@@ -344,7 +334,6 @@ class PrintWebViewHelper
|
||||
@@ -345,7 +335,6 @@ class PrintWebViewHelper
|
||||
bool IsScriptInitiatedPrintAllowed(blink::WebFrame* frame,
|
||||
bool user_initiated);
|
||||
|
||||
@ -505,7 +505,7 @@ index fe33d5e..3f1b7b5 100644
|
||||
// Shows scripted print preview when options from plugin are available.
|
||||
void ShowScriptedPrintPreview();
|
||||
|
||||
@@ -360,7 +349,6 @@ class PrintWebViewHelper
|
||||
@@ -361,7 +350,6 @@ class PrintWebViewHelper
|
||||
// |metafile| is the rendered page. Otherwise |metafile| is NULL.
|
||||
// Returns true if print preview should continue, false on failure.
|
||||
bool PreviewPageRendered(int page_number, PdfMetafileSkia* metafile);
|
||||
@ -513,7 +513,7 @@ index fe33d5e..3f1b7b5 100644
|
||||
|
||||
void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings);
|
||||
|
||||
@@ -513,6 +501,7 @@ class PrintWebViewHelper
|
||||
@@ -514,6 +502,7 @@ class PrintWebViewHelper
|
||||
ScriptingThrottler scripting_throttler_;
|
||||
|
||||
bool print_node_in_progress_;
|
||||
@ -522,7 +522,7 @@ index fe33d5e..3f1b7b5 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 d227c5e..f362093 100644
|
||||
index 0b13474..4bf7c6b 100644
|
||||
--- components/printing/renderer/print_web_view_helper_mac.mm
|
||||
+++ components/printing/renderer/print_web_view_helper_mac.mm
|
||||
@@ -68,7 +68,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
|
||||
index b7991fa..7e27615 100644
|
||||
index 0dc3ef0..705d8f4 100644
|
||||
--- render_widget_host_view_mac.mm
|
||||
+++ render_widget_host_view_mac.mm
|
||||
@@ -573,9 +573,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
|
||||
@@ -499,9 +499,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
|
||||
// Paint this view host with |background_color_| when there is no content
|
||||
// ready to draw.
|
||||
background_layer_.reset([[CALayer alloc] init]);
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index d9b97ff..9ac9883 100644
|
||||
index 284533c..6e56986 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -769,6 +769,13 @@ void RenderWidgetHostViewAura::SetKeyboardFocus() {
|
||||
@ -17,7 +17,7 @@ index d9b97ff..9ac9883 100644
|
||||
if (host_ && set_focus_on_mouse_down_or_key_event_) {
|
||||
set_focus_on_mouse_down_or_key_event_ = false;
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index 0b34ce0..de4eae7 100644
|
||||
index 8b8907e..52bee5e 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -42,6 +42,7 @@ RenderWidgetHostViewBase::RenderWidgetHostViewBase()
|
||||
@ -28,7 +28,7 @@ index 0b34ce0..de4eae7 100644
|
||||
renderer_frame_number_(0),
|
||||
weak_factory_(this) {}
|
||||
|
||||
@@ -269,6 +270,10 @@ void RenderWidgetHostViewBase::FocusedNodeTouched(
|
||||
@@ -275,6 +276,10 @@ void RenderWidgetHostViewBase::FocusedNodeTouched(
|
||||
DVLOG(1) << "FocusedNodeTouched: " << editable;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ index 0b34ce0..de4eae7 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 f6a25c1..eceab0b 100644
|
||||
index 0a1e01e..e8439d2 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -101,6 +101,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
@ -51,7 +51,7 @@ index f6a25c1..eceab0b 100644
|
||||
|
||||
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
|
||||
// that handle content embedded within other RenderWidgetHostViews.
|
||||
@@ -456,6 +457,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
@@ -458,6 +459,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
|
||||
// destroyed before the RWHV is destroyed.
|
||||
TextInputManager* text_input_manager_;
|
||||
|
||||
@ -63,7 +63,7 @@ index f6a25c1..eceab0b 100644
|
||||
void FlushInput();
|
||||
|
||||
diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h
|
||||
index 5ef49e4..d391b20 100644
|
||||
index 5475763..d92ecd0 100644
|
||||
--- content/public/browser/render_widget_host_view.h
|
||||
+++ content/public/browser/render_widget_host_view.h
|
||||
@@ -167,6 +167,10 @@ class CONTENT_EXPORT RenderWidgetHostView {
|
||||
@ -91,7 +91,7 @@ index f772f64..7d13f9f 100644
|
||||
return host ? host->GetAcceleratedWidget() : NULL;
|
||||
}
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index de96b63..ed0ba73 100644
|
||||
index f58bbaa..1643f5a 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -86,6 +86,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin(
|
||||
@ -116,7 +116,7 @@ index de96b63..ed0ba73 100644
|
||||
|
||||
remove_standard_frame_ = params.remove_standard_frame;
|
||||
has_non_client_view_ = Widget::RequiresNonClientView(params.type);
|
||||
@@ -641,6 +646,10 @@ bool DesktopWindowTreeHostWin::CanActivate() const {
|
||||
@@ -645,6 +650,10 @@ bool DesktopWindowTreeHostWin::CanActivate() const {
|
||||
return native_widget_delegate_->CanActivate();
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ index de96b63..ed0ba73 100644
|
||||
bool DesktopWindowTreeHostWin::WantsMouseEventsWhenInactive() const {
|
||||
return wants_mouse_events_when_inactive_;
|
||||
}
|
||||
@@ -821,11 +830,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
|
||||
@@ -825,11 +834,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
|
||||
}
|
||||
|
||||
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
|
||||
@ -146,10 +146,10 @@ index de96b63..ed0ba73 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 e71604d..937bf91 100644
|
||||
index ec0bd2a..e4c2403 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
@@ -137,6 +137,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
@@ -138,6 +138,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
bool CanMaximize() const override;
|
||||
bool CanMinimize() const override;
|
||||
bool CanActivate() const override;
|
||||
@ -157,7 +157,7 @@ index e71604d..937bf91 100644
|
||||
bool WantsMouseEventsWhenInactive() const override;
|
||||
bool WidgetSizeIsClientSize() const override;
|
||||
bool IsModal() const override;
|
||||
@@ -251,6 +252,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
@@ -252,6 +253,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
// True if the window should have the frame removed.
|
||||
bool remove_standard_frame_;
|
||||
|
||||
@ -169,7 +169,7 @@ index e71604d..937bf91 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 82ba30c..c27b201 100644
|
||||
index 0475bf7..3a810de 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
||||
@@ -174,6 +174,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
@ -209,7 +209,7 @@ index 82ba30c..c27b201 100644
|
||||
return ToDIPRect(bounds_in_pixels_);
|
||||
}
|
||||
|
||||
@@ -986,6 +991,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
|
||||
@@ -1005,6 +1010,8 @@ void DesktopWindowTreeHostX11::HideImpl() {
|
||||
}
|
||||
|
||||
gfx::Rect DesktopWindowTreeHostX11::GetBounds() const {
|
||||
@ -218,7 +218,7 @@ index 82ba30c..c27b201 100644
|
||||
return bounds_in_pixels_;
|
||||
}
|
||||
|
||||
@@ -1043,6 +1050,8 @@ void DesktopWindowTreeHostX11::SetBounds(
|
||||
@@ -1064,6 +1071,8 @@ void DesktopWindowTreeHostX11::SetBounds(
|
||||
}
|
||||
|
||||
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
|
||||
@ -227,7 +227,7 @@ index 82ba30c..c27b201 100644
|
||||
return bounds_in_pixels_.origin();
|
||||
}
|
||||
|
||||
@@ -1154,9 +1163,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
@@ -1175,9 +1184,15 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
None;
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ index 82ba30c..c27b201 100644
|
||||
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
|
||||
bounds_in_pixels_.height(),
|
||||
0, // border width
|
||||
@@ -1787,6 +1802,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
@@ -1809,6 +1824,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -256,7 +256,7 @@ index 82ba30c..c27b201 100644
|
||||
if (xev->xfocus.mode != NotifyGrab) {
|
||||
ReleaseCapture();
|
||||
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
index fa262f1..78a4aba 100644
|
||||
index aced1ef..9e72692 100644
|
||||
--- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
|
||||
@@ -86,6 +86,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@ -272,7 +272,7 @@ index fa262f1..78a4aba 100644
|
||||
protected:
|
||||
// Overridden from DesktopWindowTreeHost:
|
||||
void Init(aura::Window* content_window,
|
||||
@@ -266,6 +272,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -271,6 +277,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// The bounds of |xwindow_|.
|
||||
gfx::Rect bounds_in_pixels_;
|
||||
|
||||
@ -282,7 +282,7 @@ index fa262f1..78a4aba 100644
|
||||
// Whenever the bounds are set, we keep the previous set of bounds around so
|
||||
// we can have a better chance of getting the real
|
||||
// |restored_bounds_in_pixels_|. Window managers tend to send a Configure
|
||||
@@ -302,6 +311,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -310,6 +319,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
// Whether we used an ARGB visual for our window.
|
||||
bool use_argb_visual_;
|
||||
|
||||
@ -293,7 +293,7 @@ index fa262f1..78a4aba 100644
|
||||
DesktopDragDropClientAuraX11* drag_drop_client_;
|
||||
|
||||
std::unique_ptr<ui::EventHandler> x11_non_client_event_filter_;
|
||||
@@ -354,6 +367,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@@ -362,6 +375,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
|
||||
base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_;
|
||||
|
||||
@ -304,10 +304,10 @@ index fa262f1..78a4aba 100644
|
||||
};
|
||||
|
||||
diff --git ui/views/widget/desktop_aura/x11_desktop_handler.cc ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
||||
index 8ec4b1e..587e4e3 100644
|
||||
index aa3c234..021bd01 100644
|
||||
--- ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
||||
+++ ui/views/widget/desktop_aura/x11_desktop_handler.cc
|
||||
@@ -31,6 +31,30 @@ views::X11DesktopHandler* g_handler = NULL;
|
||||
@@ -33,6 +33,30 @@ views::X11DesktopHandler* g_handler = NULL;
|
||||
|
||||
namespace views {
|
||||
|
||||
@ -338,7 +338,7 @@ index 8ec4b1e..587e4e3 100644
|
||||
// static
|
||||
X11DesktopHandler* X11DesktopHandler::get() {
|
||||
if (!g_handler)
|
||||
@@ -86,7 +110,11 @@ void X11DesktopHandler::ActivateWindow(::Window window) {
|
||||
@@ -88,7 +112,11 @@ void X11DesktopHandler::ActivateWindow(::Window window) {
|
||||
// in an active X window.
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ index 8ec4b1e..587e4e3 100644
|
||||
DCHECK_EQ(gfx::GetXDisplay(), xdisplay_);
|
||||
|
||||
// If the window is not already active, send a hint to activate it
|
||||
@@ -191,8 +219,10 @@ uint32_t X11DesktopHandler::DispatchEvent(const ui::PlatformEvent& event) {
|
||||
@@ -213,8 +241,10 @@ uint32_t X11DesktopHandler::DispatchEvent(const ui::PlatformEvent& event) {
|
||||
::Window window;
|
||||
if (ui::GetXIDProperty(x_root_window_, "_NET_ACTIVE_WINDOW", &window) &&
|
||||
window) {
|
||||
@ -365,7 +365,7 @@ index 8ec4b1e..587e4e3 100644
|
||||
x_active_window_ = None;
|
||||
}
|
||||
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
|
||||
index 62b4b56..5fe4bd0 100644
|
||||
index eebeb87..eed32f8 100644
|
||||
--- ui/views/widget/widget.cc
|
||||
+++ ui/views/widget/widget.cc
|
||||
@@ -126,9 +126,11 @@ Widget::InitParams::InitParams(Type type)
|
||||
@ -413,10 +413,10 @@ index 62b4b56..5fe4bd0 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 0376866..7901ea4 100644
|
||||
index 4e1617f..5b1f06b 100644
|
||||
--- ui/views/widget/widget.h
|
||||
+++ ui/views/widget/widget.h
|
||||
@@ -238,12 +238,17 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
@@ -235,12 +235,17 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
// rendered, and that the client area should be equivalent to the window
|
||||
// area. Only used on some platforms (Windows and Linux).
|
||||
bool remove_standard_frame;
|
||||
@ -432,9 +432,9 @@ index 0376866..7901ea4 100644
|
||||
gfx::NativeView parent;
|
||||
+ gfx::AcceleratedWidget parent_widget;
|
||||
// Used only by mus and is necessitated by mus not being a NativeView.
|
||||
mus::Window* parent_mus = nullptr;
|
||||
ui::Window* parent_mus = nullptr;
|
||||
// Specifies the initial bounds of the Widget. Default is empty, which means
|
||||
@@ -754,6 +759,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
@@ -757,6 +762,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
bool movement_disabled() const { return movement_disabled_; }
|
||||
void set_movement_disabled(bool disabled) { movement_disabled_ = disabled; }
|
||||
|
||||
@ -445,7 +445,7 @@ index 0376866..7901ea4 100644
|
||||
// Returns the work area bounds of the screen the Widget belongs to.
|
||||
gfx::Rect GetWorkAreaBoundsInScreen() const;
|
||||
|
||||
@@ -972,6 +981,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
@@ -975,6 +984,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
// disabled.
|
||||
bool movement_disabled_;
|
||||
|
||||
|
@ -44,7 +44,7 @@ index d646060..697bf1b 100644
|
||||
// window.opener property, terminate prerendering.
|
||||
prerender_contents_->Destroy(FINAL_STATUS_CREATE_NEW_WINDOW);
|
||||
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||
index b10b2df..a47dd18 100644
|
||||
index 3951954..ca52685 100644
|
||||
--- chrome/browser/ui/browser.cc
|
||||
+++ chrome/browser/ui/browser.cc
|
||||
@@ -1618,7 +1618,9 @@ bool Browser::ShouldCreateWebContents(
|
||||
@ -74,10 +74,10 @@ index 693e84d..be1f1dd 100644
|
||||
int opener_render_frame_id,
|
||||
const std::string& frame_name,
|
||||
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
|
||||
index db8263e..07f1989 100644
|
||||
index 62dfcec..acdc44d 100644
|
||||
--- content/browser/web_contents/web_contents_impl.cc
|
||||
+++ content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -1502,6 +1502,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -1521,6 +1521,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
std::string unique_name = params.main_frame_name;
|
||||
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
|
||||
|
||||
@ -90,7 +90,7 @@ index db8263e..07f1989 100644
|
||||
WebContentsViewDelegate* delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -1534,6 +1540,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
@@ -1553,6 +1559,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
std::move(view_),
|
||||
&render_view_host_delegate_view_));
|
||||
}
|
||||
@ -98,7 +98,7 @@ index db8263e..07f1989 100644
|
||||
CHECK(render_view_host_delegate_view_);
|
||||
CHECK(view_.get());
|
||||
|
||||
@@ -1977,11 +1984,14 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -2010,11 +2017,14 @@ void WebContentsImpl::CreateNewWindow(
|
||||
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
|
||||
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
|
||||
|
||||
@ -114,7 +114,7 @@ index db8263e..07f1989 100644
|
||||
if (route_id != MSG_ROUTING_NONE &&
|
||||
!RenderViewHost::FromID(render_process_id, route_id)) {
|
||||
// If the embedder didn't create a WebContents for this route, we need to
|
||||
@@ -2005,6 +2015,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -2038,6 +2048,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||
create_params.opener_render_process_id = render_process_id;
|
||||
create_params.opener_render_frame_id = params.opener_render_frame_id;
|
||||
create_params.opener_suppressed = params.opener_suppressed;
|
||||
@ -139,7 +139,7 @@ index fa0afb5..d677b31 100644
|
||||
|
||||
WebContents::CreateParams::CreateParams(const CreateParams& other) = default;
|
||||
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
|
||||
index 9ccb6fe..d8561f9 100644
|
||||
index 65de3da..6807203 100644
|
||||
--- content/public/browser/web_contents.h
|
||||
+++ content/public/browser/web_contents.h
|
||||
@@ -55,8 +55,10 @@ class PageState;
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
||||
index 6b3b603..0530199 100644
|
||||
index da897ce..c1d6cf8 100644
|
||||
--- Source/web/ChromeClientImpl.cpp
|
||||
+++ Source/web/ChromeClientImpl.cpp
|
||||
@@ -883,7 +883,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
||||
@@ -843,7 +843,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
||||
PopupMenu* ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
|
||||
{
|
||||
notifyPopupOpeningObservers();
|
||||
@ -12,7 +12,7 @@ index 6b3b603..0530199 100644
|
||||
|
||||
DCHECK(RuntimeEnabledFeatures::pagePopupEnabled());
|
||||
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
||||
index 3e92e32..049d5d8 100644
|
||||
index fcb4d10..dea498b 100644
|
||||
--- Source/web/WebViewImpl.cpp
|
||||
+++ Source/web/WebViewImpl.cpp
|
||||
@@ -422,6 +422,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebPageVisibilityState visibilit
|
||||
@ -23,7 +23,7 @@ index 3e92e32..049d5d8 100644
|
||||
, m_doingDragAndDrop(false)
|
||||
, m_ignoreInputEvents(false)
|
||||
, m_compositorDeviceScaleFactorOverride(0)
|
||||
@@ -4067,9 +4068,14 @@ void WebViewImpl::pageScaleFactorChanged()
|
||||
@@ -4108,9 +4109,14 @@ void WebViewImpl::pageScaleFactorChanged()
|
||||
m_client->pageScaleFactorChanged();
|
||||
}
|
||||
|
||||
@ -40,10 +40,10 @@ index 3e92e32..049d5d8 100644
|
||||
|
||||
void WebViewImpl::startDragging(LocalFrame* frame,
|
||||
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
|
||||
index 2c3e9a0..7d6a2dc 100644
|
||||
index 5292560..08e6afe 100644
|
||||
--- Source/web/WebViewImpl.h
|
||||
+++ Source/web/WebViewImpl.h
|
||||
@@ -384,7 +384,8 @@ public:
|
||||
@@ -382,7 +382,8 @@ public:
|
||||
|
||||
// Returns true if popup menus should be rendered by the browser, false if
|
||||
// they should be rendered by WebKit (which is the default).
|
||||
@ -53,7 +53,7 @@ index 2c3e9a0..7d6a2dc 100644
|
||||
|
||||
bool shouldAutoResize() const
|
||||
{
|
||||
@@ -675,6 +676,8 @@ private:
|
||||
@@ -678,6 +679,8 @@ private:
|
||||
float m_fakePageScaleAnimationPageScaleFactor;
|
||||
bool m_fakePageScaleAnimationUseAnchor;
|
||||
|
||||
@ -63,10 +63,10 @@ index 2c3e9a0..7d6a2dc 100644
|
||||
|
||||
bool m_ignoreInputEvents;
|
||||
diff --git public/web/WebView.h public/web/WebView.h
|
||||
index fe06749..22895f9 100644
|
||||
index 4f81bb6..66f1b2d 100644
|
||||
--- public/web/WebView.h
|
||||
+++ public/web/WebView.h
|
||||
@@ -438,6 +438,7 @@ public:
|
||||
@@ -437,6 +437,7 @@ public:
|
||||
|
||||
// Sets whether select popup menus should be rendered by the browser.
|
||||
BLINK_EXPORT static void setUseExternalPopupMenus(bool);
|
||||
|
@ -656,10 +656,7 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||
#if defined(OS_MACOSX)
|
||||
EXPECT_EQ(0xff5d99d6, *(reinterpret_cast<const uint32*>(buffer)));
|
||||
#elif defined(OS_LINUX) || defined(OS_WIN)
|
||||
if (scale_factor_ == 1.0f)
|
||||
EXPECT_EQ(0xff6497ea, *(reinterpret_cast<const uint32*>(buffer)));
|
||||
else if (scale_factor_ == 2.0f)
|
||||
EXPECT_EQ(0xff4d90fe, *(reinterpret_cast<const uint32*>(buffer)));
|
||||
EXPECT_EQ(0xff6497ea, *(reinterpret_cast<const uint32*>(buffer)));
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
|
@ -70,7 +70,7 @@ class CefTestThread : public base::Thread {
|
||||
// Called on the UI thread.
|
||||
void RunTests(CefTestThread* thread) {
|
||||
// Run the test suite on the test thread.
|
||||
thread->message_loop()->PostTask(FROM_HERE,
|
||||
thread->message_loop()->task_runner()->PostTask(FROM_HERE,
|
||||
base::Bind(&CefTestThread::RunTests, base::Unretained(thread)));
|
||||
}
|
||||
|
||||
|
@ -266,6 +266,8 @@ def GetAllPlatformConfigs(build_args):
|
||||
|
||||
# Don't create debug directories for asan builds.
|
||||
is_asan = GetArgValue(args, 'is_asan')
|
||||
if is_asan:
|
||||
msg('Only generating Release configuration due to is_asan=true')
|
||||
|
||||
# Always create x64 configs.
|
||||
if not is_asan:
|
||||
|
Loading…
x
Reference in New Issue
Block a user