Update to Chromium version 88.0.4324.0 (#827102)

- Mac: Xcode 12.2 and the MacOS 11.0 SDK are now required for building.
- MacOS 10.10 (Yosemite) is no longer supported (see https://crbug.com/1126056).
- Flash is no longer supported (see https://www.chromium.org/flash-roadmap).
This commit is contained in:
Marshall Greenblatt
2020-12-02 17:31:49 -05:00
parent 7d1d3c0206
commit a584bd187b
143 changed files with 1065 additions and 1312 deletions

View File

@ -425,6 +425,8 @@ static_library("libcef_static") {
"libcef/browser/alloy/alloy_content_browser_client.h",
"libcef/browser/audio_capturer.cc",
"libcef/browser/audio_capturer.h",
"libcef/browser/audio_loopback_stream_creator.cc",
"libcef/browser/audio_loopback_stream_creator.h",
"libcef/browser/browser_contents_delegate.cc",
"libcef/browser/browser_contents_delegate.h",
"libcef/browser/browser_context.cc",
@ -1187,6 +1189,9 @@ static_library("libcef_static") {
if (use_x11) {
sources += [
# Support for UI input events.
# Part of //ui/base/x:test_support which is testingonly.
"//ui/base/x/test/x11_ui_controls_test_helper.cc",
"//ui/base/x/test/x11_ui_controls_test_helper.h",
# Part of //ui/aura:test_support which is testingonly.
"//ui/aura/test/x11_event_sender.h",
# Part of //ui/views:test_support which is testingonly.
@ -1364,6 +1369,7 @@ repack("pak_extensions") {
"$root_gen_dir/extensions/extensions_renderer_resources.pak",
"$root_gen_dir/extensions/extensions_resources.pak",
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
"$root_gen_dir/ui/resources/webui_generated_resources.pak",
"$root_gen_dir/ui/resources/webui_resources.pak",
]
@ -1377,6 +1383,7 @@ repack("pak_extensions") {
"//extensions:extensions_renderer_resources",
"//extensions:extensions_resources_grd",
"//mojo/public/js:resources",
"//ui/resources:webui_generated_resources_grd",
"//ui/resources:webui_resources_grd",
]
@ -1428,10 +1435,10 @@ repack("pak") {
# Each input pak file should also have a deps line for completeness.
# Add associated .h files in the make_pack_header("resources") target.
sources = [
"$root_gen_dir/base/tracing/protos/tracing_proto_resources.pak",
"$root_gen_dir/chrome/browser_resources.pak",
"$root_gen_dir/chrome/dev_ui_browser_resources.pak",
"$root_gen_dir/chrome/net_internals_resources.pak",
"$root_gen_dir/chrome/print_preview_pdf_resources.pak",
"$root_gen_dir/chrome/print_preview_resources.pak",
"$root_gen_dir/chrome/common_resources.pak",
"$root_gen_dir/components/components_resources.pak",
@ -1448,11 +1455,11 @@ repack("pak") {
# the libcef_static target. Grit deps that generate .cc files must be
# listed both here and in the libcef_static target.
public_deps = [
"//base/tracing/protos:chrome_track_event_resources",
"//chrome/browser:dev_ui_browser_resources",
"//chrome/browser:resources",
"//chrome/browser/resources/net_internals:net_internals_resources",
"//chrome/browser/resources:print_preview_pdf_resources",
"//chrome/browser/resources:print_preview_resources",
"//chrome/browser/resources/print_preview:print_preview_resources",
"//chrome/common:resources",
"//components/resources:components_resources",
"//components/resources:dev_ui_components_resources",
@ -1498,13 +1505,13 @@ template("make_pack_header") {
make_pack_header("resources") {
header = "$root_out_dir/includes/include/cef_pack_resources.h"
inputs = [
"$root_gen_dir/base/tracing/protos/grit/tracing_proto_resources.h",
"$root_gen_dir/cef/grit/cef_resources.h",
"$root_gen_dir/chrome/grit/browser_resources.h",
"$root_gen_dir/chrome/grit/common_resources.h",
"$root_gen_dir/chrome/grit/component_extension_resources.h",
"$root_gen_dir/chrome/grit/dev_ui_browser_resources.h",
"$root_gen_dir/chrome/grit/net_internals_resources.h",
"$root_gen_dir/chrome/grit/print_preview_pdf_resources.h",
"$root_gen_dir/chrome/grit/print_preview_resources.h",
"$root_gen_dir/chrome/grit/renderer_resources.h",
"$root_gen_dir/components/grit/components_resources.h",
@ -1519,6 +1526,7 @@ make_pack_header("resources") {
"$root_gen_dir/net/grit/net_resources.h",
"$root_gen_dir/third_party/blink/public/resources/grit/blink_resources.h",
"$root_gen_dir/ui/resources/grit/ui_resources.h",
"$root_gen_dir/ui/resources/grit/webui_generated_resources.h",
"$root_gen_dir/ui/resources/grit/webui_resources.h",
"$root_gen_dir/ui/views/resources/grit/views_resources.h",
]
@ -1632,7 +1640,7 @@ if (is_mac) {
]
public_deps += [ "//v8" ]
if (use_v8_context_snapshot) {
sources += [ "$root_out_dir/v8_context_snapshot.bin" ]
sources += [ "$root_out_dir/$v8_context_snapshot_filename" ]
public_deps += [ "//tools/v8_context_snapshot" ]
}
}

View File

@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/87.0.4280.0'
'chromium_checkout': 'refs/tags/88.0.4324.0'
}

View File

@ -48,7 +48,7 @@
# libgtkglext1-dev (required by the cefclient target only)
#
# - MacOS requirements:
# Xcode 8 or newer building on MacOS 10.10 (Yosemite) or newer. Xcode 11.2
# Xcode 8 or newer building on MacOS 10.11 (El Capitan) or newer. Xcode 11.2
# and MacOS 10.14 are recommended. The Xcode command-line tools must also be
# installed. Only 64-bit builds are supported.
#

View File

@ -13,7 +13,6 @@
'include/base/cef_build.h',
'include/base/cef_callback.h',
'include/base/cef_callback_forward.h',
'include/base/cef_callback_helpers.h',
'include/base/cef_callback_list.h',
'include/base/cef_cancelable_callback.h',
'include/base/cef_lock.h',
@ -124,7 +123,6 @@
'libcef_dll_wrapper_sources_base': [
'libcef_dll/base/cef_atomicops_x86_gcc.cc',
'libcef_dll/base/cef_bind_helpers.cc',
'libcef_dll/base/cef_callback_helpers.cc',
'libcef_dll/base/cef_callback_internal.cc',
'libcef_dll/base/cef_lock.cc',
'libcef_dll/base/cef_lock_impl.cc',

View File

@ -311,7 +311,7 @@ if(OS_MAC)
# Find the newest available base SDK.
execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
foreach(OS_VERSION 10.15 10.14 10.13 10.12 10.11 10.10)
foreach(OS_VERSION 10.15 10.14 10.13 10.12 10.11)
set(SDK "${XCODE_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OS_VERSION}.sdk")
if(NOT "${CMAKE_OSX_SYSROOT}" AND EXISTS "${SDK}" AND IS_DIRECTORY "${SDK}")
set(CMAKE_OSX_SYSROOT ${SDK})
@ -319,7 +319,7 @@ if(OS_MAC)
endforeach()
# Target SDK.
set(CEF_TARGET_SDK "10.10")
set(CEF_TARGET_SDK "10.11")
list(APPEND CEF_COMPILER_FLAGS
-mmacosx-version-min=${CEF_TARGET_SDK}
)

View File

@ -1,93 +0,0 @@
// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
// Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// This defines helpful methods for dealing with Callbacks. Because Callbacks
// are implemented using templates, with a class per callback signature, adding
// methods to Callback<> itself is unattractive (lots of extra code gets
// generated). Instead, consider adding methods here.
//
// ResetAndReturn(&cb) is like cb.Reset() but allows executing a callback (via a
// copy) after the original callback is Reset(). This can be handy if Run()
// reads/writes the variable holding the Callback.
#ifndef CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_
#define CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_
#pragma once
#if defined(BASE_CALLBACK_HELPERS_H_)
// Do nothing if the Chromium header has already been included.
// This can happen in cases where Chromium code is used directly by the
// client application. When using Chromium code directly always include
// the Chromium header first to avoid type conflicts.
#elif defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "base/callback_helpers.h"
#else // !USING_CHROMIUM_INCLUDES
// The following is substantially similar to the Chromium implementation.
// If the Chromium implementation diverges the below implementation should be
// updated to match.
#include "include/base/cef_basictypes.h"
#include "include/base/cef_build.h"
#include "include/base/cef_callback.h"
#include "include/base/cef_macros.h"
namespace base {
template <typename Sig>
base::Callback<Sig> ResetAndReturn(base::Callback<Sig>* cb) {
base::Callback<Sig> ret(*cb);
cb->Reset();
return ret;
}
// ScopedClosureRunner is akin to scoped_ptr for Closures. It ensures that the
// Closure is executed and deleted no matter how the current scope exits.
class ScopedClosureRunner {
public:
ScopedClosureRunner();
explicit ScopedClosureRunner(const Closure& closure);
~ScopedClosureRunner();
void Reset();
void Reset(const Closure& closure);
Closure Release() WARN_UNUSED_RESULT;
private:
Closure closure_;
DISALLOW_COPY_AND_ASSIGN(ScopedClosureRunner);
};
} // namespace base
#endif // !USING_CHROMIUM_INCLUDES
#endif // CEF_INCLUDE_BASE_CEF_CALLBACK_HELPERS_H_

View File

@ -554,12 +554,7 @@ const LogSeverity LOG_DCHECK = LOG_INFO;
#define DCHECK_GE(val1, val2) DCHECK_OP(GE, >=, val1, val2)
#define DCHECK_GT(val1, val2) DCHECK_OP(GT, >, val1, val2)
#if defined(NDEBUG) && defined(OS_CHROMEOS)
#define NOTREACHED() \
LOG(ERROR) << "NOTREACHED() hit in " << __FUNCTION__ << ". "
#else
#define NOTREACHED() DCHECK(false)
#endif
// Redefine the standard assert to use our nice log files
#undef assert

View File

@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=f1b2b6203d45fdf76d72ea1e79fcef0bb2a26138$
// $hash=864f1dc749e0c3f80b7f50250b21beaad37f3ef4$
//
#ifndef CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_
@ -58,7 +58,7 @@ typedef struct _cef_web_plugin_info_t {
cef_base_ref_counted_t base;
///
// Returns the plugin name (i.e. Flash).
// Returns the plugin name.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t(CEF_CALLBACK* get_name)(

View File

@ -48,7 +48,7 @@ class CefBrowser;
class CefWebPluginInfo : public virtual CefBaseRefCounted {
public:
///
// Returns the plugin name (i.e. Flash).
// Returns the plugin name.
///
/*--cef()--*/
virtual CefString GetName() = 0;

View File

@ -1670,7 +1670,7 @@ typedef enum {
MENU_ID_ADD_TO_DICTIONARY = 206,
// Custom menu items originating from the renderer process. For example,
// plugin placeholder menu items or Flash menu items.
// plugin placeholder menu items.
MENU_ID_CUSTOM_FIRST = 220,
MENU_ID_CUSTOM_LAST = 250,

View File

@ -29,12 +29,11 @@
#include "libcef/features/runtime_checks.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback_helpers.h"
#include "base/command_line.h"
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/widget_messages.h"
#include "content/public/browser/desktop_media_id.h"
#include "content/public/browser/file_select_listener.h"
#include "content/public/browser/host_zoom_map.h"
@ -945,12 +944,6 @@ void AlloyBrowserHostImpl::RunFileChooser(
file_dialog_manager_->RunFileChooser(params, std::move(callback));
}
bool AlloyBrowserHostImpl::EmbedsFullscreenWidget() {
// When using windowless rendering do not allow Flash to create its own
// full- screen widget.
return IsWindowless();
}
void AlloyBrowserHostImpl::EnterFullscreenModeForTab(
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) {
@ -1548,8 +1541,7 @@ bool AlloyBrowserHostImpl::CheckMediaAccessPermission(
content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
blink::mojom::MediaStreamType type) {
// Check media access permission without prompting the user. This is called
// when loading the Pepper Flash plugin.
// Check media access permission without prompting the user.
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
return command_line->HasSwitch(switches::kEnableMediaStream);

View File

@ -286,7 +286,6 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
void RunFileChooser(content::RenderFrameHost* render_frame_host,
scoped_refptr<content::FileSelectListener> listener,
const blink::mojom::FileChooserParams& params) override;
bool EmbedsFullscreenWidget() override;
void EnterFullscreenModeForTab(
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) override;

View File

@ -716,10 +716,6 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
switches::kDisableScrollBounce,
switches::kDisableSpellChecking,
switches::kEnableSpeechInput,
switches::kEnableSystemFlash,
switches::kPpapiFlashArgs,
switches::kPpapiFlashPath,
switches::kPpapiFlashVersion,
switches::kUncaughtExceptionStackSize,
network::switches::kUnsafelyTreatInsecureOriginAsSecure,
};
@ -758,15 +754,6 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
#if defined(OS_LINUX)
if (process_type == switches::kZygoteProcess) {
// Propagate the following switches to the zygote command line (along with
// any associated values) if present in the browser command line.
static const char* const kSwitchNames[] = {
switches::kPpapiFlashPath,
switches::kPpapiFlashVersion,
};
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
base::size(kSwitchNames));
#if BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
if (!browser_cmd->HasSwitch(sandbox::policy::switches::kNoSandbox)) {
// Pass the Widevine CDM path to the Zygote process. See comments in
@ -1098,8 +1085,7 @@ AlloyContentBrowserClient::CreateLoginDelegate(
void AlloyContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
int frame_tree_node_id,
base::UkmSourceId ukm_source_id,
NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories,
ukm::SourceIdObj ukm_source_id,
NonNetworkURLLoaderFactoryMap* factories) {
if (!extensions::ExtensionsEnabled())
return;
@ -1116,7 +1102,6 @@ void AlloyContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
void AlloyContentBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories(
int render_process_id,
int render_frame_id,
NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories,
NonNetworkURLLoaderFactoryMap* factories) {
if (!extensions::ExtensionsEnabled())
return;
@ -1172,7 +1157,7 @@ bool AlloyContentBrowserClient::WillCreateURLLoaderFactory(
URLLoaderFactoryType type,
const url::Origin& request_initiator,
base::Optional<int64_t> navigation_id,
base::UkmSourceId ukm_source_id,
ukm::SourceIdObj ukm_source_id,
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
header_client,

View File

@ -150,13 +150,11 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
LoginAuthRequiredCallback auth_required_callback) override;
void RegisterNonNetworkNavigationURLLoaderFactories(
int frame_tree_node_id,
base::UkmSourceId ukm_source_id,
NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories,
ukm::SourceIdObj ukm_source_id,
NonNetworkURLLoaderFactoryMap* factories) override;
void RegisterNonNetworkSubresourceURLLoaderFactories(
int render_process_id,
int render_frame_id,
NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories,
NonNetworkURLLoaderFactoryMap* factories) override;
bool WillCreateURLLoaderFactory(
content::BrowserContext* browser_context,
@ -165,7 +163,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
URLLoaderFactoryType type,
const url::Origin& request_initiator,
base::Optional<int64_t> navigation_id,
base::UkmSourceId ukm_source_id,
ukm::SourceIdObj ukm_source_id,
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
header_client,

View File

@ -252,13 +252,14 @@ void CefBrowserPlatformDelegateAlloy::SendCaptureLostEvent() {
#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MAC))
void CefBrowserPlatformDelegateAlloy::NotifyMoveOrResizeStarted() {
if (!web_contents_)
if (!browser_)
return;
// Dismiss any existing popups.
content::RenderViewHost* host = web_contents_->GetRenderViewHost();
if (host)
host->NotifyMoveOrResizeStarted();
auto frame = browser_->GetMainFrame();
if (frame && frame->IsValid()) {
static_cast<CefFrameHostImpl*>(frame.get())->NotifyMoveOrResizeStarted();
}
}
#endif

View File

@ -319,12 +319,6 @@ ChromeBrowserProcessAlloy::subresource_filter_ruleset_service() {
return nullptr;
}
federated_learning::FlocBlocklistService*
ChromeBrowserProcessAlloy::floc_blocklist_service() {
NOTREACHED();
return nullptr;
}
federated_learning::FlocSortingLshClustersService*
ChromeBrowserProcessAlloy::floc_sorting_lsh_clusters_service() {
NOTREACHED();
@ -342,7 +336,7 @@ StartupData* ChromeBrowserProcessAlloy::startup_data() {
return nullptr;
}
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
#if defined(OS_WIN) || defined(OS_LINUX)
void ChromeBrowserProcessAlloy::StartAutoupdateTimer() {}
#endif

View File

@ -82,14 +82,13 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
subresource_filter::RulesetService* subresource_filter_ruleset_service()
override;
federated_learning::FlocBlocklistService* floc_blocklist_service() override;
federated_learning::FlocSortingLshClustersService*
floc_sorting_lsh_clusters_service() override;
optimization_guide::OptimizationGuideService* optimization_guide_service()
override;
StartupData* startup_data() override;
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
#if defined(OS_WIN) || defined(OS_LINUX)
void StartAutoupdateTimer() override;
#endif

View File

@ -4,10 +4,11 @@
// found in the LICENSE file.
#include "libcef/browser/audio_capturer.h"
#include "libcef/browser/alloy/alloy_browser_host_impl.h"
#include "libcef/browser/audio_loopback_stream_creator.h"
#include "components/mirroring/service/captured_audio_input.h"
#include "content/public/browser/audio_loopback_stream_creator.h"
#include "media/audio/audio_input_device.h"
namespace {
@ -26,7 +27,7 @@ media::ChannelLayout TranslateChannelLayout(
void StreamCreatorHelper(
content::WebContents* source_web_contents,
content::AudioLoopbackStreamCreator* audio_stream_creator,
CefAudioLoopbackStreamCreator* audio_stream_creator,
mojo::PendingRemote<mirroring::mojom::AudioStreamCreatorClient> client,
const media::AudioParameters& params,
uint32_t total_segments) {
@ -56,8 +57,7 @@ CefAudioCapturer::CefAudioCapturer(const CefAudioParameters& params,
: params_(params),
browser_(browser),
audio_handler_(audio_handler),
audio_stream_creator_(content::AudioLoopbackStreamCreator::
CreateInProcessAudioLoopbackStreamCreator()) {
audio_stream_creator_(std::make_unique<CefAudioLoopbackStreamCreator>()) {
media::AudioParameters audio_params(
media::AudioParameters::AUDIO_PCM_LINEAR,
TranslateChannelLayout(params.channel_layout), params.sample_rate,

View File

@ -12,15 +12,12 @@
#include "media/base/audio_capturer_source.h"
namespace content {
class AudioLoopbackStreamCreator;
} // namespace content
namespace media {
class AudioInputDevice;
} // namespace media
class CefAudioHandler;
class CefAudioLoopbackStreamCreator;
class AlloyBrowserHostImpl;
class CefAudioCapturer : public media::AudioCapturerSource::CaptureCallback {
@ -44,7 +41,7 @@ class CefAudioCapturer : public media::AudioCapturerSource::CaptureCallback {
CefAudioParameters params_;
CefRefPtr<AlloyBrowserHostImpl> browser_;
CefRefPtr<CefAudioHandler> audio_handler_;
std::unique_ptr<content::AudioLoopbackStreamCreator> audio_stream_creator_;
std::unique_ptr<CefAudioLoopbackStreamCreator> audio_stream_creator_;
scoped_refptr<media::AudioInputDevice> audio_input_device_;
bool capturing_ = false;
int channels_ = 0;

View File

@ -0,0 +1,132 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "libcef/browser/audio_loopback_stream_creator.h"
#include <memory>
#include <utility>
#include "base/bind.h"
#include "base/check_op.h"
#include "base/location.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "media/audio/audio_device_description.h"
#include "media/base/user_input_monitor.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "third_party/blink/public/mojom/media/renderer_audio_input_stream_factory.mojom.h"
namespace {
// A blink::mojom::RendererAudioInputStreamFactoryClient that holds a
// CefAudioLoopbackStreamCreator::StreamCreatedCallback. The callback runs when
// the requested audio stream is created.
class StreamCreatedCallbackAdapter final
: public blink::mojom::RendererAudioInputStreamFactoryClient {
public:
explicit StreamCreatedCallbackAdapter(
const CefAudioLoopbackStreamCreator::StreamCreatedCallback& callback)
: callback_(callback) {
DCHECK(callback_);
}
~StreamCreatedCallbackAdapter() override {}
// blink::mojom::RendererAudioInputStreamFactoryClient implementation.
void StreamCreated(
mojo::PendingRemote<media::mojom::AudioInputStream> stream,
mojo::PendingReceiver<media::mojom::AudioInputStreamClient>
client_receiver,
media::mojom::ReadOnlyAudioDataPipePtr data_pipe,
bool initially_muted,
const base::Optional<base::UnguessableToken>& stream_id) override {
DCHECK(!initially_muted); // Loopback streams shouldn't be started muted.
callback_.Run(std::move(stream), std::move(client_receiver),
std::move(data_pipe));
}
private:
const CefAudioLoopbackStreamCreator::StreamCreatedCallback callback_;
DISALLOW_COPY_AND_ASSIGN(StreamCreatedCallbackAdapter);
};
void CreateLoopbackStreamHelper(
content::ForwardingAudioStreamFactory::Core* factory,
content::AudioStreamBroker::LoopbackSource* loopback_source,
const media::AudioParameters& params,
uint32_t total_segments,
mojo::PendingRemote<blink::mojom::RendererAudioInputStreamFactoryClient>
client_remote) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
const bool mute_source = true;
factory->CreateLoopbackStream(-1, -1, loopback_source, params, total_segments,
mute_source, std::move(client_remote));
}
void CreateSystemWideLoopbackStreamHelper(
content::ForwardingAudioStreamFactory::Core* factory,
const media::AudioParameters& params,
uint32_t total_segments,
mojo::PendingRemote<blink::mojom::RendererAudioInputStreamFactoryClient>
client_remote) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
const bool enable_agc = false;
factory->CreateInputStream(
-1, -1, media::AudioDeviceDescription::kLoopbackWithMuteDeviceId, params,
total_segments, enable_agc, std::move(client_remote));
}
} // namespace
CefAudioLoopbackStreamCreator::CefAudioLoopbackStreamCreator()
: factory_(nullptr,
content::BrowserMainLoop::GetInstance()
? static_cast<media::UserInputMonitorBase*>(
content::BrowserMainLoop::GetInstance()
->user_input_monitor())
: nullptr,
content::AudioStreamBrokerFactory::CreateImpl()) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}
CefAudioLoopbackStreamCreator::~CefAudioLoopbackStreamCreator() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}
void CefAudioLoopbackStreamCreator::CreateLoopbackStream(
content::WebContents* loopback_source,
const media::AudioParameters& params,
uint32_t total_segments,
const StreamCreatedCallback& callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
mojo::PendingRemote<blink::mojom::RendererAudioInputStreamFactoryClient>
client;
mojo::MakeSelfOwnedReceiver(
std::make_unique<StreamCreatedCallbackAdapter>(callback),
client.InitWithNewPipeAndPassReceiver());
// Deletion of factory_.core() is posted to the IO thread when |factory_| is
// destroyed, so Unretained is safe below.
if (loopback_source) {
content::GetIOThreadTaskRunner({})->PostTask(
FROM_HERE,
base::BindOnce(&CreateLoopbackStreamHelper, factory_.core(),
static_cast<content::WebContentsImpl*>(loopback_source)
->GetAudioStreamFactory()
->core(),
params, total_segments, std::move(client)));
return;
}
// A null |frame_of_source_web_contents| requests system-wide loopback.
content::GetIOThreadTaskRunner({})->PostTask(
FROM_HERE,
base::BindOnce(&CreateSystemWideLoopbackStreamHelper, factory_.core(),
params, total_segments, std::move(client)));
}

View File

@ -0,0 +1,51 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_
#define CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_
#include "base/callback.h"
#include "base/macros.h"
#include "content/browser/media/forwarding_audio_stream_factory.h"
#include "content/common/content_export.h"
#include "media/mojo/mojom/audio_data_pipe.mojom.h"
#include "media/mojo/mojom/audio_input_stream.mojom.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
namespace media {
class AudioParameters;
}
// This class handles creating a loopback stream that either captures audio from
// a WebContents or the system-wide loopback through the Audio Service.
// This class is operated on the UI thread.
// Based on InProcessAudioLoopbackStreamCreator which was deleted in
// https://crrev.com/a5af2468cf.
class CefAudioLoopbackStreamCreator final {
public:
CefAudioLoopbackStreamCreator();
~CefAudioLoopbackStreamCreator();
// The callback that is called when the requested stream is created.
using StreamCreatedCallback = base::RepeatingCallback<void(
mojo::PendingRemote<media::mojom::AudioInputStream> stream,
mojo::PendingReceiver<media::mojom::AudioInputStreamClient>
client_receiver,
media::mojom::ReadOnlyAudioDataPipePtr data_pipe)>;
// Creates a loopback stream that captures the audio from |loopback_source|,
// or the default system playback if |loopback_source| is null. Local output
// of the source/system audio is muted during capturing.
void CreateLoopbackStream(content::WebContents* loopback_source,
const media::AudioParameters& params,
uint32_t total_segments,
const StreamCreatedCallback& callback);
private:
content::ForwardingAudioStreamFactory factory_;
DISALLOW_COPY_AND_ASSIGN(CefAudioLoopbackStreamCreator);
};
#endif // CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_

View File

@ -8,7 +8,6 @@
#include "libcef/browser/browser_platform_delegate.h"
#include "libcef/browser/image_impl.h"
#include "libcef/browser/navigation_entry_impl.h"
#include "libcef/browser/net/scheme_handler.h"
#include "libcef/browser/thread_util.h"
#include "base/logging.h"
@ -16,6 +15,7 @@
#include "chrome/browser/spellchecker/spellcheck_service.h"
#include "components/favicon/core/favicon_url.h"
#include "components/spellcheck/common/spellcheck_features.h"
#include "components/url_formatter/url_fixer.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/download_request_utils.h"
@ -454,6 +454,7 @@ void CefBrowserHostBase::GoBack() {
auto callback = base::BindOnce(&CefBrowserHostBase::GoBack, this);
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, std::move(callback));
return;
}
if (browser_info_->IsNavigationLocked(std::move(callback))) {
@ -475,6 +476,7 @@ void CefBrowserHostBase::GoForward() {
auto callback = base::BindOnce(&CefBrowserHostBase::GoForward, this);
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, std::move(callback));
return;
}
if (browser_info_->IsNavigationLocked(std::move(callback))) {
@ -496,6 +498,7 @@ void CefBrowserHostBase::Reload() {
auto callback = base::BindOnce(&CefBrowserHostBase::Reload, this);
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, std::move(callback));
return;
}
if (browser_info_->IsNavigationLocked(std::move(callback))) {
@ -512,6 +515,7 @@ void CefBrowserHostBase::ReloadIgnoreCache() {
auto callback = base::BindOnce(&CefBrowserHostBase::ReloadIgnoreCache, this);
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, std::move(callback));
return;
}
if (browser_info_->IsNavigationLocked(std::move(callback))) {
@ -528,6 +532,7 @@ void CefBrowserHostBase::StopLoad() {
auto callback = base::BindOnce(&CefBrowserHostBase::StopLoad, this);
if (!CEF_CURRENTLY_ON_UIT()) {
CEF_POST_TASK(CEF_UIT, std::move(callback));
return;
}
if (browser_info_->IsNavigationLocked(std::move(callback))) {
@ -681,11 +686,6 @@ bool CefBrowserHostBase::HasObserver(Observer* observer) const {
void CefBrowserHostBase::LoadMainFrameURL(
const content::OpenURLParams& params) {
if (!params.url.is_valid()) {
LOG(ERROR) << "Invalid URL: " << params.url.spec();
return;
}
auto callback =
base::BindOnce(&CefBrowserHostBase::LoadMainFrameURL, this, params);
if (!CEF_CURRENTLY_ON_UIT()) {
@ -706,8 +706,19 @@ bool CefBrowserHostBase::Navigate(const content::OpenURLParams& params) {
CEF_REQUIRE_UIT();
auto web_contents = GetWebContents();
if (web_contents) {
// Fix common problems with user-typed text. Among other things, this:
// - Converts absolute file paths to "file://" URLs.
// - Normalizes "about:" and "chrome:" to "chrome://" URLs.
// - Adds the "http://" scheme if none was specified.
GURL gurl = url_formatter::FixupURL(params.url.possibly_invalid_spec(),
std::string());
if (!gurl.is_valid()) {
LOG(ERROR) << "Invalid URL: " << params.url.possibly_invalid_spec();
return false;
}
web_contents->GetController().LoadURL(
params.url, params.referrer, params.transition, params.extra_headers);
gurl, params.referrer, params.transition, params.extra_headers);
return true;
}
return false;
@ -718,9 +729,6 @@ void CefBrowserHostBase::OnDidFinishLoad(CefRefPtr<CefFrameHostImpl> frame,
int http_status_code) {
frame->RefreshAttributes();
// Give internal scheme handlers an opportunity to update content.
scheme::DidFinishLoad(frame, validated_url);
contents_delegate_->OnLoadEnd(frame, validated_url, http_status_code);
}

View File

@ -18,7 +18,6 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "content/common/view_messages.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"

View File

@ -43,7 +43,7 @@ CefRefPtr<ChromeBrowserHostImpl> ChromeBrowserHostImpl::Create(
// Create the Browser. This will indirectly create the ChomeBrowserDelegate.
// The same params will be used to create a new Browser if the tab is dragged
// out of the existing Browser.
auto browser = new Browser(chrome_params);
auto browser = Browser::Create(chrome_params);
GURL url = params.url;
if (url.is_empty()) {

View File

@ -48,9 +48,7 @@ void HandleExternalProtocolHelper(
} // namespace
ChromeContentBrowserClientCef::ChromeContentBrowserClientCef(
StartupData* startup_data)
: ChromeContentBrowserClient(startup_data) {}
ChromeContentBrowserClientCef::ChromeContentBrowserClientCef() = default;
ChromeContentBrowserClientCef::~ChromeContentBrowserClientCef() = default;
std::unique_ptr<content::BrowserMainParts>
@ -154,7 +152,7 @@ bool ChromeContentBrowserClientCef::WillCreateURLLoaderFactory(
URLLoaderFactoryType type,
const url::Origin& request_initiator,
base::Optional<int64_t> navigation_id,
base::UkmSourceId ukm_source_id,
ukm::SourceIdObj ukm_source_id,
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
header_client,

View File

@ -18,7 +18,7 @@ class ChromeBrowserMainExtraPartsCef;
// CEF override of ChromeContentBrowserClient.
class ChromeContentBrowserClientCef : public ChromeContentBrowserClient {
public:
explicit ChromeContentBrowserClientCef(StartupData* startup_data = nullptr);
ChromeContentBrowserClientCef();
~ChromeContentBrowserClientCef() override;
// ChromeContentBrowserClient overrides.
@ -47,7 +47,7 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient {
URLLoaderFactoryType type,
const url::Origin& request_initiator,
base::Optional<int64_t> navigation_id,
base::UkmSourceId ukm_source_id,
ukm::SourceIdObj ukm_source_id,
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
header_client,

View File

@ -91,8 +91,10 @@ ExtensionFunction::ResponseAction TabsCreateFunction::Run() {
return RespondNow(Error(error));
// Return data about the newly created tab.
return RespondNow(has_callback() ? OneArgument(std::move(result))
: NoArguments());
return RespondNow(
has_callback()
? OneArgument(base::Value::FromUniquePtrValue(std::move(result)))
: NoArguments());
}
ExecuteCodeInTabFunction::ExecuteCodeInTabFunction()

View File

@ -23,7 +23,7 @@ namespace cef {
namespace cefimpl = extensions::cef;
#define EXTENSION_FUNCTION_NAME(classname) classname::function_name()
#define EXTENSION_FUNCTION_NAME(classname) classname::static_function_name()
// Maintain the same order as https://developer.chrome.com/extensions/api_index
// so chrome://extensions-support looks nice.

View File

@ -17,6 +17,7 @@
#include "libcef/common/request_impl.h"
#include "libcef/common/task_runner_impl.h"
#include "components/url_formatter/url_fixer.h"
#include "content/browser/renderer_host/frame_tree_node.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
@ -302,11 +303,21 @@ void CefFrameHostImpl::RefreshAttributes() {
parent_frame_id_ = MakeFrameId(render_frame_host_->GetParent());
}
void CefFrameHostImpl::NotifyMoveOrResizeStarted() {
Send(new CefMsg_MoveOrResizeStarted(MSG_ROUTING_NONE));
}
void CefFrameHostImpl::Navigate(const CefNavigateParams& params) {
CefMsg_LoadRequest_Params request;
request.url = params.url;
// Fix common problems with user-typed text. Among other things, this:
// - Converts absolute file paths to "file://" URLs.
// - Normalizes "about:" and "chrome:" to "chrome://" URLs.
// - Adds the "http://" scheme if none was specified.
request.url = url_formatter::FixupURL(params.url.possibly_invalid_spec(),
std::string());
if (!request.url.is_valid()) {
LOG(ERROR) << "Invalid URL: " << params.url;
LOG(ERROR) << "Invalid URL: " << params.url.possibly_invalid_spec();
return;
}
@ -336,16 +347,9 @@ void CefFrameHostImpl::LoadURLWithExtras(const std::string& url,
if (frame_id < CefFrameHostImpl::kMainFrameId)
return;
// Any necessary fixup of the URL will occur in
// [CefBrowserHostBase|CefFrameHostImpl]::Navigate().
GURL gurl(url);
if (!gurl.is_valid() && !gurl.has_scheme()) {
// Try to add "http://" at the beginning.
std::string new_url = std::string("http://") + url;
gurl = GURL(new_url);
}
if (!gurl.is_valid()) {
LOG(ERROR) << "Invalid URL: " << url;
return;
}
if (frame_id == CefFrameHostImpl::kMainFrameId) {
// Load via the browser using NavigationController.

View File

@ -87,6 +87,10 @@ class CefFrameHostImpl : public CefFrame {
void SetFocused(bool focused);
void RefreshAttributes();
// Notification that a move or resize of the renderer's containing window has
// started. Used on Windows and Linux with the Alloy runtime.
void NotifyMoveOrResizeStarted();
// Navigate as specified by the |params| argument.
void Navigate(const CefNavigateParams& params);

View File

@ -286,7 +286,7 @@ void CefMenuManager::ExecuteCommandCallback(int command_id,
void CefMenuManager::CreateDefaultModel() {
if (!params_.custom_items.empty()) {
// Custom menu items originating from the renderer process. For example,
// plugin placeholder menu items or Flash menu items.
// plugin placeholder menu items.
for (size_t i = 0; i < params_.custom_items.size(); ++i) {
content::MenuItem menu_item = params_.custom_items[i];
menu_item.action += MENU_ID_CUSTOM_FIRST;

View File

@ -106,8 +106,7 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() {
// As an additional requirement on Linux, we must set the colors for the
// render widgets in webkit.
blink::mojom::RendererPreferences* prefs =
web_contents_->GetMutableRendererPrefs();
auto prefs = web_contents_->GetMutableRendererPrefs();
prefs->focus_ring_color = SkColorSetARGB(255, 229, 151, 0);
prefs->active_selection_bg_color = SkColorSetRGB(30, 144, 255);

View File

@ -63,7 +63,7 @@ x11::Window FindToplevelParent(x11::Window window) {
CEF_EXPORT XDisplay* cef_get_xdisplay() {
if (!CEF_CURRENTLY_ON(CEF_UIT))
return nullptr;
return gfx::GetXDisplay();
return x11::Connection::Get()->GetXlibDisplay();
}
CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,

View File

@ -16,7 +16,6 @@
#include "ui/events/platform/x11/x11_event_source.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/x/x11_atom_cache.h"
#include "ui/gfx/x/x11_types.h"
namespace ui {
class XScopedEventSelector;

View File

@ -196,18 +196,8 @@ std::string GetOSType() {
return "Windows";
#elif defined(OS_MAC)
return "Mac OS X";
#elif defined(OS_CHROMEOS)
return "Chromium OS";
#elif defined(OS_ANDROID)
return "Android";
#elif defined(OS_LINUX)
return "Linux";
#elif defined(OS_FREEBSD)
return "FreeBSD";
#elif defined(OS_OPENBSD)
return "OpenBSD";
#elif defined(OS_SOLARIS)
return "Solaris";
#else
return "Unknown";
#endif
@ -384,7 +374,6 @@ bool OnVersionUI(Profile* profile,
parser.Add("OS", GetOSType());
parser.Add("WEBKIT", content::GetWebKitVersion());
parser.Add("JAVASCRIPT", v8::V8::GetVersion());
parser.Add("FLASH", std::string()); // Value populated asynchronously.
parser.Add(
"USERAGENT",
CefAppManager::Get()->GetContentClient()->browser()->GetUserAgent());
@ -625,7 +614,6 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory {
const auto host_id = GetChromeHostId(url.host());
if (host_id != CHROME_UNKNOWN) {
// TODO(network): Use WebUI bindings to implement DidFinishChromeLoad.
return false;
}
@ -640,11 +628,8 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory {
}
static void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) {
// about: handler. Must come before chrome: handler, since it will
// rewrite about: urls to chrome: URLs and then expect chrome: to
// actually handle them. Also relies on a preliminary fixup phase.
handler->SetFixupHandler(&FixupBrowserAboutURL);
handler->AddHandlerPair(&WillHandleBrowserAboutURL,
// Handler to rewrite chrome://about and chrome://sync URLs.
handler->AddHandlerPair(&HandleChromeAboutAndChromeSyncRewrite,
content::BrowserURLHandler::null_handler());
// chrome: & friends.
@ -688,38 +673,6 @@ CefWebUIControllerFactory* CefWebUIControllerFactory::GetInstance() {
return &g_web_ui_controller_factory.Get();
}
void DidFinishChromeVersionLoad(CefRefPtr<CefFrame> frame) {
// Retieve Flash version information and update asynchronously.
class Visitor : public CefWebPluginInfoVisitor {
public:
Visitor(CefRefPtr<CefFrame> frame) : frame_(frame) {}
bool Visit(CefRefPtr<CefWebPluginInfo> info,
int count,
int total) override {
std::string name = info->GetName();
if (name == "Shockwave Flash") {
if (frame_->IsValid()) {
std::string version = info->GetVersion();
frame_->ExecuteJavaScript(
"document.getElementById('flash').innerText = '" + version + "';",
std::string(), 0);
}
return false;
}
return true;
}
private:
CefRefPtr<CefFrame> frame_;
IMPLEMENT_REFCOUNTING(Visitor);
};
CefVisitWebPluginInfo(new Visitor(frame));
}
} // namespace
void RegisterWebUIControllerFactory() {
@ -735,17 +688,6 @@ void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) {
CefWebUIControllerFactory::BrowserURLHandlerCreated(handler);
}
void DidFinishChromeLoad(CefRefPtr<CefFrame> frame, const GURL& validated_url) {
ChromeHostId host_id = GetChromeHostId(validated_url.host());
switch (host_id) {
case CHROME_VERSION:
DidFinishChromeVersionLoad(frame);
break;
default:
break;
}
}
bool IsWebUIAllowedToMakeNetworkRequests(const url::Origin& origin) {
return CefWebUIControllerFactory::IsWebUIAllowedToMakeNetworkRequests(origin);
}

View File

@ -36,9 +36,6 @@ void RegisterWebUIControllerFactory();
// Register the WebUI handler.
void BrowserURLHandlerCreated(content::BrowserURLHandler* handler);
// Used to fire any asynchronous content updates.
void DidFinishChromeLoad(CefRefPtr<CefFrame> frame, const GURL& validated_url);
// Returns true if WebUI is allowed to make network requests.
bool IsWebUIAllowedToMakeNetworkRequests(const url::Origin& origin);

View File

@ -22,9 +22,4 @@ void RegisterInternalHandlers(CefIOThreadState* iothread_state) {
scheme::RegisterChromeDevToolsHandler(iothread_state);
}
void DidFinishLoad(CefRefPtr<CefFrame> frame, const GURL& validated_url) {
if (validated_url.scheme() == content::kChromeUIScheme)
scheme::DidFinishChromeLoad(frame, validated_url);
}
} // namespace scheme

View File

@ -18,9 +18,6 @@ namespace scheme {
// Register the internal scheme handlers that can be overridden.
void RegisterInternalHandlers(CefIOThreadState* iothread_state);
// Used to fire any asynchronous content updates.
void DidFinishLoad(CefRefPtr<CefFrame> frame, const GURL& validated_url);
} // namespace scheme
#endif // CEF_LIBCEF_BROWSER_NET_SCHEME_HANDLER_H_

View File

@ -267,7 +267,7 @@ bool CefCookieManagerImpl::SetCookie(const CefString& url,
expiration_time,
base::Time(), // Last access time.
cookie.secure ? true : false, cookie.httponly ? true : false, same_site,
priority);
priority, /*same_party=*/false);
if (!canonical_cookie) {
SetCookieCallbackImpl(

View File

@ -21,6 +21,10 @@
#include "services/network/public/mojom/network_context.mojom.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
namespace content {
class ResourceContext;
}
namespace net_service {
class InterceptedRequest;

View File

@ -65,7 +65,7 @@ scoped_refptr<URLLoaderFactoryGetter> URLLoaderFactoryGetter::Create(
should_proxy |= browser_client->WillCreateURLLoaderFactory(
browser_context, render_frame_host, render_process_id,
content::ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource,
url::Origin(), base::nullopt /* navigation_id */, base::UkmSourceId(),
url::Origin(), base::nullopt /* navigation_id */, ukm::SourceIdObj(),
&maybe_proxy_factory_request, nullptr /* header_client */,
nullptr /* bypass_redirect_checks */, nullptr /* disable_secure_dns */,
nullptr /* factory_override */);

View File

@ -594,12 +594,6 @@ gfx::Point CefBrowserPlatformDelegateOsr::GetParentScreenPoint(
CefRenderWidgetHostViewOSR* CefBrowserPlatformDelegateOsr::GetOSRHostView()
const {
CefRenderWidgetHostViewOSR* fs_view =
static_cast<CefRenderWidgetHostViewOSR*>(
web_contents_->GetFullscreenRenderWidgetHostView());
if (fs_view)
return fs_view;
content::RenderViewHost* host = web_contents_->GetRenderViewHost();
if (host) {
return static_cast<CefRenderWidgetHostViewOSR*>(

View File

@ -133,7 +133,7 @@ void CefHostDisplayClientOSR::CreateLayeredWindowUpdater(
layered_window_updater_->SetActive(active_);
}
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
#if defined(OS_LINUX)
void CefHostDisplayClientOSR::DidCompleteSwapWithNewSize(
const gfx::Size& size) {}
#endif

View File

@ -33,7 +33,7 @@ class CefHostDisplayClientOSR : public viz::HostDisplayClient {
mojo::PendingReceiver<viz::mojom::LayeredWindowUpdater> receiver)
override;
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
#if defined(OS_LINUX)
void DidCompleteSwapWithNewSize(const gfx::Size& size) override;
#endif

View File

@ -39,7 +39,6 @@
#include "content/browser/renderer_host/render_widget_host_input_event_router.h"
#include "content/common/content_switches_internal.h"
#include "content/common/input_messages.h"
#include "content/common/view_messages.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/context_factory.h"
@ -459,6 +458,16 @@ base::Optional<SkColor> CefRenderWidgetHostViewOSR::GetBackgroundColor() {
void CefRenderWidgetHostViewOSR::UpdateBackgroundColor() {}
base::Optional<content::DisplayFeature>
CefRenderWidgetHostViewOSR::GetDisplayFeature() {
return base::nullopt;
}
void CefRenderWidgetHostViewOSR::SetDisplayFeatureForTesting(
const content::DisplayFeature* display_feature) {
NOTREACHED();
}
blink::mojom::PointerLockResult CefRenderWidgetHostViewOSR::LockMouse(
bool request_unadjusted_movement) {
return blink::mojom::PointerLockResult::kPermissionDenied;

View File

@ -122,6 +122,9 @@ class CefRenderWidgetHostViewOSR
void SetBackgroundColor(SkColor color) override;
base::Optional<SkColor> GetBackgroundColor() override;
void UpdateBackgroundColor() override;
base::Optional<content::DisplayFeature> GetDisplayFeature() override;
void SetDisplayFeatureForTesting(
const content::DisplayFeature* display_feature) override;
blink::mojom::PointerLockResult LockMouse(
bool request_unadjusted_movement) override;
blink::mojom::PointerLockResult ChangeMouseLock(

View File

@ -130,7 +130,9 @@ CefWebContentsViewOSR::CreateViewForChildWidget(
void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {}
void CefWebContentsViewOSR::RenderViewReady() {}
void CefWebContentsViewOSR::RenderViewReady() {
RenderViewCreated();
}
void CefWebContentsViewOSR::RenderViewHostChanged(
content::RenderViewHost* old_host,

View File

@ -133,12 +133,16 @@ void SetChromePrefs(Profile* profile, blink::web_pref::WebPreferences& web) {
if (extensions::ExtensionsEnabled()) {
std::string image_animation_policy =
prefs->GetString(prefs::kAnimationPolicy);
if (image_animation_policy == kAnimationPolicyOnce)
web.animation_policy = blink::web_pref::kImageAnimationPolicyAnimateOnce;
else if (image_animation_policy == kAnimationPolicyNone)
web.animation_policy = blink::web_pref::kImageAnimationPolicyNoAnimation;
else
web.animation_policy = blink::web_pref::kImageAnimationPolicyAllowed;
if (image_animation_policy == kAnimationPolicyOnce) {
web.animation_policy =
blink::mojom::ImageAnimationPolicy::kImageAnimationPolicyAnimateOnce;
} else if (image_animation_policy == kAnimationPolicyNone) {
web.animation_policy =
blink::mojom::ImageAnimationPolicy::kImageAnimationPolicyNoAnimation;
} else {
web.animation_policy =
blink::mojom::ImageAnimationPolicy::kImageAnimationPolicyAllowed;
}
}
// Make sure we will set the default_encoding with canonical encoding name.
@ -279,22 +283,47 @@ void SetBool(CommandLinePrefStore* prefs, const std::string& key, bool value) {
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
blink::mojom::PreferredColorScheme ToBlinkPreferredColorScheme(
ui::NativeTheme::PreferredColorScheme native_theme_scheme) {
switch (native_theme_scheme) {
case ui::NativeTheme::PreferredColorScheme::kDark:
return blink::mojom::PreferredColorScheme::kDark;
case ui::NativeTheme::PreferredColorScheme::kLight:
return blink::mojom::PreferredColorScheme::kLight;
}
NOTREACHED();
}
// From chrome/browser/chrome_content_browser_client.cc
bool UpdatePreferredColorSchemesBasedOnURLIfNeeded(
blink::web_pref::WebPreferences* web_prefs,
const GURL& url) {
// Returns true if preferred color scheme is modified based on at least one of
// the following -
// |url| - Last committed url.
// |native_theme| - For other platforms based on native theme scheme.
bool UpdatePreferredColorScheme(blink::web_pref::WebPreferences* web_prefs,
const GURL& url,
const ui::NativeTheme* native_theme) {
auto old_preferred_color_scheme = web_prefs->preferred_color_scheme;
// Update based on native theme scheme.
web_prefs->preferred_color_scheme =
ToBlinkPreferredColorScheme(native_theme->GetPreferredColorScheme());
// Force a light preferred color scheme on certain URLs if kWebUIDarkMode is
// disabled; some of the UI is not yet correctly themed.
if (base::FeatureList::IsEnabled(features::kWebUIDarkMode))
return false;
bool force_light = url.SchemeIs(content::kChromeUIScheme);
if (!force_light && extensions::ExtensionsEnabled()) {
force_light = url.SchemeIs(extensions::kExtensionScheme) &&
url.host_piece() == extension_misc::kPdfExtensionId;
if (!base::FeatureList::IsEnabled(features::kWebUIDarkMode)) {
// Update based on last committed url.
bool force_light = url.SchemeIs(content::kChromeUIScheme);
if (!force_light) {
force_light = url.SchemeIs(extensions::kExtensionScheme) &&
url.host_piece() == extension_misc::kPdfExtensionId;
}
if (force_light) {
web_prefs->preferred_color_scheme =
blink::mojom::PreferredColorScheme::kLight;
}
}
auto old_preferred_color_scheme = web_prefs->preferred_color_scheme;
if (force_light)
web_prefs->preferred_color_scheme = blink::PreferredColorScheme::kLight;
return old_preferred_color_scheme != web_prefs->preferred_color_scheme;
}
@ -332,9 +361,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
registry->RegisterBooleanPref(prefs::kCloudPrintDeprecationWarningsSuppressed,
false);
// TODO(guoweis): Remove next 2 options at M50.
registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, true);
registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, true);
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
blink::kWebRTCIPHandlingDefault);
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
@ -371,15 +397,27 @@ void PopulateWebPreferences(content::RenderViewHost* rvh,
auto* native_theme = ui::NativeTheme::GetInstanceForWeb();
switch (native_theme->GetPreferredColorScheme()) {
case ui::NativeTheme::PreferredColorScheme::kDark:
web.preferred_color_scheme = blink::PreferredColorScheme::kDark;
web.preferred_color_scheme = blink::mojom::PreferredColorScheme::kDark;
break;
case ui::NativeTheme::PreferredColorScheme::kLight:
web.preferred_color_scheme = blink::PreferredColorScheme::kLight;
web.preferred_color_scheme = blink::mojom::PreferredColorScheme::kLight;
break;
}
UpdatePreferredColorSchemesBasedOnURLIfNeeded(
&web, rvh->GetSiteInstance()->GetSiteURL());
switch (native_theme->GetPreferredContrast()) {
case ui::NativeTheme::PreferredContrast::kNoPreference:
web.preferred_contrast = blink::mojom::PreferredContrast::kNoPreference;
break;
case ui::NativeTheme::PreferredContrast::kMore:
web.preferred_contrast = blink::mojom::PreferredContrast::kMore;
break;
case ui::NativeTheme::PreferredContrast::kLess:
web.preferred_contrast = blink::mojom::PreferredContrast::kLess;
break;
}
UpdatePreferredColorScheme(&web, rvh->GetSiteInstance()->GetSiteURL(),
native_theme);
// Set preferences based on the extension.
SetExtensionPrefs(rvh, web);
@ -403,8 +441,9 @@ void PopulateWebPreferences(content::RenderViewHost* rvh,
bool PopulateWebPreferencesAfterNavigation(
content::WebContents* web_contents,
blink::web_pref::WebPreferences& web) {
return UpdatePreferredColorSchemesBasedOnURLIfNeeded(
&web, web_contents->GetLastCommittedURL());
auto* native_theme = ui::NativeTheme::GetInstanceForWeb();
return UpdatePreferredColorScheme(&web, web_contents->GetLastCommittedURL(),
native_theme);
}
} // namespace renderer_prefs

View File

@ -64,25 +64,6 @@ CefPrintingMessageFilterShutdownNotifierFactory::GetInstance() {
return g_printing_message_filter_shutdown_notifier_factory.Pointer();
}
#if defined(OS_WIN)
content::WebContents* GetWebContentsForRenderFrame(int render_process_id,
int render_frame_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
content::RenderFrameHost* frame =
content::RenderFrameHost::FromID(render_process_id, render_frame_id);
return frame ? content::WebContents::FromRenderFrameHost(frame) : nullptr;
}
CefPrintViewManager* GetPrintViewManager(int render_process_id,
int render_frame_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
content::WebContents* web_contents =
GetWebContentsForRenderFrame(render_process_id, render_frame_id);
return web_contents ? CefPrintViewManager::FromWebContents(web_contents)
: nullptr;
}
#endif // defined(OS_WIN)
} // namespace
CefPrintingMessageFilter::CefPrintingMessageFilter(int render_process_id,
@ -123,8 +104,6 @@ bool CefPrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(CefPrintingMessageFilter, message)
IPC_MESSAGE_HANDLER_DELAY_REPLY(PrintHostMsg_ScriptedPrint, OnScriptedPrint)
IPC_MESSAGE_HANDLER_DELAY_REPLY(PrintHostMsg_UpdatePrintSettings,
OnUpdatePrintSettings)
IPC_MESSAGE_HANDLER(PrintHostMsg_CheckForCancel, OnCheckForCancel)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@ -169,72 +148,9 @@ void CefPrintingMessageFilter::OnScriptedPrintReply(
}
}
void CefPrintingMessageFilter::OnUpdatePrintSettings(int document_cookie,
base::Value job_settings,
IPC::Message* reply_msg) {
std::unique_ptr<PrinterQuery> printer_query;
if (!is_printing_enabled_.GetValue()) {
// Reply with NULL query.
OnUpdatePrintSettingsReply(std::move(printer_query), reply_msg);
return;
}
printer_query = queue_->PopPrinterQuery(document_cookie);
if (!printer_query.get()) {
printer_query = queue_->CreatePrinterQuery(
content::ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE);
}
printer_query->SetSettings(
std::move(job_settings),
base::BindOnce(&CefPrintingMessageFilter::OnUpdatePrintSettingsReply,
this, std::move(printer_query), reply_msg));
}
void CefPrintingMessageFilter::OnUpdatePrintSettingsReply(
std::unique_ptr<PrinterQuery> printer_query,
IPC::Message* reply_msg) {
mojom::PrintPagesParams params;
params.params = mojom::PrintParams::New();
if (printer_query && printer_query->last_status() == PrintingContext::OK) {
RenderParamsFromPrintSettings(printer_query->settings(),
params.params.get());
params.params->document_cookie = printer_query->cookie();
params.pages = PageRange::GetPages(printer_query->settings().ranges());
}
bool canceled = printer_query.get() &&
(printer_query->last_status() == PrintingContext::CANCEL);
#if defined(OS_WIN)
if (canceled) {
int routing_id = reply_msg->routing_id();
content::GetUIThreadTaskRunner({})->PostTask(
FROM_HERE,
base::BindOnce(&CefPrintingMessageFilter::NotifySystemDialogCancelled,
this, routing_id));
}
#endif
PrintHostMsg_UpdatePrintSettings::WriteReplyParams(reply_msg, params,
canceled);
Send(reply_msg);
// If user hasn't cancelled.
if (printer_query.get()) {
if (printer_query->cookie() && printer_query->settings().dpi()) {
queue_->QueuePrinterQuery(std::move(printer_query));
} else {
printer_query->StopWorker();
}
}
}
void CefPrintingMessageFilter::OnCheckForCancel(const mojom::PreviewIds& ids,
bool* cancel) {
*cancel = false;
}
#if defined(OS_WIN)
void CefPrintingMessageFilter::NotifySystemDialogCancelled(int routing_id) {
auto manager = GetPrintViewManager(render_process_id_, routing_id);
manager->SystemDialogCancelled();
}
#endif
} // namespace printing

View File

@ -54,20 +54,8 @@ class CefPrintingMessageFilter : public content::BrowserMessageFilter {
void OnScriptedPrintReply(std::unique_ptr<PrinterQuery> printer_query,
IPC::Message* reply_msg);
// Modify the current print settings based on |job_settings|. The task is
// handled by the print worker thread and the UI thread. The reply occurs on
// the IO thread.
void OnUpdatePrintSettings(int document_cookie,
base::Value job_settings,
IPC::Message* reply_msg);
void OnUpdatePrintSettingsReply(std::unique_ptr<PrinterQuery> printer_query,
IPC::Message* reply_msg);
// Check to see if print preview has been cancelled.
void OnCheckForCancel(const mojom::PreviewIds& ids, bool* cancel);
#if defined(OS_WIN)
void NotifySystemDialogCancelled(int routing_id);
#endif
std::unique_ptr<KeyedServiceShutdownNotifier::Subscription>
printing_shutdown_notifier_;

View File

@ -407,13 +407,16 @@ CefRefPtr<CefDictionaryValue> CefRequestContextImpl::GetAllPreferences(
PrefService* pref_service = browser_context()->AsProfile()->GetPrefs();
std::unique_ptr<base::DictionaryValue> values =
pref_service->GetPreferenceValues(include_defaults
? PrefService::INCLUDE_DEFAULTS
: PrefService::EXCLUDE_DEFAULTS);
base::Value values = pref_service->GetPreferenceValues(
include_defaults ? PrefService::INCLUDE_DEFAULTS
: PrefService::EXCLUDE_DEFAULTS);
// CefDictionaryValueImpl takes ownership of |values|.
return new CefDictionaryValueImpl(values.release(), true, false);
return new CefDictionaryValueImpl(
base::DictionaryValue::From(
base::Value::ToUniquePtrValue(std::move(values)))
.release(),
true, false);
}
bool CefRequestContextImpl::CanSetPreference(const CefString& name) {

View File

@ -15,9 +15,17 @@
// Extend views::LabelButton with a no-argument constructor as required by the
// CefViewView template and extend views::ButtonListener as required by the
// CefButtonView template.
class LabelButtonEx : public views::LabelButton, public views::ButtonListener {
class LabelButtonEx : public views::LabelButton {
public:
LabelButtonEx() : views::LabelButton(this, base::string16()) {}
LabelButtonEx()
: views::LabelButton(base::BindRepeating(
[](LabelButtonEx* self, const ui::Event& event) {
self->ButtonPressed(event);
},
base::Unretained(this)),
base::string16()) {}
virtual void ButtonPressed(const ui::Event& event) = 0;
};
class CefBasicLabelButtonView

View File

@ -42,8 +42,8 @@ CEF_BUTTON_VIEW_T class CefButtonView : public CEF_VIEW_VIEW_D {
// views::Button methods:
void StateChanged(views::Button::ButtonState old_state) override;
// views::ButtonListener methods:
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
// LabelButtonEx methods:
void ButtonPressed(const ui::Event& event) override;
};
CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::StateChanged(
@ -54,7 +54,6 @@ CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::StateChanged(
}
CEF_BUTTON_VIEW_T void CEF_BUTTON_VIEW_D::ButtonPressed(
views::Button* sender,
const ui::Event& event) {
// Callback may trigger new animation state.
if (ParentClass::cef_delegate())

View File

@ -51,10 +51,9 @@ void CefMenuButtonView::SetDrawStringsFlags(int flags) {
label()->SetDrawStringsFlags(flags);
}
void CefMenuButtonView::ButtonPressed(views::Button* source,
const ui::Event& event) {
auto position = source->GetMenuPosition();
cef_delegate()->OnMenuButtonPressed(
GetCefMenuButton(), CefPoint(position.x(), position.y()),
new ButtonPressedLock(static_cast<views::MenuButton*>(source)));
void CefMenuButtonView::ButtonPressed(const ui::Event& event) {
auto position = GetMenuPosition();
cef_delegate()->OnMenuButtonPressed(GetCefMenuButton(),
CefPoint(position.x(), position.y()),
new ButtonPressedLock(this));
}

View File

@ -16,9 +16,16 @@
// Extend views::LabelButton with a no-argument constructor as required by the
// CefViewView template and extend views::ButtonListener as required by the
// CefButtonView template.
class MenuButtonEx : public views::MenuButton, public views::ButtonListener {
class MenuButtonEx : public views::MenuButton {
public:
MenuButtonEx() : views::MenuButton(this) {}
MenuButtonEx()
: views::MenuButton(base::BindRepeating(
[](MenuButtonEx* self, const ui::Event& event) {
self->ButtonPressed(event);
},
base::Unretained(this))) {}
virtual void ButtonPressed(const ui::Event& event) = 0;
};
class CefMenuButtonView
@ -38,8 +45,8 @@ class CefMenuButtonView
// Set the flags that control display of accelerator characters.
void SetDrawStringsFlags(int flags);
// views::ButtonListener methods:
void ButtonPressed(views::Button* source, const ui::Event& event) override;
// MenuButtonEx methods:
void ButtonPressed(const ui::Event& event) override;
private:
DISALLOW_COPY_AND_ASSIGN(CefMenuButtonView);

View File

@ -15,7 +15,6 @@
#if defined(OS_LINUX) && defined(USE_X11)
#include "ui/base/x/x11_util.h"
#include "ui/gfx/x/x11_types.h"
#endif
#if defined(OS_WIN)

View File

@ -27,7 +27,6 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pepper_flash.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/pepper_plugin_info.h"
@ -81,103 +80,6 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
}
}
content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path,
const std::string& version) {
content::PepperPluginInfo plugin;
plugin.is_out_of_process = true;
plugin.name = content::kFlashPluginName;
plugin.path = path;
plugin.permissions = kPepperFlashPermissions;
std::vector<std::string> flash_version_numbers = base::SplitString(
version, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
if (flash_version_numbers.size() < 1)
flash_version_numbers.push_back("11");
if (flash_version_numbers.size() < 2)
flash_version_numbers.push_back("2");
if (flash_version_numbers.size() < 3)
flash_version_numbers.push_back("999");
if (flash_version_numbers.size() < 4)
flash_version_numbers.push_back("999");
// E.g., "Shockwave Flash 10.2 r154":
plugin.description = plugin.name + " " + flash_version_numbers[0] + "." +
flash_version_numbers[1] + " r" +
flash_version_numbers[2];
plugin.version = base::JoinString(flash_version_numbers, ".");
content::WebPluginMimeType swf_mime_type(content::kFlashPluginSwfMimeType,
content::kFlashPluginSwfExtension,
content::kFlashPluginSwfDescription);
plugin.mime_types.push_back(swf_mime_type);
content::WebPluginMimeType spl_mime_type(content::kFlashPluginSplMimeType,
content::kFlashPluginSplExtension,
content::kFlashPluginSplDescription);
plugin.mime_types.push_back(spl_mime_type);
return plugin;
}
void AddPepperFlashFromCommandLine(
std::vector<content::PepperPluginInfo>* plugins) {
const base::CommandLine::StringType flash_path =
base::CommandLine::ForCurrentProcess()->GetSwitchValueNative(
switches::kPpapiFlashPath);
if (flash_path.empty())
return;
// Also get the version from the command-line. Should be something like 11.2
// or 11.2.123.45.
std::string flash_version =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kPpapiFlashVersion);
plugins->push_back(
CreatePepperFlashInfo(base::FilePath(flash_path), flash_version));
}
bool GetSystemPepperFlash(content::PepperPluginInfo* plugin) {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(switches::kEnableSystemFlash))
return false;
// Do not try and find System Pepper Flash if there is a specific path on
// the commmand-line.
if (command_line->HasSwitch(switches::kPpapiFlashPath))
return false;
base::FilePath flash_filename;
if (!base::PathService::Get(chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN,
&flash_filename)) {
return false;
}
base::FilePath manifest_path(
flash_filename.DirName().AppendASCII("manifest.json"));
std::string manifest_data;
if (!base::ReadFileToString(manifest_path, &manifest_data))
return false;
auto json_manifest_value =
base::JSONReader::Read(manifest_data, base::JSON_ALLOW_TRAILING_COMMAS);
if (!json_manifest_value.has_value())
return false;
std::unique_ptr<base::Value> manifest_value(
base::Value::ToUniquePtrValue(std::move(json_manifest_value.value())));
if (!manifest_value.get())
return false;
base::DictionaryValue* manifest = nullptr;
if (!manifest_value->GetAsDictionary(&manifest))
return false;
base::Version version;
if (!CheckPepperFlashManifest(*manifest, &version))
return false;
*plugin = CreatePepperFlashInfo(flash_filename, version.GetString());
return true;
}
} // namespace
const char AlloyContentClient::kPDFPluginPath[] = "internal-pdf-viewer";
@ -188,11 +90,6 @@ AlloyContentClient::~AlloyContentClient() = default;
void AlloyContentClient::AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) {
ComputeBuiltInPlugins(plugins);
AddPepperFlashFromCommandLine(plugins);
content::PepperPluginInfo plugin;
if (GetSystemPepperFlash(&plugin))
plugins->push_back(plugin);
}
void AlloyContentClient::AddContentDecryptionModules(

View File

@ -374,7 +374,6 @@ void AlloyMainDelegate::PreSandboxStartup() {
util_mac::PreSandboxStartup();
#endif
resource_util::OverridePepperFlashSystemPluginPath();
resource_util::OverrideDefaultDownloadDir();
resource_util::OverrideUserDataDir(settings_, command_line);
}

View File

@ -143,9 +143,11 @@ IPC_MESSAGE_ROUTED1(CefMsg_ResponseAck, int /* request_id */)
// Tells the renderer that loading has stopped.
IPC_MESSAGE_ROUTED0(CefMsg_DidStopLoading)
// Tells the render frame to load all blocked plugins with the given identifier.
// Based on ChromeViewMsg_LoadBlockedPlugins.
IPC_MESSAGE_ROUTED1(CefViewMsg_LoadBlockedPlugins, std::string /* identifier */)
// Notification that a move or resize of the renderer's containing window has
// started. Used on Windows and Linux with the Alloy runtime, and was
// previously handled by RenderViewHost::NotifyMoveOrResizeStarted() prior to
// that method's removal in https://crbug.com/1051648.
IPC_MESSAGE_ROUTED0(CefMsg_MoveOrResizeStarted)
// Sent to child processes to add or remove a cross-origin whitelist entry.
IPC_MESSAGE_CONTROL2(CefProcessMsg_ModifyCrossOriginWhitelistEntry,

View File

@ -88,9 +88,6 @@ const char kEnableSpellingService[] = "enable-spelling-service";
// Override the default spellchecking language which comes from locales.pak.
const char kOverrideSpellCheckLang[] = "override-spell-check-lang";
// Enable detection and use of a system-wide Pepper Flash install.
const char kEnableSystemFlash[] = "enable-system-flash";
// Disable scroll bounce (rubber-banding) on OS X Lion and newer.
const char kDisableScrollBounce[] = "disable-scroll-bounce";

View File

@ -42,7 +42,6 @@ extern const char kEnableProfanityFilter[];
extern const char kDisableSpellChecking[];
extern const char kEnableSpellingService[];
extern const char kOverrideSpellCheckLang[];
extern const char kEnableSystemFlash[];
extern const char kDisableScrollBounce[];
extern const char kDisablePdfExtension[];
extern const char kWidevineCdmPath[];

View File

@ -176,13 +176,8 @@ content::ContentBrowserClient*
ChromeMainDelegateCef::CreateContentBrowserClient() {
// Match the logic in the parent ChromeMainDelegate implementation, but create
// our own object type.
if (chrome_content_browser_client_ == nullptr) {
DCHECK(!startup_data_);
startup_data_ = std::make_unique<StartupData>();
chrome_content_browser_client_ =
std::make_unique<ChromeContentBrowserClientCef>(startup_data_.get());
}
chrome_content_browser_client_ =
std::make_unique<ChromeContentBrowserClientCef>();
return chrome_content_browser_client_.get();
}

View File

@ -34,6 +34,11 @@ base::RefCountedStaticMemory* CefResourceBundleDelegate::LoadDataResourceBytes(
return nullptr;
}
base::Optional<std::string> CefResourceBundleDelegate::LoadDataResourceString(
int resource_id) {
return base::nullopt;
}
bool CefResourceBundleDelegate::GetRawDataResource(
int resource_id,
ui::ScaleFactor scale_factor,

View File

@ -31,6 +31,7 @@ class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate {
base::RefCountedStaticMemory* LoadDataResourceBytes(
int resource_id,
ui::ScaleFactor scale_factor) override;
base::Optional<std::string> LoadDataResourceString(int resource_id) override;
bool GetRawDataResource(int resource_id,
ui::ScaleFactor scale_factor,
base::StringPiece* value) const override;

View File

@ -37,31 +37,6 @@ namespace resource_util {
namespace {
#if defined(OS_WIN)
// Gets the Flash path if installed on the system.
bool GetSystemFlashFilename(base::FilePath* out_path) {
const wchar_t kPepperFlashRegistryRoot[] =
L"SOFTWARE\\Macromedia\\FlashPlayerPepper";
const wchar_t kFlashPlayerPathValueName[] = L"PlayerPath";
base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kPepperFlashRegistryRoot,
KEY_READ);
base::string16 path_str;
if (FAILED(path_key.ReadValue(kFlashPlayerPathValueName, &path_str)))
return false;
*out_path = base::FilePath(path_str);
return true;
}
#elif defined(OS_MAC)
const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] =
FILE_PATH_LITERAL("Internet Plug-Ins/PepperFlashPlayer");
#endif
#if defined(OS_LINUX)
// Based on chrome/common/chrome_paths_linux.cc.
@ -200,29 +175,6 @@ base::FilePath GetDefaultLogFilePath() {
#endif // !defined(OS_MAC)
void OverridePepperFlashSystemPluginPath() {
#if defined(OS_WIN) || defined(OS_MAC)
base::FilePath plugin_filename;
#if defined(OS_WIN)
if (!GetSystemFlashFilename(&plugin_filename))
return;
#elif defined(OS_MAC)
if (!util_mac::GetLocalLibraryDirectory(&plugin_filename))
return;
plugin_filename = plugin_filename.Append(kPepperFlashSystemBaseDirectory)
.Append(chrome::kPepperFlashPluginFilename);
#endif // defined(OS_MAC)
if (!plugin_filename.empty()) {
base::PathService::Override(chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN,
plugin_filename);
}
#else // !(defined(OS_WIN) || defined(OS_MAC))
// A system plugin is not available on other platforms.
return;
#endif
}
void OverrideDefaultDownloadDir() {
base::FilePath dir_default_download;
base::FilePath dir_default_download_safe;

View File

@ -25,7 +25,6 @@ base::FilePath GetResourcesDir();
base::FilePath GetDefaultLogFilePath();
// Called from MainDelegate::PreSandboxStartup.
void OverridePepperFlashSystemPluginPath();
void OverrideDefaultDownloadDir();
void OverrideUserDataDir(CefSettings* settings,
const base::CommandLine* command_line);

View File

@ -74,7 +74,6 @@
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/public/renderer/plugin_instance_throttler.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/render_view_visitor.h"
#include "content/renderer/render_widget.h"
@ -499,11 +498,8 @@ AlloyContentRendererClient::CreateURLLoaderThrottleProvider(
return std::make_unique<CefURLLoaderThrottleProviderImpl>(provider_type);
}
bool AlloyContentRendererClient::RequiresWebComponentsV0(const GURL& url) {
// TODO(1025782): For now, file:// URLs are allowed to access Web Components
// v0 features. This will be removed once origin trials support file:// URLs
// for this purpose.
return url.SchemeIs(content::kChromeUIScheme) || url.SchemeIs("file");
bool AlloyContentRendererClient::RequiresHtmlImports(const GURL& url) {
return url.SchemeIs(content::kChromeUIScheme);
}
void AlloyContentRendererClient::GetInterface(

View File

@ -108,7 +108,7 @@ class AlloyContentRendererClient
std::unique_ptr<content::URLLoaderThrottleProvider>
CreateURLLoaderThrottleProvider(
content::URLLoaderThrottleProviderType provider_type) override;
bool RequiresWebComponentsV0(const GURL& url) override;
bool RequiresHtmlImports(const GURL& url) override;
// service_manager::LocalInterfaceProvider implementation.
void GetInterface(const std::string& name,

View File

@ -6,6 +6,7 @@
#include "libcef/renderer/blink_glue.h"
#include "third_party/blink/public/mojom/v8_cache_options.mojom-blink.h"
#include "third_party/blink/public/platform/scheduler/web_resource_loading_task_runner_handle.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url_response.h"
#include "third_party/blink/public/web/web_document.h"
@ -32,6 +33,7 @@
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_response.h"
#include "third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h"
#include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h"
#include "third_party/blink/renderer/platform/weborigin/scheme_registry.h"
#undef LOG
@ -245,4 +247,23 @@ bool HasPluginFrameOwner(blink::WebLocalFrame* frame) {
return core_frame->Owner() && core_frame->Owner()->IsPlugin();
}
BLINK_EXPORT
std::unique_ptr<blink::scheduler::WebResourceLoadingTaskRunnerHandle>
CreateResourceLoadingTaskRunnerHandle(blink::WebLocalFrame* frame) {
blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*frame);
return blink::To<blink::LocalFrame>(core_frame)
->GetFrameScheduler()
->CreateResourceLoadingTaskRunnerHandle();
}
BLINK_EXPORT
std::unique_ptr<blink::scheduler::WebResourceLoadingTaskRunnerHandle>
CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle(
blink::WebLocalFrame* frame) {
blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*frame);
return blink::To<blink::LocalFrame>(core_frame)
->GetFrameScheduler()
->CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle();
}
} // namespace blink_glue

View File

@ -24,6 +24,10 @@ class WebNode;
class WebString;
class WebURLResponse;
class WebView;
namespace scheduler {
class WebResourceLoadingTaskRunnerHandle;
}
} // namespace blink
namespace blink_glue {
@ -89,6 +93,15 @@ BLINK_EXPORT bool ResponseWasCached(const blink::WebURLResponse& response);
// Returns true if the frame owner is a plugin.
BLINK_EXPORT bool HasPluginFrameOwner(blink::WebLocalFrame* frame);
// Used by CefFrameImpl::CreateURLLoader.
BLINK_EXPORT
std::unique_ptr<blink::scheduler::WebResourceLoadingTaskRunnerHandle>
CreateResourceLoadingTaskRunnerHandle(blink::WebLocalFrame* frame);
BLINK_EXPORT
std::unique_ptr<blink::scheduler::WebResourceLoadingTaskRunnerHandle>
CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle(
blink::WebLocalFrame* frame);
} // namespace blink_glue
#endif // CEF_LIBCEF_RENDERER_BLINK_GLUE_H_

View File

@ -77,9 +77,6 @@ class CefBrowserImpl : public CefBrowser, public content::RenderViewObserver {
int browser_id() const { return browser_id_; }
bool is_popup() const { return is_popup_; }
bool is_windowless() const { return is_windowless_; }
content::RenderView* render_view() const {
return content::RenderViewObserver::render_view();
}
// RenderViewObserver methods.
void OnDestruct() override;

View File

@ -286,15 +286,36 @@ void CefFrameImpl::SendProcessMessage(CefProcessId target_process,
}
}
blink::WebURLLoaderFactory* CefFrameImpl::GetURLLoaderFactory() {
std::unique_ptr<blink::WebURLLoader> CefFrameImpl::CreateURLLoader() {
CEF_REQUIRE_RT();
if (!url_loader_factory_ && frame_) {
if (!frame_)
return nullptr;
if (!url_loader_factory_) {
auto render_frame = content::RenderFrameImpl::FromWebFrame(frame_);
if (render_frame) {
url_loader_factory_ = render_frame->CreateURLLoaderFactory();
}
}
return url_loader_factory_.get();
if (!url_loader_factory_)
return nullptr;
return url_loader_factory_->CreateURLLoader(
blink::WebURLRequest(),
blink_glue::CreateResourceLoadingTaskRunnerHandle(frame_),
blink_glue::CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle(
frame_));
}
std::unique_ptr<blink::ResourceLoadInfoNotifierWrapper>
CefFrameImpl::CreateResourceLoadInfoNotifierWrapper() {
CEF_REQUIRE_RT();
if (frame_) {
auto render_frame = content::RenderFrameImpl::FromWebFrame(frame_);
if (render_frame)
return render_frame->CreateResourceLoadInfoNotifierWrapper();
}
return nullptr;
}
void CefFrameImpl::OnAttached() {
@ -309,6 +330,7 @@ bool CefFrameImpl::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(CefMsg_ResponseAck, OnResponseAck)
IPC_MESSAGE_HANDLER(CefMsg_LoadRequest, OnLoadRequest)
IPC_MESSAGE_HANDLER(CefMsg_DidStopLoading, OnDidStopLoading)
IPC_MESSAGE_HANDLER(CefMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@ -507,6 +529,14 @@ void CefFrameImpl::OnDidStopLoading() {
browser_->OnLoadingStateChange(false);
}
void CefFrameImpl::OnMoveOrResizeStarted() {
if (frame_) {
auto web_view = frame_->View();
if (web_view)
web_view->CancelPagePopup();
}
}
void CefFrameImpl::OnLoadRequest(const CefMsg_LoadRequest_Params& params) {
DCHECK(frame_);

View File

@ -15,7 +15,9 @@ class ListValue;
}
namespace blink {
class ResourceLoadInfoNotifierWrapper;
class WebLocalFrame;
class WebURLLoader;
class WebURLLoaderFactory;
} // namespace blink
@ -74,7 +76,9 @@ class CefFrameImpl : public CefFrame {
CefRefPtr<CefProcessMessage> message) override;
// Used by CefRenderURLRequest.
blink::WebURLLoaderFactory* GetURLLoaderFactory();
std::unique_ptr<blink::WebURLLoader> CreateURLLoader();
std::unique_ptr<blink::ResourceLoadInfoNotifierWrapper>
CreateResourceLoadInfoNotifierWrapper();
// Forwarded from CefRenderFrameObserver.
void OnAttached();
@ -102,6 +106,7 @@ class CefFrameImpl : public CefFrame {
void OnResponse(const Cef_Response_Params& params);
void OnResponseAck(int request_id);
void OnDidStopLoading();
void OnMoveOrResizeStarted();
void OnLoadRequest(const CefMsg_LoadRequest_Params& params);
CefBrowserImpl* browser_;

View File

@ -8,22 +8,23 @@
#include "libcef/common/request_impl.h"
#include "libcef/common/response_impl.h"
#include "libcef/common/task_runner_impl.h"
#include "libcef/renderer/blink_glue.h"
#include "libcef/renderer/frame_impl.h"
#include "libcef/renderer/thread_util.h"
#include "base/logging.h"
#include "net/base/request_priority.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom.h"
#include "third_party/blink/public/platform/resource_load_info_notifier_wrapper.h"
#include "third_party/blink/public/platform/web_security_origin.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_url_error.h"
#include "third_party/blink/public/platform/web_url_loader.h"
#include "third_party/blink/public/platform/web_url_loader_client.h"
#include "third_party/blink/public/platform/web_url_loader_factory.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/public/platform/web_url_request_extra_data.h"
#include "third_party/blink/public/platform/web_url_response.h"
using blink::WebString;
@ -87,7 +88,6 @@ class CefRenderURLRequest::Context
frame_(frame),
request_(request),
client_(client),
task_runner_(CefTaskRunnerImpl::GetCurrentTaskRunner()),
status_(UR_IO_PENDING),
error_code_(ERR_NONE),
body_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL),
@ -100,13 +100,7 @@ class CefRenderURLRequest::Context
static_cast<CefRequestImpl*>(request_.get())->SetReadOnly(true);
}
inline bool CalledOnValidThread() {
return task_runner_->RunsTasksInCurrentSequence();
}
bool Start() {
DCHECK(CalledOnValidThread());
GURL url = GURL(request_->GetURL().ToString());
if (!url.is_valid())
return false;
@ -148,30 +142,17 @@ class CefRenderURLRequest::Context
}
}
blink::WebURLLoaderFactory* factory = nullptr;
if (frame_) {
// This factory supports all requests.
factory = static_cast<CefFrameImpl*>(frame_.get())->GetURLLoaderFactory();
}
if (!factory) {
// Global requests are not supported.
return false;
}
loader_ = factory->CreateURLLoader(
blink::WebURLRequest(),
blink::scheduler::WebResourceLoadingTaskRunnerHandle::
CreateUnprioritized(task_runner_.get()));
auto frame_impl = static_cast<CefFrameImpl*>(frame_.get());
loader_ = frame_impl->CreateURLLoader();
loader_->LoadAsynchronously(
std::move(resource_request), nullptr /* extra_data */,
0 /* requestor_id */, false /* download_to_network_cache_only */,
false /* no_mime_sniffing */, url_client_.get());
std::move(resource_request), /*extra_data=*/nullptr,
/*requestor_id=*/0,
/*no_mime_sniffing=*/false,
frame_impl->CreateResourceLoadInfoNotifierWrapper(), url_client_.get());
return true;
}
void Cancel() {
DCHECK(CalledOnValidThread());
// The request may already be complete.
if (!loader_.get() || status_ != UR_IO_PENDING)
return;
@ -185,8 +166,6 @@ class CefRenderURLRequest::Context
void OnStopRedirect(const WebURL& redirect_url,
const WebURLResponse& response) {
DCHECK(CalledOnValidThread());
response_was_cached_ = blink_glue::ResponseWasCached(response);
response_ = CefResponse::Create();
CefResponseImpl* responseImpl =
@ -206,8 +185,6 @@ class CefRenderURLRequest::Context
}
void OnResponse(const WebURLResponse& response) {
DCHECK(CalledOnValidThread());
response_was_cached_ = blink_glue::ResponseWasCached(response);
response_ = CefResponse::Create();
CefResponseImpl* responseImpl =
@ -219,8 +196,6 @@ class CefRenderURLRequest::Context
}
void OnError(const WebURLError& error) {
DCHECK(CalledOnValidThread());
if (status_ == UR_IO_PENDING) {
status_ = UR_FAILED;
error_code_ = static_cast<cef_errorcode_t>(error.reason());
@ -230,8 +205,6 @@ class CefRenderURLRequest::Context
}
void OnComplete() {
DCHECK(CalledOnValidThread());
if (body_handle_.is_valid()) {
return;
}
@ -292,7 +265,6 @@ class CefRenderURLRequest::Context
void OnStartLoadingResponseBody(
mojo::ScopedDataPipeConsumerHandle response_body) {
DCHECK(CalledOnValidThread());
DCHECK(response_body);
DCHECK(!body_handle_);
body_handle_ = std::move(response_body);
@ -307,7 +279,6 @@ class CefRenderURLRequest::Context
}
void OnDownloadProgress(int64_t current) {
DCHECK(CalledOnValidThread());
DCHECK(url_request_.get());
NotifyUploadProgressIfNecessary();
@ -318,13 +289,11 @@ class CefRenderURLRequest::Context
}
void OnDownloadData(const char* data, int dataLength) {
DCHECK(CalledOnValidThread());
DCHECK(url_request_.get());
client_->OnDownloadData(url_request_.get(), data, dataLength);
}
void OnUploadProgress(int64_t current, int64_t total) {
DCHECK(CalledOnValidThread());
DCHECK(url_request_.get());
if (current == total)
got_upload_progress_complete_ = true;
@ -358,7 +327,6 @@ class CefRenderURLRequest::Context
CefRefPtr<CefFrame> frame_;
CefRefPtr<CefRequest> request_;
CefRefPtr<CefURLRequestClient> client_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
CefURLRequest::Status status_;
CefURLRequest::ErrorCode error_code_;
CefRefPtr<CefResponse> response_;
@ -503,7 +471,7 @@ void CefRenderURLRequest::Cancel() {
bool CefRenderURLRequest::VerifyContext() {
DCHECK(context_.get());
if (!context_->CalledOnValidThread()) {
if (!CEF_CURRENTLY_ON_RT()) {
NOTREACHED() << "called on invalid thread";
return false;
}

View File

@ -95,9 +95,6 @@ body {
<tr>
<td class="label" valign="top">JavaScript</td>
<td class="value">$$JAVASCRIPT$$</td>
</tr>
<tr><td class="label" valign="top">Flash</td>
<td class="value" id="flash">$$FLASH$$</td>
</tr>
<tr>
<td class="label" valign="top">User Agent</td>

View File

@ -1,40 +0,0 @@
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "include/base/cef_callback_helpers.h"
#include "include/base/cef_callback.h"
namespace base {
ScopedClosureRunner::ScopedClosureRunner() {}
ScopedClosureRunner::ScopedClosureRunner(const Closure& closure)
: closure_(closure) {}
ScopedClosureRunner::~ScopedClosureRunner() {
if (!closure_.is_null())
closure_.Run();
}
void ScopedClosureRunner::Reset() {
Closure old_closure = Release();
if (!old_closure.is_null())
old_closure.Run();
}
void ScopedClosureRunner::Reset(const Closure& closure) {
Closure old_closure = Release();
closure_ = closure;
if (!old_closure.is_null())
old_closure.Run();
}
Closure ScopedClosureRunner::Release() {
Closure result = closure_;
closure_.Reset();
return result;
}
} // namespace base

View File

@ -130,11 +130,6 @@ patches = [
# https://codereview.chromium.org/208313009
'name': 'ui_dragdrop_355390',
},
{
# Remove NOTREACHED() that is hit when loading Flash in incognito mode.
# https://bitbucket.org/chromiumembedded/cef/issue/1586
'name': 'content_pepper_flash_1586',
},
{
# Fix placement of IME window on Windows.
# https://bitbucket.org/chromiumembedded/cef/issue/1610
@ -520,14 +515,14 @@ patches = [
# https://bugs.chromium.org/p/chromium/issues/detail?id=1123388
'name': 'chrome_browser_sharesheet_1123388',
},
{
# Windows/Linux: Fix scrolling in popup lists with high-dpi.
# https://crrev.com/97514ca869
'name': 'webkit_widget_base_2444320',
},
{
# Linux: Fix ATK assertion error when generating ARM build config.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1123214
'name': 'linux_atk_1123214',
},
{
# Fix crash in MimeHandlerViewEmbedder::DidFinishNavigation.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1133115#c11
'name': 'mime_handler_view_embedder_1133115',
}
]

View File

@ -1,5 +1,5 @@
diff --git base/BUILD.gn base/BUILD.gn
index 1d449b35bf40..0b859084ba1c 100644
index 9d0250c77571..100fc4b9d860 100644
--- base/BUILD.gn
+++ base/BUILD.gn
@@ -33,6 +33,7 @@ import("//build/config/ui.gni")
@ -10,7 +10,7 @@ index 1d449b35bf40..0b859084ba1c 100644
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
@@ -1646,7 +1647,11 @@ component("base") {
@@ -1655,7 +1656,11 @@ component("base") {
"hash/md5_constexpr_internal.h",
"hash/sha1.h",
]
@ -23,7 +23,7 @@ index 1d449b35bf40..0b859084ba1c 100644
sources += [
"hash/md5_nacl.cc",
"hash/md5_nacl.h",
@@ -1841,6 +1846,12 @@ component("base") {
@@ -1858,6 +1863,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
}

View File

@ -12,7 +12,7 @@ index 202bd7aa0d57..20067b203d96 100644
// Force a new surface id to be allocated. Returns true if the
// RenderWidgetHostImpl sent the resulting surface id to the renderer.
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
index c9885b773743..dbd06e177d96 100644
index a82ed2d5bbcd..59fabfcdfff7 100644
--- content/browser/renderer_host/browser_compositor_view_mac.mm
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -86,6 +86,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {

View File

@ -1,21 +1,21 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index dfa87d00c03b..d04b6dd692dd 100644
index fed61eb62d74..af8ae804c1ff 100644
--- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc
@@ -1680,6 +1680,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
// DeclarativeApiTest.PersistRules.
if (actual_process_lock.matches_scheme(url::kDataScheme))
return true;
@@ -1704,6 +1704,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
// DeclarativeApiTest.PersistRules.
if (actual_process_lock.matches_scheme(url::kDataScheme))
return true;
+
+ // Allow other schemes that are non-standard, non-local and WebSafe.
+ if (lock_url.is_valid() &&
+ !lock_url.IsStandard() &&
+ !base::Contains(url::GetLocalSchemes(),
+ lock_url.scheme_piece()) &&
+ base::Contains(schemes_okay_to_request_in_any_process_,
+ lock_url.scheme_piece())) {
+ return true;
+ }
}
+ // Allow other schemes that are non-standard, non-local and WebSafe.
+ if (lock_url.is_valid() &&
+ !lock_url.IsStandard() &&
+ !base::Contains(url::GetLocalSchemes(),
+ lock_url.scheme_piece()) &&
+ base::Contains(schemes_okay_to_request_in_any_process_,
+ lock_url.scheme_piece())) {
+ return true;
+ }
}
// TODO(wjmaclean): We should update the ProcessLock comparison API to
// TODO(wjmaclean): We should update the ProcessLock comparison API

View File

@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 4f6461b6b5f5..58bb48800898 100644
index 9d66490cdb55..1e4a14311524 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -1766,8 +1766,6 @@ config("thin_archive") {
@@ -1765,8 +1765,6 @@ config("thin_archive") {
# archive names to 16 characters, which is not what we want).
if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
arflags = [ "-T" ]

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index e462f7d8bef1..6c1c686f161c 100644
index 16bd4c2717ee..65e309d23866 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -12,6 +12,7 @@ import("//build/config/crypto.gni")
@ -10,15 +10,15 @@ index e462f7d8bef1..6c1c686f161c 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -1876,6 +1877,7 @@ static_library("browser") {
"//build:branding_buildflags",
@@ -1912,6 +1913,7 @@ static_library("browser") {
"//build:chromeos_buildflags",
"//build/config/compiler:compiler_buildflags",
"//cc",
+ "//cef/libcef/features",
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2354,6 +2356,10 @@ static_library("browser") {
@@ -2424,6 +2426,10 @@ static_library("browser") {
]
}
@ -29,7 +29,7 @@ index e462f7d8bef1..6c1c686f161c 100644
if (is_android) {
sources += [
"after_startup_task_utils_android.cc",
@@ -4821,7 +4827,7 @@ static_library("browser") {
@@ -4975,7 +4981,7 @@ static_library("browser") {
]
}

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/app_controller_mac.mm chrome/browser/app_controller_mac.mm
index ce66d73e0fa4..cc62e05ba3ba 100644
index 189055ae0abb..f12df6cab7a8 100644
--- chrome/browser/app_controller_mac.mm
+++ chrome/browser/app_controller_mac.mm
@@ -1141,6 +1141,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
@@ -1144,6 +1144,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
// Run a (background) application in a new tab.
- (void)executeApplication:(id)sender {
@ -10,7 +10,7 @@ index ce66d73e0fa4..cc62e05ba3ba 100644
NSInteger tag = [sender tag];
Profile* profile = [self lastProfile];
DCHECK(profile);
@@ -1149,6 +1150,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
@@ -1152,6 +1153,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
tag < static_cast<int>(applications.size()));
const extensions::Extension* extension = applications.GetExtension(tag);
BackgroundModeManager::LaunchBackgroundApplication(profile, extension);
@ -18,7 +18,7 @@ index ce66d73e0fa4..cc62e05ba3ba 100644
}
// Same as |-commandDispatch:|, but executes commands using a disposition
@@ -1530,6 +1532,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
@@ -1549,6 +1551,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
// TODO(rickcam): Mock out BackgroundApplicationListModel, then add unit
// tests which use the mock in place of the profile-initialized model.
@ -26,7 +26,7 @@ index ce66d73e0fa4..cc62e05ba3ba 100644
// Avoid breaking unit tests which have no profile.
if (profile) {
BackgroundApplicationListModel applications(profile);
@@ -1556,6 +1559,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
@@ -1575,6 +1578,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
}
}
}
@ -35,10 +35,10 @@ index ce66d73e0fa4..cc62e05ba3ba 100644
return dockMenu;
}
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
index b6fe1fee2cbb..84a75c6070d6 100644
index ee9693ce0bf9..29c6bfa6baa1 100644
--- chrome/browser/browser_process.h
+++ chrome/browser/browser_process.h
@@ -202,10 +202,12 @@ class BrowserProcess {
@@ -206,10 +206,12 @@ class BrowserProcess {
virtual DownloadStatusUpdater* download_status_updater() = 0;
virtual DownloadRequestLimiter* download_request_limiter() = 0;
@ -52,10 +52,10 @@ index b6fe1fee2cbb..84a75c6070d6 100644
// Returns the StatusTray, which provides an API for displaying status icons
// in the system status tray. Returns NULL if status icons are not supported
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index 443348c2de00..7486628a9912 100644
index cfa6979b9fb5..e4f584d1e549 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -951,24 +951,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
@@ -959,24 +959,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get();
}
@ -83,10 +83,10 @@ index 443348c2de00..7486628a9912 100644
StatusTray* BrowserProcessImpl::status_tray() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index 8a8d8a820690..c06d97c65ec2 100644
index e63afefc769d..afa0e2e59326 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -163,9 +163,11 @@ class BrowserProcessImpl : public BrowserProcess,
@@ -165,9 +165,11 @@ class BrowserProcessImpl : public BrowserProcess,
void SetApplicationLocale(const std::string& actual_locale) override;
DownloadStatusUpdater* download_status_updater() override;
DownloadRequestLimiter* download_request_limiter() override;
@ -118,7 +118,7 @@ index 845abd9ea9ab..29a5cfb36448 100644
// Make a copy of the BrowserList to simplify the case where we need to
// destroy a Browser during the loop.
diff --git chrome/browser/sessions/session_service.cc chrome/browser/sessions/session_service.cc
index 1ed498e97be4..56e56b4d765a 100644
index 3ccad0af51e7..370475e9f5ff 100644
--- chrome/browser/sessions/session_service.cc
+++ chrome/browser/sessions/session_service.cc
@@ -954,12 +954,19 @@ void SessionService::MaybeDeleteSessionOnlyData() {

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/browser_about_handler.cc chrome/browser/browser_about_handler.cc
index af2282034336..c49d920f73b5 100644
index ba0c5c3fc044..b4df9af95ecd 100644
--- chrome/browser/browser_about_handler.cc
+++ chrome/browser/browser_about_handler.cc
@@ -95,6 +95,9 @@ bool HandleNonNavigationAboutURL(const GURL& url) {
@@ -70,6 +70,9 @@ bool HandleNonNavigationAboutURL(const GURL& url) {
FROM_HERE, base::BindOnce(&chrome::AttemptExit));
return true;
}
@ -13,10 +13,10 @@ index af2282034336..c49d920f73b5 100644
return false;
}
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index 24954ee7e0e8..2b883c5316c6 100644
index 2c9d816e1aff..a07928ddc18c 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -257,6 +257,20 @@
@@ -255,6 +255,20 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif
@ -37,9 +37,9 @@ index 24954ee7e0e8..2b883c5316c6 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif
@@ -474,6 +488,13 @@ Browser::Browser(const CreateParams& params)
CHECK(CanCreateBrowserForProfile(profile_));
@@ -477,6 +491,13 @@ Browser::Browser(const CreateParams& params)
{
tab_strip_model_->AddObserver(this);
+#if BUILDFLAG(ENABLE_CEF)
+ if (cef::IsChromeRuntimeEnabled()) {
@ -48,10 +48,10 @@ index 24954ee7e0e8..2b883c5316c6 100644
+ }
+#endif
+
tab_strip_model_->AddObserver(this);
location_bar_model_ = std::make_unique<LocationBarModelImpl>(
@@ -1346,6 +1367,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
location_bar_model_delegate_.get(), content::kMaxURLDisplayChars);
@@ -1335,6 +1356,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED;
@ -66,7 +66,7 @@ index 24954ee7e0e8..2b883c5316c6 100644
return window()->PreHandleKeyboardEvent(event);
}
@@ -1353,8 +1382,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
@@ -1342,8 +1371,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source);
@ -87,7 +87,7 @@ index 24954ee7e0e8..2b883c5316c6 100644
}
bool Browser::TabsNeedBeforeUnloadFired() {
@@ -1609,6 +1648,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
@@ -1572,6 +1611,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
return window->OpenURLFromTab(source, params);
}
@ -102,7 +102,7 @@ index 24954ee7e0e8..2b883c5316c6 100644
NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source;
@@ -1721,6 +1768,8 @@ void Browser::LoadingStateChanged(WebContents* source,
@@ -1684,6 +1731,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool to_different_document) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, to_different_document);
@ -111,7 +111,7 @@ index 24954ee7e0e8..2b883c5316c6 100644
}
void Browser::CloseContents(WebContents* source) {
@@ -1748,6 +1797,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -1711,6 +1760,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@ -120,7 +120,7 @@ index 24954ee7e0e8..2b883c5316c6 100644
if (!GetStatusBubble())
return;
@@ -1755,6 +1806,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -1718,6 +1769,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url);
}
@ -138,7 +138,7 @@ index 24954ee7e0e8..2b883c5316c6 100644
void Browser::ContentsMouseEvent(WebContents* source,
bool motion,
bool exited) {
@@ -1871,6 +1933,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
@@ -1834,6 +1896,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents);
@ -149,7 +149,7 @@ index 24954ee7e0e8..2b883c5316c6 100644
}
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) {
@@ -1907,6 +1973,8 @@ void Browser::RendererResponsive(
@@ -1870,6 +1936,8 @@ void Browser::RendererResponsive(
void Browser::DidNavigateMainFramePostCommit(WebContents* web_contents) {
if (web_contents == tab_strip_model_->GetActiveWebContents())
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
@ -158,7 +158,7 @@ index 24954ee7e0e8..2b883c5316c6 100644
}
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
@@ -1957,11 +2025,15 @@ void Browser::EnterFullscreenModeForTab(
@@ -1916,11 +1984,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id);
@ -174,7 +174,7 @@ index 24954ee7e0e8..2b883c5316c6 100644
}
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2822,6 +2894,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
@@ -2814,6 +2886,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
content_translate_driver->RemoveObserver(this);
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
}
@ -184,7 +184,7 @@ index 24954ee7e0e8..2b883c5316c6 100644
void Browser::CloseFrame() {
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index c67b79ec647a..532bb064b080 100644
index afd852999cd7..a2d2df4838f7 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -21,6 +21,7 @@
@ -206,7 +206,7 @@ index c67b79ec647a..532bb064b080 100644
#if defined(OS_ANDROID)
#error This file should only be included on desktop.
#endif
@@ -247,6 +252,11 @@ class Browser : public TabStripModelObserver,
@@ -259,6 +264,11 @@ class Browser : public TabStripModelObserver,
// User-set title of this browser window, if there is one.
std::string user_title;
@ -218,7 +218,7 @@ index c67b79ec647a..532bb064b080 100644
private:
friend class Browser;
friend class WindowSizerChromeOSTest;
@@ -365,6 +375,12 @@ class Browser : public TabStripModelObserver,
@@ -377,6 +387,12 @@ class Browser : public TabStripModelObserver,
return &signin_view_controller_;
}
@ -231,7 +231,7 @@ index c67b79ec647a..532bb064b080 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -755,6 +771,11 @@ class Browser : public TabStripModelObserver,
@@ -762,6 +778,11 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@ -243,7 +243,7 @@ index c67b79ec647a..532bb064b080 100644
void ContentsMouseEvent(content::WebContents* source,
bool motion,
bool exited) override;
@@ -1221,6 +1242,10 @@ class Browser : public TabStripModelObserver,
@@ -1229,6 +1250,10 @@ class Browser : public TabStripModelObserver,
extension_browser_window_helper_;
#endif
@ -255,7 +255,7 @@ index c67b79ec647a..532bb064b080 100644
// Stores the list of browser windows showing via a menu.
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index 675dae9023fe..770a85a45f8f 100644
index 9e3369185322..95abb6f37561 100644
--- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc
@@ -435,6 +435,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
@ -273,7 +273,7 @@ index 675dae9023fe..770a85a45f8f 100644
// tab helpers, so the entire set of tab helpers needs to be set up
// immediately.
diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc
index f5134591c3dd..8d0211b43791 100644
index 6f917199c655..bf7802b8d707 100644
--- chrome/browser/ui/browser_tabstrip.cc
+++ chrome/browser/ui/browser_tabstrip.cc
@@ -30,9 +30,13 @@ void AddTabAt(Browser* browser,

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
index f3b51e20cb9c..b479022f1d3b 100644
index cf62b79358e1..4fe90fde38ff 100644
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -8,6 +8,7 @@
@ -7,10 +7,10 @@ index f3b51e20cb9c..b479022f1d3b 100644
#include "base/feature_list.h"
#include "build/buildflag.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/content_settings/one_time_geolocation_permission_provider.h"
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
@@ -20,6 +21,10 @@
@@ -21,6 +22,10 @@
#include "extensions/buildflags/buildflags.h"
#include "ui/webui/webui_allowlist_provider.h"
@ -21,7 +21,7 @@ index f3b51e20cb9c..b479022f1d3b 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_service.h"
#include "extensions/browser/extension_system.h"
@@ -48,8 +53,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
@@ -49,8 +54,14 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
#endif
#if BUILDFLAG(ENABLE_EXTENSIONS)
@ -36,8 +36,8 @@ index f3b51e20cb9c..b479022f1d3b 100644
#endif
}
@@ -97,10 +108,16 @@ scoped_refptr<RefcountedKeyedService>
std::move(allowlist_provider));
@@ -108,10 +119,16 @@ scoped_refptr<RefcountedKeyedService>
}
#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_CEF)
@ -54,7 +54,7 @@ index f3b51e20cb9c..b479022f1d3b 100644
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
SupervisedUserSettingsService* supervised_service =
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
index 20ae512af806..e03946e7ce80 100644
index c932b27c6ab2..862c2205d12c 100644
--- components/content_settings/renderer/content_settings_agent_impl.cc
+++ components/content_settings/renderer/content_settings_agent_impl.cc
@@ -176,7 +176,7 @@ ContentSetting GetContentSettingFromRulesImpl(

View File

@ -1,16 +1,16 @@
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index bf4ca6cdccc4..1b9607765313 100644
index d4de7dc10b2a..f5b030de54f0 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -10,6 +10,7 @@ import("//build/config/crypto.gni")
import("//build/config/features.gni")
@@ -11,6 +11,7 @@ import("//build/config/features.gni")
import("//build/config/linux/gtk/gtk.gni")
import("//build/config/ozone.gni")
import("//build/config/ui.gni")
+import("//cef/libcef/features/features.gni")
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/assistant/assistant.gni")
@@ -330,6 +331,10 @@ static_library("ui") {
@@ -323,6 +324,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@ -21,7 +21,7 @@ index bf4ca6cdccc4..1b9607765313 100644
# Since browser and browser_ui actually depend on each other,
# we must omit the dependency from browser_ui to browser.
# However, this means browser_ui and browser should more or less
@@ -351,6 +356,7 @@ static_library("ui") {
@@ -344,6 +349,7 @@ static_library("ui") {
"//base/allocator:buildflags",
"//build:branding_buildflags",
"//cc/paint",
@ -29,15 +29,15 @@ index bf4ca6cdccc4..1b9607765313 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -1525,6 +1531,7 @@ static_library("ui") {
@@ -1531,6 +1537,7 @@ static_library("ui") {
"//components/page_load_metrics/browser",
"//components/performance_manager:site_data_proto",
"//components/printing/browser",
+ "//components/printing/common:mojo_interfaces",
"//components/profile_metrics",
"//components/safety_check",
"//components/search_provider_logos",
@@ -3243,7 +3250,9 @@ static_library("ui") {
"//components/reading_list/features:flags",
"//components/safe_browsing/core/common:safe_browsing_policy_handler",
@@ -3299,7 +3306,9 @@ static_library("ui") {
"views/frame/browser_desktop_window_tree_host_platform.h",
]
}
@ -46,7 +46,7 @@ index bf4ca6cdccc4..1b9607765313 100644
+ sources += [ "views/frame/native_browser_frame_factory_ozone.cc" ]
+ }
}
if (is_desktop_linux) {
if (is_linux) {
sources += [
diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc
index f27414c41891..5ff3bfa8f724 100644

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index c5c7a662232d..c1d9e8c5434d 100644
index 957a3e09113f..1d8a5bdac349 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -1035,10 +1035,6 @@ void LaunchURL(const GURL& url,
@@ -1052,10 +1052,6 @@ void LaunchURL(const GURL& url,
}
}
@ -13,7 +13,7 @@ index c5c7a662232d..c1d9e8c5434d 100644
void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) {
// |allowlist| combines pref/policy + cmdline switch in the browser process.
// For renderer and utility (e.g. NetworkService) processes the switch is the
@@ -1217,6 +1213,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
@@ -1234,6 +1230,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
return *greased_brand_version_list;
}
@ -29,10 +29,10 @@ index c5c7a662232d..c1d9e8c5434d 100644
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUserAgent)) {
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index ef7da4343581..93ad5e8b1d9b 100644
index c6f87c148d16..bdc93db224d0 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -98,7 +98,8 @@ class ChromeXrIntegrationClient;
@@ -101,7 +101,8 @@ class ChromeXrIntegrationClient;
}
#endif

View File

@ -1,8 +1,8 @@
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 670a33244287..9c13775f385d 100644
index 8af99f57cd5e..3801b8dc79af 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -373,7 +373,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -368,7 +368,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
content::NotificationService::AllSources());
@ -12,10 +12,10 @@ index 670a33244287..9c13775f385d 100644
}
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
index 8d0793739a72..8f5097889fcb 100644
index ccbe94c5b66b..834a01d6be84 100644
--- chrome/browser/profiles/profile_manager.h
+++ chrome/browser/profiles/profile_manager.h
@@ -99,7 +99,7 @@ class ProfileManager : public content::NotificationObserver,
@@ -103,7 +103,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.
@ -24,7 +24,7 @@ index 8d0793739a72..8f5097889fcb 100644
// Returns regular or off-the-record profile given its profile key.
static Profile* GetProfileFromProfileKey(ProfileKey* profile_key);
@@ -132,7 +132,7 @@ class ProfileManager : public content::NotificationObserver,
@@ -136,7 +136,7 @@ class ProfileManager : public content::NotificationObserver,
// Returns true if the profile pointer is known to point to an existing
// profile.
@ -33,7 +33,7 @@ index 8d0793739a72..8f5097889fcb 100644
// Returns the directory where the first created profile is stored,
// relative to the user data directory currently in use.
@@ -141,7 +141,7 @@ class ProfileManager : public content::NotificationObserver,
@@ -145,7 +145,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,8 +1,8 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index 8d48495d450e..eea8b9c41e54 100644
index 1cab7756e96f..77a8bdde7d62 100644
--- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn
@@ -260,6 +260,7 @@ static_library("safe_browsing") {
@@ -256,6 +256,7 @@ static_library("safe_browsing") {
"//chrome/common/safe_browsing:download_type_util",
"//chrome/services/file_util/public/cpp",
"//components/content_settings/core/browser",

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/sharesheet/sharesheet_service_delegate.cc chrome/browser/sharesheet/sharesheet_service_delegate.cc
index ceea6a38ca79..6e8e335222bc 100644
index 1ddf613c138f..00c497b67533 100644
--- chrome/browser/sharesheet/sharesheet_service_delegate.cc
+++ chrome/browser/sharesheet/sharesheet_service_delegate.cc
@@ -21,8 +21,10 @@ SharesheetServiceDelegate::SharesheetServiceDelegate(
@ -53,12 +53,12 @@ index ceea6a38ca79..6e8e335222bc 100644
+#endif
}
} // namespace sharesheet
const gfx::VectorIcon* SharesheetServiceDelegate::GetVectorIcon(
diff --git chrome/browser/sharesheet/sharesheet_service_delegate.h chrome/browser/sharesheet/sharesheet_service_delegate.h
index 47f15a6b4093..71189bfee8b9 100644
index e957b2c39772..80d9dc7b6c76 100644
--- chrome/browser/sharesheet/sharesheet_service_delegate.h
+++ chrome/browser/sharesheet/sharesheet_service_delegate.h
@@ -59,7 +59,9 @@ class SharesheetServiceDelegate : public SharesheetController {
@@ -64,7 +64,9 @@ class SharesheetServiceDelegate : public SharesheetController {
private:
const uint32_t id_;
base::string16 active_action_;

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
index a63433f6a77c..ad603df13e79 100644
index 08cafea4eb1c..e21eff668695 100644
--- chrome/browser/themes/theme_service.cc
+++ chrome/browser/themes/theme_service.cc
@@ -26,6 +26,7 @@
@ -35,8 +35,8 @@ index a63433f6a77c..ad603df13e79 100644
theme_observer_ = std::make_unique<ThemeObserver>(this);
extensions::ExtensionSystem::Get(profile_)->ready().Post(
FROM_HERE, base::Bind(&ThemeService::OnExtensionServiceReady,
weak_ptr_factory_.GetWeakPtr()));
FROM_HERE, base::BindOnce(&ThemeService::OnExtensionServiceReady,
weak_ptr_factory_.GetWeakPtr()));
+ }
#endif
theme_syncable_service_.reset(new ThemeSyncableService(profile_, this));

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
index d789ee040ac5..19e5a5daa343 100644
index 1d19e684d0c2..382423f3f2ce 100644
--- chrome/browser/plugins/plugin_info_host_impl.cc
+++ chrome/browser/plugins/plugin_info_host_impl.cc
@@ -18,6 +18,7 @@
@ -10,7 +10,7 @@ index d789ee040ac5..19e5a5daa343 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
@@ -54,6 +55,11 @@
@@ -53,6 +54,11 @@
#include "url/gurl.h"
#include "url/origin.h"
@ -22,7 +22,7 @@ index d789ee040ac5..19e5a5daa343 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "components/guest_view/browser/guest_view_base.h"
#include "extensions/browser/extension_registry.h"
@@ -100,6 +106,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
@@ -99,6 +105,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
extensions::ExtensionRegistry* extension_registry,
int process_id,
const GURL& resource) {
@ -32,7 +32,7 @@ index d789ee040ac5..19e5a5daa343 100644
extensions::WebViewRendererState* renderer_state =
extensions::WebViewRendererState::GetInstance();
std::string partition_id;
@@ -128,9 +137,6 @@ bool IsPluginLoadingAccessibleResourceInWebView(
@@ -127,9 +136,6 @@ bool IsPluginLoadingAccessibleResourceInWebView(
PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile)
: render_process_id_(render_process_id),
@ -42,7 +42,7 @@ index d789ee040ac5..19e5a5daa343 100644
host_content_settings_map_(
HostContentSettingsMapFactory::GetForProfile(profile)),
plugin_prefs_(PluginPrefs::GetForProfile(profile)) {
@@ -138,6 +144,13 @@ PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile)
@@ -137,6 +143,13 @@ PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile)
profile->GetPrefs());
run_all_flash_in_allow_mode_.Init(prefs::kRunAllFlashInAllowMode,
profile->GetPrefs());
@ -56,7 +56,7 @@ index d789ee040ac5..19e5a5daa343 100644
}
PluginInfoHostImpl::Context::~Context() {}
@@ -208,7 +221,8 @@ void PluginInfoHostImpl::PluginsLoaded(
@@ -207,7 +220,8 @@ void PluginInfoHostImpl::PluginsLoaded(
plugin_metadata->identifier(), &output->status);
}
@ -66,7 +66,7 @@ index d789ee040ac5..19e5a5daa343 100644
// Check to see if the component updater can fetch an implementation.
std::unique_ptr<component_updater::ComponentInfo> cus_plugin_info =
g_browser_process->component_updater()->GetComponentForMimeType(
@@ -229,6 +243,15 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
@@ -228,6 +242,15 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
PluginMetadata::SecurityStatus security_status,
const std::string& plugin_identifier,
chrome::mojom::PluginStatus* status) const {
@ -82,7 +82,7 @@ index d789ee040ac5..19e5a5daa343 100644
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
*status = chrome::mojom::PluginStatus::kAllowed;
return;
@@ -337,17 +360,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
@@ -345,17 +368,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
return false;
}
@ -127,7 +127,7 @@ index d789ee040ac5..19e5a5daa343 100644
bool enabled = i < matching_plugins.size();
if (!enabled) {
diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc
index 1471b8f2a414..a856ce635719 100644
index c78907c1d4ea..8297fa6a0162 100644
--- chrome/browser/plugins/plugin_utils.cc
+++ chrome/browser/plugins/plugin_utils.cc
@@ -5,6 +5,7 @@
@ -138,7 +138,7 @@ index 1471b8f2a414..a856ce635719 100644
#include "chrome/browser/profiles/profile_io_data.h"
#include "chrome/common/plugin_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
@@ -14,6 +15,10 @@
@@ -15,6 +16,10 @@
#include "url/gurl.h"
#include "url/origin.h"
@ -149,7 +149,7 @@ index 1471b8f2a414..a856ce635719 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
@@ -181,6 +186,12 @@ base::flat_map<std::string, std::string>
@@ -168,6 +173,12 @@ base::flat_map<std::string, std::string>
PluginUtils::GetMimeTypeToExtensionIdMap(
content::BrowserContext* browser_context) {
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
@ -197,10 +197,10 @@ index c1870b0f56ef..d32b8d54fb3f 100644
GURL webstore_url(extension_urls::GetWebstoreLaunchURL());
if (response_url.SchemeIsHTTPOrHTTPS() &&
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index c9852764a59c..ffe26ef879b9 100644
index 7dbbe8742ca4..01a8b2e3eb24 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -825,6 +825,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -831,6 +831,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) &&
@ -208,7 +208,7 @@ index c9852764a59c..ffe26ef879b9 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
@@ -1028,7 +1029,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1029,7 +1030,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@ -218,7 +218,7 @@ index c9852764a59c..ffe26ef879b9 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -1037,7 +1039,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1038,7 +1040,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@ -228,7 +228,7 @@ index c9852764a59c..ffe26ef879b9 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1047,7 +1050,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1048,7 +1051,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));
@ -238,7 +238,7 @@ index c9852764a59c..ffe26ef879b9 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
@@ -1055,7 +1059,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1056,7 +1060,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
IDR_BLOCKED_PLUGIN_HTML,
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
group_name));
@ -249,10 +249,10 @@ index c9852764a59c..ffe26ef879b9 100644
}
case chrome::mojom::PluginStatus::kComponentUpdateRequired: {
diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 4e883820f752..267c6af2af6b 100644
index f1370e70cc04..2109770d03e7 100644
--- chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -364,8 +364,11 @@ void ChromePluginPlaceholder::OnBlockedContent(
@@ -356,8 +356,11 @@ void ChromePluginPlaceholder::OnBlockedContent(
if (status ==
content::RenderFrame::PeripheralContentStatus::CONTENT_STATUS_TINY) {
@ -267,7 +267,7 @@ index 4e883820f752..267c6af2af6b 100644
std::string message = base::StringPrintf(
diff --git content/browser/browser_plugin/browser_plugin_guest.h content/browser/browser_plugin/browser_plugin_guest.h
index 4e1cf0118cb7..af941abfe235 100644
index 347c1f83b873..9d77ef57274d 100644
--- content/browser/browser_plugin/browser_plugin_guest.h
+++ content/browser/browser_plugin/browser_plugin_guest.h
@@ -127,6 +127,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,

View File

@ -1,5 +1,5 @@
diff --git chrome/browser/ui/prefs/pref_watcher.h chrome/browser/ui/prefs/pref_watcher.h
index a439b2ce1b32..21c7b97639f4 100644
index 78d5b763970c..de98bd0b325b 100644
--- chrome/browser/ui/prefs/pref_watcher.h
+++ chrome/browser/ui/prefs/pref_watcher.h
@@ -29,10 +29,10 @@ class PrefWatcher : public KeyedService {

View File

@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index ce49b5924986..596069095d86 100644
index fb7fa9ff4ed2..cf7be804968e 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -4,6 +4,7 @@
@ -10,15 +10,15 @@ index ce49b5924986..596069095d86 100644
import("//chrome/common/features.gni")
import("//components/nacl/features.gni")
import("//components/offline_pages/buildflags/features.gni")
@@ -141,6 +142,7 @@ static_library("renderer") {
public_deps = [ "//components/contextual_search:buildflags" ]
@@ -137,6 +138,7 @@ static_library("renderer") {
deps = [
"//base/allocator:buildflags",
+ "//cef/libcef/features",
"//chrome:resources",
"//chrome:strings",
"//chrome/common",
@@ -206,6 +208,10 @@ static_library("renderer") {
@@ -218,6 +220,10 @@ static_library("renderer") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]

View File

@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index 8b7b6f492b3e..1085e4b1e23d 100644
index d9a02faddd91..09a349fcf2b8 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -27,6 +27,7 @@
@ -10,7 +10,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h"
#include "chrome/browser/defaults.h"
@@ -379,6 +380,8 @@ struct MainFunction {
@@ -378,6 +379,8 @@ struct MainFunction {
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
@ -19,7 +19,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644
#if defined(OS_WIN)
// Reach out to chrome_elf for the truth on the user data directory.
// Note that in tests, this links to chrome_elf_test_stubs.
@@ -640,7 +643,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
@@ -644,7 +647,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
}
#if defined(OS_WIN)
@ -29,7 +29,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644
base::sequence_manager::internal::ThreadControllerPowerMonitor::
InitializeOnMainThread();
#endif
@@ -922,6 +927,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -926,6 +931,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@ -37,7 +37,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644
crash_reporter::InitializeCrashKeys();
#if defined(OS_POSIX)
@@ -932,6 +938,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -936,6 +942,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
InitMacCrashReporter(command_line, process_type);
SetUpInstallerPreferences(command_line);
#endif
@ -45,7 +45,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644
#if defined(OS_WIN)
child_process_logging::Init();
@@ -1056,6 +1063,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1058,6 +1065,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
locale;
}
@ -53,7 +53,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644
#if defined(OS_POSIX) && !defined(OS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) {
@@ -1088,6 +1096,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1090,6 +1098,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@ -61,7 +61,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644
#if BUILDFLAG(ENABLE_PDF)
MaybeInitializeGDI();
@@ -1186,6 +1195,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1188,6 +1197,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@ -69,7 +69,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
// this up for the browser process in a different manner.
const base::CommandLine* command_line =
@@ -1202,6 +1212,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1204,6 +1214,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@ -78,7 +78,7 @@ index 8b7b6f492b3e..1085e4b1e23d 100644
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index c9bf19474a2a..3c1d5eec82fa 100644
index 195da4bea79f..5f2c60e63623 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -49,6 +49,7 @@
@ -101,7 +101,7 @@ index c9bf19474a2a..3c1d5eec82fa 100644
// These members must be initialized before returning from this function.
// Android doesn't use StartupBrowserCreator.
@@ -1613,11 +1616,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1615,11 +1618,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// This step is costly and is already measured in
// Startup.StartupBrowserCreator_Start.
// See the comment above for an explanation of |process_command_line|.
@ -117,10 +117,10 @@ index c9bf19474a2a..3c1d5eec82fa 100644
// Initialize autoupdate timer. Timer callback costs basically nothing
// when browser is not in persistent mode, so it's OK to let it ride on
diff --git chrome/browser/notifications/notification_platform_bridge_mac.mm chrome/browser/notifications/notification_platform_bridge_mac.mm
index c2905bfd0df7..09bfcf942a7c 100644
index 9e8fcb9f9f91..2a9eaca0fb0d 100644
--- chrome/browser/notifications/notification_platform_bridge_mac.mm
+++ chrome/browser/notifications/notification_platform_bridge_mac.mm
@@ -25,6 +25,7 @@
@@ -24,6 +24,7 @@
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/system/sys_info.h"
@ -128,7 +128,7 @@ index c2905bfd0df7..09bfcf942a7c 100644
#include "chrome/browser/browser_features.h"
#include "chrome/browser/notifications/notification_common.h"
#include "chrome/browser/notifications/notification_display_service_impl.h"
@@ -449,6 +450,12 @@ getDisplayedAlertsForProfileId:(NSString*)profileId
@@ -451,6 +452,12 @@ getDisplayedAlertsForProfileId:(NSString*)profileId
- (id<NotificationDelivery>)serviceProxy {
id<NotificationDelivery> proxy = [_xpcConnection remoteObjectProxy];

View File

@ -1,10 +1,10 @@
diff --git third_party/widevine/cdm/BUILD.gn third_party/widevine/cdm/BUILD.gn
index 4a6b5bb81c17..de8c4e03a9c9 100644
index fa726c5a60fa..b84dd523542b 100644
--- third_party/widevine/cdm/BUILD.gn
+++ third_party/widevine/cdm/BUILD.gn
@@ -5,6 +5,7 @@
import("//build/buildflag_header.gni")
@@ -6,6 +6,7 @@ import("//build/buildflag_header.gni")
import("//build/config/chrome_build.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/features.gni")
+import("//cef/libcef/features/features.gni")
import("//media/cdm/library_cdm/cdm_paths.gni")

View File

@ -1,5 +1,5 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
index a8ad8c8220c8..91ca3ff02fbe 100644
index 1d6121a4ba08..8e6735eca670 100644
--- content/browser/devtools/devtools_instrumentation.h
+++ content/browser/devtools/devtools_instrumentation.h
@@ -12,6 +12,7 @@
@ -10,7 +10,7 @@ index a8ad8c8220c8..91ca3ff02fbe 100644
#include "content/common/navigation_params.mojom.h"
#include "content/public/browser/certificate_request_result_type.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
@@ -74,7 +75,7 @@ bool ApplyUserAgentMetadataOverrides(
@@ -76,7 +77,7 @@ bool ApplyUserAgentMetadataOverrides(
FrameTreeNode* frame_tree_node,
base::Optional<blink::UserAgentMetadata>* override_out);
@ -55,18 +55,18 @@ index 57072bf1263a..0a93446e4d21 100644
blink::mojom::V8CacheOptions GetV8CacheOptions();
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
index 87c15e50b7f0..8f42ae4da8de 100644
index c5647d2dc509..1314c30b60c7 100644
--- third_party/blink/renderer/controller/BUILD.gn
+++ third_party/blink/renderer/controller/BUILD.gn
@@ -25,6 +25,7 @@ component("controller") {
@@ -26,6 +26,7 @@ component("controller") {
configs += [
"//build/config/compiler:noshadowing",
"//build/config/compiler:wexit_time_destructors",
+ "//cef/libcef/features:config",
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:inside_blink",
"//third_party/blink/renderer:non_test_config",
@@ -49,6 +50,8 @@ component("controller") {
@@ -50,6 +51,8 @@ component("controller") {
"performance_manager/v8_detailed_memory_reporter_impl.h",
"performance_manager/v8_worker_memory_reporter.cc",
"performance_manager/v8_worker_memory_reporter.h",
@ -76,7 +76,7 @@ index 87c15e50b7f0..8f42ae4da8de 100644
if (is_linux || is_chromeos) {
diff --git ui/events/keycodes/BUILD.gn ui/events/keycodes/BUILD.gn
index 4aae406b9ace..40ca74281b78 100644
index 4a2d0348caeb..42742d24ebed 100644
--- ui/events/keycodes/BUILD.gn
+++ ui/events/keycodes/BUILD.gn
@@ -19,6 +19,8 @@ source_set("xkb") {

View File

@ -12,10 +12,10 @@ index cdeecb35a998..1615185f2a65 100644
if (is_stale && stale_plugin_action == RETRY_IF_STALE_PLUGIN_LIST) {
// The GetPlugins call causes the plugin list to be refreshed. Once that's
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
index e46003ea5e4a..503876cf7725 100644
index e0437a2c3479..82896ca9e261 100644
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -163,6 +163,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
@@ -132,6 +132,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
int render_process_id,
int render_frame_id,
const GURL& plugin_content_url,
@ -49,10 +49,10 @@ index 5b780f8bf34c..a75d0da983b4 100644
false /* allow_wildcard */, is_stale, &plugin_info,
nullptr /* actual_mime_type */);
diff --git chrome/browser/ui/views/frame/browser_root_view.cc chrome/browser/ui/views/frame/browser_root_view.cc
index f64e2a94062e..b1bf9689321c 100644
index 88fa7da1411e..98d0ea7650ed 100644
--- chrome/browser/ui/views/frame/browser_root_view.cc
+++ chrome/browser/ui/views/frame/browser_root_view.cc
@@ -76,7 +76,7 @@ void OnFindURLMimeType(const GURL& url,
@@ -77,7 +77,7 @@ void OnFindURLMimeType(const GURL& url,
#if BUILDFLAG(ENABLE_PLUGINS)
content::WebPluginInfo plugin;
result = result || content::PluginService::GetInstance()->GetPluginInfo(
@ -75,10 +75,10 @@ index f66e6bca5e2b..c99998449b6b 100644
GetContentClient()->browser()->GetUserAgent());
version.SetString("V8-Version", V8_VERSION_STRING);
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index 3a0f7d0a3a26..fd32c77e58cb 100644
index 69c7f35e8b6e..0a549792040b 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -638,6 +638,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
@@ -633,6 +633,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
resource_request_->has_user_gesture,
resource_request_->request_initiator, &loader_factory);
@ -92,7 +92,7 @@ index 3a0f7d0a3a26..fd32c77e58cb 100644
if (loader_factory) {
factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
std::move(loader_factory));
@@ -839,7 +846,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse(
@@ -834,7 +841,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse(
frame_tree_node->current_frame_host()->GetProcess()->GetID();
int routing_id = frame_tree_node->current_frame_host()->GetRoutingID();
bool has_plugin = PluginService::GetInstance()->GetPluginInfo(
@ -102,10 +102,10 @@ index 3a0f7d0a3a26..fd32c77e58cb 100644
if (stale) {
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
index e9cb48e03f17..47996036362c 100644
index 7caf00713119..3a4058a247be 100644
--- content/browser/plugin_service_impl.cc
+++ content/browser/plugin_service_impl.cc
@@ -341,6 +341,7 @@ bool PluginServiceImpl::GetPluginInfoArray(
@@ -276,6 +276,7 @@ bool PluginServiceImpl::GetPluginInfoArray(
bool PluginServiceImpl::GetPluginInfo(int render_process_id,
int render_frame_id,
const GURL& url,
@ -113,7 +113,7 @@ index e9cb48e03f17..47996036362c 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool allow_wildcard,
@@ -358,7 +359,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
@@ -293,7 +294,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
for (size_t i = 0; i < plugins.size(); ++i) {
if (!filter_ ||
filter_->IsPluginAvailable(render_process_id, render_frame_id, url,
@ -124,7 +124,7 @@ index e9cb48e03f17..47996036362c 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 79ac3b705511..71d73d3da158 100644
index c1d358b1e977..a40d09446c24 100644
--- content/browser/plugin_service_impl.h
+++ content/browser/plugin_service_impl.h
@@ -54,6 +54,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
@ -188,10 +188,10 @@ index 632ae86c6fd6..55b749ec1242 100644
const std::vector<WebPluginInfo>& all_plugins);
diff --git content/browser/renderer_host/render_frame_message_filter.cc content/browser/renderer_host/render_frame_message_filter.cc
index 17729c56fa29..84a14a89306f 100644
index ad253601284f..13c689ff7e5e 100644
--- content/browser/renderer_host/render_frame_message_filter.cc
+++ content/browser/renderer_host/render_frame_message_filter.cc
@@ -300,6 +300,7 @@ void RenderFrameMessageFilter::OnCreateChildFrame(
@@ -194,6 +194,7 @@ void RenderFrameMessageFilter::OverrideThreadForMessage(
void RenderFrameMessageFilter::OnGetPluginInfo(
int render_frame_id,
const GURL& url,
@ -199,7 +199,7 @@ index 17729c56fa29..84a14a89306f 100644
const url::Origin& main_frame_origin,
const std::string& mime_type,
bool* found,
@@ -307,8 +308,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
@@ -201,8 +202,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
std::string* actual_mime_type) {
bool allow_wildcard = true;
*found = plugin_service_->GetPluginInfo(
@ -212,10 +212,10 @@ index 17729c56fa29..84a14a89306f 100644
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
diff --git content/browser/renderer_host/render_frame_message_filter.h content/browser/renderer_host/render_frame_message_filter.h
index 0f197c63c11c..20d046827f56 100644
index ff2ee2302d2a..e4db2bc08b5a 100644
--- content/browser/renderer_host/render_frame_message_filter.h
+++ content/browser/renderer_host/render_frame_message_filter.h
@@ -83,6 +83,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter {
@@ -75,6 +75,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter {
#if BUILDFLAG(ENABLE_PLUGINS)
void OnGetPluginInfo(int render_frame_id,
const GURL& url,
@ -224,10 +224,10 @@ index 0f197c63c11c..20d046827f56 100644
const std::string& mime_type,
bool* found,
diff --git content/common/frame_messages.h content/common/frame_messages.h
index 65116e483c65..c97f731cef9a 100644
index 34e40d5fd8eb..aef36ad96a5a 100644
--- content/common/frame_messages.h
+++ content/common/frame_messages.h
@@ -495,9 +495,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
@@ -440,9 +440,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
// type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the
// found plugin.
@ -240,23 +240,23 @@ index 65116e483c65..c97f731cef9a 100644
std::string /* mime_type */,
bool /* found */,
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
index da3aceed75b1..e88601502e28 100644
index 3a2957836151..b3a3a2c7a649 100644
--- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc
@@ -9,7 +9,7 @@
// declarations instead of including more headers. If that is infeasible, adjust
// the limit. For more info, see
// https://chromium.googlesource.com/chromium/src/+/HEAD/docs/wmax_tokens.md
-#pragma clang max_tokens_here 890000
+// #pragma clang max_tokens_here 890000
-#pragma clang max_tokens_here 910000
+// #pragma clang max_tokens_here 910000
#include <utility>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 27b7e117b531..80c92eed565d 100644
index ce69e43769b2..ce91333894e5 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -31,6 +31,7 @@
@@ -30,6 +30,7 @@
#include "content/public/browser/certificate_request_result_type.h"
#include "content/public/browser/generated_code_cache_settings.h"
#include "content/public/browser/storage_partition_config.h"
@ -264,7 +264,7 @@ index 27b7e117b531..80c92eed565d 100644
#include "content/public/common/page_visibility_state.h"
#include "content/public/common/window_container_type.mojom-forward.h"
#include "device/vr/buildflags/buildflags.h"
@@ -1685,6 +1686,14 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1678,6 +1679,14 @@ class CONTENT_EXPORT ContentBrowserClient {
const base::Optional<url::Origin>& initiating_origin,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@ -279,7 +279,7 @@ index 27b7e117b531..80c92eed565d 100644
// Creates an OverlayWindow to be used for Picture-in-Picture. This window
// will house the content shown when in Picture-in-Picture mode. This will
// return a new OverlayWindow.
@@ -1756,6 +1765,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1749,6 +1758,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct();
@ -315,10 +315,10 @@ index 98c59005599e..69752184745d 100644
WebPluginInfo* plugin) = 0;
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index 12e091c7c13d..513db858b8fa 100644
index e9def973e93c..1fe148c4f429 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -84,6 +84,9 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -85,6 +85,9 @@ class CONTENT_EXPORT ContentRendererClient {
// binding requests from RenderProcessHost::BindReceiver().
virtual void ExposeInterfacesToBrowser(mojo::BinderMap* binders) {}
@ -328,7 +328,7 @@ index 12e091c7c13d..513db858b8fa 100644
// Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -312,6 +315,10 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -308,6 +311,10 @@ class CONTENT_EXPORT ContentRendererClient {
// This method may invalidate the frame.
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
@ -340,10 +340,10 @@ index 12e091c7c13d..513db858b8fa 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
index 3b2626c3ef9d..c0acde278d5a 100644
index 340642fd854c..c031facf8897 100644
--- content/renderer/render_frame_impl.cc
+++ content/renderer/render_frame_impl.cc
@@ -3896,7 +3896,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
@@ -3737,7 +3737,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
std::string mime_type;
bool found = false;
Send(new FrameHostMsg_GetPluginInfo(
@ -354,23 +354,23 @@ index 3b2626c3ef9d..c0acde278d5a 100644
if (!found)
return nullptr;
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 91daa69bf55a..40f79ddf47b9 100644
index a4240c7c75a3..df18416ac09e 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -636,6 +636,8 @@ void RenderThreadImpl::Init() {
@@ -624,6 +624,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
URLLoaderThrottleProviderType::kFrame);
+ GetContentClient()->renderer()->RenderThreadConnected();
+
GetAssociatedInterfaceRegistry()->AddInterface(base::BindRepeating(
&RenderThreadImpl::OnRouteProviderReceiver, base::Unretained(this)));
GetAssociatedInterfaceRegistry()->AddInterface(base::BindRepeating(
&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this)));
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
index ca435bda981b..274c460a151e 100644
index 1fa872443617..758812fbb3a2 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -915,6 +915,15 @@ void RendererBlinkPlatformImpl::SetRenderingColorSpace(
@@ -974,6 +974,15 @@ void RendererBlinkPlatformImpl::SetActiveURL(const blink::WebURL& url,
//------------------------------------------------------------------------------
@ -387,12 +387,12 @@ index ca435bda981b..274c460a151e 100644
if (!code_cache_host_) {
code_cache_host_ = mojo::SharedRemote<blink::mojom::CodeCacheHost>(
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 30af7f4fed5f..3bea58414d5b 100644
index 0bbe077c86a7..723dca391001 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -211,6 +211,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
media::GpuVideoAcceleratorFactories* GetGpuFactories() override;
void SetRenderingColorSpace(const gfx::ColorSpace& color_space) override;
@@ -213,6 +213,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void SetActiveURL(const blink::WebURL& url,
const blink::WebString& top_url) override;
+ void DevToolsAgentAttached() override;
+ void DevToolsAgentDetached() override;

View File

@ -1,8 +1,8 @@
diff --git content/app/content_main.cc content/app/content_main.cc
index e463c4d677b1..5fbc0a732dee 100644
index 2aba28d210db..5413f08af93d 100644
--- content/app/content_main.cc
+++ content/app/content_main.cc
@@ -206,15 +206,10 @@ void InitializeMojo(mojo::core::Configuration* config) {
@@ -205,15 +205,10 @@ void InitializeMojo(mojo::core::Configuration* config) {
} // namespace
@ -20,7 +20,7 @@ index e463c4d677b1..5fbc0a732dee 100644
// A flag to indicate whether Main() has been called before. On Android, we
// may re-run Main() without restarting the browser process. This flag
@@ -300,8 +295,7 @@ int RunContentProcess(const ContentMainParams& params,
@@ -299,8 +294,7 @@ int RunContentProcess(const ContentMainParams& params,
// loop, but we don't want to leave them hanging around until the app quits.
// Each "main" needs to flush this pool right before it goes into its main
// event loop to get rid of the cruft.
@ -30,7 +30,7 @@ index e463c4d677b1..5fbc0a732dee 100644
InitializeMac();
#endif
@@ -311,7 +305,7 @@ int RunContentProcess(const ContentMainParams& params,
@@ -310,7 +304,7 @@ int RunContentProcess(const ContentMainParams& params,
ui::RegisterPathProvider();
tracker = base::debug::GlobalActivityTracker::Get();
@ -39,7 +39,7 @@ index e463c4d677b1..5fbc0a732dee 100644
if (exit_code >= 0) {
if (tracker) {
@@ -370,8 +364,16 @@ int RunContentProcess(const ContentMainParams& params,
@@ -369,8 +363,16 @@ int RunContentProcess(const ContentMainParams& params,
if (IsSubprocess())
CommonSubprocessInit();
@ -57,7 +57,7 @@ index e463c4d677b1..5fbc0a732dee 100644
if (tracker) {
if (exit_code == 0) {
tracker->SetProcessPhaseIfEnabled(
@@ -382,19 +384,33 @@ int RunContentProcess(const ContentMainParams& params,
@@ -381,19 +383,33 @@ int RunContentProcess(const ContentMainParams& params,
tracker->process_data().SetInt("exit-code", exit_code);
}
}
@ -94,10 +94,10 @@ index e463c4d677b1..5fbc0a732dee 100644
return RunContentProcess(params, runner.get());
}
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index a85c25303dfc..8fdc214608fc 100644
index 6f5d40dd324d..8fa1397f0353 100644
--- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc
@@ -45,6 +45,7 @@
@@ -46,6 +46,7 @@
#include "base/task/post_task.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/threading/hang_watcher.h"
@ -105,7 +105,7 @@ index a85c25303dfc..8fdc214608fc 100644
#include "base/trace_event/trace_event.h"
#include "components/discardable_memory/service/discardable_shared_memory_manager.h"
#include "components/download/public/common/download_task_runner.h"
@@ -571,7 +572,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
@@ -589,7 +590,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
#else // !OS_WIN
#if defined(OS_MAC)
@ -114,7 +114,7 @@ index a85c25303dfc..8fdc214608fc 100644
#endif // defined(OS_MAC)
#if defined(OS_ANDROID)
@@ -1010,6 +1011,11 @@ void ContentMainRunnerImpl::Shutdown() {
@@ -1039,6 +1040,11 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true;
}
@ -127,27 +127,19 @@ index a85c25303dfc..8fdc214608fc 100644
std::unique_ptr<ContentMainRunner> ContentMainRunner::Create() {
return ContentMainRunnerImpl::Create();
diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h
index 3eb986f3c7d4..58d1883f7948 100644
index 30d5515b3af8..d59b4779afef 100644
--- content/app/content_main_runner_impl.h
+++ content/app/content_main_runner_impl.h
@@ -13,6 +13,7 @@
#include "base/threading/hang_watcher.h"
#include "build/build_config.h"
#include "content/browser/startup_data_impl.h"
+#include "content/common/content_export.h"
#include "content/public/app/content_main.h"
#include "content/public/app/content_main_runner.h"
#include "content/public/common/main_function_params.h"
@@ -37,7 +38,7 @@ class ContentMainDelegate;
struct ContentMainParams;
@@ -39,7 +39,7 @@ class ContentMainDelegate;
class ServiceManagerEnvironment;
struct ContentMainParams;
-class ContentMainRunnerImpl : public ContentMainRunner {
+class CONTENT_EXPORT ContentMainRunnerImpl : public ContentMainRunner {
public:
static std::unique_ptr<ContentMainRunnerImpl> Create();
@@ -51,6 +52,8 @@ class ContentMainRunnerImpl : public ContentMainRunner {
@@ -53,6 +53,8 @@ class ContentMainRunnerImpl : public ContentMainRunner {
int Run(bool start_service_manager_only) override;
void Shutdown() override;
@ -170,7 +162,7 @@ index 8b829a488773..a69a08869728 100644
if (main_argv)
setproctitle_init(main_argv);
diff --git content/public/app/content_main.h content/public/app/content_main.h
index 7384f3276f38..b84127a62b81 100644
index 97aac3d0c758..4e7baa790252 100644
--- content/public/app/content_main.h
+++ content/public/app/content_main.h
@@ -5,6 +5,7 @@
@ -204,7 +196,7 @@ index 7384f3276f38..b84127a62b81 100644
ContentMainRunner* content_main_runner);
#if defined(OS_ANDROID)
@@ -88,7 +98,7 @@ CONTENT_EXPORT ContentMainDelegate* GetContentMainDelegateForTesting();
@@ -91,7 +101,7 @@ ContentMainDelegate* GetContentMainDelegate();
// initial setup for every process. The embedder has a chance to customize
// startup using the ContentMainDelegate interface. The embedder can also pass
// in null for |delegate| if they don't want to override default startup.

View File

@ -1,13 +0,0 @@
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 df1d395158a3..2ab2475b9164 100644
--- content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
+++ content/browser/renderer_host/pepper/pepper_flash_file_message_filter.cc
@@ -56,7 +56,7 @@ PepperFlashFileMessageFilter::PepperFlashFileMessageFilter(
// will construct a bad path and could provide access to the wrong files.
// In this case, |plugin_data_directory_| will remain unset and
// |ValidateAndConvertPepperFilePath| will fail.
- NOTREACHED();
+ //NOTREACHED();
} else {
plugin_data_directory_ = GetDataDirName(profile_data_directory).Append(
base::FilePath::FromUTF8Unsafe(plugin_name));

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