Update to Chromium revision fa6a5d87 (#499098)

This commit is contained in:
Marshall Greenblatt 2017-09-06 17:40:58 -04:00
parent 22d2fc50d1
commit a028976ac4
122 changed files with 983 additions and 996 deletions

View File

@ -270,7 +270,6 @@ source_set("webkit_set") {
defines = [
# Blink-internal defines.
"BLINK_IMPLEMENTATION=1",
"BLINK_WEB_IMPLEMENTATION=1",
"INSIDE_BLINK",
]
@ -629,8 +628,8 @@ static_library("libcef_static") {
"libcef/renderer/extensions/extensions_dispatcher_delegate.h",
"libcef/renderer/extensions/extensions_renderer_client.cc",
"libcef/renderer/extensions/extensions_renderer_client.h",
"libcef/renderer/extensions/print_web_view_helper_delegate.cc",
"libcef/renderer/extensions/print_web_view_helper_delegate.h",
"libcef/renderer/extensions/print_render_frame_helper_delegate.cc",
"libcef/renderer/extensions/print_render_frame_helper_delegate.h",
"libcef/renderer/frame_impl.cc",
"libcef/renderer/frame_impl.h",
"libcef/renderer/media/cef_key_systems.cc",
@ -717,7 +716,7 @@ static_library("libcef_static") {
"//components/keyed_service/content:content",
"//components/keyed_service/core:core",
"//components/navigation_interception",
"//components/network_session_configurator/common",
"//components/network_session_configurator/browser",
"//components/pdf/browser",
"//components/pdf/renderer",
"//components/plugins/renderer",
@ -781,6 +780,7 @@ static_library("libcef_static") {
"//third_party/widevine/cdm:headers",
"//third_party/icu",
"//third_party/zlib:minizip",
"//tools/v8_context_snapshot:v8_context_snapshot",
"//ui/base",
"//ui/base/ime",
"//ui/events:events_base",
@ -1078,7 +1078,7 @@ template("cef_pak_scaled") {
# Each input pak file should also have a deps line for completeness.
# Add associated .h files in the make_pack_header("resources") target.
sources = [
"$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
"$root_gen_dir/blink/public/resources/blink_scaled_resources_${percent}_percent.pak",
"$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
"$root_gen_dir/components/components_resources_${percent}_percent.pak",
"$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
@ -1090,7 +1090,7 @@ template("cef_pak_scaled") {
# the libcef_static target. Grit deps that generate .cc files must be
# listed both here and in the libcef_static target.
public_deps = [
"//third_party/WebKit/public:image_resources",
"//third_party/WebKit/public:scaled_resources",
"//chrome/renderer:resources",
"//components/resources:components_scaled_resources",
"//content/app/resources",
@ -1098,6 +1098,12 @@ template("cef_pak_scaled") {
"//ui/resources:ui_resources_grd",
]
deps = [
# This repack target generates the blink_scaled_resources_*_percent.pak
# file but doesn't expose the public_deps required by make_pack_header.
"//third_party/WebKit/public:scaled_resources_${percent}_percent",
]
if (toolkit_views) {
sources += [
"$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak"
@ -1265,6 +1271,7 @@ template("make_pack_header") {
make_pack_header("resources") {
header = "$root_out_dir/includes/include/cef_pack_resources.h"
inputs = [
"$root_gen_dir/blink/public/resources/grit/media_controls_resources.h",
"$root_gen_dir/blink/public/resources/grit/blink_image_resources.h",
"$root_gen_dir/blink/public/resources/grit/blink_resources.h",
"$root_gen_dir/cef/grit/cef_resources.h",
@ -1346,6 +1353,7 @@ if (is_mac) {
"$root_out_dir/cef_200_percent.pak",
"$root_out_dir/cef_extensions.pak",
"$root_out_dir/devtools_resources.pak",
"$root_out_dir/v8_context_snapshot.bin",
# TODO(cef): Restore this line once Widevine build errors are resolved.
# "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin",
]
@ -1358,6 +1366,7 @@ if (is_mac) {
":pak_extensions",
# TODO(cef): Restore this line once Widevine build errors are resolved.
# "//third_party/widevine/cdm:widevinecdmadapter",
"//tools/v8_context_snapshot:v8_context_snapshot",
]
if (icu_use_data_file) {

View File

@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'ff259bab28b35d242e10186cd63af7ed404fae0d',
'chromium_checkout': 'fa6a5d87adff761bc16afc5498c3f5944c1daa68',
}

View File

@ -983,14 +983,12 @@ void CefBrowserHostImpl::SetAccessibilityState(
if (!web_contents_impl)
return;
content::AccessibilityMode accMode;
ui::AXMode accMode;
// In windowless mode set accessibility to TreeOnly mode. Else native
// accessibility APIs, specific to each platform, are also created.
if (accessibility_state == STATE_ENABLED) {
if (IsWindowless())
accMode = content::kAccessibilityModeWebContentsOnly;
else
accMode = content::kAccessibilityModeComplete;
accMode =
IsWindowless() ? ui::AXMode::kWebContents : ui::AXMode::kNativeAPIs;
}
web_contents_impl->SetAccessibilityMode(accMode);
}
@ -1609,7 +1607,7 @@ void CefBrowserHostImpl::Navigate(const CefNavigateParams& params) {
CefRequestImpl::BlinkReferrerPolicyToNetReferrerPolicy(
params.referrer.policy);
request.frame_id = params.frame_id;
request.first_party_for_cookies = params.first_party_for_cookies;
request.site_for_cookies = params.site_for_cookies;
request.headers = params.headers;
request.load_flags = params.load_flags;
request.upload_data = params.upload_data;
@ -2205,17 +2203,25 @@ void CefBrowserHostImpl::AddNewContents(content::WebContents* source,
void CefBrowserHostImpl::LoadingStateChanged(content::WebContents* source,
bool to_different_document) {
int current_index =
const int current_index =
web_contents_->GetController().GetLastCommittedEntryIndex();
int max_index = web_contents_->GetController().GetEntryCount() - 1;
const int max_index = web_contents_->GetController().GetEntryCount() - 1;
bool is_loading, can_go_back, can_go_forward;
const bool is_loading = web_contents_->IsLoading();
const bool can_go_back = (current_index > 0);
const bool can_go_forward = (current_index < max_index);
{
base::AutoLock lock_scope(state_lock_);
is_loading = is_loading_ = web_contents_->IsLoading();
can_go_back = can_go_back_ = (current_index > 0);
can_go_forward = can_go_forward_ = (current_index < max_index);
// This method may be called multiple times in a row with |is_loading| true
// as a result of https://crrev.com/5e750ad0. Ignore the 2nd+ times.
if (is_loading_ == is_loading)
return;
is_loading_ = is_loading;
can_go_back_ = can_go_back;
can_go_forward_ = can_go_forward;
}
if (client_.get()) {
@ -2754,8 +2760,7 @@ void CefBrowserHostImpl::DidFailLoad(
content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
int error_code,
const base::string16& error_description,
bool was_ignored_by_handler) {
const base::string16& error_description) {
// The navigation failed after commit. OnLoadStart was called so we also call
// OnLoadEnd.
const bool is_main_frame = !render_frame_host->GetParent();

View File

@ -496,8 +496,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
void DidFailLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
int error_code,
const base::string16& error_description,
bool was_ignored_by_handler) override;
const base::string16& error_description) override;
void FrameDeleted(content::RenderFrameHost* render_frame_host) override;
void TitleWasSet(content::NavigationEntry* entry, bool explicit_set) override;
void PluginCrashed(const base::FilePath& plugin_path,

View File

@ -160,14 +160,14 @@ int CefBrowserMainParts::PreCreateThreads() {
// before the IO thread is started.
content::GpuDataManager::GetInstance();
#if defined(USE_AURA)
display::Screen::SetScreenInstance(views::CreateDesktopScreen());
#endif
return 0;
}
void CefBrowserMainParts::PreMainMessageLoopRun() {
#if defined(USE_AURA)
display::Screen::SetScreenInstance(views::CreateDesktopScreen());
#endif
if (extensions::ExtensionsEnabled()) {
// Initialize extension global objects before creating the global
// BrowserContext.

View File

@ -145,7 +145,7 @@ class CefBrowserURLRequest::Context
}
inline bool CalledOnValidThread() {
return task_runner_->RunsTasksOnCurrentThread();
return task_runner_->RunsTasksInCurrentSequence();
}
bool Start() {

View File

@ -88,6 +88,11 @@ void ChromeBrowserProcessStub::EndSession() {
NOTREACHED();
};
void ChromeBrowserProcessStub::FlushLocalStateAndReply(
base::OnceClosure reply) {
NOTREACHED();
}
metrics_services_manager::MetricsServicesManager*
ChromeBrowserProcessStub::GetMetricsServicesManager() {
NOTREACHED();
@ -113,6 +118,12 @@ IOThread* ChromeBrowserProcessStub::io_thread() {
return NULL;
}
SystemNetworkContextManager*
ChromeBrowserProcessStub::system_network_context_manager() {
NOTREACHED();
return NULL;
}
WatchDogThread* ChromeBrowserProcessStub::watchdog_thread() {
NOTREACHED();
return NULL;
@ -321,11 +332,6 @@ ChromeBrowserProcessStub::media_file_system_registry() {
return NULL;
}
bool ChromeBrowserProcessStub::created_local_state() const {
NOTREACHED();
return false;
}
#if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* ChromeBrowserProcessStub::webrtc_log_uploader() {
NOTREACHED();

View File

@ -42,12 +42,14 @@ class ChromeBrowserProcessStub : public BrowserProcess,
// BrowserProcess implementation.
void ResourceDispatcherHostCreated() override;
void EndSession() override;
void FlushLocalStateAndReply(base::OnceClosure reply) override;
metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager()
override;
metrics::MetricsService* metrics_service() override;
rappor::RapporServiceImpl* rappor_service() override;
ukm::UkmRecorder* ukm_recorder() override;
IOThread* io_thread() override;
SystemNetworkContextManager* system_network_context_manager() override;
WatchDogThread* watchdog_thread() override;
ProfileManager* profile_manager() override;
PrefService* local_state() override;
@ -98,7 +100,6 @@ class ChromeBrowserProcessStub : public BrowserProcess,
component_updater::SupervisedUserWhitelistInstaller*
supervised_user_whitelist_installer() override;
MediaFileSystemRegistry* media_file_system_registry() override;
bool created_local_state() const override;
#if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* webrtc_log_uploader() override;
#endif

View File

@ -700,7 +700,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
arraysize(kSwitchNames));
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
if (!browser_cmd->HasSwitch(switches::kNoSandbox)) {
// Pass the Widevine CDM path to the Zygote process. See comments in
// CefWidevineLoader::AddPepperPlugins.
@ -958,7 +958,7 @@ CefContentBrowserClient::CreateThrottlesForNavigation(
void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,
int child_process_id,
content::FileDescriptorInfo* mappings) {
content::PosixFileDescriptorInfo* mappings) {
int crash_signal_fd = GetCrashSignalFD(command_line);
if (crash_signal_fd >= 0) {
mappings->Share(kCrashDumpSignal, crash_signal_fd);

View File

@ -109,7 +109,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
void GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,
int child_process_id,
content::FileDescriptorInfo* mappings) override;
content::PosixFileDescriptorInfo* mappings) override;
#endif
#if defined(OS_WIN)

View File

@ -303,7 +303,8 @@ void CefQuitMessageLoop() {
return;
}
CefBrowserMessageLoop::current()->QuitWhenIdle();
// Quit the CefBrowserMessageLoop.
base::RunLoop::QuitCurrentWhenIdleDeprecated();
}
void CefSetOSModalLoop(bool osModalLoop) {
@ -499,7 +500,7 @@ void CefContext::OnContextInitialized() {
static_cast<ChromeBrowserProcessStub*>(g_browser_process)
->OnContextInitialized();
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
CefWidevineLoader::GetInstance()->OnContextInitialized();
#endif

View File

@ -88,9 +88,9 @@ int ResponseWriter::Write(net::IOBuffer* buffer,
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(&CefDevToolsFrontend::CallClientFunction, shell_devtools_,
"DevToolsAPI.streamWrite", base::Owned(id),
base::Owned(chunkValue), nullptr));
base::BindOnce(&CefDevToolsFrontend::CallClientFunction, shell_devtools_,
"DevToolsAPI.streamWrite", base::Owned(id),
base::Owned(chunkValue), nullptr));
return num_bytes;
}
@ -221,6 +221,8 @@ void CefDevToolsFrontend::DocumentAvailableInMainFrame() {
scoped_refptr<content::DevToolsAgentHost> agent_host =
content::DevToolsAgentHost::GetOrCreateFor(inspected_contents_);
if (agent_host != agent_host_) {
if (agent_host_)
agent_host_->DetachClient(this);
agent_host_ = agent_host;
agent_host_->AttachClient(this);
if (!inspect_element_at_.IsEmpty()) {
@ -231,8 +233,10 @@ void CefDevToolsFrontend::DocumentAvailableInMainFrame() {
}
void CefDevToolsFrontend::WebContentsDestroyed() {
if (agent_host_)
if (agent_host_) {
agent_host_->DetachClient(this);
agent_host_ = nullptr;
}
delete this;
}
@ -270,8 +274,6 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend(
dict->GetList("params", &params);
if (method == "dispatchProtocolMessage" && params && params->GetSize() == 1) {
if (!agent_host_ || !agent_host_->IsAttached())
return;
std::string protocol_message;
if (!params->GetString(0, &protocol_message))
return;
@ -348,7 +350,7 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend(
return;
}
DictionaryPrefUpdate update(GetPrefs(), prefs::kDevToolsPreferences);
update.Get()->SetStringWithoutPathExpansion(name, value);
update.Get()->SetKey(name, base::Value(value));
} else if (method == "removePreference") {
std::string name;
if (!params->GetString(0, &name))

View File

@ -9,7 +9,6 @@
#include <vector>
#include "libcef/browser/browser_host_impl.h"
#include "libcef/common/content_client.h"
#include "base/atomicops.h"
#include "base/bind.h"
@ -107,7 +106,7 @@ void CefDevToolsManagerDelegate::StartHttpHandler(
return;
content::DevToolsAgentHost::StartRemoteDebuggingServer(
std::move(socket_factory), std::string(), browser_context->GetPath(),
base::FilePath(), std::string(), CefContentClient::Get()->GetUserAgent());
base::FilePath());
}
// static

View File

@ -216,7 +216,7 @@ void CefExtensionSystem::Init() {
// 11.The PDF extension requests a plugin to handle
// kPDFPluginOutOfProcessMimeType which loads the PDF PPAPI plugin.
// 12.Routing of print-related commands are handled by ChromePDFPrintClient
// and CefPrintWebViewHelperDelegate in the renderer process.
// and CefPrintRenderFrameHelperDelegate in the renderer process.
// 13.The PDF extension is granted access to chrome://resources via
// CefExtensionWebContentsObserver::RenderViewCreated in the browser
// process.

View File

@ -5,8 +5,8 @@
#include "libcef/browser/extensions/extension_web_contents_observer.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/common/url_constants.h"
DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::CefExtensionWebContentsObserver);
@ -21,15 +21,15 @@ CefExtensionWebContentsObserver::CefExtensionWebContentsObserver(
CefExtensionWebContentsObserver::~CefExtensionWebContentsObserver() {}
void CefExtensionWebContentsObserver::RenderViewCreated(
content::RenderViewHost* render_view_host) {
ExtensionWebContentsObserver::RenderViewCreated(render_view_host);
void CefExtensionWebContentsObserver::RenderFrameCreated(
content::RenderFrameHost* render_frame_host) {
ExtensionWebContentsObserver::RenderFrameCreated(render_frame_host);
const Extension* extension = GetExtension(render_view_host);
const Extension* extension = GetExtensionFromFrame(render_frame_host, false);
if (!extension)
return;
int process_id = render_view_host->GetProcess()->GetID();
int process_id = render_frame_host->GetProcess()->GetID();
auto policy = content::ChildProcessSecurityPolicy::GetInstance();
// Components of chrome that are implemented as extensions or platform apps

View File

@ -30,7 +30,7 @@ class CefExtensionWebContentsObserver
explicit CefExtensionWebContentsObserver(content::WebContents* web_contents);
// content::WebContentsObserver overrides.
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
// Our content script observers. Declare at top so that it will outlive all
// other members, since they might add themselves as observers.

View File

@ -31,7 +31,7 @@
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function_registry.h"
#include "extensions/browser/extension_host_delegate.h"
#include "extensions/browser/mojo/service_registration.h"
#include "extensions/browser/mojo/interface_registration.h"
#include "extensions/browser/serial_extension_host_queue.h"
#include "extensions/browser/url_request_util.h"
#include "extensions/common/constants.h"
@ -257,10 +257,12 @@ void CefExtensionsBrowserClient::RegisterExtensionFunctions(
api::cef::ChromeFunctionRegistry::RegisterAll(registry);
}
void CefExtensionsBrowserClient::RegisterMojoServices(
void CefExtensionsBrowserClient::RegisterExtensionInterfaces(
service_manager::BinderRegistryWithArgs<content::RenderFrameHost*>*
registry,
content::RenderFrameHost* render_frame_host,
const Extension* extension) const {
RegisterServicesForFrame(render_frame_host, extension);
RegisterInterfacesForExtension(registry, render_frame_host, extension);
}
std::unique_ptr<RuntimeAPIDelegate>
@ -320,6 +322,10 @@ bool CefExtensionsBrowserClient::IsLockScreenContext(
return false;
}
std::string CefExtensionsBrowserClient::GetApplicationLocale() {
return g_browser_process->GetApplicationLocale();
}
ExtensionHostQueue* CefExtensionsBrowserClient::GetExtensionHostQueue() {
if (!extension_host_queue_)
extension_host_queue_.reset(new SerialExtensionHostQueue);

View File

@ -73,8 +73,10 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
ExtensionSystemProvider* GetExtensionSystemFactory() override;
void RegisterExtensionFunctions(
ExtensionFunctionRegistry* registry) const override;
void RegisterMojoServices(content::RenderFrameHost* render_frame_host,
const Extension* extension) const override;
void RegisterExtensionInterfaces(service_manager::BinderRegistryWithArgs<
content::RenderFrameHost*>* registry,
content::RenderFrameHost* render_frame_host,
const Extension* extension) const override;
std::unique_ptr<RuntimeAPIDelegate> CreateRuntimeAPIDelegate(
content::BrowserContext* context) const override;
const ComponentExtensionResourceManager*
@ -91,6 +93,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
content::WebContents* web_contents) override;
KioskDelegate* GetKioskDelegate() override;
bool IsLockScreenContext(content::BrowserContext* context) override;
std::string GetApplicationLocale() override;
ExtensionHostQueue* GetExtensionHostQueue();

View File

@ -319,8 +319,7 @@ bool CefImageImpl::AddBitmap(float scale_factor, const SkBitmap& bitmap) {
gfx::ImageSkiaRep skia_rep(bitmap, scale_factor);
if (image_.IsEmpty()) {
gfx::Image image((gfx::ImageSkia(skia_rep)));
image_.SwapRepresentations(&image);
image_ = gfx::Image(gfx::ImageSkia(skia_rep));
} else {
image_.AsImageSkia().AddRepresentation(skia_rep);
}

View File

@ -38,9 +38,9 @@ struct CefNavigateParams {
// Usually the URL of the document in the top-level window, which may be
// checked by the third-party cookie blocking policy. Leaving it empty may
// lead to undesired cookie blocking. Third-party cookie blocking can be
// bypassed by setting first_party_for_cookies = url, but this should ideally
// bypassed by setting site_for_cookies = url, but this should ideally
// only be done if there really is no way to determine the correct value.
GURL first_party_for_cookies;
GURL site_for_cookies;
// Additional HTTP request headers.
std::string headers;

View File

@ -156,7 +156,16 @@ CefCookieStoreProxy::AddCallbackForCookie(
net::CookieStore* cookie_store = GetCookieStore();
if (cookie_store)
return cookie_store->AddCallbackForCookie(url, name, callback);
return NULL;
return nullptr;
}
std::unique_ptr<net::CookieStore::CookieChangedSubscription>
CefCookieStoreProxy::AddCallbackForAllChanges(
const CookieChangedCallback& callback) {
net::CookieStore* cookie_store = GetCookieStore();
if (cookie_store)
return cookie_store->AddCallbackForAllChanges(callback);
return nullptr;
}
bool CefCookieStoreProxy::IsEphemeral() {

View File

@ -69,6 +69,8 @@ class CefCookieStoreProxy : public net::CookieStore {
const GURL& url,
const std::string& name,
const CookieChangedCallback& callback) override;
std::unique_ptr<CookieChangedSubscription> AddCallbackForAllChanges(
const CookieChangedCallback& callback) override;
bool IsEphemeral() override;
private:

View File

@ -357,8 +357,7 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() {
std::unique_ptr<net::HttpCache::DefaultBackend> main_backend(
new net::HttpCache::DefaultBackend(
cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE,
net::CACHE_BACKEND_DEFAULT, http_cache_path, 0,
BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE)));
net::CACHE_BACKEND_DEFAULT, http_cache_path, 0));
net::HttpNetworkSession::Context network_session_context;
network_session_context.host_resolver =

View File

@ -18,9 +18,9 @@
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "cc/base/switches.h"
#include "cc/output/copy_output_request.h"
#include "cc/scheduler/delay_based_time_source.h"
#include "components/viz/common/frame_sinks/delay_based_time_source.h"
#include "components/viz/common/gl_helper.h"
#include "components/viz/common/quads/copy_output_request.h"
#include "content/browser/bad_message.h"
#include "content/browser/compositor/image_transport_factory.h"
#include "content/browser/frame_host/render_widget_host_view_guest.h"
@ -130,8 +130,8 @@ class CefCopyFrameGenerator {
// The below code is similar in functionality to
// DelegatedFrameHost::CopyFromCompositingSurface but we reuse the same
// SkBitmap in the GPU codepath and avoid scaling where possible.
std::unique_ptr<cc::CopyOutputRequest> request =
cc::CopyOutputRequest::CreateRequest(base::Bind(
std::unique_ptr<viz::CopyOutputRequest> request =
viz::CopyOutputRequest::CreateRequest(base::Bind(
&CefCopyFrameGenerator::CopyFromCompositingSurfaceHasResult,
weak_ptr_factory_.GetWeakPtr(), damage_rect));
@ -141,7 +141,7 @@ class CefCopyFrameGenerator {
void CopyFromCompositingSurfaceHasResult(
const gfx::Rect& damage_rect,
std::unique_ptr<cc::CopyOutputResult> result) {
std::unique_ptr<viz::CopyOutputResult> result) {
if (result->IsEmpty() || result->size().IsEmpty() ||
!view_->render_widget_host()) {
OnCopyFrameCaptureFailure(damage_rect);
@ -159,7 +159,7 @@ class CefCopyFrameGenerator {
void PrepareTextureCopyOutputResult(
const gfx::Rect& damage_rect,
std::unique_ptr<cc::CopyOutputResult> result) {
std::unique_ptr<viz::CopyOutputResult> result) {
DCHECK(result->HasTexture());
base::ScopedClosureRunner scoped_callback_runner(
base::Bind(&CefCopyFrameGenerator::OnCopyFrameCaptureFailure,
@ -188,7 +188,7 @@ class CefCopyFrameGenerator {
uint8_t* pixels = static_cast<uint8_t*>(bitmap_->getPixels());
viz::TextureMailbox texture_mailbox;
std::unique_ptr<cc::SingleReleaseCallback> release_callback;
std::unique_ptr<viz::SingleReleaseCallback> release_callback;
result->TakeTexture(&texture_mailbox, &release_callback);
DCHECK(texture_mailbox.IsTexture());
if (!texture_mailbox.IsTexture())
@ -208,7 +208,7 @@ class CefCopyFrameGenerator {
static void CopyFromCompositingSurfaceFinishedProxy(
base::WeakPtr<CefCopyFrameGenerator> generator,
std::unique_ptr<cc::SingleReleaseCallback> release_callback,
std::unique_ptr<viz::SingleReleaseCallback> release_callback,
const gfx::Rect& damage_rect,
std::unique_ptr<SkBitmap> bitmap,
bool result) {
@ -247,7 +247,7 @@ class CefCopyFrameGenerator {
void PrepareBitmapCopyOutputResult(
const gfx::Rect& damage_rect,
std::unique_ptr<cc::CopyOutputResult> result) {
std::unique_ptr<viz::CopyOutputResult> result) {
DCHECK(result->HasBitmap());
std::unique_ptr<SkBitmap> source = result->TakeBitmap();
DCHECK(source);
@ -308,11 +308,11 @@ class CefCopyFrameGenerator {
// Used to control the VSync rate in subprocesses when BeginFrame scheduling is
// enabled.
class CefBeginFrameTimer : public cc::DelayBasedTimeSourceClient {
class CefBeginFrameTimer : public viz::DelayBasedTimeSourceClient {
public:
CefBeginFrameTimer(int frame_rate_threshold_ms, const base::Closure& callback)
: callback_(callback) {
time_source_.reset(new cc::DelayBasedTimeSource(
time_source_.reset(new viz::DelayBasedTimeSource(
content::BrowserThread::GetTaskRunnerForThread(CEF_UIT).get()));
time_source_->SetTimebaseAndInterval(
base::TimeTicks(),
@ -335,7 +335,7 @@ class CefBeginFrameTimer : public cc::DelayBasedTimeSourceClient {
void OnTimerTick() override { callback_.Run(); }
const base::Closure callback_;
std::unique_ptr<cc::DelayBasedTimeSource> time_source_;
std::unique_ptr<viz::DelayBasedTimeSource> time_source_;
DISALLOW_COPY_AND_ASSIGN(CefBeginFrameTimer);
};
@ -399,7 +399,8 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
new ui::Compositor(context_factory_private->AllocateFrameSinkId(),
content::GetContextFactory(), context_factory_private,
base::ThreadTaskRunnerHandle::Get(),
false /* enable_surface_synchronization */));
false /* enable_surface_synchronization */,
false /* enable_pixel_canvas */));
compositor_->SetAcceleratedWidget(compositor_widget_);
compositor_->SetDelegate(this);
compositor_->SetRootLayer(root_layer_.get());
@ -572,7 +573,7 @@ bool CefRenderWidgetHostViewOSR::LockMouse() {
void CefRenderWidgetHostViewOSR::UnlockMouse() {}
void CefRenderWidgetHostViewOSR::DidCreateNewRendererCompositorFrameSink(
cc::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) {
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) {
renderer_compositor_frame_sink_ = renderer_compositor_frame_sink;
if (GetDelegatedFrameHost()) {
GetDelegatedFrameHost()->DidCreateNewRendererCompositorFrameSink(
@ -868,12 +869,12 @@ void CefRenderWidgetHostViewOSR::ImeSetComposition(
if (!render_widget_host_)
return;
std::vector<ui::CompositionUnderline> web_underlines;
std::vector<ui::ImeTextSpan> web_underlines;
web_underlines.reserve(underlines.size());
for (const CefCompositionUnderline& line : underlines) {
web_underlines.push_back(ui::CompositionUnderline(
line.range.from, line.range.to, line.color, line.thick ? true : false,
line.background_color));
web_underlines.push_back(ui::ImeTextSpan(
ui::ImeTextSpan::Type::kComposition, line.range.from, line.range.to,
line.color, line.thick ? true : false, line.background_color));
}
gfx::Range range(replacement_range.from, replacement_range.to);
@ -893,8 +894,7 @@ void CefRenderWidgetHostViewOSR::ImeCommitText(
return;
gfx::Range range(replacement_range.from, replacement_range.to);
render_widget_host_->ImeCommitText(text,
std::vector<ui::CompositionUnderline>(),
render_widget_host_->ImeCommitText(text, std::vector<ui::ImeTextSpan>(),
range, relative_cursor_pos);
// Stop Monitoring for composition updates after we are done.
@ -1492,10 +1492,10 @@ void CefRenderWidgetHostViewOSR::SendBeginFrame(base::TimeTicks frame_time,
base::TimeTicks deadline = display_time - estimated_browser_composite_time;
const cc::BeginFrameArgs& begin_frame_args = cc::BeginFrameArgs::Create(
const viz::BeginFrameArgs& begin_frame_args = viz::BeginFrameArgs::Create(
BEGINFRAME_FROM_HERE, begin_frame_source_.source_id(),
begin_frame_number_, frame_time, deadline, vsync_period,
cc::BeginFrameArgs::NORMAL);
viz::BeginFrameArgs::NORMAL);
DCHECK(begin_frame_args.IsValid());
begin_frame_number_++;

View File

@ -15,7 +15,7 @@
#include "base/memory/weak_ptr.h"
#include "build/build_config.h"
#include "cc/scheduler/begin_frame_source.h"
#include "components/viz/common/frame_sinks/begin_frame_source.h"
#include "content/browser/renderer_host/compositor_resize_lock.h"
#include "content/browser/renderer_host/delegated_frame_host.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
@ -129,7 +129,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
// RenderWidgetHostViewBase implementation.
void DidCreateNewRendererCompositorFrameSink(
cc::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink)
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink)
override;
void SubmitCompositorFrame(const viz::LocalSurfaceId& local_surface_id,
cc::CompositorFrame frame) override;
@ -343,8 +343,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
std::unique_ptr<CefBeginFrameTimer> begin_frame_timer_;
// Provides |source_id| for BeginFrameArgs that we create.
cc::StubBeginFrameSource begin_frame_source_;
uint64_t begin_frame_number_ = cc::BeginFrameArgs::kStartingFrameNumber;
viz::StubBeginFrameSource begin_frame_source_;
uint64_t begin_frame_number_ = viz::BeginFrameArgs::kStartingFrameNumber;
// Used for direct rendering from the compositor when GPU compositing is
// disabled. This object is owned by the compositor.
@ -377,7 +377,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
gfx::Vector2dF last_scroll_offset_;
bool is_scroll_offset_changed_pending_;
cc::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink_ =
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink_ =
nullptr;
base::WeakPtrFactory<CefRenderWidgetHostViewOSR> weak_ptr_factory_;

View File

@ -8,7 +8,7 @@
#include "libcef/browser/permissions/permission_context.h"
#include "base/callback_forward.h"
#include "base/id_map.h"
#include "base/containers/id_map.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "components/content_settings/core/browser/content_settings_observer.h"
@ -65,10 +65,10 @@ class CefPermissionManager : public KeyedService,
private:
class PendingRequest;
using PendingRequestsMap = IDMap<std::unique_ptr<PendingRequest>>;
using PendingRequestsMap = base::IDMap<std::unique_ptr<PendingRequest>>;
struct Subscription;
using SubscriptionsMap = IDMap<std::unique_ptr<Subscription>>;
using SubscriptionsMap = base::IDMap<std::unique_ptr<Subscription>>;
// Called when a permission was decided for a given PendingRequest. The
// PendingRequest is identified by its |request_id| and the permission is

View File

@ -39,6 +39,10 @@ ContentSettingsType PermissionTypeToContentSetting(PermissionType permission) {
return CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC;
case PermissionType::FLASH:
return CONTENT_SETTINGS_TYPE_PLUGINS;
case PermissionType::SENSORS:
return CONTENT_SETTINGS_TYPE_SENSORS;
case PermissionType::ACCESSIBILITY_EVENTS:
return CONTENT_SETTINGS_TYPE_ACCESSIBILITY_EVENTS;
case PermissionType::NUM:
// This will hit the NOTREACHED below.
break;

View File

@ -94,18 +94,18 @@ bool ShouldUseJavaScriptSettingForPlugin(const WebPluginInfo& plugin) {
return true;
#endif
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
// Treat CDM invocations like JavaScript.
if (plugin.name == base::ASCIIToUTF16(kWidevineCdmDisplayName)) {
DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS);
return true;
}
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
return false;
}
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
enum PluginAvailabilityStatusForUMA {
PLUGIN_NOT_REGISTERED,
@ -126,7 +126,7 @@ static void SendPluginAvailabilityUMA(const std::string& mime_type,
#endif // defined(WIDEVINE_CDM_AVAILABLE)
}
#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
void ReportMetrics(const std::string& mime_type,
const GURL& url,
@ -221,7 +221,7 @@ bool CefPluginInfoMessageFilter::OnMessageReceived(
IPC_BEGIN_MESSAGE_MAP(CefPluginInfoMessageFilter, message)
IPC_MESSAGE_HANDLER_DELAY_REPLY(CefViewHostMsg_GetPluginInfo,
OnGetPluginInfo)
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
IPC_MESSAGE_HANDLER(CefViewHostMsg_IsInternalPluginAvailableForMimeType,
OnIsInternalPluginAvailableForMimeType)
#endif
@ -287,7 +287,7 @@ void CefPluginInfoMessageFilter::PluginsLoaded(
}
}
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
void CefPluginInfoMessageFilter::OnIsInternalPluginAvailableForMimeType(
const std::string& mime_type,
@ -323,7 +323,7 @@ void CefPluginInfoMessageFilter::OnIsInternalPluginAvailableForMimeType(
mime_type, is_plugin_disabled ? PLUGIN_DISABLED : PLUGIN_NOT_REGISTERED);
}
#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
void CefPluginInfoMessageFilter::Context::DecidePluginStatus(
const GetPluginInfo_Params& params,

View File

@ -20,7 +20,7 @@
#include "components/prefs/pref_member.h"
#include "content/public/browser/browser_message_filter.h"
#include "extensions/features/features.h"
#include "ppapi/features/features.h"
#include "media/media_features.h"
class CefBrowserContext;
class CefResourceContext;
@ -111,7 +111,7 @@ class CefPluginInfoMessageFilter : public content::BrowserMessageFilter {
IPC::Message* reply_msg,
const std::vector<content::WebPluginInfo>& plugins);
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
// Returns whether any internal plugin supporting |mime_type| is registered
// and enabled. Does not determine whether the plugin can actually be
// instantiated (e.g. whether it has all its dependencies).

View File

@ -101,6 +101,12 @@ void CefPrefStore::CommitPendingWrite(base::OnceClosure done_callback) {
void CefPrefStore::SchedulePendingLossyWrites() {}
void CefPrefStore::ClearMutableValues() {
NOTIMPLEMENTED();
}
void CefPrefStore::OnStoreDeletionFromDisk() {}
void CefPrefStore::SetInitializationCompleted() {
NotifyInitializationCompleted();
}
@ -167,10 +173,6 @@ void CefPrefStore::SetBlockAsyncRead(bool block_async_read) {
NotifyInitializationCompleted();
}
void CefPrefStore::ClearMutableValues() {
NOTIMPLEMENTED();
}
void CefPrefStore::set_read_only(bool read_only) {
read_only_ = read_only;
}

View File

@ -47,6 +47,8 @@ class CefPrefStore : public PersistentPrefStore {
void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override;
virtual void CommitPendingWrite(base::OnceClosure done_callback) override;
void SchedulePendingLossyWrites() override;
void ClearMutableValues() override;
void OnStoreDeletionFromDisk() override;
// Marks the store as having completed initialization.
void SetInitializationCompleted();
@ -70,8 +72,6 @@ class CefPrefStore : public PersistentPrefStore {
// the call to ReadPrefsAsync.
void SetBlockAsyncRead(bool block_async_read);
void ClearMutableValues() override;
// Getter and Setter methods for setting and getting the state of the
// |TestingPrefStore|.
virtual void set_read_only(bool read_only);

View File

@ -149,7 +149,7 @@ void SavePdfFile(scoped_refptr<base::RefCountedBytes> data,
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK_GT(data->size(), 0U);
PdfMetafileSkia metafile(PDF_SKIA_DOCUMENT_TYPE);
PdfMetafileSkia metafile(SkiaDocumentType::PDF);
metafile.InitFromData(static_cast<const void*>(data->front()), data->size());
base::File file(path,

View File

@ -154,7 +154,7 @@ void CefPrintViewManagerBase::OnDidPrintPage(
}
std::unique_ptr<PdfMetafileSkia> metafile(
new PdfMetafileSkia(PDF_SKIA_DOCUMENT_TYPE));
new PdfMetafileSkia(SkiaDocumentType::PDF));
if (metafile_must_be_valid) {
if (!metafile->InitFromData(shared_buf->memory(), params.data_size)) {
NOTREACHED() << "Invalid metafile header";
@ -338,7 +338,7 @@ bool CefPrintViewManagerBase::RenderAllMissingPagesNow() {
// to actually spool the pages, only to have the renderer generate them. Run
// a message loop until we get our signal that the print job is satisfied.
// PrintJob will send a ALL_PAGES_REQUESTED after having received all the
// pages it needs. MessageLoop::current()->QuitWhenIdle() will be called as
// pages it needs. RunLoop::QuitCurrentWhenIdleDeprecated() will be called as
// soon as print_job_->document()->IsComplete() is true on either
// ALL_PAGES_REQUESTED or in DidPrintPage(). The check is done in
// ShouldQuitFromInnerMessageLoop().
@ -358,7 +358,7 @@ void CefPrintViewManagerBase::ShouldQuitFromInnerMessageLoop() {
inside_inner_message_loop_) {
// We are in a message loop created by RenderAllMissingPagesNow. Quit from
// it.
base::MessageLoop::current()->QuitWhenIdle();
base::RunLoop::QuitCurrentWhenIdleDeprecated();
inside_inner_message_loop_ = false;
}
}
@ -464,9 +464,10 @@ bool CefPrintViewManagerBase::RunInnerMessageLoop() {
// memory-bound.
static const int kPrinterSettingsTimeout = 60000;
base::OneShotTimer quit_timer;
quit_timer.Start(
FROM_HERE, TimeDelta::FromMilliseconds(kPrinterSettingsTimeout),
base::MessageLoop::current(), &base::MessageLoop::QuitWhenIdle);
base::RunLoop run_loop;
quit_timer.Start(FROM_HERE,
TimeDelta::FromMilliseconds(kPrinterSettingsTimeout),
run_loop.QuitWhenIdleClosure());
inside_inner_message_loop_ = true;
@ -474,7 +475,7 @@ bool CefPrintViewManagerBase::RunInnerMessageLoop() {
{
base::MessageLoop::ScopedNestableTaskAllower allow(
base::MessageLoop::current());
base::RunLoop().Run();
run_loop.Run();
}
bool success = true;

View File

@ -26,7 +26,7 @@ using content::BrowserThread;
namespace {
base::StaticAtomicSequenceNumber g_next_id;
base::AtomicSequenceNumber g_next_id;
const char* GetTypeString(base::Value::Type type) {
switch (type) {

View File

@ -14,7 +14,7 @@
// interface. Based on chrome/browser/speech/
// chrome_speech_recognition_manager_delegate.[cc|h]
class CefSpeechRecognitionManagerDelegate
: NON_EXPORTED_BASE(public content::SpeechRecognitionManagerDelegate),
: public content::SpeechRecognitionManagerDelegate,
public content::SpeechRecognitionEventListener {
public:
CefSpeechRecognitionManagerDelegate();

View File

@ -26,6 +26,10 @@ CefStoragePartitionProxy::GetMediaURLRequestContext() {
return GetURLRequestContext();
}
content::mojom::NetworkContext* CefStoragePartitionProxy::GetNetworkContext() {
return parent_->GetNetworkContext();
}
storage::QuotaManager* CefStoragePartitionProxy::GetQuotaManager() {
return parent_->GetQuotaManager();
}
@ -162,10 +166,6 @@ void CefStoragePartitionProxy::ClearBluetoothAllowedDevicesMapForTesting() {
parent_->ClearBluetoothAllowedDevicesMapForTesting();
}
content::mojom::NetworkContext* CefStoragePartitionProxy::network_context() {
return parent_->network_context();
}
content::URLLoaderFactoryGetter*
CefStoragePartitionProxy::url_loader_factory_getter() {
return parent_->url_loader_factory_getter();
@ -176,6 +176,7 @@ content::BrowserContext* CefStoragePartitionProxy::browser_context() const {
}
void CefStoragePartitionProxy::Bind(
int process_id,
mojo::InterfaceRequest<content::mojom::StoragePartitionService> request) {
parent_->Bind(std::move(request));
parent_->Bind(process_id, std::move(request));
}

View File

@ -24,6 +24,7 @@ class CefStoragePartitionProxy : public content::StoragePartition {
base::FilePath GetPath() override;
net::URLRequestContextGetter* GetURLRequestContext() override;
net::URLRequestContextGetter* GetMediaURLRequestContext() override;
content::mojom::NetworkContext* GetNetworkContext() override;
storage::QuotaManager* GetQuotaManager() override;
content::AppCacheService* GetAppCacheService() override;
storage::FileSystemContext* GetFileSystemContext() override;
@ -70,10 +71,10 @@ class CefStoragePartitionProxy : public content::StoragePartition {
const base::Closure& callback) override;
void Flush() override;
void ClearBluetoothAllowedDevicesMapForTesting() override;
content::mojom::NetworkContext* network_context() override;
content::URLLoaderFactoryGetter* url_loader_factory_getter() override;
content::BrowserContext* browser_context() const override;
void Bind(mojo::InterfaceRequest<content::mojom::StoragePartitionService>
void Bind(int process_id,
mojo::InterfaceRequest<content::mojom::StoragePartitionService>
request) override;
content::StoragePartition* parent() const { return parent_; }

View File

@ -26,8 +26,7 @@ CefRefPtr<CefBasicLabelButtonImpl> CefBasicLabelButtonImpl::Create(
if (!text.empty())
label_button->SetText(text);
if (with_frame) {
label_button->root_view()->SetStyleDeprecated(
views::CustomButton::STYLE_BUTTON);
label_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON);
}
return label_button;
}

View File

@ -13,7 +13,7 @@
#include "base/logging.h"
#include "ui/gfx/color_utils.h"
#include "ui/views/controls/button/custom_button.h"
#include "ui/views/controls/button/button.h"
// Helpers for template boiler-plate.
#define CEF_BUTTON_IMPL_T CEF_VIEW_IMPL_T
@ -54,7 +54,7 @@ CEF_BUTTON_IMPL_T void CEF_BUTTON_IMPL_D::SetState(cef_button_state_t state) {
static_cast<views::Button::ButtonState>(state);
if (ParentClass::root_view()->ink_drop_mode() !=
views::CustomButton::InkDropMode::OFF &&
views::Button::InkDropMode::OFF &&
!ParentClass::root_view()->IsFocusable()) {
// Ink drop state does not get set properly on state change when the button
// is non-focusable.

View File

@ -12,15 +12,15 @@
#include "libcef/browser/views/view_view.h"
#include "base/logging.h"
#include "ui/views/controls/button/custom_button.h"
#include "ui/views/controls/button/button.h"
// Helpers for template boiler-plate.
#define CEF_BUTTON_VIEW_T CEF_VIEW_VIEW_T
#define CEF_BUTTON_VIEW_A CEF_VIEW_VIEW_A
#define CEF_BUTTON_VIEW_D CefButtonView<CEF_BUTTON_VIEW_A>
// Template for implementing views::CustomButton-derived classes. The
// views::CustomButton-derived type passed to this template must extend
// Template for implementing views::Button-derived classes. The
// views::Button-derived type passed to this template must extend
// views::ButtonListener (for example, see LabelButtonEx from
// basic_label_button_view.h). See comments in view_impl.h for a usage overview.
CEF_BUTTON_VIEW_T class CefButtonView : public CEF_VIEW_VIEW_D {
@ -39,15 +39,15 @@ CEF_BUTTON_VIEW_T class CefButtonView : public CEF_VIEW_VIEW_D {
return button;
}
// views::CustomButton methods:
void StateChanged(views::CustomButton::ButtonState old_state) override;
// views::Button methods:
void StateChanged(views::Button::ButtonState old_state) override;
// views::ButtonListener methods:
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
};
CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::StateChanged(
views::CustomButton::ButtonState old_state) {
views::Button::ButtonState old_state) {
ParentClass::StateChanged(old_state);
if (ParentClass::cef_delegate())
ParentClass::cef_delegate()->OnButtonStateChanged(GetCefButton());
@ -59,9 +59,9 @@ CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::ButtonPressed(
// Callback may trigger new animation state.
if (ParentClass::cef_delegate())
ParentClass::cef_delegate()->OnButtonPressed(GetCefButton());
if (ParentClass::ink_drop_mode() != views::CustomButton::InkDropMode::OFF &&
if (ParentClass::ink_drop_mode() != views::Button::InkDropMode::OFF &&
!ParentClass::IsFocusable() &&
ParentClass::state() != views::CustomButton::STATE_PRESSED) {
ParentClass::state() != views::Button::STATE_PRESSED) {
// Ink drop state does not get reset properly on click when the button is
// non-focusable. Reset the ink drop state here if the state has not been
// explicitly set to pressed by the OnButtonPressed callback calling

View File

@ -34,8 +34,7 @@ CefRefPtr<CefMenuButtonImpl> CefMenuButtonImpl::Create(
if (!text.empty())
menu_button->SetText(text);
if (with_frame) {
menu_button->root_view()->SetStyleDeprecated(
views::CustomButton::STYLE_BUTTON);
menu_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON);
}
menu_button->root_view()->set_show_menu_marker(with_menu_marker);
return menu_button;

View File

@ -53,8 +53,7 @@
// And the CefBasicLabelButtonView object created via
// CefBasicLabelButtonImpl::CreateRootView() has the following object hierarchy:
//
// views::View => views::Button => views::CustomButton =>
// views::LabelButton =>
// views::View => views::Button => views::LabelButton =>
// LabelButtonEx (used to implement the required no-argument constructor) =>
// CefViewView<LabelButtonEx, CefButtonDelegate> =>
// CefButtonView<LabelButtonEx, CefButtonDelegate> =>

View File

@ -30,7 +30,7 @@ void PluginsCallbackImpl(
}
}
#if !(defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)) || \
#if !(defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)) || \
defined(OS_LINUX)
void DeliverWidevineCdmError(const std::string& error_message,
@ -168,7 +168,7 @@ void CefIsWebPluginUnstable(const CefString& path,
void CefRegisterWidevineCdm(const CefString& path,
CefRefPtr<CefRegisterCdmCallback> callback) {
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
#if defined(OS_LINUX)
// Enforce the requirement that CefRegisterWidevineCdm() is called before
// CefInitialize() on Linux. See comments in
@ -184,5 +184,5 @@ void CefRegisterWidevineCdm(const CefString& path,
CefWidevineLoader::GetInstance()->LoadWidevineCdm(path, callback);
#else
DeliverWidevineCdmError("Widevine registration is not supported", callback);
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
}

View File

@ -133,9 +133,9 @@ IPC_STRUCT_BEGIN(CefMsg_LoadRequest_Params)
// Usually the URL of the document in the top-level window, which may be
// checked by the third-party cookie blocking policy. Leaving it empty may
// lead to undesired cookie blocking. Third-party cookie blocking can be
// bypassed by setting first_party_for_cookies = url, but this should ideally
// bypassed by setting site_for_cookies = url, but this should ideally
// only be done if there really is no way to determine the correct value.
IPC_STRUCT_MEMBER(GURL, first_party_for_cookies)
IPC_STRUCT_MEMBER(GURL, site_for_cookies)
// Additional HTTP request headers.
IPC_STRUCT_MEMBER(std::string, headers)

View File

@ -205,7 +205,7 @@ void CefContentClient::AddPepperPlugins(
AddPepperFlashFromCommandLine(plugins);
#if defined(OS_LINUX)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
CefWidevineLoader::AddPepperPlugins(plugins);
#endif
#endif

View File

@ -67,6 +67,11 @@
namespace {
const char* const kNonWildcardDomainNonPortSchemes[] = {
extensions::kExtensionScheme};
const size_t kNonWildcardDomainNonPortSchemesSize =
arraysize(kNonWildcardDomainNonPortSchemes);
#if defined(OS_MACOSX)
base::FilePath GetResourcesFilePath() {
@ -481,8 +486,8 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
logging::InitLogging(log_settings);
ContentSettingsPattern::SetNonWildcardDomainNonPortScheme(
extensions::kExtensionScheme);
ContentSettingsPattern::SetNonWildcardDomainNonPortSchemes(
kNonWildcardDomainNonPortSchemes, kNonWildcardDomainNonPortSchemesSize);
content::SetContentClient(&content_client_);

View File

@ -345,15 +345,15 @@ void CefRequestImpl::SetFlags(int flags) {
CefString CefRequestImpl::GetFirstPartyForCookies() {
base::AutoLock lock_scope(lock_);
return first_party_for_cookies_.spec();
return site_for_cookies_.spec();
}
void CefRequestImpl::SetFirstPartyForCookies(const CefString& url) {
base::AutoLock lock_scope(lock_);
CHECK_READONLY_RETURN_VOID();
const GURL& new_url = GURL(url.ToString());
if (first_party_for_cookies_ != new_url) {
first_party_for_cookies_ = new_url;
if (site_for_cookies_ != new_url) {
site_for_cookies_ = new_url;
Changed(kChangedFirstPartyForCookies);
}
}
@ -405,7 +405,7 @@ void CefRequestImpl::Set(net::URLRequest* request) {
static_cast<CefPostDataImpl*>(postdata_.get())->Set(*data);
}
first_party_for_cookies_ = request->first_party_for_cookies();
site_for_cookies_ = request->site_for_cookies();
const content::ResourceRequestInfo* info =
content::ResourceRequestInfo::ForRequest(request);
@ -443,9 +443,9 @@ void CefRequestImpl::Get(net::URLRequest* request, bool changed_only) const {
}
}
if (!first_party_for_cookies_.is_empty() &&
if (!site_for_cookies_.is_empty() &&
ShouldSet(kChangedFirstPartyForCookies, changed_only)) {
request->set_first_party_for_cookies(first_party_for_cookies_);
request->set_site_for_cookies(site_for_cookies_);
}
}
@ -492,7 +492,7 @@ void CefRequestImpl::Set(const blink::WebURLRequest& request) {
static_cast<CefPostDataImpl*>(postdata_.get())->Set(body);
}
first_party_for_cookies_ = request.FirstPartyForCookies();
site_for_cookies_ = request.SiteForCookies();
if (request.GetCachePolicy() == blink::WebCachePolicy::kBypassingCache)
flags_ |= UR_FLAG_SKIP_CACHE;
@ -541,8 +541,8 @@ void CefRequestImpl::Get(blink::WebURLRequest& request,
::SetHeaderMap(headermap_, request);
if (!first_party_for_cookies_.is_empty())
request.SetFirstPartyForCookies(first_party_for_cookies_);
if (!site_for_cookies_.is_empty())
request.SetSiteForCookies(site_for_cookies_);
request.SetCachePolicy((flags_ & UR_FLAG_SKIP_CACHE)
? blink::WebCachePolicy::kBypassingCache
@ -620,8 +620,8 @@ void CefRequestImpl::Get(const CefMsg_LoadRequest_Params& params,
request.SetHTTPBody(body);
}
if (params.first_party_for_cookies.is_valid())
request.SetFirstPartyForCookies(params.first_party_for_cookies);
if (params.site_for_cookies.is_valid())
request.SetSiteForCookies(params.site_for_cookies);
request.SetCachePolicy((params.load_flags & UR_FLAG_SKIP_CACHE)
? blink::WebCachePolicy::kBypassingCache
@ -653,7 +653,7 @@ void CefRequestImpl::Get(CefNavigateParams& params) const {
impl->Get(*params.upload_data.get());
}
params.first_party_for_cookies = first_party_for_cookies_;
params.site_for_cookies = site_for_cookies_;
params.load_flags = flags_;
}
@ -722,8 +722,8 @@ void CefRequestImpl::Get(net::URLFetcher& fetcher,
}
}
if (!first_party_for_cookies_.is_empty())
fetcher.SetInitiator(url::Origin(first_party_for_cookies_));
if (!site_for_cookies_.is_empty())
fetcher.SetInitiator(url::Origin(site_for_cookies_));
if (flags_ & UR_FLAG_NO_RETRY_ON_5XX)
fetcher.SetAutomaticallyRetryOn5xx(false);
@ -881,7 +881,7 @@ void CefRequestImpl::Reset() {
transition_type_ = TT_EXPLICIT;
identifier_ = 0U;
flags_ = UR_FLAG_NONE;
first_party_for_cookies_ = GURL();
site_for_cookies_ = GURL();
changes_ = kChangedNone;
}
@ -1299,8 +1299,15 @@ void CefPostDataElementImpl::Set(const blink::WebHTTPBody::Element& element) {
}
if (element.type == blink::WebHTTPBody::Element::kTypeData) {
SetToBytes(element.data.size(),
static_cast<const void*>(element.data.Data()));
std::string file_contents;
file_contents.reserve(element.data.size());
element.data.ForEachSegment([&file_contents](const char* segment,
size_t segment_size,
size_t segment_offset) {
file_contents.append(segment, segment_size);
return true;
});
SetToBytes(file_contents.size(), file_contents.data());
} else if (element.type == blink::WebHTTPBody::Element::kTypeFile) {
SetToFile(element.file_path.Utf16());
} else {

View File

@ -142,7 +142,7 @@ class CefRequestImpl : public CefRequest {
// The below members are used by CefURLRequest.
int flags_;
GURL first_party_for_cookies_;
GURL site_for_cookies_;
// True if this object is read-only.
bool read_only_;

View File

@ -12,7 +12,7 @@ bool CefCurrentlyOn(CefThreadId threadId) {
scoped_refptr<base::SequencedTaskRunner> task_runner =
CefTaskRunnerImpl::GetTaskRunner(threadId);
if (task_runner.get())
return task_runner->RunsTasksOnCurrentThread();
return task_runner->RunsTasksInCurrentSequence();
return false;
}

View File

@ -129,7 +129,7 @@ bool CefTaskRunnerImpl::IsSame(CefRefPtr<CefTaskRunner> that) {
}
bool CefTaskRunnerImpl::BelongsToCurrentThread() {
return task_runner_->RunsTasksOnCurrentThread();
return task_runner_->RunsTasksInCurrentSequence();
}
bool CefTaskRunnerImpl::BelongsToThread(CefThreadId threadId) {

View File

@ -45,7 +45,7 @@ CefThreadImpl::CefThreadImpl() : thread_id_(kInvalidPlatformThreadId) {}
CefThreadImpl::~CefThreadImpl() {
if (thread_.get()) {
if (!owner_task_runner_->RunsTasksOnCurrentThread()) {
if (!owner_task_runner_->RunsTasksInCurrentSequence()) {
// Delete |thread_| on the correct thread.
owner_task_runner_->PostTask(
FROM_HERE,
@ -126,7 +126,7 @@ cef_platform_thread_id_t CefThreadImpl::GetPlatformThreadId() {
void CefThreadImpl::Stop() {
if (!owner_task_runner_)
return;
if (!owner_task_runner_->RunsTasksOnCurrentThread()) {
if (!owner_task_runner_->RunsTasksInCurrentSequence()) {
NOTREACHED() << "called on invalid thread";
return;
}
@ -138,7 +138,7 @@ void CefThreadImpl::Stop() {
bool CefThreadImpl::IsRunning() {
if (!owner_task_runner_)
return false;
if (!owner_task_runner_->RunsTasksOnCurrentThread()) {
if (!owner_task_runner_->RunsTasksInCurrentSequence()) {
NOTREACHED() << "called on invalid thread";
return false;
}

View File

@ -4,7 +4,7 @@
#include "libcef/common/widevine_loader.h"
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
#include "libcef/browser/context.h"
#include "libcef/browser/thread_util.h"
@ -394,4 +394,4 @@ CefWidevineLoader::CefWidevineLoader() {}
CefWidevineLoader::~CefWidevineLoader() {}
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)

View File

@ -10,7 +10,7 @@
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
#include <vector>
@ -59,6 +59,6 @@ class CefWidevineLoader {
~CefWidevineLoader();
};
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
#endif // CEF_LIBCEF_COMMON_WIDEVINE_LOADER_H_

View File

@ -31,7 +31,6 @@
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
#include "third_party/WebKit/public/web/WebDataSource.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebFrameContentDumper.h"
@ -446,11 +445,11 @@ void CefBrowserImpl::DidStopLoading() {
}
void CefBrowserImpl::DidFinishLoad(blink::WebLocalFrame* frame) {
blink::WebDataSource* ds = frame->DataSource();
blink::WebDocumentLoader* dl = frame->GetDocumentLoader();
Send(new CefHostMsg_DidFinishLoad(routing_id(),
render_frame_util::GetIdentifier(frame),
ds->GetRequest().Url(), !frame->Parent(),
ds->GetResponse().HttpStatusCode()));
dl->GetRequest().Url(), !frame->Parent(),
dl->GetResponse().HttpStatusCode()));
OnLoadEnd(frame);
}
@ -718,7 +717,7 @@ void CefBrowserImpl::OnLoadEnd(blink::WebLocalFrame* frame) {
if (load_handler.get()) {
CefRefPtr<CefFrameImpl> cef_frame = GetWebFrameImpl(frame);
int httpStatusCode =
frame->DataSource()->GetResponse().HttpStatusCode();
frame->GetDocumentLoader()->GetResponse().HttpStatusCode();
load_handler->OnLoadEnd(this, cef_frame.get(), httpStatusCode);
}
}

View File

@ -25,7 +25,7 @@
#include "libcef/common/values_impl.h"
#include "libcef/renderer/browser_impl.h"
#include "libcef/renderer/extensions/extensions_renderer_client.h"
#include "libcef/renderer/extensions/print_web_view_helper_delegate.h"
#include "libcef/renderer/extensions/print_render_frame_helper_delegate.h"
#include "libcef/renderer/media/cef_key_systems.h"
#include "libcef/renderer/pepper/pepper_helper.h"
#include "libcef/renderer/plugins/cef_plugin_placeholder.h"
@ -57,7 +57,7 @@
#include "chrome/renderer/plugins/power_saver_info.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/nacl/common/nacl_constants.h"
#include "components/printing/renderer/print_web_view_helper.h"
#include "components/printing/renderer/print_render_frame_helper.h"
#include "components/spellcheck/renderer/spellcheck.h"
#include "components/spellcheck/renderer/spellcheck_provider.h"
#include "components/visitedlink/renderer/visitedlink_slave.h"
@ -75,6 +75,7 @@
#include "content/public/renderer/render_view_visitor.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_widget.h"
#include "extensions/common/switches.h"
#include "extensions/renderer/renderer_extension_registry.h"
#include "ipc/ipc_sync_channel.h"
#include "media/base/media.h"
@ -84,6 +85,7 @@
#include "third_party/WebKit/public/platform/WebRuntimeFeatures.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/scheduler/renderer_process_type.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebFrame.h"
@ -158,6 +160,12 @@ void AppendParams(const std::vector<base::string16>& additional_names,
existing_values->Swap(values);
}
bool IsStandaloneExtensionProcess() {
return extensions::ExtensionsEnabled() &&
extensions::CefExtensionsRendererClient::
IsStandaloneExtensionProcess();
}
} // namespace
// Placeholder object for guest views.
@ -389,6 +397,12 @@ void CefContentRendererClient::RenderThreadStarted() {
web_cache_impl_.reset(new web_cache::WebCacheImpl());
content::RenderThread* thread = content::RenderThread::Get();
thread->SetRendererProcessType(
IsStandaloneExtensionProcess()
? blink::scheduler::RendererProcessType::kExtensionRenderer
: blink::scheduler::RendererProcessType::kRenderer);
thread->AddObserver(observer_.get());
thread->GetChannel()->AddFilter(new CefRenderMessageFilter);
@ -462,14 +476,17 @@ void CefContentRendererClient::RenderThreadConnected() {
void CefContentRendererClient::RenderFrameCreated(
content::RenderFrame* render_frame) {
new CefRenderFrameObserver(render_frame);
CefRenderFrameObserver* render_frame_observer =
new CefRenderFrameObserver(render_frame);
service_manager::BinderRegistry* registry = render_frame_observer->registry();
new CefPepperHelper(render_frame);
new printing::PrintWebViewHelper(
new printing::PrintRenderFrameHelper(
render_frame,
base::WrapUnique(new extensions::CefPrintWebViewHelperDelegate()));
base::WrapUnique(new extensions::CefPrintRenderFrameHelperDelegate()));
if (extensions::ExtensionsEnabled())
extensions_renderer_client_->RenderFrameCreated(render_frame);
extensions_renderer_client_->RenderFrameCreated(render_frame, registry);
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();

View File

@ -21,6 +21,7 @@
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/extension_frame_helper.h"
#include "extensions/renderer/extension_helper.h"
#include "extensions/renderer/extensions_render_frame_observer.h"
#include "extensions/renderer/guest_view/extensions_guest_view_container.h"
#include "extensions/renderer/guest_view/extensions_guest_view_container_dispatcher.h"
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.h"
@ -34,11 +35,6 @@ namespace extensions {
namespace {
bool IsStandaloneExtensionProcess() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
extensions::switches::kExtensionProcess);
}
void IsGuestViewApiAvailableToScriptContext(
bool* api_is_available,
extensions::ScriptContext* context) {
@ -86,7 +82,7 @@ bool CrossesExtensionExtents(blink::WebLocalFrame* frame,
opener_top_extension &&
opener_top_extension->id() == extensions::kWebStoreAppId;
if (!is_extension_url && !opener_is_extension_url && !opener_is_web_store &&
IsStandaloneExtensionProcess() &&
CefExtensionsRendererClient::IsStandaloneExtensionProcess() &&
opener_origin.CanRequest(blink::WebURL(new_url)))
return false;
}
@ -148,7 +144,9 @@ void CefExtensionsRendererClient::RenderThreadStarted() {
}
void CefExtensionsRendererClient::RenderFrameCreated(
content::RenderFrame* render_frame) {
content::RenderFrame* render_frame,
service_manager::BinderRegistry* registry) {
new extensions::ExtensionsRenderFrameObserver(render_frame, registry);
new extensions::ExtensionFrameHelper(render_frame,
extension_dispatcher_.get());
extension_dispatcher_->OnRenderFrameCreated(render_frame);
@ -204,6 +202,12 @@ void CefExtensionsRendererClient::RunScriptsAtDocumentIdle(
extension_dispatcher_->RunScriptsAtDocumentIdle(render_frame);
}
// static
bool CefExtensionsRendererClient::IsStandaloneExtensionProcess() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
extensions::switches::kExtensionProcess);
}
// static
bool CefExtensionsRendererClient::ShouldFork(blink::WebLocalFrame* frame,
const GURL& url,

View File

@ -10,6 +10,7 @@
#include "base/macros.h"
#include "extensions/renderer/extensions_renderer_client.h"
#include "services/service_manager/public/cpp/binder_registry.h"
#include "ui/base/page_transition_types.h"
class GURL;
@ -49,7 +50,8 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient {
// See CefContentRendererClient methods with the same names.
void RenderThreadStarted();
void RenderFrameCreated(content::RenderFrame* render_frame);
void RenderFrameCreated(content::RenderFrame* render_frame,
service_manager::BinderRegistry* registry);
void RenderViewCreated(content::RenderView* render_view);
bool OverrideCreatePlugin(content::RenderFrame* render_frame,
const blink::WebPluginParams& params);
@ -61,6 +63,7 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient {
void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame);
void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame);
static bool IsStandaloneExtensionProcess();
static bool ShouldFork(blink::WebLocalFrame* frame,
const GURL& url,
bool is_initial_navigation,

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "libcef/renderer/extensions/print_web_view_helper_delegate.h"
#include "libcef/renderer/extensions/print_render_frame_helper_delegate.h"
#include <vector>
@ -18,15 +18,15 @@
namespace extensions {
CefPrintWebViewHelperDelegate::~CefPrintWebViewHelperDelegate() {}
CefPrintRenderFrameHelperDelegate::~CefPrintRenderFrameHelperDelegate() {}
bool CefPrintWebViewHelperDelegate::CancelPrerender(
bool CefPrintRenderFrameHelperDelegate::CancelPrerender(
content::RenderFrame* render_frame) {
return false;
}
// Return the PDF object element if |frame| is the out of process PDF extension.
blink::WebElement CefPrintWebViewHelperDelegate::GetPdfElement(
blink::WebElement CefPrintRenderFrameHelperDelegate::GetPdfElement(
blink::WebLocalFrame* frame) {
GURL url = frame->GetDocument().Url();
if (url.SchemeIs(extensions::kExtensionScheme) &&
@ -42,11 +42,12 @@ blink::WebElement CefPrintWebViewHelperDelegate::GetPdfElement(
return blink::WebElement();
}
bool CefPrintWebViewHelperDelegate::IsPrintPreviewEnabled() {
bool CefPrintRenderFrameHelperDelegate::IsPrintPreviewEnabled() {
return false;
}
bool CefPrintWebViewHelperDelegate::OverridePrint(blink::WebLocalFrame* frame) {
bool CefPrintRenderFrameHelperDelegate::OverridePrint(
blink::WebLocalFrame* frame) {
if (!frame->GetDocument().IsPluginDocument())
return false;

View File

@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_WEB_VIEW_HELPER_DELEGATE_H_
#define CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_WEB_VIEW_HELPER_DELEGATE_H_
#ifndef CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_
#define CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_
#include "components/printing/renderer/print_web_view_helper.h"
#include "components/printing/renderer/print_render_frame_helper.h"
namespace extensions {
class CefPrintWebViewHelperDelegate
: public printing::PrintWebViewHelper::Delegate {
class CefPrintRenderFrameHelperDelegate
: public printing::PrintRenderFrameHelper::Delegate {
public:
~CefPrintWebViewHelperDelegate() override;
~CefPrintRenderFrameHelperDelegate() override;
bool CancelPrerender(content::RenderFrame* render_frame) override;
blink::WebElement GetPdfElement(blink::WebLocalFrame* frame) override;
@ -22,4 +22,4 @@ class CefPrintWebViewHelperDelegate
} // namespace extensions
#endif // CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_WEB_VIEW_HELPER_DELEGATE_H_
#endif // CEF_LIBCEF_RENDERER_EXTENSIONS_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_

View File

@ -107,7 +107,7 @@ void CefFrameImpl::LoadRequest(CefRefPtr<CefRequest> request) {
params.url = GURL(std::string(request->GetURL()));
params.method = request->GetMethod();
params.frame_id = frame_id_;
params.first_party_for_cookies =
params.site_for_cookies =
GURL(std::string(request->GetFirstPartyForCookies()));
CefRequest::HeaderMap headerMap;

View File

@ -17,7 +17,6 @@
#include "media/base/eme_constants.h"
#include "media/base/key_system_properties.h"
#include "media/media_features.h"
#include "ppapi/features/features.h"
#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
@ -33,7 +32,7 @@ using media::SupportedCodecs;
namespace {
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
bool IsPepperCdmAvailable(
const std::string& pepper_type,
std::vector<base::string16>* additional_param_names,
@ -132,15 +131,15 @@ void AddPepperBasedWidevine(
media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier.
}
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
} // namespace
void AddCefKeySystems(
std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) {
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE)
AddPepperBasedWidevine(key_systems_properties);
#endif // defined(WIDEVINE_CDM_AVAILABLE)
#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
}

View File

@ -54,8 +54,7 @@ CefPluginPlaceholder::CefPluginPlaceholder(content::RenderFrame* render_frame,
: plugins::LoadablePluginPlaceholder(render_frame, params, html_data),
status_(CefViewHostMsg_GetPluginInfo_Status::kAllowed),
title_(title),
context_menu_request_id_(0),
did_send_blocked_content_notification_(false) {
context_menu_request_id_(0) {
RenderThread::Get()->AddObserver(this);
}
@ -283,11 +282,10 @@ blink::WebPlugin* CefPluginPlaceholder::CreatePlugin() {
std::move(throttler));
}
void CefPluginPlaceholder::OnBlockedTinyContent() {
void CefPluginPlaceholder::OnBlockedContent(
content::RenderFrame::PeripheralContentStatus status,
bool is_same_origin) {
DCHECK(render_frame());
if (did_send_blocked_content_notification_)
return;
did_send_blocked_content_notification_ = true;
}
gin::ObjectTemplateBuilder CefPluginPlaceholder::GetObjectTemplateBuilder(

View File

@ -48,7 +48,8 @@ class CefPluginPlaceholder final : public plugins::LoadablePluginPlaceholder,
// content::LoadablePluginPlaceholder overrides:
blink::WebPlugin* CreatePlugin() override;
void OnBlockedTinyContent() override;
void OnBlockedContent(content::RenderFrame::PeripheralContentStatus status,
bool is_same_origin) override;
// gin::Wrappable (via PluginPlaceholder) method
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
@ -78,8 +79,6 @@ class CefPluginPlaceholder final : public plugins::LoadablePluginPlaceholder,
int context_menu_request_id_; // Nonzero when request pending.
base::string16 plugin_name_;
bool did_send_blocked_content_notification_;
DISALLOW_COPY_AND_ASSIGN(CefPluginPlaceholder);
};

View File

@ -28,8 +28,14 @@ CefRenderFrameObserver::CefRenderFrameObserver(
CefRenderFrameObserver::~CefRenderFrameObserver() {}
void CefRenderFrameObserver::OnInterfaceRequestForFrame(
const std::string& interface_name,
mojo::ScopedMessagePipeHandle* interface_pipe) {
registry_.TryBindInterface(interface_name, interface_pipe);
}
void CefRenderFrameObserver::DidStartProvisionalLoad(
blink::WebDataSource* data_source) {
blink::WebDocumentLoader* document_loader) {
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
CefRefPtr<CefBrowserImpl> browserPtr =
CefBrowserImpl::GetBrowserForMainFrame(frame->Top());

View File

@ -6,6 +6,7 @@
#define LIBCEF_RENDERER_RENDER_FRAME_OBSERVER_H_
#include "content/public/renderer/render_frame_observer.h"
#include "services/service_manager/public/cpp/binder_registry.h"
namespace content {
class RenderFrame;
@ -17,7 +18,11 @@ class CefRenderFrameObserver : public content::RenderFrameObserver {
~CefRenderFrameObserver() override;
// RenderFrameObserver methods:
void DidStartProvisionalLoad(blink::WebDataSource* data_source) override;
void OnInterfaceRequestForFrame(
const std::string& interface_name,
mojo::ScopedMessagePipeHandle* interface_pipe) override;
void DidStartProvisionalLoad(
blink::WebDocumentLoader* document_loader) override;
void DidFinishLoad() override;
void FrameDetached() override;
void FrameFocused() override;
@ -29,7 +34,11 @@ class CefRenderFrameObserver : public content::RenderFrameObserver {
int world_id) override;
void OnDestruct() override;
service_manager::BinderRegistry* registry() { return &registry_; }
private:
service_manager::BinderRegistry registry_;
DISALLOW_COPY_AND_ASSIGN(CefRenderFrameObserver);
};

View File

@ -9,6 +9,7 @@
#include "base/logging.h"
#include "content/renderer/render_frame_impl.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
namespace render_frame_util {

View File

@ -36,14 +36,10 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient {
~CefWebURLLoaderClient() override;
// blink::WebURLLoaderClient methods.
bool WillFollowRedirect(WebURLRequest& newRequest,
const WebURLResponse& redirectResponse) override;
void DidSendData(unsigned long long bytesSent,
unsigned long long totalBytesToBeSent) override;
void DidReceiveResponse(const WebURLResponse& response) override;
void DidDownloadData(int dataLength, int encodedDataLength) override;
void DidReceiveData(const char* data, int dataLength) override;
void DidReceiveCachedMetadata(const char* data, int dataLength) override;
void DidFinishLoading(double finish_time,
int64_t total_encoded_data_length,
int64_t total_encoded_body_length,
@ -84,7 +80,7 @@ class CefRenderURLRequest::Context
}
inline bool CalledOnValidThread() {
return task_runner_->RunsTasksOnCurrentThread();
return task_runner_->RunsTasksInCurrentSequence();
}
bool Start() {
@ -240,12 +236,6 @@ CefWebURLLoaderClient::CefWebURLLoaderClient(
CefWebURLLoaderClient::~CefWebURLLoaderClient() {}
bool CefWebURLLoaderClient::WillFollowRedirect(
WebURLRequest& newRequest,
const WebURLResponse& redirectResponse) {
return true;
}
void CefWebURLLoaderClient::DidSendData(unsigned long long bytesSent,
unsigned long long totalBytesToBeSent) {
if (request_flags_ & UR_FLAG_REPORT_UPLOAD_PROGRESS)
@ -256,9 +246,6 @@ void CefWebURLLoaderClient::DidReceiveResponse(const WebURLResponse& response) {
context_->OnResponse(response);
}
void CefWebURLLoaderClient::DidDownloadData(int dataLength,
int encodedDataLength) {}
void CefWebURLLoaderClient::DidReceiveData(const char* data, int dataLength) {
context_->OnDownloadProgress(dataLength);
@ -266,9 +253,6 @@ void CefWebURLLoaderClient::DidReceiveData(const char* data, int dataLength) {
context_->OnDownloadData(data, dataLength);
}
void CefWebURLLoaderClient::DidReceiveCachedMetadata(const char* data,
int dataLength) {}
void CefWebURLLoaderClient::DidFinishLoading(
double finishTime,
int64_t total_encoded_data_length,

View File

@ -812,7 +812,7 @@ CefV8HandleBase::~CefV8HandleBase() {
}
bool CefV8HandleBase::BelongsToCurrentThread() const {
return task_runner_->RunsTasksOnCurrentThread();
return task_runner_->RunsTasksInCurrentSequence();
}
CefV8HandleBase::CefV8HandleBase(v8::Isolate* isolate,

View File

@ -75,7 +75,7 @@ class CefV8ContextState : public base::RefCounted<CefV8ContextState> {
struct CefV8DeleteOnMessageLoopThread {
template <typename T>
static void Destruct(const T* x) {
if (x->task_runner()->RunsTasksOnCurrentThread()) {
if (x->task_runner()->RunsTasksInCurrentSequence()) {
delete x;
} else {
if (!x->task_runner()->DeleteSoon(FROM_HERE, x)) {

View File

@ -20,13 +20,13 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "third_party/WebKit/Source/core/dom/Element.h"
#include "third_party/WebKit/Source/core/dom/Node.h"
#include "third_party/WebKit/Source/core/editing/serializers/Serialization.h"
#include "third_party/WebKit/Source/core/exported/WebViewImpl.h"
#include "third_party/WebKit/Source/core/frame/LocalFrame.h"
#include "third_party/WebKit/Source/core/frame/Settings.h"
#include "third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h"
#include "third_party/WebKit/Source/platform/ScriptForbiddenScope.h"
#include "third_party/WebKit/Source/platform/bindings/V8Binding.h"
#include "third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h"
#include "third_party/WebKit/Source/web/WebLocalFrameImpl.h"
#include "third_party/WebKit/Source/web/WebViewImpl.h"
MSVC_POP_WARNING();
#undef LOG
@ -178,7 +178,8 @@ v8::MaybeLocal<v8::Value> ExecuteV8ScriptAndReturnValue(
v8CacheOptions = frame->GetSettings()->GetV8CacheOptions();
v8::Local<v8::Script> script;
if (!blink::V8ScriptRunner::CompileScript(ssc, isolate, accessControlStatus,
if (!blink::V8ScriptRunner::CompileScript(blink::ScriptState::From(context),
ssc, accessControlStatus,
v8CacheOptions)
.ToLocal(&script)) {
DCHECK(tryCatch.HasCaught());

View File

@ -324,7 +324,6 @@ patches = [
},
{
# Linux: Fix build errors related to dependency versions.
# https://chromium-review.googlesource.com/c/590271/
'name': 'linux_build',
},
{
@ -333,11 +332,6 @@ patches = [
'name': 'angle_697758',
'path': 'third_party/angle/',
},
{
# macOS: Add missing availability annotations for 10.12 SDK.
# https://bugs.chromium.org/p/chromium/issues/detail?id=747693
'name': 'mac_build_747693',
},
{
# Changes necessary to support for chrome extensions:
# (a) Add a new ExtensionHost constructor that allows CEF to create the

View File

@ -1,5 +1,5 @@
diff --git src/libGLESv2.gypi src/libGLESv2.gypi
index e0167d7..937dda0 100644
index 8f12a4a9b..2d7175eb7 100644
--- src/libGLESv2.gypi
+++ src/libGLESv2.gypi
@@ -36,8 +36,6 @@

View File

@ -1,13 +1,17 @@
diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h
index da3c2c7..93ed93d 100644
index 4355a8cdacb4..57961ef39f8d 100644
--- content/browser/renderer_host/browser_compositor_view_mac.h
+++ content/browser/renderer_host/browser_compositor_view_mac.h
@@ -50,9 +50,11 @@ class BrowserCompositorMac : public DelegatedFrameHostClient {
@@ -50,6 +50,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
// These will not return nullptr until Destroy is called.
DelegatedFrameHost* GetDelegatedFrameHost();
+ ui::Layer* GetRootLayer() { return root_layer_.get(); }
// Ensure that the currect compositor frame be cleared (even if it is
// potentially visible).
@@ -57,6 +58,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
// This may return nullptr, if this has detached itself from its
// ui::Compositor.
+ ui::Compositor* GetCompositor();
@ -15,10 +19,10 @@ index da3c2c7..93ed93d 100644
void DidCreateNewRendererCompositorFrameSink(
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index 278c702..686bfb5 100644
index 428bef1ff74e..e841db553ed8 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -204,6 +204,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
@@ -205,6 +205,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
g_spare_recyclable_compositors.Get().clear();
}
@ -31,7 +35,7 @@ index 278c702..686bfb5 100644
ui::AcceleratedWidgetMac* BrowserCompositorMac::GetAcceleratedWidgetMac() {
if (recyclable_compositor_)
return recyclable_compositor_->accelerated_widget_mac();
@@ -425,8 +431,13 @@ SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor(
@@ -437,8 +443,13 @@ SkColor BrowserCompositorMac::DelegatedFrameHostGetGutterColor(
}
gfx::Size BrowserCompositorMac::DelegatedFrameHostDesiredSizeInDIP() const {

View File

@ -1,8 +1,8 @@
diff --git content/browser/frame_host/render_widget_host_view_guest.cc content/browser/frame_host/render_widget_host_view_guest.cc
index d221c6c..f3d5ad4 100644
index a1abce179e5e..fed7d874781b 100644
--- content/browser/frame_host/render_widget_host_view_guest.cc
+++ content/browser/frame_host/render_widget_host_view_guest.cc
@@ -246,13 +246,14 @@ void RenderWidgetHostViewGuest::Destroy() {
@@ -251,13 +251,14 @@ void RenderWidgetHostViewGuest::Destroy() {
}
gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {

View File

@ -1,8 +1,8 @@
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
index b4eae88..bfb3887 100644
index 13e452c2b72b..2c4c55d90a50 100644
--- content/browser/browser_plugin/browser_plugin_guest.cc
+++ content/browser/browser_plugin/browser_plugin_guest.cc
@@ -336,14 +336,20 @@ void BrowserPluginGuest::InitInternal(
@@ -345,8 +345,11 @@ void BrowserPluginGuest::InitInternal(
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
}
@ -15,17 +15,7 @@ index b4eae88..bfb3887 100644
// Once a BrowserPluginGuest has an embedder WebContents, it's considered to
// be attached.
owner_web_contents_ = owner_web_contents;
- if (new_view)
+ if (new_view) {
new_view->OnGuestAttached(owner_web_contents_->GetView());
+ if (delegate_)
+ delegate_->OnGuestAttached(owner_web_contents_->GetView());
+ }
}
RendererPreferences* renderer_prefs =
@@ -834,7 +840,8 @@ void BrowserPluginGuest::OnWillAttachComplete(
@@ -843,10 +846,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
web_contents_view->CreateViewForWidget(
@ -35,8 +25,19 @@ index b4eae88..bfb3887 100644
}
}
+ if (delegate_) {
+ // Notify the delegate here instead of in InitInternal because InitInternal
+ // will now be called from Init before GuestViewBase::CompleteInit has set
+ // web_contents() to the guest WebContents. This behavior change is due to
+ // https://crrev.com/07263b56.
+ delegate_->OnGuestAttached(embedder_web_contents->GetView());
+ }
+
InitInternal(params, embedder_web_contents);
attached_ = true;
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
index de0043f..7699c2f 100644
index 28a7ddfc40ac..33c0c4399584 100644
--- content/browser/frame_host/interstitial_page_impl.cc
+++ content/browser/frame_host/interstitial_page_impl.cc
@@ -609,7 +609,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
@ -49,7 +50,7 @@ index de0043f..7699c2f 100644
render_view_host_->GetMainFrame()->AllowBindings(
BINDINGS_POLICY_DOM_AUTOMATION);
diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h
index e4401f8..20b8560 100644
index e4401f85bf3f..20b85609a23f 100644
--- content/browser/web_contents/web_contents_view.h
+++ content/browser/web_contents/web_contents_view.h
@@ -24,7 +24,7 @@ struct ScreenInfo;
@ -78,10 +79,10 @@ index e4401f8..20b8560 100644
// Creates a new View that holds a popup and receives messages for it.
virtual RenderWidgetHostViewBase* CreateViewForPopupWidget(
diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc
index a99e043..f1ef7cb 100644
index f407726a437e..0efc406c949f 100644
--- content/browser/web_contents/web_contents_view_aura.cc
+++ content/browser/web_contents/web_contents_view_aura.cc
@@ -844,7 +844,8 @@ void WebContentsViewAura::CreateView(
@@ -833,7 +833,8 @@ void WebContentsViewAura::CreateView(
}
RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
@ -91,7 +92,7 @@ index a99e043..f1ef7cb 100644
if (render_widget_host->GetView()) {
// During testing, the view will already be set up in most cases to the
// test view, so we don't want to clobber it with a real one. To verify that
@@ -856,6 +857,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
@@ -845,6 +846,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
render_widget_host->GetView());
}
@ -100,10 +101,10 @@ index a99e043..f1ef7cb 100644
g_create_render_widget_host_view
? g_create_render_widget_host_view(render_widget_host,
diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h
index bb49288..603f18a 100644
index 7979b48375e1..add76f7404de 100644
--- content/browser/web_contents/web_contents_view_aura.h
+++ content/browser/web_contents/web_contents_view_aura.h
@@ -118,7 +118,7 @@ class CONTENT_EXPORT WebContentsViewAura
@@ -116,7 +116,7 @@ class CONTENT_EXPORT WebContentsViewAura
gfx::NativeView context) override;
RenderWidgetHostViewBase* CreateViewForWidget(
RenderWidgetHost* render_widget_host,
@ -113,7 +114,7 @@ index bb49288..603f18a 100644
RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override;
diff --git content/browser/web_contents/web_contents_view_child_frame.cc content/browser/web_contents/web_contents_view_child_frame.cc
index eb309e7..e69e6df 100644
index e1aca335ede0..47e02fc73f74 100644
--- content/browser/web_contents/web_contents_view_child_frame.cc
+++ content/browser/web_contents/web_contents_view_child_frame.cc
@@ -94,7 +94,7 @@ void WebContentsViewChildFrame::CreateView(const gfx::Size& initial_size,
@ -126,7 +127,7 @@ index eb309e7..e69e6df 100644
}
diff --git content/browser/web_contents/web_contents_view_child_frame.h content/browser/web_contents/web_contents_view_child_frame.h
index 18d45ee..6aa738d 100644
index 18d45eea524f..6aa738daf5b5 100644
--- content/browser/web_contents/web_contents_view_child_frame.h
+++ content/browser/web_contents/web_contents_view_child_frame.h
@@ -40,7 +40,7 @@ class WebContentsViewChildFrame : public WebContentsView,
@ -139,7 +140,7 @@ index 18d45ee..6aa738d 100644
RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override;
diff --git content/browser/web_contents/web_contents_view_guest.cc content/browser/web_contents/web_contents_view_guest.cc
index 0256869..da7a9b8 100644
index 025686922ade..da7a9b88cabc 100644
--- content/browser/web_contents/web_contents_view_guest.cc
+++ content/browser/web_contents/web_contents_view_guest.cc
@@ -72,6 +72,8 @@ void WebContentsViewGuest::GetScreenInfo(ScreenInfo* screen_info) const {
@ -194,7 +195,7 @@ index 0256869..da7a9b8 100644
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget(
diff --git content/browser/web_contents/web_contents_view_guest.h content/browser/web_contents/web_contents_view_guest.h
index 464ea8f..0d3118d 100644
index 464ea8f780e4..0d3118df538a 100644
--- content/browser/web_contents/web_contents_view_guest.h
+++ content/browser/web_contents/web_contents_view_guest.h
@@ -58,7 +58,7 @@ class WebContentsViewGuest : public WebContentsView,
@ -207,10 +208,10 @@ index 464ea8f..0d3118d 100644
RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override;
diff --git content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.h
index 34945ac..542042c 100644
index 12675d077c8a..46db5596618e 100644
--- content/browser/web_contents/web_contents_view_mac.h
+++ content/browser/web_contents/web_contents_view_mac.h
@@ -91,7 +91,7 @@ class WebContentsViewMac : public WebContentsView,
@@ -90,7 +90,7 @@ class WebContentsViewMac : public WebContentsView,
gfx::NativeView context) override;
RenderWidgetHostViewBase* CreateViewForWidget(
RenderWidgetHost* render_widget_host,
@ -220,7 +221,7 @@ index 34945ac..542042c 100644
RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override;
diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm
index f256f69..fbf2726 100644
index a9111f9d9cef..33d5eea2cbb9 100644
--- content/browser/web_contents/web_contents_view_mac.mm
+++ content/browser/web_contents/web_contents_view_mac.mm
@@ -352,7 +352,8 @@ void WebContentsViewMac::CreateView(
@ -242,7 +243,7 @@ index f256f69..fbf2726 100644
g_create_render_widget_host_view
? g_create_render_widget_host_view(render_widget_host,
diff --git content/public/browser/browser_plugin_guest_delegate.h content/public/browser/browser_plugin_guest_delegate.h
index 61662f4..6a4648f 100644
index ef0ff9d6f67b..4eab513ba4ce 100644
--- content/public/browser/browser_plugin_guest_delegate.h
+++ content/public/browser/browser_plugin_guest_delegate.h
@@ -19,6 +19,7 @@ namespace content {
@ -253,7 +254,7 @@ index 61662f4..6a4648f 100644
// Objects implement this interface to get notified about changes in the guest
// WebContents and to provide necessary functionality.
@@ -78,6 +79,10 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
@@ -72,6 +73,10 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
// content module.
virtual void SetGuestHost(GuestHost* guest_host) {}
@ -265,7 +266,7 @@ index 61662f4..6a4648f 100644
// reported from the guest renderer should be ignored. The reported value
// from the guest renderer is incorrect in situations where BrowserPlugin is
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 255217d..1571064 100644
index 6f2b56d0cd90..ec6f15c0a789 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -174,6 +174,8 @@ void MimeHandlerViewGuest::CreateWebContents(
@ -275,10 +276,10 @@ index 255217d..1571064 100644
+ if (delegate_)
+ delegate_->OverrideWebContentsCreateParams(&params);
callback.Run(WebContents::Create(params));
}
@@ -194,6 +196,18 @@ bool MimeHandlerViewGuest::ZoomPropagatesFromEmbedderToGuest() const {
return false;
registry_.AddInterface(
@@ -199,6 +201,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
return true;
}
+void MimeHandlerViewGuest::OnGuestAttached(
@ -297,12 +298,12 @@ index 255217d..1571064 100644
WebContents* source,
const content::OpenURLParams& params) {
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
index f3fb783..642342c 100644
index df25eca4aeae..3072be6a9ca5 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
@@ -87,6 +87,10 @@ class MimeHandlerViewGuest :
void DidInitialize(const base::DictionaryValue& create_params) final;
@@ -89,6 +89,10 @@ class MimeHandlerViewGuest :
bool ZoomPropagatesFromEmbedderToGuest() const final;
bool ShouldDestroyOnDetach() const final;
+ // content::BrowserPluginGuestDelegate implementation
+ void OnGuestAttached(content::WebContentsView* parent_view) override;
@ -312,7 +313,7 @@ index f3fb783..642342c 100644
content::WebContents* OpenURLFromTab(
content::WebContents* source,
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
index 0928bf2..e954278 100644
index 0928bf2f44da..e9542785ec8a 100644
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
@@ -6,9 +6,9 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/profiles/incognito_helpers.cc chrome/browser/profiles/incognito_helpers.cc
index 6155e96..2125a436 100644
index 6155e9606d67..2125a436c87e 100644
--- chrome/browser/profiles/incognito_helpers.cc
+++ chrome/browser/profiles/incognito_helpers.cc
@@ -8,13 +8,35 @@
@ -39,7 +39,7 @@ index 6155e96..2125a436 100644
}
diff --git chrome/browser/profiles/incognito_helpers.h chrome/browser/profiles/incognito_helpers.h
index 4b43013..169ca47 100644
index 4b430133e16f..169ca4765907 100644
--- chrome/browser/profiles/incognito_helpers.h
+++ chrome/browser/profiles/incognito_helpers.h
@@ -11,6 +11,19 @@ class BrowserContext;
@ -63,23 +63,23 @@ index 4b43013..169ca47 100644
content::BrowserContext* GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context);
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 00635b8..d15278e 100644
index 460098e8f17d..9bf838204f62 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -375,7 +375,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -377,7 +377,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
content::NotificationService::AllSources());
- if (ProfileShortcutManager::IsFeatureEnabled() && !user_data_dir_.empty())
+ if (!user_data_dir_.empty() && ProfileShortcutManager::IsFeatureEnabled())
profile_shortcut_manager_.reset(ProfileShortcutManager::Create(
this));
}
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
index b3fa180..81adaea 100644
index 538b8458ab9e..169d4e079bf9 100644
--- chrome/browser/profiles/profile_manager.h
+++ chrome/browser/profiles/profile_manager.h
@@ -94,7 +94,7 @@ class ProfileManager : public content::NotificationObserver,
@@ -93,7 +93,7 @@ class ProfileManager : public content::NotificationObserver,
// acceptable. Returns null if creation of the new profile fails.
// TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then
// make this method private.
@ -88,7 +88,7 @@ index b3fa180..81adaea 100644
// Returns total number of profiles available on this machine.
size_t GetNumberOfProfiles();
@@ -125,7 +125,7 @@ class ProfileManager : public content::NotificationObserver,
@@ -124,7 +124,7 @@ class ProfileManager : public content::NotificationObserver,
// Returns true if the profile pointer is known to point to an existing
// profile.
@ -97,7 +97,7 @@ index b3fa180..81adaea 100644
// Returns the directory where the first created profile is stored,
// relative to the user data directory currently in use.
@@ -134,7 +134,7 @@ class ProfileManager : public content::NotificationObserver,
@@ -133,7 +133,7 @@ class ProfileManager : public content::NotificationObserver,
// Get the Profile last used (the Profile to which owns the most recently
// focused window) with this Chrome build. If no signed profile has been
// stored in Local State, hand back the Default profile.

View File

@ -1,11 +1,11 @@
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
index 05e23a6..051dab3 100644
index 17d9819ad2b0..05a72199a247 100644
--- chrome/common/chrome_content_client.cc
+++ chrome/common/chrome_content_client.cc
@@ -82,7 +82,7 @@
#endif
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS) && \
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) && \
- !defined(WIDEVINE_CDM_IS_COMPONENT)
+ !defined(WIDEVINE_CDM_IS_COMPONENT) && defined(WIDEVINE_CDM_VERSION_STRING)
#define WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT

View File

@ -1,5 +1,17 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 97c769cdf483..78d9db9d084e 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -489,6 +489,7 @@ split_static_library("ui") {
"//chrome/browser/ui/webui/usb_internals:mojo_bindings",
"//chrome/common",
"//chrome/common:search_mojom",
+ "//chrome/common:service_process_mojom",
"//chrome/common/net",
"//chrome/installer/util:with_no_strings",
"//components/about_ui",
diff --git content/app/content_service_manager_main_delegate.h content/app/content_service_manager_main_delegate.h
index 7563ce4..6c59474 100644
index 7563ce48bf5e..6c594749d57b 100644
--- content/app/content_service_manager_main_delegate.h
+++ content/app/content_service_manager_main_delegate.h
@@ -16,7 +16,8 @@ namespace content {
@ -12,12 +24,12 @@ index 7563ce4..6c59474 100644
public:
explicit ContentServiceManagerMainDelegate(const ContentMainParams& params);
~ContentServiceManagerMainDelegate() override;
diff --git third_party/WebKit/Source/web/BUILD.gn third_party/WebKit/Source/web/BUILD.gn
index 148b260..b08bb89 100644
--- third_party/WebKit/Source/web/BUILD.gn
+++ third_party/WebKit/Source/web/BUILD.gn
@@ -15,6 +15,7 @@ component("web") {
output_name = "blink_web"
diff --git third_party/WebKit/Source/controller/BUILD.gn third_party/WebKit/Source/controller/BUILD.gn
index dbcd69337de8..fc0b6aca080f 100644
--- third_party/WebKit/Source/controller/BUILD.gn
+++ third_party/WebKit/Source/controller/BUILD.gn
@@ -15,6 +15,7 @@ component("controller") {
output_name = "blink_controller"
deps = [
+ "//cef:webkit_set",

View File

@ -1,8 +1,8 @@
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
index 0e405ef..f2ecb56 100644
index 8313f13f3355..9ee1056eb825 100644
--- content/browser/compositor/gpu_process_transport_factory.cc
+++ content/browser/compositor/gpu_process_transport_factory.cc
@@ -239,6 +239,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
@@ -274,6 +274,13 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
std::unique_ptr<cc::SoftwareOutputDevice>
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
ui::Compositor* compositor) {
@ -17,18 +17,18 @@ index 0e405ef..f2ecb56 100644
if (command_line->HasSwitch(switches::kHeadless))
return base::WrapUnique(new cc::SoftwareOutputDevice);
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index 163fbb0..bb8dea8 100644
index a3bc8cafc574..745f1dacb26e 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -18,6 +18,7 @@
@@ -17,6 +17,7 @@
#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "cc/output/begin_frame_args.h"
+#include "cc/output/software_output_device.h"
#include "cc/trees/layer_tree_host_client.h"
#include "cc/trees/layer_tree_host_single_thread_client.h"
#include "components/viz/common/surfaces/surface_sequence.h"
@@ -174,6 +175,17 @@ class COMPOSITOR_EXPORT ContextFactory {
#include "components/viz/common/frame_sinks/begin_frame_args.h"
@@ -179,6 +180,17 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual void RemoveObserver(ContextFactoryObserver* observer) = 0;
};
@ -46,7 +46,7 @@ index 163fbb0..bb8dea8 100644
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -207,6 +219,9 @@ class COMPOSITOR_EXPORT Compositor
@@ -215,6 +227,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@ -56,7 +56,7 @@ index 163fbb0..bb8dea8 100644
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -389,6 +404,8 @@ class COMPOSITOR_EXPORT Compositor
@@ -431,6 +446,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
ui::ContextFactory* context_factory_;
ui::ContextFactoryPrivate* context_factory_private_;

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
index 43bbb3a..7c03fdc 100644
index faca8fe60751..cd96d66a5d8b 100644
--- chrome/browser/download/download_target_determiner.cc
+++ chrome/browser/download/download_target_determiner.cc
@@ -477,8 +477,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
@@ -484,8 +484,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
content::PluginService* plugin_service =
content::PluginService::GetInstance();
bool plugin_found = plugin_service->GetPluginInfo(
@ -14,7 +14,7 @@ index 43bbb3a..7c03fdc 100644
// The GetPlugins call causes the plugin list to be refreshed. Once that's
// done we can retry the GetPluginInfo call. We break out of this cycle
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
index 1783a10..b380ef8 100644
index 1783a101aa02..b380ef826ff7 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -179,6 +179,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
@ -26,7 +26,7 @@ index 1783a10..b380ef8 100644
content::WebPluginInfo* plugin) {
base::AutoLock auto_lock(lock_);
diff --git chrome/browser/plugins/chrome_plugin_service_filter.h chrome/browser/plugins/chrome_plugin_service_filter.h
index f8b651f..ec39f8d 100644
index f8b651f1ddc4..ec39f8d7dc85 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.h
+++ chrome/browser/plugins/chrome_plugin_service_filter.h
@@ -71,6 +71,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter,
@ -37,11 +37,24 @@ index f8b651f..ec39f8d 100644
const url::Origin& main_frame_origin,
content::WebPluginInfo* plugin) override;
diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
index 83445e1428a9..385e223b9069 100644
--- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
+++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
@@ -52,7 +52,7 @@ PDFIFrameNavigationThrottle::MaybeCreateThrottleFor(
content::ResourceContext* resource_context =
handle->GetWebContents()->GetBrowserContext()->GetResourceContext();
if (filter->IsPluginAvailable(process_id, routing_id, resource_context,
- handle->GetURL(), url::Origin(),
+ handle->GetURL(), false, url::Origin(),
&pdf_plugin_info)) {
return nullptr;
}
diff --git chrome/browser/plugins/plugin_info_message_filter.cc chrome/browser/plugins/plugin_info_message_filter.cc
index 176b1bc..3e91d67 100644
index 8d0adcac00c1..2751e745107f 100644
--- chrome/browser/plugins/plugin_info_message_filter.cc
+++ chrome/browser/plugins/plugin_info_message_filter.cc
@@ -452,8 +452,8 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
@@ -451,8 +451,8 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
for (; i < matching_plugins.size(); ++i) {
if (!filter ||
filter->IsPluginAvailable(render_process_id_, render_frame_id,
@ -53,7 +66,7 @@ index 176b1bc..3e91d67 100644
}
}
diff --git chrome/browser/ui/cocoa/drag_util.mm chrome/browser/ui/cocoa/drag_util.mm
index fd8c993..7f70c96 100644
index 6a2122ee1ed7..68831894695a 100644
--- chrome/browser/ui/cocoa/drag_util.mm
+++ chrome/browser/ui/cocoa/drag_util.mm
@@ -54,7 +54,7 @@ BOOL IsSupportedFileURL(Profile* profile, const GURL& url) {
@ -66,10 +79,10 @@ index fd8c993..7f70c96 100644
}
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 5ca4247..fc24263 100644
index ef7ae9c7de76..29a4e7cb9578 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -575,6 +575,6 @@ void BrowserTabStripController::OnFindURLMimeTypeCompleted(
@@ -594,6 +594,6 @@ void BrowserTabStripController::OnFindURLMimeTypeCompleted(
content::PluginService::GetInstance()->GetPluginInfo(
-1, // process ID
MSG_ROUTING_NONE, // routing ID
@ -78,10 +91,10 @@ index 5ca4247..fc24263 100644
mime_type, false, NULL, &plugin, NULL));
}
diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc
index ec9ded6..4a0406a 100644
index 2e4d0d9ac4cb..9bd0bf12ca88 100644
--- content/browser/frame_host/navigation_handle_impl.cc
+++ content/browser/frame_host/navigation_handle_impl.cc
@@ -300,12 +300,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
@@ -312,12 +312,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() {
}
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
@ -95,10 +108,23 @@ index ec9ded6..4a0406a 100644
}
diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc
index b9f925b..eacb4167 100644
index 7e577c8395d7..96421d4f2d88 100644
--- content/browser/frame_host/render_frame_host_impl.cc
+++ content/browser/frame_host/render_frame_host_impl.cc
@@ -918,10 +918,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
@@ -370,9 +370,9 @@ void ForwardRequest(const char* service_name,
void CreatePaymentManager(RenderFrameHostImpl* rfh,
payments::mojom::PaymentManagerRequest request) {
- StoragePartitionImpl* storage_partition =
- static_cast<StoragePartitionImpl*>(BrowserContext::GetStoragePartition(
- rfh->GetSiteInstance()->GetBrowserContext(), rfh->GetSiteInstance()));
+ StoragePartition* storage_partition =
+ BrowserContext::GetStoragePartition(
+ rfh->GetSiteInstance()->GetBrowserContext(), rfh->GetSiteInstance());
storage_partition->GetPaymentAppContext()->CreatePaymentManager(
std::move(request));
}
@@ -937,10 +937,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup)
IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup)
#endif
@ -109,7 +135,7 @@ index b9f925b..eacb4167 100644
IPC_MESSAGE_HANDLER(FrameHostMsg_RequestOverlayRoutingToken,
OnRequestOverlayRoutingToken)
IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow)
@@ -1410,6 +1408,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
@@ -1436,6 +1434,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError(
if (navigation_handle_) {
navigation_handle_->set_net_error_code(
static_cast<net::Error>(params.error_code));
@ -117,7 +143,7 @@ index b9f925b..eacb4167 100644
}
frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params);
@@ -2683,14 +2682,12 @@ void RenderFrameHostImpl::OnHidePopup() {
@@ -2705,14 +2704,12 @@ void RenderFrameHostImpl::OnHidePopup() {
}
#endif
@ -133,10 +159,10 @@ index b9f925b..eacb4167 100644
void RenderFrameHostImpl::OnRequestOverlayRoutingToken() {
// Make sure that we have a token.
diff --git content/browser/frame_host/render_frame_host_impl.h content/browser/frame_host/render_frame_host_impl.h
index c3a1726..9b3922e 100644
index 9a4fa29dd7c6..bfd658b91c06 100644
--- content/browser/frame_host/render_frame_host_impl.h
+++ content/browser/frame_host/render_frame_host_impl.h
@@ -815,8 +815,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
@@ -821,8 +821,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params);
void OnHidePopup();
#endif
@ -147,10 +173,10 @@ index c3a1726..9b3922e 100644
mojo::ScopedMessagePipeHandle pipe);
#endif
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
index 9b9cfbd..ae3a274 100644
index c440d8061dac..1ee6a7ca1cf1 100644
--- content/browser/frame_host/render_frame_message_filter.cc
+++ content/browser/frame_host/render_frame_message_filter.cc
@@ -475,6 +475,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
@@ -509,6 +509,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
void RenderFrameMessageFilter::OnGetPlugins(
bool refresh,
@ -158,12 +184,12 @@ index 9b9cfbd..ae3a274 100644
const url::Origin& main_frame_origin,
IPC::Message* reply_msg) {
// Don't refresh if the specified threshold has not been passed. Note that
@@ -496,18 +497,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
@@ -530,18 +531,19 @@ void RenderFrameMessageFilter::OnGetPlugins(
PluginServiceImpl::GetInstance()->GetPlugins(
base::Bind(&RenderFrameMessageFilter::GetPluginsCallback, this, reply_msg,
- main_frame_origin));
+ is_main_frame, main_frame_origin));
base::BindOnce(&RenderFrameMessageFilter::GetPluginsCallback, this,
- reply_msg, main_frame_origin));
+ reply_msg, is_main_frame, main_frame_origin));
}
void RenderFrameMessageFilter::GetPluginsCallback(
@ -180,7 +206,7 @@ index 9b9cfbd..ae3a274 100644
int routing_id = MSG_ROUTING_NONE;
// In this loop, copy the WebPluginInfo (and do not use a reference) because
// the filter might mutate it.
@@ -516,7 +518,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
@@ -550,7 +552,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
if (!filter ||
filter->IsPluginAvailable(child_process_id, routing_id,
resource_context_, main_frame_origin.GetURL(),
@ -189,7 +215,7 @@ index 9b9cfbd..ae3a274 100644
plugins.push_back(plugin);
}
}
@@ -528,6 +530,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
@@ -562,6 +564,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
void RenderFrameMessageFilter::OnGetPluginInfo(
int render_frame_id,
const GURL& url,
@ -197,7 +223,7 @@ index 9b9cfbd..ae3a274 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool* found,
@@ -536,8 +539,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
@@ -570,8 +573,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
bool allow_wildcard = true;
*found = plugin_service_->GetPluginInfo(
render_process_id_, render_frame_id, resource_context_, url,
@ -209,10 +235,10 @@ index 9b9cfbd..ae3a274 100644
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h
index 3f49cc4..c593146 100644
index 6875eb6496c4..a9248109c2b3 100644
--- content/browser/frame_host/render_frame_message_filter.h
+++ content/browser/frame_host/render_frame_message_filter.h
@@ -124,13 +124,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter
@@ -127,13 +127,16 @@ class CONTENT_EXPORT RenderFrameMessageFilter
#if BUILDFLAG(ENABLE_PLUGINS)
void OnGetPlugins(bool refresh,
@ -230,10 +256,10 @@ index 3f49cc4..c593146 100644
const std::string& mime_type,
bool* found,
diff --git content/browser/loader/mime_sniffing_resource_handler.cc content/browser/loader/mime_sniffing_resource_handler.cc
index 20d09f5..f36d855 100644
index 482bb55c2bfe..fbbac2ab26b1 100644
--- content/browser/loader/mime_sniffing_resource_handler.cc
+++ content/browser/loader/mime_sniffing_resource_handler.cc
@@ -494,8 +494,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
@@ -489,8 +489,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
WebPluginInfo plugin;
bool has_plugin = plugin_service_->GetPluginInfo(
info->GetChildID(), info->GetRenderFrameID(), info->GetContext(),
@ -245,7 +271,7 @@ index 20d09f5..f36d855 100644
if (stale) {
// Refresh the plugins asynchronously.
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
index 4bdfa1d..cf9b916 100644
index 4bdfa1d5455f..cf9b9166ae43 100644
--- content/browser/plugin_service_impl.cc
+++ content/browser/plugin_service_impl.cc
@@ -242,6 +242,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
@ -267,10 +293,10 @@ index 4bdfa1d..cf9b916 100644
if (actual_mime_type)
*actual_mime_type = mime_types[i];
diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h
index 85b64da..e77f1bb 100644
index b654bf3c98b4..1b09cd3d0a23 100644
--- content/browser/plugin_service_impl.h
+++ content/browser/plugin_service_impl.h
@@ -64,6 +64,7 @@ class CONTENT_EXPORT PluginServiceImpl
@@ -63,6 +63,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
int render_frame_id,
ResourceContext* context,
const GURL& url,
@ -279,7 +305,7 @@ index 85b64da..e77f1bb 100644
const std::string& mime_type,
bool allow_wildcard,
diff --git content/common/frame_messages.h content/common/frame_messages.h
index 168d64f..82e9385 100644
index 7fcc51298b12..6cde762011c9 100644
--- content/common/frame_messages.h
+++ content/common/frame_messages.h
@@ -1324,8 +1324,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
@ -305,7 +331,7 @@ index 168d64f..82e9385 100644
url::Origin /* main_frame_origin */,
std::string /* mime_type */,
bool /* found */,
@@ -1716,9 +1718,9 @@ IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply,
@@ -1722,9 +1724,9 @@ IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply,
IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply,
int /* nfr_request_id */,
float /* distance */)
@ -317,7 +343,7 @@ index 168d64f..82e9385 100644
// Adding a new message? Stick to the sort order above: first platform
// independent FrameMsg, then ifdefs for platform specific FrameMsg, then
diff --git content/ppapi_plugin/ppapi_blink_platform_impl.cc content/ppapi_plugin/ppapi_blink_platform_impl.cc
index 6190e33..fbde1ba 100644
index bf393b7025c9..ae2f1840d193 100644
--- content/ppapi_plugin/ppapi_blink_platform_impl.cc
+++ content/ppapi_plugin/ppapi_blink_platform_impl.cc
@@ -215,6 +215,7 @@ std::unique_ptr<blink::WebURLLoader> PpapiBlinkPlatformImpl::CreateURLLoader(
@ -329,10 +355,10 @@ index 6190e33..fbde1ba 100644
blink::WebPluginListBuilder* builder) {
NOTREACHED();
diff --git content/ppapi_plugin/ppapi_blink_platform_impl.h content/ppapi_plugin/ppapi_blink_platform_impl.h
index fc83aea..9c1a4b2 100644
index f7684513c3bd..ff6d12f17fe7 100644
--- content/ppapi_plugin/ppapi_blink_platform_impl.h
+++ content/ppapi_plugin/ppapi_blink_platform_impl.h
@@ -47,6 +47,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -46,6 +46,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImpl {
const blink::WebURLRequest& request,
base::SingleThreadTaskRunner* task_runner) override;
void GetPluginList(bool refresh,
@ -341,7 +367,7 @@ index fc83aea..9c1a4b2 100644
blink::WebPluginListBuilder*) override;
blink::WebData GetDataResource(const char* name) override;
diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h
index ac05c13..762262b 100644
index ac05c13b1df8..762262bff01a 100644
--- content/public/browser/plugin_service.h
+++ content/public/browser/plugin_service.h
@@ -74,6 +74,7 @@ class PluginService {
@ -353,7 +379,7 @@ index ac05c13..762262b 100644
const std::string& mime_type,
bool allow_wildcard,
diff --git content/public/browser/plugin_service_filter.h content/public/browser/plugin_service_filter.h
index 3b610b1..7c439e0 100644
index 3b610b1f554e..7c439e060779 100644
--- content/public/browser/plugin_service_filter.h
+++ content/public/browser/plugin_service_filter.h
@@ -33,6 +33,7 @@ class PluginServiceFilter {
@ -365,10 +391,10 @@ index 3b610b1..7c439e0 100644
WebPluginInfo* plugin) = 0;
diff --git content/public/renderer/content_renderer_client.cc content/public/renderer/content_renderer_client.cc
index 62e2a4e..7932e91 100644
index 303653a66248..a53478408226 100644
--- content/public/renderer/content_renderer_client.cc
+++ content/public/renderer/content_renderer_client.cc
@@ -110,7 +110,6 @@ bool ContentRendererClient::AllowPopup() {
@@ -109,7 +109,6 @@ bool ContentRendererClient::AllowPopup() {
return false;
}
@ -376,7 +402,7 @@ index 62e2a4e..7932e91 100644
bool ContentRendererClient::HandleNavigation(
RenderFrame* render_frame,
bool is_content_initiated,
@@ -123,6 +122,7 @@ bool ContentRendererClient::HandleNavigation(
@@ -122,6 +121,7 @@ bool ContentRendererClient::HandleNavigation(
return false;
}
@ -385,7 +411,7 @@ index 62e2a4e..7932e91 100644
return false;
}
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index 915dc35..a015048 100644
index 16f55a95fdea..7f40cd466b09 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -77,6 +77,9 @@ class CONTENT_EXPORT ContentRendererClient {
@ -398,7 +424,7 @@ index 915dc35..a015048 100644
// Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -197,7 +200,6 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -201,7 +204,6 @@ class CONTENT_EXPORT ContentRendererClient {
// Returns true if a popup window should be allowed.
virtual bool AllowPopup();
@ -406,7 +432,7 @@ index 915dc35..a015048 100644
// TODO(sgurun) This callback is deprecated and will be removed as soon
// as android webview completes implementation of a resource throttle based
// shouldoverrideurl implementation. See crbug.com/325351
@@ -213,6 +215,7 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -217,6 +219,7 @@ class CONTENT_EXPORT ContentRendererClient {
blink::WebNavigationPolicy default_policy,
bool is_redirect);
@ -415,12 +441,12 @@ index 915dc35..a015048 100644
// built in media player for the given |url|. Defaults to false.
virtual bool ShouldUseMediaPlayerForURL(const GURL& url);
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
index 48b932e..80110f9 100644
index 4f8478bfa87a..52471407518e 100644
--- content/public/renderer/render_frame_observer.h
+++ content/public/renderer/render_frame_observer.h
@@ -116,6 +116,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
virtual void DidObserveLoadingBehavior(
blink::WebLoadingBehaviorFlag behavior) {}
@@ -124,6 +124,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
// load. This is used for UseCounter feature metrics.
virtual void DidObserveNewFeatureUsage(blink::mojom::WebFeature feature) {}
+ // Called when this frame gains focus.
+ virtual void FrameFocused() {}
@ -429,10 +455,10 @@ index 48b932e..80110f9 100644
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index 69bb3ef..df99298 100644
index 7fc594620793..9082ae71219f 100644
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
@@ -2897,7 +2897,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
@@ -2952,7 +2952,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
std::string mime_type;
bool found = false;
Send(new FrameHostMsg_GetPluginInfo(
@ -442,7 +468,7 @@ index 69bb3ef..df99298 100644
params.mime_type.Utf8(), &found, &info, &mime_type));
if (!found)
return nullptr;
@@ -3205,6 +3206,8 @@ void RenderFrameImpl::FrameDetached(blink::WebLocalFrame* frame,
@@ -3258,6 +3259,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
void RenderFrameImpl::FrameFocused() {
Send(new FrameHostMsg_FrameFocused(routing_id_));
@ -451,7 +477,7 @@ index 69bb3ef..df99298 100644
}
void RenderFrameImpl::WillCommitProvisionalLoad() {
@@ -5324,9 +5327,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
@@ -5397,9 +5400,8 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
(!IsBrowserSideNavigationEnabled() ||
url != pending_navigation_params_->request_params.redirects[0]));
@ -463,19 +489,19 @@ index 69bb3ef..df99298 100644
// The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved.
if (GetContentClient()->renderer()->HandleNavigation(
@@ -5339,7 +5341,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
@@ -5412,7 +5414,6 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
}
return blink::kWebNavigationPolicyIgnore;
}
-#endif
Referrer referrer(
RenderViewImpl::GetReferrerFromRequest(frame_, info.url_request));
// If the browser is interested, then give it a chance to look at the request.
if (is_content_initiated && IsTopLevelNavigation(frame_) &&
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index c26bd13..25e7028 100644
index dbf1a1967f90..064f48a2e071 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -772,6 +772,8 @@ void RenderThreadImpl::Init(
@@ -774,6 +774,8 @@ void RenderThreadImpl::Init(
StartServiceManagerConnection();
@ -485,10 +511,10 @@ index c26bd13..25e7028 100644
base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest,
base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index 45fcfe8..165a5f4 100644
index 2246aa95c564..02d25c60a090 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -876,6 +876,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
@@ -783,6 +783,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor(
void RendererBlinkPlatformImpl::GetPluginList(
bool refresh,
@ -496,7 +522,7 @@ index 45fcfe8..165a5f4 100644
const blink::WebSecurityOrigin& mainFrameOrigin,
blink::WebPluginListBuilder* builder) {
#if BUILDFLAG(ENABLE_PLUGINS)
@@ -883,7 +884,8 @@ void RendererBlinkPlatformImpl::GetPluginList(
@@ -790,7 +791,8 @@ void RendererBlinkPlatformImpl::GetPluginList(
if (!plugin_refresh_allowed_)
refresh = false;
RenderThread::Get()->Send(
@ -507,7 +533,7 @@ index 45fcfe8..165a5f4 100644
builder->AddPlugin(WebString::FromUTF16(plugin.name),
WebString::FromUTF16(plugin.desc),
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 0ca8faf..7c81cf9 100644
index 18ab5e68d8a6..bd40d2914f7a 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -125,6 +125,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@ -519,7 +545,7 @@ index 0ca8faf..7c81cf9 100644
blink::WebPluginListBuilder* builder) override;
blink::WebPublicSuffixList* PublicSuffixList() override;
diff --git content/shell/browser/shell_plugin_service_filter.cc content/shell/browser/shell_plugin_service_filter.cc
index 3a48c59..d10ef64 100644
index 3a48c59b7e3e..d10ef64adbba 100644
--- content/shell/browser/shell_plugin_service_filter.cc
+++ content/shell/browser/shell_plugin_service_filter.cc
@@ -18,6 +18,7 @@ bool ShellPluginServiceFilter::IsPluginAvailable(
@ -531,7 +557,7 @@ index 3a48c59..d10ef64 100644
WebPluginInfo* plugin) {
return plugin->name == base::ASCIIToUTF16("Blink Test Plugin") ||
diff --git content/shell/browser/shell_plugin_service_filter.h content/shell/browser/shell_plugin_service_filter.h
index 7767a62..8a95377 100644
index 7767a620a9fd..8a95377f5f3b 100644
--- content/shell/browser/shell_plugin_service_filter.h
+++ content/shell/browser/shell_plugin_service_filter.h
@@ -21,6 +21,7 @@ class ShellPluginServiceFilter : public PluginServiceFilter {
@ -543,7 +569,7 @@ index 7767a62..8a95377 100644
WebPluginInfo* plugin) override;
diff --git content/test/fake_plugin_service.cc content/test/fake_plugin_service.cc
index 6746b9f..8634ada 100644
index 6746b9f16e7e..8634ada48d57 100644
--- content/test/fake_plugin_service.cc
+++ content/test/fake_plugin_service.cc
@@ -29,6 +29,7 @@ bool FakePluginService::GetPluginInfo(int render_process_id,
@ -555,7 +581,7 @@ index 6746b9f..8634ada 100644
const std::string& mime_type,
bool allow_wildcard,
diff --git content/test/fake_plugin_service.h content/test/fake_plugin_service.h
index db23a83..57a4c536 100644
index db23a83ed079..57a4c536118c 100644
--- content/test/fake_plugin_service.h
+++ content/test/fake_plugin_service.h
@@ -30,6 +30,7 @@ class FakePluginService : public PluginService {
@ -567,7 +593,7 @@ index db23a83..57a4c536 100644
const std::string& mime_type,
bool allow_wildcard,
diff --git content/test/test_blink_web_unit_test_support.cc content/test/test_blink_web_unit_test_support.cc
index c19d608..3dce54d 100644
index c19d608cc3e1..3dce54daf1cb 100644
--- content/test/test_blink_web_unit_test_support.cc
+++ content/test/test_blink_web_unit_test_support.cc
@@ -290,6 +290,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() {
@ -579,7 +605,7 @@ index c19d608..3dce54d 100644
blink::WebPluginListBuilder* builder) {
builder->AddPlugin("pdf", "pdf", "pdf-files");
diff --git content/test/test_blink_web_unit_test_support.h content/test/test_blink_web_unit_test_support.h
index 556242d..61853c2 100644
index 556242d76fa9..61853c2df547 100644
--- content/test/test_blink_web_unit_test_support.h
+++ content/test/test_blink_web_unit_test_support.h
@@ -70,6 +70,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl {

View File

@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
index 4822d0d..3efc466 100644
index 4822d0d57e44..3efc46631f4c 100644
--- content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
+++ content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
@@ -55,7 +55,7 @@ PepperFlashFileMessageFilter::PepperFlashFileMessageFilter(

View File

@ -1,5 +1,5 @@
diff --git build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
index 4d385dd..1b51f2d 100644
index 4d385dd5512b..1b51f2d17491 100644
--- build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
+++ build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn
@@ -2,6 +2,8 @@
@ -31,7 +31,7 @@ index 4d385dd..1b51f2d 100644
cflags = [ "/wd4201" ]
}
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
index effec5c..1cd8f58 100644
index 1b3349852829..c1425f39e28d 100644
--- chrome/common/crash_keys.cc
+++ chrome/common/crash_keys.cc
@@ -4,6 +4,8 @@
@ -52,7 +52,7 @@ index effec5c..1cd8f58 100644
// The following keys may be chunked by the underlying crash logging system,
// but ultimately constitute a single key-value pair.
//
@@ -229,10 +231,16 @@ size_t RegisterChromeCrashKeys() {
@@ -212,10 +214,16 @@ size_t RegisterChromeCrashKeys() {
// This dynamic set of keys is used for sets of key value pairs when gathering
// a collection of data, like command line switches or extension IDs.
@ -71,7 +71,7 @@ index effec5c..1cd8f58 100644
// Register the extension IDs.
{
@@ -266,7 +274,7 @@ size_t RegisterChromeCrashKeys() {
@@ -249,7 +257,7 @@ size_t RegisterChromeCrashKeys() {
return base::debug::InitCrashKeys(&keys.at(0), keys.size(), kChunkMaxLength);
}
@ -80,7 +80,7 @@ index effec5c..1cd8f58 100644
static const char* const kIgnoreSwitches[] = {
switches::kEnableLogging,
switches::kFlagSwitchesBegin,
@@ -322,7 +330,7 @@ static bool IsBoringSwitch(const std::string& flag) {
@@ -305,7 +313,7 @@ static bool IsBoringSwitch(const std::string& flag) {
}
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) {
@ -90,7 +90,7 @@ index effec5c..1cd8f58 100644
void SetActiveExtensions(const std::set<std::string>& extensions) {
diff --git chrome/common/crash_keys.h chrome/common/crash_keys.h
index 687146e..b1b73d6 100644
index 687146e9e92c..b1b73d6e36b2 100644
--- chrome/common/crash_keys.h
+++ chrome/common/crash_keys.h
@@ -22,10 +22,18 @@ class CommandLine;
@ -113,7 +113,7 @@ index 687146e..b1b73d6 100644
// on the given |command_line|.
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
index 8ae2c85..cea4a3d 100644
index f8ac4823fa05..83386f77dd69 100644
--- chrome_elf/BUILD.gn
+++ chrome_elf/BUILD.gn
@@ -7,6 +7,7 @@
@ -124,7 +124,7 @@ index 8ae2c85..cea4a3d 100644
import("//chrome/process_version_rc_template.gni")
import("//testing/test.gni")
@@ -137,16 +138,15 @@ static_library("blacklist") {
@@ -158,9 +159,6 @@ static_library("blacklist") {
static_library("crash") {
sources = [
@ -134,18 +134,17 @@ index 8ae2c85..cea4a3d 100644
"crash/crash_helper.cc",
"crash/crash_helper.h",
]
+
deps = [
@@ -168,6 +166,7 @@ static_library("crash") {
":hook_util",
"//base:base", # This needs to go. DEP of app, crash_keys, client.
"//base", # This needs to go. DEP of app, crash_keys, client.
"//base:base_static", # pe_image
+ "//cef/libcef/features",
"//chrome/install_static:install_static_util",
"//components/crash/content/app:app",
"//components/crash/content/app",
"//components/crash/core/common", # crash_keys
@@ -155,6 +155,17 @@ static_library("crash") {
@@ -176,6 +175,17 @@ static_library("crash") {
"//gpu/config:crash_keys",
"//third_party/crashpad/crashpad/client:client", # DumpWithoutCrash
"//third_party/crashpad/crashpad/client", # DumpWithoutCrash
]
+
+ if (enable_cef) {
@ -162,7 +161,7 @@ index 8ae2c85..cea4a3d 100644
static_library("hook_util") {
diff --git chrome_elf/crash/crash_helper.cc chrome_elf/crash/crash_helper.cc
index 31ed150..aacbb02 100644
index e1bede4790c0..e21761ecaf52 100644
--- chrome_elf/crash/crash_helper.cc
+++ chrome_elf/crash/crash_helper.cc
@@ -11,12 +11,17 @@
@ -196,7 +195,7 @@ index 31ed150..aacbb02 100644
g_crash_helper_enabled = true;
return true;
diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc
index 2199920..e6e8f58 100644
index 2199920ee793..e6e8f58a0be0 100644
--- components/crash/content/app/breakpad_linux.cc
+++ components/crash/content/app/breakpad_linux.cc
@@ -29,6 +29,7 @@
@ -274,7 +273,7 @@ index 2199920..e6e8f58 100644
void InitNonBrowserCrashReporterForAndroid(const std::string& process_type) {
SanitizationInfo sanitization_info;
diff --git components/crash/content/app/breakpad_linux.h components/crash/content/app/breakpad_linux.h
index 4a2a429..70f3adb 100644
index 4a2a429fc052..70f3adbc73cf 100644
--- components/crash/content/app/breakpad_linux.h
+++ components/crash/content/app/breakpad_linux.h
@@ -16,6 +16,9 @@ namespace breakpad {
@ -288,7 +287,7 @@ index 4a2a429..70f3adb 100644
extern void InitCrashKeysForTesting();
diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc
index 2e9ee28..de53f59 100644
index 2e9ee28e1b00..de53f5927143 100644
--- components/crash/content/app/crash_reporter_client.cc
+++ components/crash/content/app/crash_reporter_client.cc
@@ -88,11 +88,12 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
@ -357,7 +356,7 @@ index 2e9ee28..de53f59 100644
-
} // namespace crash_reporter
diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h
index 9f69c19..2abaee00 100644
index 9f69c193dda2..2abaee004c47 100644
--- components/crash/content/app/crash_reporter_client.h
+++ components/crash/content/app/crash_reporter_client.h
@@ -8,6 +8,7 @@
@ -383,14 +382,14 @@ index 9f69c19..2abaee00 100644
virtual base::FilePath GetReporterLogFilename();
// Custom crash minidump handler after the minidump is generated.
@@ -119,6 +121,7 @@ class CrashReporterClient {
@@ -118,6 +120,7 @@ class CrashReporterClient {
// WARNING: this handler runs in a compromised context. It may not call into
// libc nor allocate memory normally.
virtual bool HandleCrashDump(const char* crashdump_filename);
#endif
+#endif
#endif
// The location where minidump files should be written. Returns true if
// |crash_dir| was set. Windows has to use base::string16 because this code
@@ -197,6 +200,23 @@ class CrashReporterClient {
// Returns true if breakpad should run in the given process type.
@ -416,10 +415,10 @@ index 9f69c19..2abaee00 100644
} // namespace crash_reporter
diff --git components/crash/content/app/crashpad.cc components/crash/content/app/crashpad.cc
index ede08d7..d7caf4d 100644
index aface8de549a..df37644bd872 100644
--- components/crash/content/app/crashpad.cc
+++ components/crash/content/app/crashpad.cc
@@ -139,7 +139,8 @@ void InitializeCrashpadImpl(bool initial_client,
@@ -135,7 +135,8 @@ void InitializeCrashpadImpl(bool initial_client,
// fallback. Forwarding is turned off for debug-mode builds even for the
// browser process, because the system's crash reporter can take a very long
// time to chew on symbols.
@ -430,7 +429,7 @@ index ede08d7..d7caf4d 100644
crashpad::TriState::kDisabled);
}
diff --git components/crash/content/app/crashpad_mac.mm components/crash/content/app/crashpad_mac.mm
index 485c2b4..3b5f3ea 100644
index 485c2b4b3e98..3b5f3eaa3926 100644
--- components/crash/content/app/crashpad_mac.mm
+++ components/crash/content/app/crashpad_mac.mm
@@ -16,11 +16,14 @@
@ -531,10 +530,10 @@ index 485c2b4..3b5f3ea 100644
handler_path, database_path, metrics_path, url, process_annotations,
arguments, true, false);
diff --git components/crash/content/app/crashpad_win.cc components/crash/content/app/crashpad_win.cc
index 3946d2a..175fb2e 100644
index bb5c09732c20..da3628cf8eb1 100644
--- components/crash/content/app/crashpad_win.cc
+++ components/crash/content/app/crashpad_win.cc
@@ -33,8 +33,8 @@ void GetPlatformCrashpadAnnotations(
@@ -34,8 +34,8 @@ void GetPlatformCrashpadAnnotations(
base::string16 product_name, version, special_build, channel_name;
crash_reporter_client->GetProductNameAndVersion(
exe_file, &product_name, &version, &special_build, &channel_name);
@ -545,7 +544,7 @@ index 3946d2a..175fb2e 100644
#if defined(GOOGLE_CHROME_BUILD)
// Empty means stable.
const bool allow_empty_channel = true;
@@ -46,9 +46,9 @@ void GetPlatformCrashpadAnnotations(
@@ -47,9 +47,9 @@ void GetPlatformCrashpadAnnotations(
if (!special_build.empty())
(*annotations)["special"] = base::UTF16ToUTF8(special_build);
#if defined(ARCH_CPU_X86)
@ -557,7 +556,7 @@ index 3946d2a..175fb2e 100644
#endif
}
@@ -82,7 +82,7 @@ base::FilePath PlatformCrashpadInitialization(
@@ -83,7 +83,7 @@ base::FilePath PlatformCrashpadInitialization(
#if defined(GOOGLE_CHROME_BUILD)
std::string url = "https://clients2.google.com/cr/report";
#else
@ -566,7 +565,7 @@ index 3946d2a..175fb2e 100644
#endif
// Allow the crash server to be overridden for testing. If the variable
@@ -102,13 +102,14 @@ base::FilePath PlatformCrashpadInitialization(
@@ -103,13 +103,14 @@ base::FilePath PlatformCrashpadInitialization(
crashpad::TriState::kEnabled, kIndirectMemoryLimit);
}
@ -586,7 +585,7 @@ index 3946d2a..175fb2e 100644
if (!user_data_dir.empty()) {
start_arguments.push_back(std::string("--user-data-dir=") +
user_data_dir);
@@ -119,9 +120,12 @@ base::FilePath PlatformCrashpadInitialization(
@@ -120,9 +121,12 @@ base::FilePath PlatformCrashpadInitialization(
start_arguments.push_back("/prefetch:7");
} else {
base::FilePath exe_dir = exe_file.DirName();
@ -601,7 +600,7 @@ index 3946d2a..175fb2e 100644
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
index bcf53d5..d4f070b 100644
index c1764c511286..46165027b9d8 100644
--- content/browser/frame_host/debug_urls.cc
+++ content/browser/frame_host/debug_urls.cc
@@ -139,7 +139,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {

View File

@ -1,5 +1,5 @@
diff --git third_party/crashpad/crashpad/client/prune_crash_reports.cc third_party/crashpad/crashpad/client/prune_crash_reports.cc
index 3aaaeee..d99fcb4 100644
index 3aaaeee5d07f..d99fcb418d9e 100644
--- third_party/crashpad/crashpad/client/prune_crash_reports.cc
+++ third_party/crashpad/crashpad/client/prune_crash_reports.cc
@@ -67,13 +67,19 @@ void PruneCrashReportDatabase(CrashReportDatabase* database,
@ -26,7 +26,7 @@ index 3aaaeee..d99fcb4 100644
static const time_t kSecondsInDay = 60 * 60 * 24;
diff --git third_party/crashpad/crashpad/client/prune_crash_reports.h third_party/crashpad/crashpad/client/prune_crash_reports.h
index 6dac5f3..34f5ee1 100644
index 6dac5f3002b3..34f5ee111d3d 100644
--- third_party/crashpad/crashpad/client/prune_crash_reports.h
+++ third_party/crashpad/crashpad/client/prune_crash_reports.h
@@ -57,7 +57,8 @@ class PruneCondition {
@ -40,7 +40,7 @@ index 6dac5f3..34f5ee1 100644
virtual ~PruneCondition() {}
diff --git third_party/crashpad/crashpad/client/settings.cc third_party/crashpad/crashpad/client/settings.cc
index 15d16f2..5e8eadf 100644
index 15d16f2e0928..5e8eadfd3ad1 100644
--- third_party/crashpad/crashpad/client/settings.cc
+++ third_party/crashpad/crashpad/client/settings.cc
@@ -38,7 +38,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) {
@ -130,7 +130,7 @@ index 15d16f2..5e8eadf 100644
Settings::ScopedLockedFileHandle Settings::MakeScopedLockedFileHandle(
FileHandle file,
diff --git third_party/crashpad/crashpad/client/settings.h third_party/crashpad/crashpad/client/settings.h
index b64f74f..0c3c22e 100644
index b64f74fbaf28..0c3c22e215b6 100644
--- third_party/crashpad/crashpad/client/settings.h
+++ third_party/crashpad/crashpad/client/settings.h
@@ -102,6 +102,11 @@ class Settings {
@ -146,7 +146,7 @@ index b64f74f..0c3c22e 100644
struct Data;
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.h third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
index c769efe..daec6cd 100644
index c769efed5c54..daec6cd17f37 100644
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.h
@@ -89,7 +89,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate {
@ -177,7 +177,7 @@ index c769efe..daec6cd 100644
//! \brief Attempts to upload a crash report.
//!
diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc
index e6d05e2..93e5eb1 100644
index abc22bf3ef0c..05753af3c2a1 100644
--- third_party/crashpad/crashpad/handler/handler_main.cc
+++ third_party/crashpad/crashpad/handler/handler_main.cc
@@ -35,8 +35,10 @@

View File

@ -1,8 +1,8 @@
diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc
index c8b4275..05ca91e 100644
index 799d2925b21a..43f9173e5db2 100644
--- content/browser/frame_host/render_frame_host_manager.cc
+++ content/browser/frame_host/render_frame_host_manager.cc
@@ -1083,10 +1083,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
@@ -1072,10 +1072,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation(
// TODO(alexmos): This check should've been enforced earlier in the
// navigation, in chrome::Navigate(). Verify this, and then convert this to
// a CHECK and remove the fallback.
@ -18,7 +18,7 @@ index c8b4275..05ca91e 100644
return true;
}
@@ -1208,7 +1209,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
@@ -1197,7 +1198,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
// Double-check that the new SiteInstance is associated with the right
// BrowserContext.
@ -29,10 +29,10 @@ index c8b4275..05ca91e 100644
// If |new_instance| is a new SiteInstance for a subframe with an isolated
// origin, set its process reuse policy so that such subframes are
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index e226ba1..9c9c7cf 100644
index 507f728ffe5b..20c49cc25387 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -310,6 +310,13 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -316,6 +316,13 @@ class CONTENT_EXPORT ContentBrowserClient {
const GURL& current_url,
const GURL& new_url);
@ -47,7 +47,7 @@ index e226ba1..9c9c7cf 100644
// current SiteInstance, if it does not yet have a site.
virtual bool ShouldAssignSiteForURL(const GURL& url);
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
index 4ec655a..b937c20 100644
index 4ec655aa834c..b937c201ecf9 100644
--- extensions/browser/extension_host.cc
+++ extensions/browser/extension_host.cc
@@ -69,11 +69,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@ -117,7 +117,7 @@ index 4ec655a..b937c20 100644
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
index fea09ed..16f81b1 100644
index fea09edc247f..16f81b139476 100644
--- extensions/browser/extension_host.h
+++ extensions/browser/extension_host.h
@@ -51,11 +51,17 @@ class ExtensionHost : public DeferredStartRenderHost,
@ -150,18 +150,18 @@ index fea09ed..16f81b1 100644
// A weak pointer to the current or pending RenderViewHost. We don't access
// this through the host_contents because we want to deal with the pending
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
index 64cf7b0..e801fb0 100644
index 0c70794823d3..4922df0d5398 100644
--- extensions/browser/extensions_browser_client.h
+++ extensions/browser/extensions_browser_client.h
@@ -17,6 +17,7 @@
#include "extensions/common/view_type.h"
@@ -18,6 +18,7 @@
#include "services/service_manager/public/cpp/binder_registry.h"
class ExtensionFunctionRegistry;
+class GURL;
class PrefService;
namespace base {
@@ -48,6 +49,7 @@ class ComponentExtensionResourceManager;
@@ -49,6 +50,7 @@ class ComponentExtensionResourceManager;
class Extension;
class ExtensionCache;
class ExtensionError;
@ -169,7 +169,7 @@ index 64cf7b0..e801fb0 100644
class ExtensionHostDelegate;
class ExtensionPrefsObserver;
class ExtensionApiFrameIdMap;
@@ -102,6 +104,11 @@ class ExtensionsBrowserClient {
@@ -103,6 +105,11 @@ class ExtensionsBrowserClient {
virtual content::BrowserContext* GetOriginalContext(
content::BrowserContext* context) = 0;
@ -181,7 +181,7 @@ index 64cf7b0..e801fb0 100644
#if defined(OS_CHROMEOS)
// Returns a user id hash from |context| or an empty string if no hash could
// be extracted.
@@ -162,6 +169,14 @@ class ExtensionsBrowserClient {
@@ -163,6 +170,14 @@ class ExtensionsBrowserClient {
virtual std::unique_ptr<ExtensionHostDelegate>
CreateExtensionHostDelegate() = 0;
@ -197,10 +197,10 @@ index 64cf7b0..e801fb0 100644
// once each time the extensions system is loaded per browser_context. The
// implementation may wish to use the BrowserContext to record the current
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
index cb63e50..6e3eccd 100644
index 073efff20e05..7a7656206cef 100644
--- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc
@@ -347,9 +347,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
@@ -349,9 +349,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
return true; // TODO(kalman): return false here? It might break things...
DVLOG(1) << "CreateBackgroundHost " << extension->id();
@ -221,7 +221,7 @@ index cb63e50..6e3eccd 100644
OnBackgroundHostCreated(host);
return true;
diff --git extensions/browser/process_manager_factory.cc extensions/browser/process_manager_factory.cc
index e8929c5..5ae43b4 100644
index e8929c5da255..5ae43b4361a4 100644
--- extensions/browser/process_manager_factory.cc
+++ extensions/browser/process_manager_factory.cc
@@ -5,6 +5,7 @@

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/font_family_cache.h chrome/browser/font_family_cache.h
index 2961f37..2ef6a30 100644
index 9366134bfe8e..c85039bad70b 100644
--- chrome/browser/font_family_cache.h
+++ chrome/browser/font_family_cache.h
@@ -21,6 +21,8 @@ class Profile;

View File

@ -1,8 +1,8 @@
diff --git .gn .gn
index 441b8ac..c3fe3b1 100644
index 29d65d771249..eb61510004a7 100644
--- .gn
+++ .gn
@@ -271,6 +271,8 @@ exec_script_whitelist =
@@ -255,6 +255,8 @@ exec_script_whitelist =
# in the Chromium repo outside of //build.
"//build_overrides/build.gni",
@ -12,10 +12,10 @@ index 441b8ac..c3fe3b1 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index d274819..191ea00 100644
index 5fdb6c5f516c..654c28e9f3a0 100644
--- BUILD.gn
+++ BUILD.gn
@@ -170,6 +170,7 @@ group("gn_all") {
@@ -172,6 +172,7 @@ group("gn_all") {
if (!is_ios && !is_fuchsia) {
deps += [
"//cc:cc_unittests",
@ -24,7 +24,7 @@ index d274819..191ea00 100644
"//chrome/test:unit_tests",
"//components:components_browsertests",
diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni
index 982fbe8..e757be46 100644
index 982fbe8d3f0d..e757be4688f1 100644
--- build/config/win/visual_studio_version.gni
+++ build/config/win/visual_studio_version.gni
@@ -12,9 +12,8 @@ declare_args() {
@ -56,7 +56,7 @@ index 982fbe8..e757be46 100644
+ "studio path")
}
diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py
index 8150d3a..39441ef 100644
index 8150d3a4e4ac..39441ef7ae89 100644
--- build/toolchain/win/setup_toolchain.py
+++ build/toolchain/win/setup_toolchain.py
@@ -132,17 +132,21 @@ def _LoadToolchainEnv(cpu, sdk_dir):
@ -91,7 +91,7 @@ index 8150d3a..39441ef 100644
diff --git build/vs_toolchain.py build/vs_toolchain.py
index 3b2c727..60e4984 100755
index 93a04ceb27d0..05342d2707e9 100755
--- build/vs_toolchain.py
+++ build/vs_toolchain.py
@@ -79,11 +79,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
@ -114,10 +114,10 @@ index 3b2c727..60e4984 100755
# directory in order to run binaries locally, but they are needed in order
# to create isolates or the mini_installer. Copying them to the output
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index a7778f9..5e3eb75a 100644
index c9a9a3d95f29..41f3bd29d7dc 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -252,7 +252,7 @@ template("chrome_paks") {
@@ -248,7 +248,7 @@ template("chrome_paks") {
}
input_locales = locales
@ -127,10 +127,10 @@ index a7778f9..5e3eb75a 100644
if (is_mac) {
output_locales = locales_as_mac_outputs
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
index 2afab1a..c8791ea 100644
index 14a729a33cd4..3651ff58915c 100644
--- chrome/installer/mini_installer/BUILD.gn
+++ chrome/installer/mini_installer/BUILD.gn
@@ -128,7 +128,7 @@ template("generate_mini_installer") {
@@ -130,7 +130,7 @@ template("generate_mini_installer") {
inputs = [
"$chrome_dll_file",
"$root_out_dir/chrome.exe",

View File

@ -1,5 +1,5 @@
diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids
index 9a0f5ed..9de2636 100644
index ee0116d1852b..be1ec3e1c230 100644
--- tools/gritsettings/resource_ids
+++ tools/gritsettings/resource_ids
@@ -380,4 +380,11 @@

View File

@ -1,5 +1,5 @@
diff --git ui/base/ime/input_method_win.cc ui/base/ime/input_method_win.cc
index 3e33b5a..6b425cc 100644
index 3e33b5a74170..6b425cc0fbee 100644
--- ui/base/ime/input_method_win.cc
+++ ui/base/ime/input_method_win.cc
@@ -688,8 +688,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {

View File

@ -1,33 +1,20 @@
diff --git chrome/browser/ui/libgtkui/gtk_ui.cc chrome/browser/ui/libgtkui/gtk_ui.cc
index a38c6b8..bb4fa59 100644
index f45f2b1..dbabf1b 100644
--- chrome/browser/ui/libgtkui/gtk_ui.cc
+++ chrome/browser/ui/libgtkui/gtk_ui.cc
@@ -1053,7 +1053,11 @@ float GtkUi::GetRawDeviceScaleFactor() {
return display::Display::GetForcedDeviceScaleFactor();
@@ -92,6 +92,7 @@ namespace libgtkui {
namespace {
GdkScreen* screen = gdk_screen_get_default();
+#if GTK_MAJOR_VERSION == 3
gint scale = gtk_widget_get_scale_factor(fake_window_);
+#else
+ gint scale = 1;
// We would like this to be a feature flag, but GtkUi gets initialized
// earlier than the feature flag registry, so just use a simple bool.
// The reason for wanting a flag is so that we can release the GTK3
@@ -100,6 +101,7 @@ namespace {
// Since this was never really intended to be toggled by users, this
// is fine for now.
const bool kUseGtkNavButtonLayoutManager = true;
+#endif
gdouble resolution = gdk_screen_get_resolution(screen);
const float scale_factor =
resolution <= 0 ? scale : resolution * scale / kDefaultDPI;
diff --git ui/accessibility/platform/ax_platform_node_auralinux.cc ui/accessibility/platform/ax_platform_node_auralinux.cc
index c73d7a9..5fcc441 100644
--- ui/accessibility/platform/ax_platform_node_auralinux.cc
+++ ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -474,8 +474,12 @@ void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) {
atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDED);
if (data.HasState(ui::AX_STATE_FOCUSABLE))
atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE);
+#if defined(ATK_CHECK_VERSION)
+#if ATK_CHECK_VERSION(2, 11, 2)
if (data.HasState(ui::AX_STATE_HASPOPUP))
atk_state_set_add_state(atk_state_set, ATK_STATE_HAS_POPUP);
+#endif
+#endif
if (data.HasState(ui::AX_STATE_SELECTED))
atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTED);
if (data.HasState(ui::AX_STATE_SELECTABLE))
const double kDefaultDPI = 96;

View File

@ -1,118 +0,0 @@
diff --git chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h
index 18755d494cf3..3605076be5d1 100644
--- chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h
+++ chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h
@@ -8,6 +8,7 @@
#import <Cocoa/Cocoa.h>
#include <stddef.h>
+#include "base/mac/availability.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h"
#import "ui/base/cocoa/touch_bar_forward_declarations.h"
@@ -38,7 +39,7 @@ class AutofillPopupViewCocoaDelegate;
- (void)invalidateRow:(NSInteger)row;
// Creates and returns a touch bar if the popup is for credit cards.
-- (NSTouchBar*)makeTouchBar;
+- (NSTouchBar*)makeTouchBar API_AVAILABLE(macos(10.12.2));
@end
diff --git chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
index 46733a165a31..2d71d4446a36 100644
--- chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
+++ chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
@@ -178,7 +178,8 @@ - (void)drawRect:(NSRect)dirtyRect {
#pragma mark NSTouchBarDelegate implementation:
- (NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar
- makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier {
+ makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier
+ API_AVAILABLE(macos(10.12.2)) {
if (![identifier hasSuffix:kCreditCardItemsTouchId])
return nil;
diff --git chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa_unittest.mm chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa_unittest.mm
index aebb22367472..2e6d6be61b5f 100644
--- chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa_unittest.mm
+++ chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa_unittest.mm
@@ -110,31 +110,27 @@ void SetLineCount(int line_count) {
// Tests to check if the touch bar shows up properly.
TEST_F(AutofillPopupViewCocoaUnitTest, CreditCardAutofillTouchBar) {
- if (!base::mac::IsAtLeastOS10_12())
- return;
-
- // Touch bar shouldn't appear if the popup is not for credit cards.
- autofill_popup_controller_.SetIsCreditCardField(false);
- EXPECT_FALSE([view_ makeTouchBar]);
-
- // Touch bar shouldn't appear if the popup is empty.
- autofill_popup_controller_.SetIsCreditCardField(true);
- SetLineCount(0);
- EXPECT_FALSE([view_ makeTouchBar]);
-
- autofill_popup_controller_.SetIsCreditCardField(true);
- SetLineCount(3);
- NSTouchBar* touch_bar = [view_ makeTouchBar];
- EXPECT_TRUE(touch_bar);
- EXPECT_TRUE([[touch_bar customizationIdentifier]
- isEqual:ui::GetTouchBarId(kCreditCardAutofillTouchBarId)]);
+ if (@available(macOS 10.12.2, *)) {
+ // Touch bar shouldn't appear if the popup is not for credit cards.
+ autofill_popup_controller_.SetIsCreditCardField(false);
+ EXPECT_FALSE([view_ makeTouchBar]);
+
+ // Touch bar shouldn't appear if the popup is empty.
+ autofill_popup_controller_.SetIsCreditCardField(true);
+ SetLineCount(0);
+ EXPECT_FALSE([view_ makeTouchBar]);
+
+ autofill_popup_controller_.SetIsCreditCardField(true);
+ SetLineCount(3);
+ NSTouchBar* touch_bar = [view_ makeTouchBar];
+ EXPECT_TRUE(touch_bar);
+ EXPECT_TRUE([[touch_bar customizationIdentifier]
+ isEqual:ui::GetTouchBarId(kCreditCardAutofillTouchBarId)]);
+ }
}
-// Tests that the touch bar logs into the histogram correctly.
+// Tests that the touch bar histogram is logged correctly.
TEST_F(AutofillPopupViewCocoaUnitTest, CreditCardAutofillTouchBarMetric) {
- if (!base::mac::IsAtLeastOS10_12())
- return;
-
{
base::HistogramTester histogram_tester;
[view_ acceptCreditCard:nil];
diff --git chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
index 5378abc9cc2a..f0e7d9e8c86c 100644
--- chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
+++ chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
@@ -235,7 +235,10 @@ - (void)loadView {
}
- (NSTouchBar*)makeTouchBar {
- return [touchBarController_ makeTouchBar];
+ if (@available(macOS 10.12.2, *))
+ return [touchBarController_ makeTouchBar];
+
+ return nil;
}
- (void)ensureContentsVisibleInSuperview:(NSView*)superview {
diff --git chrome/browser/ui/cocoa/web_textfield_touch_bar_controller.h chrome/browser/ui/cocoa/web_textfield_touch_bar_controller.h
index c3dc305aa48e..d50a2689d9de 100644
--- chrome/browser/ui/cocoa/web_textfield_touch_bar_controller.h
+++ chrome/browser/ui/cocoa/web_textfield_touch_bar_controller.h
@@ -28,7 +28,7 @@
- (void)showCreditCardAutofillForPopupView:(AutofillPopupViewCocoa*)popupView;
// Creates and returns a touch bar.
-- (NSTouchBar*)makeTouchBar;
+- (NSTouchBar*)makeTouchBar API_AVAILABLE(macos(10.12.2));
@end

View File

@ -1,8 +1,8 @@
diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h
index 83c3191..c4c1290a 100644
index a118917ea1cc..5c89a01e1019 100644
--- base/message_loop/message_loop.h
+++ base/message_loop/message_loop.h
@@ -291,6 +291,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
@@ -278,6 +278,16 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
void AddTaskObserver(TaskObserver* task_observer);
void RemoveTaskObserver(TaskObserver* task_observer);
@ -16,11 +16,11 @@ index 83c3191..c4c1290a 100644
+ }
+#endif // OS_WIN
+
// Returns true if the message loop has high resolution timers enabled.
// Provided for testing.
bool HasHighResolutionTasks();
@@ -427,6 +437,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
// insider a (accidentally induced?) nested message pump.
// Returns true if the message loop is "idle". Provided for testing.
bool IsIdleForTesting();
@@ -413,6 +423,12 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate,
// need to be checked in conditionals).
bool nestable_tasks_allowed_;
+#if defined(OS_WIN)
@ -33,7 +33,7 @@ index 83c3191..c4c1290a 100644
// if type_ is TYPE_CUSTOM and pump_ is null.
MessagePumpFactoryCallback pump_factory_;
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
index 6f48da1..e427941 100644
index 6f48da1c744e..e427941bfd06 100644
--- base/message_loop/message_pump_win.cc
+++ base/message_loop/message_pump_win.cc
@@ -366,20 +366,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {

View File

@ -1,5 +1,5 @@
diff --git net/base/network_delegate.h net/base/network_delegate.h
index 79a94d6..19af0d1 100644
index 22d22d03554a..c9a1c6df8f1b 100644
--- net/base/network_delegate.h
+++ net/base/network_delegate.h
@@ -16,6 +16,7 @@
@ -22,10 +22,10 @@ index 79a94d6..19af0d1 100644
THREAD_CHECKER(thread_checker_);
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
index 7a776d3..84c0189 100644
index 9112c4467cb2..4298ab28eab1 100644
--- net/url_request/url_request_job.cc
+++ net/url_request/url_request_job.cc
@@ -532,6 +532,12 @@ void URLRequestJob::NotifyHeadersComplete() {
@@ -531,6 +531,12 @@ void URLRequestJob::NotifyHeadersComplete() {
DCHECK(!source_stream_);
source_stream_ = SetUpSourceStream();

View File

@ -1,5 +1,5 @@
diff --git net/cert/ct_policy_enforcer.cc net/cert/ct_policy_enforcer.cc
index 0dd6a0d..8bc6502d 100644
index 0dd6a0d6bc0c..8bc6502d1e6f 100644
--- net/cert/ct_policy_enforcer.cc
+++ net/cert/ct_policy_enforcer.cc
@@ -35,15 +35,6 @@ namespace net {
@ -33,7 +33,7 @@ index 0dd6a0d..8bc6502d 100644
+
} // namespace net
diff --git net/cert/ct_policy_enforcer.h net/cert/ct_policy_enforcer.h
index b594cba..285eae8 100644
index b594cba1a6fc..285eae814c50 100644
--- net/cert/ct_policy_enforcer.h
+++ net/cert/ct_policy_enforcer.h
@@ -42,6 +42,17 @@ class NET_EXPORT CTPolicyEnforcer {
@ -55,7 +55,7 @@ index b594cba..285eae8 100644
} // namespace net
diff --git net/http/transport_security_state.cc net/http/transport_security_state.cc
index 4ffe9e8..013cea5 100644
index 718c70b8f865..0973f4ac142c 100644
--- net/http/transport_security_state.cc
+++ net/http/transport_security_state.cc
@@ -1550,8 +1550,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
@ -72,7 +72,7 @@ index 4ffe9e8..013cea5 100644
// We consider built-in information to be timely for 10 weeks.
return (base::Time::Now() - build_time).InDays() < 70 /* 10 weeks */;
diff --git net/http/transport_security_state.h net/http/transport_security_state.h
index 5e75551..1d1ca02 100644
index b4bab0db79db..6c11351b43ba 100644
--- net/http/transport_security_state.h
+++ net/http/transport_security_state.h
@@ -574,6 +574,10 @@ class NET_EXPORT TransportSecurityState {

View File

@ -1,10 +1,10 @@
diff --git net/url_request/url_request.h net/url_request/url_request.h
index e529c37..9039974 100644
index ae6bba1cdfa7..6fe1172b01b8 100644
--- net/url_request/url_request.h
+++ net/url_request/url_request.h
@@ -667,10 +667,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
return traffic_annotation_;
}
@@ -681,10 +681,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
// called with a response from the server.
void SetResponseHeadersCallback(ResponseHeadersCallback callback);
- protected:
// Allow the URLRequestJob class to control the is_pending() flag.

View File

@ -1,5 +1,5 @@
diff --git BUILD.gn BUILD.gn
index 80a258e..7f343f1 100644
index f268a0c3f..8767aed1d 100644
--- BUILD.gn
+++ BUILD.gn
@@ -227,6 +227,10 @@ static_library("pdfium") {
@ -14,10 +14,10 @@ index 80a258e..7f343f1 100644
static_library("test_support") {
diff --git fpdfsdk/fpdfview.cpp fpdfsdk/fpdfview.cpp
index 7dbaf7f..3b41421 100644
index e93e8bcd5..c003f9f9b 100644
--- fpdfsdk/fpdfview.cpp
+++ fpdfsdk/fpdfview.cpp
@@ -37,6 +37,7 @@
@@ -38,6 +38,7 @@
#include "fpdfsdk/fsdk_define.h"
#include "fpdfsdk/fsdk_pauseadapter.h"
#include "fpdfsdk/javascript/ijs_runtime.h"
@ -25,7 +25,7 @@ index 7dbaf7f..3b41421 100644
#include "public/fpdf_edit.h"
#include "public/fpdf_ext.h"
#include "public/fpdf_progressive.h"
@@ -419,6 +420,7 @@ DLLEXPORT void STDCALL FPDF_DestroyLibrary() {
@@ -480,6 +481,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
CPDF_ModuleMgr::Destroy();
CFX_GEModule::Destroy();

View File

@ -1,5 +1,5 @@
diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h
index 95656cd..35f26f1 100644
index 24302aa9a63b..ba5c08bf5892 100644
--- content/public/common/common_param_traits_macros.h
+++ content/public/common/common_param_traits_macros.h
@@ -205,6 +205,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
@ -11,10 +11,10 @@ index 95656cd..35f26f1 100644
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc
index 767e91c..34f59fe 100644
index a9c7b7d8c3ae..7c9d26fb223f 100644
--- content/public/common/web_preferences.cc
+++ content/public/common/web_preferences.cc
@@ -171,6 +171,7 @@ WebPreferences::WebPreferences()
@@ -170,6 +170,7 @@ WebPreferences::WebPreferences()
spatial_navigation_enabled(false),
use_solid_color_scrollbars(false),
navigate_on_drag_drop(true),
@ -23,7 +23,7 @@ index 767e91c..34f59fe 100644
record_whole_document(false),
cookie_enabled(true),
diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h
index 5012952..ed17a57 100644
index 1e24ea16ae51..2c4062d42992 100644
--- content/public/common/web_preferences.h
+++ content/public/common/web_preferences.h
@@ -191,6 +191,7 @@ struct CONTENT_EXPORT WebPreferences {
@ -35,10 +35,10 @@ index 5012952..ed17a57 100644
bool record_whole_document;
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
index f26cc78..fab85a3 100644
index 344e89232ca7..c74e5c5432ed 100644
--- content/renderer/render_view_impl.cc
+++ content/renderer/render_view_impl.cc
@@ -1317,6 +1317,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
@@ -1309,6 +1309,8 @@ void RenderViewImpl::ApplyWebPreferencesInternal(
blink::WebView* web_view,
CompositorDependencies* compositor_deps) {
ApplyWebPreferences(prefs, web_view);

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/cocoa/applescript/tab_applescript.mm chrome/browser/ui/cocoa/applescript/tab_applescript.mm
index 0cd84f3..2f872dd 100644
index 0cd84f38c229..2f872dd3dfe2 100644
--- chrome/browser/ui/cocoa/applescript/tab_applescript.mm
+++ chrome/browser/ui/cocoa/applescript/tab_applescript.mm
@@ -9,7 +9,6 @@
@ -41,7 +41,7 @@ index 0cd84f3..2f872dd 100644
- (void)handlesSaveScriptCommand:(NSScriptCommand*)command {
diff --git chrome/common/chrome_utility_printing_messages.h chrome/common/chrome_utility_printing_messages.h
index f5712a7..11c0366 100644
index f5712a7a5bb8..11c03661412b 100644
--- chrome/common/chrome_utility_printing_messages.h
+++ chrome/common/chrome_utility_printing_messages.h
@@ -26,7 +26,6 @@
@ -61,10 +61,10 @@ index f5712a7..11c0366 100644
IPC_STRUCT_TRAITS_MEMBER(printer_capabilities)
IPC_STRUCT_TRAITS_MEMBER(caps_mime_type)
diff --git components/printing/common/print_messages.cc components/printing/common/print_messages.cc
index de03634..76ee3a7 100644
index 4a7c94d1cdd0..7bf3e6ae072c 100644
--- components/printing/common/print_messages.cc
+++ components/printing/common/print_messages.cc
@@ -105,7 +105,6 @@ void PrintMsg_PrintPages_Params::Reset() {
@@ -107,7 +107,6 @@ void PrintMsg_PrintPages_Params::Reset() {
pages = std::vector<int>();
}
@ -72,16 +72,16 @@ index de03634..76ee3a7 100644
PrintHostMsg_RequestPrintPreview_Params::
PrintHostMsg_RequestPrintPreview_Params()
: is_modifiable(false),
@@ -127,4 +126,3 @@ PrintHostMsg_SetOptionsFromDocument_Params::
@@ -129,4 +128,3 @@ PrintHostMsg_SetOptionsFromDocument_Params::
PrintHostMsg_SetOptionsFromDocument_Params::
~PrintHostMsg_SetOptionsFromDocument_Params() {
}
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h
index fd39591..fbeea6d 100644
index f9b1daf905f2..971b92bccfdc 100644
--- components/printing/common/print_messages.h
+++ components/printing/common/print_messages.h
@@ -74,7 +74,6 @@ struct PrintMsg_PrintPages_Params {
@@ -76,7 +76,6 @@ struct PrintMsg_PrintPages_Params {
std::vector<int> pages;
};
@ -89,7 +89,7 @@ index fd39591..fbeea6d 100644
struct PrintHostMsg_RequestPrintPreview_Params {
PrintHostMsg_RequestPrintPreview_Params();
~PrintHostMsg_RequestPrintPreview_Params();
@@ -93,7 +92,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params {
@@ -95,7 +94,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params {
printing::DuplexMode duplex;
printing::PageRanges page_ranges;
};
@ -97,7 +97,7 @@ index fd39591..fbeea6d 100644
#endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
@@ -173,7 +171,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange)
@@ -180,7 +178,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange)
IPC_STRUCT_TRAITS_MEMBER(to)
IPC_STRUCT_TRAITS_END()
@ -105,7 +105,7 @@ index fd39591..fbeea6d 100644
IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params)
IPC_STRUCT_TRAITS_MEMBER(is_modifiable)
IPC_STRUCT_TRAITS_MEMBER(webnode_only)
@@ -194,7 +191,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params)
@@ -201,7 +198,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params)
// Specifies page range to be printed.
IPC_STRUCT_TRAITS_MEMBER(page_ranges)
IPC_STRUCT_TRAITS_END()
@ -113,7 +113,7 @@ index fd39591..fbeea6d 100644
IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins)
IPC_STRUCT_TRAITS_MEMBER(content_width)
@@ -214,7 +210,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params)
@@ -221,7 +217,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintMsg_PrintPages_Params)
IPC_STRUCT_TRAITS_MEMBER(pages)
IPC_STRUCT_TRAITS_END()
@ -121,7 +121,7 @@ index fd39591..fbeea6d 100644
// Parameters to describe a rendered document.
IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params)
// A shared memory handle to metafile data.
@@ -265,7 +260,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params)
@@ -272,7 +267,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params)
// Indicates whether the existing preview data needs to be cleared or not.
IPC_STRUCT_MEMBER(bool, clear_preview_data)
IPC_STRUCT_END()
@ -129,7 +129,7 @@ index fd39591..fbeea6d 100644
// Parameters to describe a rendered page.
IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintPage_Params)
@@ -308,22 +302,20 @@ IPC_STRUCT_END()
@@ -315,22 +309,20 @@ IPC_STRUCT_END()
// Messages sent from the browser to the renderer.
@ -154,7 +154,7 @@ index fd39591..fbeea6d 100644
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
// Tells the RenderFrame to switch the CSS to print media type, renders every
@@ -341,13 +333,11 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
@@ -348,13 +340,11 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone,
// Tells the RenderFrame whether printing is enabled or not.
IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */)
@ -168,7 +168,7 @@ index fd39591..fbeea6d 100644
// Messages sent from the renderer to the browser.
@@ -404,7 +394,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten,
@@ -411,7 +401,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten,
int /* page count */)
#endif // defined(OS_ANDROID)
@ -176,7 +176,7 @@ index fd39591..fbeea6d 100644
// Asks the browser to do print preview.
IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview,
PrintHostMsg_RequestPrintPreview_Params /* params */)
@@ -438,7 +427,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
@@ -445,7 +434,6 @@ IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel,
// The memory handle in this message is already valid in the browser process.
IPC_MESSAGE_ROUTED1(PrintHostMsg_MetafileReadyForPrinting,
PrintHostMsg_DidPreviewDocument_Params /* params */)
@ -184,7 +184,7 @@ index fd39591..fbeea6d 100644
// This is sent when there are invalid printer settings.
IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
@@ -447,7 +435,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
@@ -454,7 +442,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError)
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed,
int /* document cookie */)
@ -192,15 +192,15 @@ index fd39591..fbeea6d 100644
// Tell the browser print preview failed.
IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintPreviewFailed,
int /* document cookie */)
@@ -474,4 +461,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
@@ -481,4 +468,3 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
// Notify the browser to set print presets based on source PDF document.
IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
PrintHostMsg_SetOptionsFromDocument_Params /* params */)
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
diff --git components/printing/renderer/print_web_view_helper.cc components/printing/renderer/print_web_view_helper.cc
index 3c9dfc0..e6a3236 100644
--- components/printing/renderer/print_web_view_helper.cc
+++ components/printing/renderer/print_web_view_helper.cc
diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc
index 18469953e9f0..bb94f44e58b0 100644
--- components/printing/renderer/print_render_frame_helper.cc
+++ components/printing/renderer/print_render_frame_helper.cc
@@ -320,7 +320,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
return plugin && plugin->SupportsPaginatedPrint();
}
@ -217,7 +217,7 @@ index 3c9dfc0..e6a3236 100644
#if BUILDFLAG(ENABLE_PRINTING)
// Disable scaling when either:
@@ -398,7 +396,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
@@ -399,7 +397,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame,
}
#endif
@ -233,7 +233,7 @@ index 3c9dfc0..e6a3236 100644
// Helper function to scale and round an integer value with a double valued
// scaling.
@@ -938,6 +934,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderFrame* render_frame,
@@ -977,6 +973,7 @@ PrintRenderFrameHelper::PrintRenderFrameHelper(
print_for_preview_(false),
delegate_(std::move(delegate)),
print_node_in_progress_(false),
@ -241,7 +241,7 @@ index 3c9dfc0..e6a3236 100644
is_loading_(false),
is_scripted_preview_delayed_(false),
ipc_nesting_level_(0),
@@ -1000,10 +997,8 @@ void PrintWebViewHelper::ScriptedPrint(bool user_initiated) {
@@ -1038,10 +1035,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
return;
if (g_is_preview_enabled) {
@ -252,7 +252,7 @@ index 3c9dfc0..e6a3236 100644
} else {
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
Print(web_frame, blink::WebNode(), true /* is_scripted? */);
@@ -1029,14 +1024,10 @@ bool PrintWebViewHelper::OnMessageReceived(const IPC::Message& message) {
@@ -1067,14 +1062,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages)
IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog)
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
@ -267,65 +267,65 @@ index 3c9dfc0..e6a3236 100644
IPC_MESSAGE_HANDLER(PrintMsg_SetPrintingEnabled, OnSetPrintingEnabled)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -1084,7 +1075,6 @@ void PrintWebViewHelper::OnPrintForSystemDialog() {
@@ -1122,7 +1113,6 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() {
}
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
-#if BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintWebViewHelper::OnPrintForPrintPreview(
void PrintRenderFrameHelper::OnPrintForPrintPreview(
const base::DictionaryValue& job_settings) {
CHECK_LE(ipc_nesting_level_, 1);
@@ -1144,7 +1134,6 @@ void PrintWebViewHelper::OnPrintForPrintPreview(
@@ -1182,7 +1172,6 @@ void PrintRenderFrameHelper::OnPrintForPrintPreview(
DidFinishPrinting(FAIL_PRINT);
}
}
-#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintWebViewHelper::GetPageSizeAndContentAreaFromPageLayout(
void PrintRenderFrameHelper::GetPageSizeAndContentAreaFromPageLayout(
const PageSizeMargins& page_layout_in_points,
@@ -1169,7 +1158,6 @@ void PrintWebViewHelper::UpdateFrameMarginsCssInfo(
@@ -1207,7 +1196,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo(
ignore_css_margins_ = (margins_type != DEFAULT_MARGINS);
}
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
void PrintRenderFrameHelper::OnPrintPreview(
const base::DictionaryValue& settings) {
if (ipc_nesting_level_ > 1)
return;
@@ -1361,7 +1349,7 @@ bool PrintWebViewHelper::CreatePreviewDocument() {
@@ -1399,7 +1387,7 @@ bool PrintRenderFrameHelper::CreatePreviewDocument() {
return true;
}
-#if !defined(OS_MACOSX) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
+#if !defined(OS_MACOSX)
bool PrintWebViewHelper::RenderPreviewPage(
bool PrintRenderFrameHelper::RenderPreviewPage(
int page_number,
const PrintMsg_Print_Params& print_params) {
@@ -1390,7 +1378,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
@@ -1429,7 +1417,7 @@ bool PrintRenderFrameHelper::RenderPreviewPage(
}
return PreviewPageRendered(page_number, draft_metafile.get());
}
-#endif // !defined(OS_MACOSX) && BUILDFLAG(ENABLE_PRINT_PREVIEW)
+#endif // !defined(OS_MACOSX)
bool PrintWebViewHelper::FinalizePrintReadyDocument() {
bool PrintRenderFrameHelper::FinalizePrintReadyDocument() {
DCHECK(!is_print_ready_metafile_sent_);
@@ -1420,7 +1408,6 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
@@ -1458,7 +1446,6 @@ bool PrintRenderFrameHelper::FinalizePrintReadyDocument() {
Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
return true;
}
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintWebViewHelper::OnPrintingDone(bool success) {
void PrintRenderFrameHelper::OnPrintingDone(bool success) {
if (ipc_nesting_level_ > 1)
@@ -1435,7 +1422,6 @@ void PrintWebViewHelper::OnSetPrintingEnabled(bool enabled) {
@@ -1473,7 +1460,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) {
is_printing_enabled_ = enabled;
}
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
if (ipc_nesting_level_ > 1)
return;
@@ -1446,7 +1432,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
@@ -1484,7 +1470,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
if (!plugin.IsNull()) {
@ -335,15 +335,15 @@ index 3c9dfc0..e6a3236 100644
return;
}
print_preview_context_.InitWithFrame(frame);
@@ -1454,7 +1442,6 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool has_selection) {
@@ -1492,7 +1480,6 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
? PRINT_PREVIEW_USER_INITIATED_SELECTION
: PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME);
}
-#endif
bool PrintWebViewHelper::IsPrintingEnabled() const {
bool PrintRenderFrameHelper::IsPrintingEnabled() const {
return is_printing_enabled_;
@@ -1476,11 +1463,9 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
@@ -1514,11 +1501,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
print_node_in_progress_ = true;
@ -356,7 +356,7 @@ index 3c9dfc0..e6a3236 100644
} else {
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
// Make a copy of the node, in case RenderView::OnContextMenuClosed() resets
@@ -1570,7 +1555,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
@@ -1608,7 +1593,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
}
break;
@ -364,7 +364,7 @@ index 3c9dfc0..e6a3236 100644
case FAIL_PREVIEW:
if (!is_print_ready_metafile_sent_) {
if (notify_browser_of_print_failure_) {
@@ -1587,7 +1571,6 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
@@ -1625,7 +1609,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
cookie));
print_preview_context_.Failed(false);
break;
@ -372,43 +372,43 @@ index 3c9dfc0..e6a3236 100644
}
prep_frame_view_.reset();
print_pages_params_.reset();
@@ -1720,7 +1703,6 @@ bool PrintWebViewHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
@@ -1757,7 +1740,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
return true;
}
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
bool PrintWebViewHelper::SetOptionsFromPdfDocument(
bool PrintRenderFrameHelper::SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options) {
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
@@ -1827,7 +1809,6 @@ bool PrintWebViewHelper::UpdatePrintSettings(
@@ -1864,7 +1846,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings(
print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS);
return false;
}
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
void PrintWebViewHelper::GetPrintSettingsFromUser(
@@ -1985,7 +1966,6 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
void PrintRenderFrameHelper::GetPrintSettingsFromUser(
@@ -2023,7 +2004,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToSharedMem(
return true;
}
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintWebViewHelper::ShowScriptedPrintPreview() {
void PrintRenderFrameHelper::ShowScriptedPrintPreview() {
if (is_scripted_preview_delayed_) {
is_scripted_preview_delayed_ = false;
@@ -2116,7 +2096,6 @@ bool PrintWebViewHelper::PreviewPageRendered(int page_number,
@@ -2154,7 +2134,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(int page_number,
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params));
return true;
}
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
PrintWebViewHelper::PrintPreviewContext::PrintPreviewContext()
PrintRenderFrameHelper::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 fc5e964..ed384ba 100644
--- components/printing/renderer/print_web_view_helper.h
+++ components/printing/renderer/print_web_view_helper.h
@@ -152,10 +152,8 @@ class PrintWebViewHelper
diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h
index 6a52cd8bb78e..d5ca1ceb264d 100644
--- components/printing/renderer/print_render_frame_helper.h
+++ components/printing/renderer/print_render_frame_helper.h
@@ -156,10 +156,8 @@ class PrintRenderFrameHelper
OK,
FAIL_PRINT_INIT,
FAIL_PRINT,
@ -419,7 +419,7 @@ index fc5e964..ed384ba 100644
};
enum PrintPreviewErrorBuckets {
@@ -191,10 +189,8 @@ class PrintWebViewHelper
@@ -196,10 +194,8 @@ class PrintRenderFrameHelper
void OnPrintForSystemDialog();
void OnPrintForPrintPreview(const base::DictionaryValue& job_settings);
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING)
@ -430,7 +430,7 @@ index fc5e964..ed384ba 100644
void OnPrintingDone(bool success);
// Get |page_size| and |content_area| information from
@@ -207,7 +203,6 @@ class PrintWebViewHelper
@@ -212,7 +208,6 @@ class PrintRenderFrameHelper
// Update |ignore_css_margins_| based on settings.
void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings);
@ -438,7 +438,7 @@ index fc5e964..ed384ba 100644
// Prepare frame for creating preview document.
void PrepareFrameForPreviewDocument();
@@ -224,7 +219,6 @@ class PrintWebViewHelper
@@ -229,7 +224,6 @@ class PrintRenderFrameHelper
// Finalize the print ready preview document.
bool FinalizePrintReadyDocument();
@ -446,7 +446,7 @@ index fc5e964..ed384ba 100644
// Enable/Disable printing.
void OnSetPrintingEnabled(bool enabled);
@@ -254,7 +248,6 @@ class PrintWebViewHelper
@@ -259,7 +253,6 @@ class PrintRenderFrameHelper
const blink::WebNode& node,
int* number_of_pages);
@ -454,7 +454,7 @@ index fc5e964..ed384ba 100644
// Set options for print preset from source PDF document.
bool SetOptionsFromPdfDocument(
PrintHostMsg_SetOptionsFromDocument_Params* options);
@@ -265,7 +258,6 @@ class PrintWebViewHelper
@@ -270,7 +263,6 @@ class PrintRenderFrameHelper
bool UpdatePrintSettings(blink::WebLocalFrame* frame,
const blink::WebNode& node,
const base::DictionaryValue& passed_job_settings);
@ -462,7 +462,7 @@ index fc5e964..ed384ba 100644
#if BUILDFLAG(ENABLE_BASIC_PRINTING)
// Get final print settings from the user.
@@ -367,7 +359,6 @@ class PrintWebViewHelper
@@ -374,7 +366,6 @@ class PrintRenderFrameHelper
bool IsScriptInitiatedPrintAllowed(blink::WebLocalFrame* frame,
bool user_initiated);
@ -470,7 +470,7 @@ index fc5e964..ed384ba 100644
// Shows scripted print preview when options from plugin are available.
void ShowScriptedPrintPreview();
@@ -385,7 +376,6 @@ class PrintWebViewHelper
@@ -392,7 +383,6 @@ class PrintRenderFrameHelper
// |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);
@ -478,7 +478,7 @@ index fc5e964..ed384ba 100644
void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings);
@@ -545,6 +535,7 @@ class PrintWebViewHelper
@@ -553,6 +543,7 @@ class PrintRenderFrameHelper
ScriptingThrottler scripting_throttler_;
bool print_node_in_progress_;
@ -486,23 +486,23 @@ index fc5e964..ed384ba 100644
PrintPreviewContext print_preview_context_;
bool is_loading_;
bool is_scripted_preview_delayed_;
diff --git components/printing/renderer/print_web_view_helper_mac.mm components/printing/renderer/print_web_view_helper_mac.mm
index a00cfa0..4608dc0 100644
--- components/printing/renderer/print_web_view_helper_mac.mm
+++ components/printing/renderer/print_web_view_helper_mac.mm
@@ -76,7 +76,6 @@ void PrintWebViewHelper::PrintPagesInternal(
diff --git components/printing/renderer/print_render_frame_helper_mac.mm components/printing/renderer/print_render_frame_helper_mac.mm
index 42149955ee2c..ca6cb42ffce1 100644
--- components/printing/renderer/print_render_frame_helper_mac.mm
+++ components/printing/renderer/print_render_frame_helper_mac.mm
@@ -76,7 +76,6 @@ void PrintRenderFrameHelper::PrintPagesInternal(
}
}
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
bool PrintWebViewHelper::RenderPreviewPage(
bool PrintRenderFrameHelper::RenderPreviewPage(
int page_number,
const PrintMsg_Print_Params& print_params) {
@@ -115,7 +114,6 @@ bool PrintWebViewHelper::RenderPreviewPage(
@@ -115,7 +114,6 @@ bool PrintRenderFrameHelper::RenderPreviewPage(
}
return PreviewPageRendered(page_number, draft_metafile.get());
}
-#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
int page_number,
void PrintRenderFrameHelper::RenderPage(const PrintMsg_Print_Params& params,
int page_number,

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
index 5616013..6d3737d 100644
index a884d985f16f..2d4df5e9b13a 100644
--- chrome/browser/printing/print_job_worker.cc
+++ chrome/browser/printing/print_job_worker.cc
@@ -125,6 +125,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id,
@ -11,7 +11,7 @@ index 5616013..6d3737d 100644
PrintJobWorker::~PrintJobWorker() {
diff --git printing/printing_context.h printing/printing_context.h
index 7054654..ed5b664 100644
index 7054654260a7..ed5b664f86a7 100644
--- printing/printing_context.h
+++ printing/printing_context.h
@@ -127,6 +127,13 @@ class PRINTING_EXPORT PrintingContext {

View File

@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/render_view_host_impl.h content/browser/renderer_host/render_view_host_impl.h
index 7e0cc57..66916d4 100644
index d9667c321aab..1cee78df71d3 100644
--- content/browser/renderer_host/render_view_host_impl.h
+++ content/browser/renderer_host/render_view_host_impl.h
@@ -155,6 +155,7 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,

View File

@ -1,5 +1,5 @@
diff --git ui/latency/latency_histogram_macros.h ui/latency/latency_histogram_macros.h
index 77e3eee..f8dd635 100644
index 77e3eeef70ba..f8dd6350c120 100644
--- ui/latency/latency_histogram_macros.h
+++ ui/latency/latency_histogram_macros.h
@@ -10,8 +10,7 @@

Some files were not shown because too many files have changed in this diff Show More