mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-16 20:20:51 +01:00
Update to Chromium version 89.0.4389.0 (#843830)
- SSE3 is now required on x86 processors (see https://crbug.com/1123353).
This commit is contained in:
parent
119415b8e9
commit
5ef0fb8ac8
10
BUILD.gn
10
BUILD.gn
@ -628,8 +628,6 @@ static_library("libcef_static") {
|
||||
"libcef/browser/print_settings_impl.h",
|
||||
"libcef/browser/printing/constrained_window_views_client.cc",
|
||||
"libcef/browser/printing/constrained_window_views_client.h",
|
||||
"libcef/browser/printing/printing_message_filter.cc",
|
||||
"libcef/browser/printing/printing_message_filter.h",
|
||||
"libcef/browser/printing/print_view_manager.cc",
|
||||
"libcef/browser/printing/print_view_manager.h",
|
||||
"libcef/browser/process_util_impl.cc",
|
||||
@ -1367,6 +1365,7 @@ repack("pak_extensions") {
|
||||
# Add associated .h files in the make_pack_header("resources") target.
|
||||
sources = [
|
||||
"$root_gen_dir/chrome/component_extension_resources.pak",
|
||||
"$root_gen_dir/chrome/pdf_resources.pak",
|
||||
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
|
||||
"$root_gen_dir/content/browser/webrtc/resources/webrtc_internals_resources.pak",
|
||||
"$root_gen_dir/extensions/extensions_renderer_resources.pak",
|
||||
@ -1381,6 +1380,7 @@ repack("pak_extensions") {
|
||||
# listed both here and in the libcef_static target.
|
||||
public_deps = [
|
||||
"//chrome/browser/resources:component_extension_resources",
|
||||
"//chrome/browser/resources/pdf:pdf_resources",
|
||||
"//content/browser/resources/media:media_internals_resources",
|
||||
"//content/browser/webrtc/resources",
|
||||
"//extensions:extensions_renderer_resources",
|
||||
@ -1515,17 +1515,21 @@ make_pack_header("resources") {
|
||||
"$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/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",
|
||||
"$root_gen_dir/components/grit/dev_ui_components_resources.h",
|
||||
"$root_gen_dir/content/browser/devtools/grit/devtools_resources.h",
|
||||
"$root_gen_dir/content/browser/resources/media/grit/media_internals_resources.h",
|
||||
"$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
|
||||
"$root_gen_dir/content/browser/webrtc/resources/grit/webrtc_internals_resources.h",
|
||||
"$root_gen_dir/content/grit/content_resources.h",
|
||||
"$root_gen_dir/content/grit/dev_ui_content_resources.h",
|
||||
"$root_gen_dir/extensions/grit/extensions_browser_resources.h",
|
||||
"$root_gen_dir/extensions/grit/extensions_renderer_resources.h",
|
||||
"$root_gen_dir/extensions/grit/extensions_resources.h",
|
||||
"$root_gen_dir/mojo/public/js/grit/mojo_bindings_resources.h",
|
||||
"$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",
|
||||
@ -1544,6 +1548,7 @@ make_pack_header("strings") {
|
||||
"$root_gen_dir/chrome/grit/generated_resources.h",
|
||||
"$root_gen_dir/chrome/grit/locale_settings.h",
|
||||
"$root_gen_dir/chrome/grit/platform_locale_settings.h",
|
||||
"$root_gen_dir/components/omnibox/resources/grit/omnibox_resources.h",
|
||||
"$root_gen_dir/components/strings/grit/components_chromium_strings.h",
|
||||
"$root_gen_dir/components/strings/grit/components_strings.h",
|
||||
"$root_gen_dir/extensions/strings/grit/extensions_strings.h",
|
||||
@ -1911,6 +1916,7 @@ if (is_mac) {
|
||||
|
||||
sources = invoker.sources
|
||||
|
||||
public_deps = [ ":libcef_dll_wrapper" ]
|
||||
deps = [
|
||||
":libcef_dll_wrapper",
|
||||
":${app_name}_framework_bundle_data",
|
||||
|
@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/88.0.4324.0'
|
||||
'chromium_checkout': 'refs/tags/89.0.4389.0'
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ template("_repack_one_locale") {
|
||||
"${root_gen_dir}/chrome/generated_resources_${locale}.pak",
|
||||
"${root_gen_dir}/chrome/locale_settings_${locale}.pak",
|
||||
"${root_gen_dir}/chrome/platform_locale_settings_${locale}.pak",
|
||||
"${root_gen_dir}/components/omnibox/resources/omnibox_resources_${locale}.pak",
|
||||
"${root_gen_dir}/components/strings/components_chromium_strings_${locale}.pak",
|
||||
"${root_gen_dir}/components/strings/components_locale_settings_${locale}.pak",
|
||||
"${root_gen_dir}/components/strings/components_strings_${locale}.pak",
|
||||
@ -53,6 +54,7 @@ template("_repack_one_locale") {
|
||||
"//chrome/app:generated_resources",
|
||||
"//chrome/app/resources:locale_settings",
|
||||
"//chrome/app/resources:platform_locale_settings",
|
||||
"//components/omnibox/resources:omnibox_resources",
|
||||
"//components/strings:components_chromium_strings",
|
||||
"//components/strings:components_locale_settings",
|
||||
"//components/strings:components_strings",
|
||||
|
@ -42,13 +42,13 @@
|
||||
// way that may cause binary incompatibility with other builds. The universal
|
||||
// hash value will change if any platform is affected whereas the platform hash
|
||||
// values will change only if that particular platform is affected.
|
||||
#define CEF_API_HASH_UNIVERSAL "7f349b7262bfe13bda037370004f56a6081e543b"
|
||||
#define CEF_API_HASH_UNIVERSAL "89715b43c948313782d2546131f510eab1975844"
|
||||
#if defined(OS_WIN)
|
||||
#define CEF_API_HASH_PLATFORM "8a5523fec15255e2fb1de64deaa15dc3554b91e5"
|
||||
#define CEF_API_HASH_PLATFORM "80648a2c5a87db1581fdb994b7154ed77d74a3c5"
|
||||
#elif defined(OS_MAC)
|
||||
#define CEF_API_HASH_PLATFORM "f572c8f7d3aee3cd3b85bd398b0ba43eb7fe79a0"
|
||||
#define CEF_API_HASH_PLATFORM "3af393a2bf165edd934c5a59f6e6fce8a4bb579c"
|
||||
#elif defined(OS_LINUX)
|
||||
#define CEF_API_HASH_PLATFORM "abf4cc6ff102e5cd019aaf51f13eb30f9bfeae45"
|
||||
#define CEF_API_HASH_PLATFORM "8049cab9a43c1d554ccdd4dd3d5e38ecebce42af"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -96,18 +96,23 @@ struct CefStringTraitsWide {
|
||||
memset(&cstr, 0, sizeof(cstr));
|
||||
cef_string_wide_to_utf16(s->str, s->length, &cstr);
|
||||
base::string16 str;
|
||||
if (cstr.length > 0)
|
||||
str = base::string16(cstr.str, cstr.length);
|
||||
if (cstr.length > 0) {
|
||||
str = base::string16(
|
||||
reinterpret_cast<base::string16::value_type*>(cstr.str), cstr.length);
|
||||
}
|
||||
cef_string_utf16_clear(&cstr);
|
||||
return str;
|
||||
}
|
||||
static inline bool from_string16(const base::string16& str, struct_type* s) {
|
||||
return cef_string_utf16_to_wide(str.c_str(), str.length(), s) ? true
|
||||
: false;
|
||||
return cef_string_utf16_to_wide(
|
||||
reinterpret_cast<const char16*>(str.c_str()), str.length(), s)
|
||||
? true
|
||||
: false;
|
||||
}
|
||||
#else // WCHAR_T_IS_UTF32
|
||||
static inline base::string16 to_string16(const struct_type* s) {
|
||||
return base::string16(s->str, s->length);
|
||||
return base::string16(
|
||||
reinterpret_cast<const base::string16::value_type*>(s->str), s->length);
|
||||
}
|
||||
static inline bool from_string16(const base::string16& str, struct_type* s) {
|
||||
return cef_string_wide_set(str.c_str(), str.length(), s, true) ? true
|
||||
@ -169,14 +174,18 @@ struct CefStringTraitsUTF8 {
|
||||
memset(&cstr, 0, sizeof(cstr));
|
||||
cef_string_utf8_to_utf16(s->str, s->length, &cstr);
|
||||
base::string16 str;
|
||||
if (cstr.length > 0)
|
||||
str = base::string16(cstr.str, cstr.length);
|
||||
if (cstr.length > 0) {
|
||||
str = base::string16(
|
||||
reinterpret_cast<base::string16::value_type*>(cstr.str), cstr.length);
|
||||
}
|
||||
cef_string_utf16_clear(&cstr);
|
||||
return str;
|
||||
}
|
||||
static inline bool from_string16(const base::string16& str, struct_type* s) {
|
||||
return cef_string_utf16_to_utf8(str.c_str(), str.length(), s) ? true
|
||||
: false;
|
||||
return cef_string_utf16_to_utf8(
|
||||
reinterpret_cast<const char16*>(str.c_str()), str.length(), s)
|
||||
? true
|
||||
: false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -248,11 +257,14 @@ struct CefStringTraitsUTF16 {
|
||||
}
|
||||
#endif // WCHAR_T_IS_UTF32
|
||||
static inline base::string16 to_string16(const struct_type* s) {
|
||||
return base::string16(s->str, s->length);
|
||||
return base::string16(
|
||||
reinterpret_cast<const base::string16::value_type*>(s->str), s->length);
|
||||
}
|
||||
static inline bool from_string16(const base::string16& str, struct_type* s) {
|
||||
return cef_string_utf16_set(str.c_str(), str.length(), s, true) ? true
|
||||
: false;
|
||||
return cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
|
||||
str.length(), s, true)
|
||||
? true
|
||||
: false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -340,7 +352,8 @@ class CefStringBase {
|
||||
}
|
||||
CefStringBase(const char16* src) : string_(NULL), owner_(false) {
|
||||
if (src)
|
||||
FromString16(base::string16(src));
|
||||
FromString16(base::string16(
|
||||
reinterpret_cast<const base::string16::value_type*>(src)));
|
||||
}
|
||||
#endif // WCHAR_T_IS_UTF32
|
||||
|
||||
@ -677,7 +690,8 @@ class CefStringBase {
|
||||
return *this;
|
||||
}
|
||||
CefStringBase& operator=(const char16* str) {
|
||||
FromString16(base::string16(str));
|
||||
FromString16(base::string16(
|
||||
reinterpret_cast<const base::string16::value_type*>(str)));
|
||||
return *this;
|
||||
}
|
||||
#endif // WCHAR_T_IS_UTF32
|
||||
|
@ -3139,8 +3139,9 @@ typedef enum {
|
||||
CEF_MRCR_NO_SUPPORTED_PROVIDER = 7,
|
||||
CEF_MRCR_CANCELLED = 8,
|
||||
CEF_MRCR_ROUTE_ALREADY_EXISTS = 9,
|
||||
CEF_MRCR_ROUTE_ALREADY_TERMINATED = 11,
|
||||
|
||||
CEF_MRCR_TOTAL_COUNT = 11 // The total number of values.
|
||||
CEF_MRCR_TOTAL_COUNT = 12 // The total number of values.
|
||||
} cef_media_route_create_result_t;
|
||||
|
||||
///
|
||||
|
@ -1732,7 +1732,8 @@ void AlloyBrowserHostImpl::StartDragging(
|
||||
}
|
||||
}
|
||||
|
||||
void AlloyBrowserHostImpl::UpdateDragCursor(blink::DragOperation operation) {
|
||||
void AlloyBrowserHostImpl::UpdateDragCursor(
|
||||
ui::mojom::DragOperation operation) {
|
||||
if (platform_delegate_)
|
||||
platform_delegate_->UpdateDragCursor(operation);
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||
const gfx::Vector2d& image_offset,
|
||||
const blink::mojom::DragEventSourceInfo& event_info,
|
||||
content::RenderWidgetHostImpl* source_rwh);
|
||||
void UpdateDragCursor(blink::DragOperation operation);
|
||||
void UpdateDragCursor(ui::mojom::DragOperation operation);
|
||||
|
||||
// Thread safe accessors.
|
||||
SkColor GetBackgroundColor() const;
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "libcef/browser/extensions/extensions_browser_client.h"
|
||||
#include "libcef/browser/net/chrome_scheme_handler.h"
|
||||
#include "libcef/browser/printing/constrained_window_views_client.h"
|
||||
#include "libcef/browser/printing/printing_message_filter.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
#include "libcef/common/app_manager.h"
|
||||
#include "libcef/common/extensions/extensions_client.h"
|
||||
@ -180,8 +179,6 @@ void AlloyBrowserMainParts::PreMainMessageLoopRun() {
|
||||
// ChromeBrowserMainExtraPartsProfiles for details.
|
||||
cef::EnsureBrowserContextKeyedServiceFactoriesBuilt();
|
||||
|
||||
printing::CefPrintingMessageFilter::EnsureShutdownNotifierFactoryBuilt();
|
||||
|
||||
background_task_runner_ = base::CreateSingleThreadTaskRunner(
|
||||
{base::ThreadPool(), base::TaskPriority::BEST_EFFORT,
|
||||
base::TaskShutdownBehavior::BLOCK_SHUTDOWN, base::MayBlock()});
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "libcef/browser/net_service/resource_request_handler_wrapper.h"
|
||||
#include "libcef/browser/plugins/plugin_service_filter.h"
|
||||
#include "libcef/browser/prefs/renderer_prefs.h"
|
||||
#include "libcef/browser/printing/printing_message_filter.h"
|
||||
#include "libcef/browser/speech_recognition_manager_delegate.h"
|
||||
#include "libcef/browser/ssl_info_impl.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
@ -54,6 +53,8 @@
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/chrome_content_browser_client.h"
|
||||
#include "chrome/browser/content_settings/cookie_settings_factory.h"
|
||||
#include "chrome/browser/net/profile_network_context_service.h"
|
||||
#include "chrome/browser/net/profile_network_context_service_factory.h"
|
||||
#include "chrome/browser/net/system_network_context_manager.h"
|
||||
#include "chrome/browser/plugins/plugin_info_host_impl.h"
|
||||
#include "chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.h"
|
||||
@ -93,7 +94,6 @@
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
#include "content/public/browser/web_ui_url_loader_factory.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/service_names.mojom.h"
|
||||
#include "content/public/common/storage_quota_params.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "content/public/common/user_agent.h"
|
||||
@ -502,7 +502,6 @@ void AlloyContentBrowserClient::RenderProcessWillLaunch(
|
||||
Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
|
||||
|
||||
host->AddFilter(new CefBrowserMessageFilter(id));
|
||||
host->AddFilter(new printing::CefPrintingMessageFilter(id, profile));
|
||||
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
host->AddFilter(new extensions::ExtensionMessageFilter(id, profile));
|
||||
@ -1205,9 +1204,17 @@ void AlloyContentBrowserClient::ConfigureNetworkContextParams(
|
||||
auto cef_context = CefBrowserContext::FromBrowserContext(context);
|
||||
|
||||
Profile* profile = cef_context->AsProfile();
|
||||
profile->ConfigureNetworkContextParams(in_memory, relative_partition_path,
|
||||
network_context_params,
|
||||
cert_verifier_creation_params);
|
||||
ProfileNetworkContextService* service =
|
||||
ProfileNetworkContextServiceFactory::GetForContext(profile);
|
||||
if (service) {
|
||||
service->ConfigureNetworkContextParams(in_memory, relative_partition_path,
|
||||
network_context_params,
|
||||
cert_verifier_creation_params);
|
||||
} else {
|
||||
// Set default params.
|
||||
network_context_params->user_agent = GetUserAgent();
|
||||
network_context_params->accept_language = GetApplicationLocale();
|
||||
}
|
||||
|
||||
network_context_params->cookieable_schemes =
|
||||
cef_context->GetCookieableSchemes();
|
||||
|
@ -325,12 +325,6 @@ ChromeBrowserProcessAlloy::floc_sorting_lsh_clusters_service() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
optimization_guide::OptimizationGuideService*
|
||||
ChromeBrowserProcessAlloy::optimization_guide_service() {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
StartupData* ChromeBrowserProcessAlloy::startup_data() {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
|
@ -84,8 +84,6 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
|
||||
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)
|
||||
|
@ -176,3 +176,8 @@ void ChromeProfileAlloy::SetCreationTimeForTesting(base::Time creation_time) {
|
||||
void ChromeProfileAlloy::RecordMainFrameNavigation() {
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
bool ChromeProfileAlloy::IsSignedIn() {
|
||||
NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ class ChromeProfileAlloy : public Profile {
|
||||
base::Time GetCreationTime() const override;
|
||||
void SetCreationTimeForTesting(base::Time creation_time) override;
|
||||
void RecordMainFrameNavigation() override;
|
||||
bool IsSignedIn() override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<variations::VariationsClient> variations_client_;
|
||||
|
@ -318,7 +318,7 @@ void CefBrowserPlatformDelegate::StartDragging(
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegate::UpdateDragCursor(
|
||||
blink::DragOperation operation) {
|
||||
ui::mojom::DragOperation operation) {
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "third_party/blink/public/common/page/drag_operation.h"
|
||||
#include "third_party/blink/public/mojom/page/drag.mojom-forward.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "ui/base/dragdrop/mojom/drag_drop_types.mojom-forward.h"
|
||||
#include "ui/base/window_open_disposition.h"
|
||||
|
||||
class GURL;
|
||||
@ -327,7 +328,7 @@ class CefBrowserPlatformDelegate {
|
||||
const gfx::Vector2d& image_offset,
|
||||
const blink::mojom::DragEventSourceInfo& event_info,
|
||||
content::RenderWidgetHostImpl* source_rwh);
|
||||
virtual void UpdateDragCursor(blink::DragOperation operation);
|
||||
virtual void UpdateDragCursor(ui::mojom::DragOperation operation);
|
||||
virtual void DragSourceEndedAt(int x, int y, cef_drag_operations_mask_t op);
|
||||
virtual void DragSourceSystemDragEnded();
|
||||
virtual void AccessibilityEventReceived(
|
||||
|
@ -108,6 +108,8 @@ void ChromeContentBrowserClientCef::AppendExtraCommandLineSwitches(
|
||||
|
||||
void ChromeContentBrowserClientCef::RenderProcessWillLaunch(
|
||||
content::RenderProcessHost* host) {
|
||||
ChromeContentBrowserClient::RenderProcessWillLaunch(host);
|
||||
|
||||
const int id = host->GetID();
|
||||
host->AddFilter(new CefBrowserMessageFilter(id));
|
||||
|
||||
|
@ -38,7 +38,7 @@ CefContextMenuParamsImpl::TypeFlags CefContextMenuParamsImpl::GetTypeFlags() {
|
||||
type_flags |= CM_TYPEFLAG_FRAME;
|
||||
if (!params.link_url.is_empty())
|
||||
type_flags |= CM_TYPEFLAG_LINK;
|
||||
if (params.media_type != blink::ContextMenuDataMediaType::kNone)
|
||||
if (params.media_type != blink::mojom::ContextMenuDataMediaType::kNone)
|
||||
type_flags |= CM_TYPEFLAG_MEDIA;
|
||||
if (!params.selection_text.empty())
|
||||
type_flags |= CM_TYPEFLAG_SELECTION;
|
||||
|
@ -107,8 +107,10 @@ void CefDevToolsManagerDelegate::StartHttpHandler(
|
||||
|
||||
const base::CommandLine& command_line =
|
||||
*base::CommandLine::ForCurrentProcess();
|
||||
if (command_line.HasSwitch(switches::kRemoteDebuggingPipe))
|
||||
content::DevToolsAgentHost::StartRemoteDebuggingPipeHandler();
|
||||
if (command_line.HasSwitch(switches::kRemoteDebuggingPipe)) {
|
||||
content::DevToolsAgentHost::StartRemoteDebuggingPipeHandler(
|
||||
base::OnceClosure());
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -47,7 +47,7 @@ SyncValueStoreCache::~SyncValueStoreCache() {
|
||||
}
|
||||
|
||||
void SyncValueStoreCache::RunWithValueStoreForExtension(
|
||||
const StorageCallback& callback,
|
||||
StorageCallback callback,
|
||||
scoped_refptr<const Extension> extension) {
|
||||
DCHECK(IsOnBackendSequence());
|
||||
|
||||
@ -58,9 +58,9 @@ void SyncValueStoreCache::RunWithValueStoreForExtension(
|
||||
if (extension->permissions_data()->HasAPIPermission(
|
||||
APIPermission::kUnlimitedStorage)) {
|
||||
WeakUnlimitedSettingsStorage unlimited_storage(storage);
|
||||
callback.Run(&unlimited_storage);
|
||||
std::move(callback).Run(&unlimited_storage);
|
||||
} else {
|
||||
callback.Run(storage);
|
||||
std::move(callback).Run(storage);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ class SyncValueStoreCache : public ValueStoreCache {
|
||||
|
||||
// ValueStoreCache implementation:
|
||||
void RunWithValueStoreForExtension(
|
||||
const StorageCallback& callback,
|
||||
StorageCallback callback,
|
||||
scoped_refptr<const Extension> extension) override;
|
||||
void DeleteStorageSoon(const std::string& extension_id) override;
|
||||
|
||||
|
@ -6,14 +6,30 @@
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/values.h"
|
||||
#include "chrome/browser/pdf/pdf_extension_util.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "chrome/grit/component_extension_resources_map.h"
|
||||
#include "chrome/grit/pdf_resources_map.h"
|
||||
#include "extensions/common/constants.h"
|
||||
|
||||
namespace extensions {
|
||||
|
||||
CefComponentExtensionResourceManager::CefComponentExtensionResourceManager() {
|
||||
AddComponentResourceEntries(kComponentExtensionResources,
|
||||
kComponentExtensionResourcesSize);
|
||||
AddComponentResourceEntries(kPdfResources, kPdfResourcesSize);
|
||||
|
||||
base::Value dict(base::Value::Type::DICTIONARY);
|
||||
pdf_extension_util::AddStrings(
|
||||
pdf_extension_util::PdfViewerContext::kPdfViewer, &dict);
|
||||
pdf_extension_util::AddAdditionalData(&dict);
|
||||
|
||||
ui::TemplateReplacements pdf_viewer_replacements;
|
||||
ui::TemplateReplacementsFromDictionaryValue(
|
||||
base::Value::AsDictionaryValue(dict), &pdf_viewer_replacements);
|
||||
template_replacements_[extension_misc::kPdfExtensionId] =
|
||||
std::move(pdf_viewer_replacements);
|
||||
}
|
||||
|
||||
CefComponentExtensionResourceManager::~CefComponentExtensionResourceManager() {}
|
||||
@ -44,34 +60,20 @@ bool CefComponentExtensionResourceManager::IsComponentExtensionResource(
|
||||
const ui::TemplateReplacements*
|
||||
CefComponentExtensionResourceManager::GetTemplateReplacementsForExtension(
|
||||
const std::string& extension_id) const {
|
||||
return nullptr;
|
||||
auto it = template_replacements_.find(extension_id);
|
||||
return it != template_replacements_.end() ? &it->second : nullptr;
|
||||
}
|
||||
|
||||
void CefComponentExtensionResourceManager::AddComponentResourceEntries(
|
||||
const GritResourceMap* entries,
|
||||
size_t size) {
|
||||
base::FilePath gen_folder_path = base::FilePath().AppendASCII(
|
||||
"@out_folder@/gen/chrome/browser/resources/");
|
||||
gen_folder_path = gen_folder_path.NormalizePathSeparators();
|
||||
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
base::FilePath resource_path =
|
||||
base::FilePath().AppendASCII(entries[i].name);
|
||||
resource_path = resource_path.NormalizePathSeparators();
|
||||
|
||||
if (!gen_folder_path.IsParent(resource_path)) {
|
||||
DCHECK(!base::Contains(path_to_resource_info_, resource_path));
|
||||
path_to_resource_info_[resource_path] = entries[i].value;
|
||||
} else {
|
||||
// If the resource is a generated file, strip the generated folder's path,
|
||||
// so that it can be served from a normal URL (as if it were not
|
||||
// generated).
|
||||
base::FilePath effective_path =
|
||||
base::FilePath().AppendASCII(resource_path.AsUTF8Unsafe().substr(
|
||||
gen_folder_path.value().length()));
|
||||
DCHECK(!base::Contains(path_to_resource_info_, effective_path));
|
||||
path_to_resource_info_[effective_path] = entries[i].value;
|
||||
}
|
||||
DCHECK(!base::Contains(path_to_resource_info_, resource_path));
|
||||
path_to_resource_info_[resource_path] = entries[i].value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,11 @@ class CefComponentExtensionResourceManager
|
||||
// IsComponentExtensionResource.
|
||||
std::map<base::FilePath, int> path_to_resource_info_;
|
||||
|
||||
// A map from an extension ID to its i18n template replacements.
|
||||
using TemplateReplacementMap =
|
||||
std::map<std::string, ui::TemplateReplacements>;
|
||||
TemplateReplacementMap template_replacements_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefComponentExtensionResourceManager);
|
||||
};
|
||||
|
||||
|
@ -182,8 +182,8 @@ void CefExtensionsBrowserClient::LoadResourceFromResourceBundle(
|
||||
}
|
||||
|
||||
bool CefExtensionsBrowserClient::AllowCrossRendererResourceLoad(
|
||||
const GURL& url,
|
||||
blink::mojom::ResourceType resource_type,
|
||||
const network::ResourceRequest& request,
|
||||
network::mojom::RequestDestination destination,
|
||||
ui::PageTransition page_transition,
|
||||
int child_id,
|
||||
bool is_incognito,
|
||||
@ -192,7 +192,7 @@ bool CefExtensionsBrowserClient::AllowCrossRendererResourceLoad(
|
||||
const ProcessMap& process_map) {
|
||||
bool allowed = false;
|
||||
if (url_request_util::AllowCrossRendererResourceLoad(
|
||||
url, resource_type, page_transition, child_id, is_incognito,
|
||||
request, destination, page_transition, child_id, is_incognito,
|
||||
extension, extensions, process_map, &allowed)) {
|
||||
return allowed;
|
||||
}
|
||||
|
@ -54,14 +54,15 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
|
||||
const std::string& content_security_policy,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderClient> client,
|
||||
bool send_cors_header) override;
|
||||
bool AllowCrossRendererResourceLoad(const GURL& url,
|
||||
blink::mojom::ResourceType resource_type,
|
||||
ui::PageTransition page_transition,
|
||||
int child_id,
|
||||
bool is_incognito,
|
||||
const Extension* extension,
|
||||
const ExtensionSet& extensions,
|
||||
const ProcessMap& process_map) override;
|
||||
bool AllowCrossRendererResourceLoad(
|
||||
const network::ResourceRequest& request,
|
||||
network::mojom::RequestDestination destination,
|
||||
ui::PageTransition page_transition,
|
||||
int child_id,
|
||||
bool is_incognito,
|
||||
const Extension* extension,
|
||||
const ExtensionSet& extensions,
|
||||
const ProcessMap& process_map) override;
|
||||
PrefService* GetPrefServiceForContext(
|
||||
content::BrowserContext* context) override;
|
||||
void GetEarlyExtensionPrefsObservers(
|
||||
|
@ -11,8 +11,6 @@
|
||||
#include "libcef/browser/browser_info.h"
|
||||
#include "libcef/browser/osr/web_contents_view_osr.h"
|
||||
|
||||
#include "content/browser/browser_plugin/browser_plugin_guest.h"
|
||||
#include "content/browser/web_contents/web_contents_impl.h"
|
||||
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
|
||||
|
||||
namespace extensions {
|
||||
@ -67,22 +65,11 @@ void CefMimeHandlerViewGuestDelegate::OnGuestDetached() {
|
||||
bool CefMimeHandlerViewGuestDelegate::HandleContextMenu(
|
||||
content::WebContents* web_contents,
|
||||
const content::ContextMenuParams& params) {
|
||||
content::ContextMenuParams new_params = params;
|
||||
|
||||
gfx::Point guest_coordinates =
|
||||
static_cast<content::WebContentsImpl*>(web_contents)
|
||||
->GetBrowserPluginGuest()
|
||||
->GetScreenCoordinates(gfx::Point());
|
||||
|
||||
// Adjust (x,y) position for offset from guest to embedder.
|
||||
new_params.x += guest_coordinates.x();
|
||||
new_params.y += guest_coordinates.y();
|
||||
|
||||
CefRefPtr<AlloyBrowserHostImpl> owner_browser =
|
||||
AlloyBrowserHostImpl::GetBrowserForContents(owner_web_contents_);
|
||||
DCHECK(owner_browser);
|
||||
|
||||
return owner_browser->HandleContextMenu(web_contents, new_params);
|
||||
return owner_browser->HandleContextMenu(web_contents, params);
|
||||
}
|
||||
|
||||
} // namespace extensions
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "skia/ext/skia_utils_base.h"
|
||||
#include "ui/gfx/codec/jpeg_codec.h"
|
||||
#include "ui/gfx/codec/png_codec.h"
|
||||
#include "ui/gfx/image/image_png_rep.h"
|
||||
@ -307,7 +308,15 @@ bool CefImageImpl::AddBitmap(float scale_factor, const SkBitmap& bitmap) {
|
||||
DCHECK(bitmap.colorType() == kBGRA_8888_SkColorType ||
|
||||
bitmap.colorType() == kRGBA_8888_SkColorType);
|
||||
|
||||
gfx::ImageSkiaRep skia_rep(bitmap, scale_factor);
|
||||
// Convert to N32 (e.g. native encoding) format if not already in that format.
|
||||
// N32 is expected by the Views framework and this early conversion avoids
|
||||
// CHECKs in ImageSkiaRep and eventual conversion to N32 at some later point
|
||||
// in the compositing pipeline.
|
||||
SkBitmap n32_bitmap;
|
||||
if (!skia::SkBitmapToN32OpaqueOrPremul(bitmap, &n32_bitmap))
|
||||
return false;
|
||||
|
||||
gfx::ImageSkiaRep skia_rep(n32_bitmap, scale_factor);
|
||||
base::AutoLock lock_scope(lock_);
|
||||
if (image_.IsEmpty()) {
|
||||
image_ = gfx::Image(gfx::ImageSkia(skia_rep));
|
||||
|
@ -96,8 +96,7 @@ class CefMediaRouterManager
|
||||
|
||||
// Used if there is no RoutePresentationConnectionPtr.
|
||||
std::unique_ptr<CefRouteMessageObserver> message_observer_;
|
||||
std::unique_ptr<media_router::PresentationConnectionStateSubscription>
|
||||
state_subscription_;
|
||||
base::CallbackListSubscription state_subscription_;
|
||||
};
|
||||
void CreateRouteState(
|
||||
const media_router::MediaRoute& route,
|
||||
|
@ -336,7 +336,7 @@ void CefMenuManager::CreateDefaultModel() {
|
||||
MENU_ID_SPELLCHECK_SUGGESTION_LAST;
|
||||
++i) {
|
||||
model_->AddItem(MENU_ID_SPELLCHECK_SUGGESTION_0 + static_cast<int>(i),
|
||||
params_.dictionary_suggestions[i].c_str());
|
||||
params_.dictionary_suggestions[i]);
|
||||
}
|
||||
|
||||
// When there are dictionary suggestions add a separator before "Add to
|
||||
|
@ -39,6 +39,6 @@ void CefMenuRunnerLinux::CancelContextMenu() {
|
||||
|
||||
bool CefMenuRunnerLinux::FormatLabel(base::string16& label) {
|
||||
// Remove the accelerator indicator (&) from label strings.
|
||||
const char16 replace[] = {L'&', 0};
|
||||
const base::string16::value_type replace[] = {L'&', 0};
|
||||
return base::ReplaceChars(label, replace, base::string16(), &label);
|
||||
}
|
||||
|
@ -11,16 +11,16 @@
|
||||
|
||||
#include "ui/base/x/x11_util.h"
|
||||
#include "ui/events/platform/platform_event_source.h"
|
||||
#include "ui/events/platform/x11/x11_event_source.h"
|
||||
#include "ui/events/x/x11_event_translation.h"
|
||||
#include "ui/events/x/x11_window_event_manager.h"
|
||||
#include "ui/gfx/x/connection.h"
|
||||
#include "ui/gfx/x/x11_window_event_manager.h"
|
||||
#include "ui/gfx/x/xproto_util.h"
|
||||
#include "ui/platform_window/x11/x11_topmost_window_finder.h"
|
||||
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h"
|
||||
|
||||
namespace {
|
||||
|
||||
const char kAtom[] = "ATOM";
|
||||
const char kNetWMPid[] = "_NET_WM_PID";
|
||||
const char kNetWMPing[] = "_NET_WM_PING";
|
||||
const char kNetWMState[] = "_NET_WM_STATE";
|
||||
@ -47,7 +47,7 @@ x11::Window FindToplevelParent(x11::Window window) {
|
||||
break;
|
||||
|
||||
top_level_window = window;
|
||||
if (!ui::PropertyExists(query_tree->parent, kNetWMPid) ||
|
||||
if (!ui::PropertyExists(query_tree->parent, x11::GetAtom(kNetWMPid)) ||
|
||||
query_tree->parent == query_tree->root) {
|
||||
break;
|
||||
}
|
||||
@ -108,19 +108,20 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,
|
||||
connection_->Flush();
|
||||
|
||||
DCHECK(ui::X11EventSource::HasInstance());
|
||||
ui::X11EventSource::GetInstance()->AddXEventDispatcher(this);
|
||||
connection_->AddEventObserver(this);
|
||||
ui::X11EventSource::GetInstance()->AddPlatformEventDispatcher(this);
|
||||
|
||||
std::vector<x11::Atom> protocols = {
|
||||
gfx::GetAtom(kWMDeleteWindow),
|
||||
gfx::GetAtom(kNetWMPing),
|
||||
x11::GetAtom(kWMDeleteWindow),
|
||||
x11::GetAtom(kNetWMPing),
|
||||
};
|
||||
ui::SetArrayProperty(xwindow_, gfx::GetAtom(kWMProtocols), x11::Atom::ATOM,
|
||||
protocols);
|
||||
x11::SetArrayProperty(xwindow_, x11::GetAtom(kWMProtocols), x11::Atom::ATOM,
|
||||
protocols);
|
||||
|
||||
// We need a WM_CLIENT_MACHINE value so we integrate with the desktop
|
||||
// environment.
|
||||
ui::SetStringProperty(xwindow_, x11::Atom::WM_CLIENT_MACHINE,
|
||||
x11::Atom::STRING, net::GetHostName());
|
||||
x11::SetStringProperty(xwindow_, x11::Atom::WM_CLIENT_MACHINE,
|
||||
x11::Atom::STRING, net::GetHostName());
|
||||
|
||||
// Likewise, the X server needs to know this window's pid so it knows which
|
||||
// program to kill if the window hangs.
|
||||
@ -128,21 +129,22 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,
|
||||
static_assert(sizeof(uint32_t) >= sizeof(pid_t),
|
||||
"pid_t should not be larger than uint32_t");
|
||||
uint32_t pid = getpid();
|
||||
ui::SetProperty(xwindow_, gfx::GetAtom(kNetWMPid), x11::Atom::CARDINAL, pid);
|
||||
x11::SetProperty(xwindow_, x11::GetAtom(kNetWMPid), x11::Atom::CARDINAL, pid);
|
||||
|
||||
// Set the initial window name, if provided.
|
||||
if (!title.empty()) {
|
||||
ui::SetStringProperty(xwindow_, x11::Atom::WM_NAME, x11::Atom::STRING,
|
||||
title);
|
||||
ui::SetStringProperty(xwindow_, x11::Atom::WM_ICON_NAME, x11::Atom::STRING,
|
||||
title);
|
||||
x11::SetStringProperty(xwindow_, x11::Atom::WM_NAME, x11::Atom::STRING,
|
||||
title);
|
||||
x11::SetStringProperty(xwindow_, x11::Atom::WM_ICON_NAME, x11::Atom::STRING,
|
||||
title);
|
||||
}
|
||||
}
|
||||
|
||||
CefWindowX11::~CefWindowX11() {
|
||||
DCHECK_EQ(xwindow_, x11::Window::None);
|
||||
DCHECK(ui::X11EventSource::HasInstance());
|
||||
ui::X11EventSource::GetInstance()->RemoveXEventDispatcher(this);
|
||||
connection_->RemoveEventObserver(this);
|
||||
ui::X11EventSource::GetInstance()->RemovePlatformEventDispatcher(this);
|
||||
}
|
||||
|
||||
void CefWindowX11::Close() {
|
||||
@ -150,8 +152,8 @@ void CefWindowX11::Close() {
|
||||
return;
|
||||
|
||||
ui::SendClientMessage(
|
||||
xwindow_, xwindow_, gfx::GetAtom(kWMProtocols),
|
||||
{static_cast<uint32_t>(gfx::GetAtom(kWMDeleteWindow)),
|
||||
xwindow_, xwindow_, x11::GetAtom(kWMProtocols),
|
||||
{static_cast<uint32_t>(x11::GetAtom(kWMDeleteWindow)),
|
||||
static_cast<uint32_t>(x11::Time::CurrentTime), 0, 0, 0},
|
||||
x11::EventMask::NoEvent);
|
||||
|
||||
@ -192,15 +194,15 @@ void CefWindowX11::Show() {
|
||||
// DesktopWindowTreeHostLinux. The proxy property is referenced by
|
||||
// DesktopDragDropClientAuraX11::FindWindowFor.
|
||||
x11::Window window = x11::Window::None;
|
||||
auto dndproxy_atom = gfx::GetAtom(kXdndProxy);
|
||||
ui::GetProperty(toplevel_window, dndproxy_atom, &window);
|
||||
auto dndproxy_atom = x11::GetAtom(kXdndProxy);
|
||||
x11::GetProperty(toplevel_window, dndproxy_atom, &window);
|
||||
|
||||
if (window != child) {
|
||||
// Set the proxy target for the top-most window.
|
||||
ui::SetProperty(toplevel_window, dndproxy_atom, x11::Atom::WINDOW,
|
||||
child);
|
||||
x11::SetProperty(toplevel_window, dndproxy_atom, x11::Atom::WINDOW,
|
||||
child);
|
||||
// Do the same for the proxy target per the spec.
|
||||
ui::SetProperty(child, dndproxy_atom, x11::Atom::WINDOW, child);
|
||||
x11::SetProperty(child, dndproxy_atom, x11::Atom::WINDOW, child);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -286,38 +288,23 @@ views::DesktopWindowTreeHostLinux* CefWindowX11::GetHost() {
|
||||
}
|
||||
|
||||
bool CefWindowX11::CanDispatchEvent(const ui::PlatformEvent& event) {
|
||||
DCHECK_NE(xwindow_, x11::Window::None);
|
||||
return !!current_xevent_;
|
||||
auto* dispatching_event = connection_->dispatching_event();
|
||||
return dispatching_event && dispatching_event->window() == xwindow_;
|
||||
}
|
||||
|
||||
uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) {
|
||||
DCHECK_NE(xwindow_, x11::Window::None);
|
||||
DCHECK(event);
|
||||
DCHECK(current_xevent_);
|
||||
|
||||
ProcessXEvent(current_xevent_);
|
||||
auto* current_xevent = connection_->dispatching_event();
|
||||
ProcessXEvent(*current_xevent);
|
||||
return ui::POST_DISPATCH_STOP_PROPAGATION;
|
||||
}
|
||||
|
||||
// Called by X11EventSourceLibevent to determine whether this XEventDispatcher
|
||||
// implementation is able to process the next translated event sent by it.
|
||||
void CefWindowX11::CheckCanDispatchNextPlatformEvent(x11::Event* x11_event) {
|
||||
current_xevent_ = IsTargetedBy(*x11_event) ? x11_event : nullptr;
|
||||
}
|
||||
|
||||
void CefWindowX11::PlatformEventDispatchFinished() {
|
||||
current_xevent_ = nullptr;
|
||||
}
|
||||
|
||||
ui::PlatformEventDispatcher* CefWindowX11::GetPlatformEventDispatcher() {
|
||||
return this;
|
||||
}
|
||||
|
||||
bool CefWindowX11::DispatchXEvent(x11::Event* x11_event) {
|
||||
if (!IsTargetedBy(*x11_event))
|
||||
return false;
|
||||
ProcessXEvent(x11_event);
|
||||
return true;
|
||||
void CefWindowX11::OnEvent(const x11::Event& event) {
|
||||
if (event.window() != xwindow_)
|
||||
return;
|
||||
ProcessXEvent(event);
|
||||
}
|
||||
|
||||
void CefWindowX11::ContinueFocus() {
|
||||
@ -334,20 +321,17 @@ bool CefWindowX11::TopLevelAlwaysOnTop() const {
|
||||
return false;
|
||||
|
||||
std::vector<x11::Atom> wm_states;
|
||||
if (ui::GetAtomArrayProperty(toplevel_window, kNetWMState, &wm_states)) {
|
||||
x11::Atom keep_above_atom = gfx::GetAtom(kNetWMStateKeepAbove);
|
||||
if (x11::GetArrayProperty(toplevel_window, x11::GetAtom(kNetWMState),
|
||||
&wm_states)) {
|
||||
x11::Atom keep_above_atom = x11::GetAtom(kNetWMStateKeepAbove);
|
||||
if (base::Contains(wm_states, keep_above_atom))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CefWindowX11::IsTargetedBy(const x11::Event& x11_event) const {
|
||||
return x11_event.window() == xwindow_;
|
||||
}
|
||||
|
||||
void CefWindowX11::ProcessXEvent(x11::Event* event) {
|
||||
if (auto* configure = event->As<x11::ConfigureNotifyEvent>()) {
|
||||
void CefWindowX11::ProcessXEvent(const x11::Event& event) {
|
||||
if (auto* configure = event.As<x11::ConfigureNotifyEvent>()) {
|
||||
DCHECK_EQ(xwindow_, configure->event);
|
||||
DCHECK_EQ(xwindow_, configure->window);
|
||||
// It's possible that the X window may be resized by some other means
|
||||
@ -370,10 +354,10 @@ void CefWindowX11::ProcessXEvent(x11::Event* event) {
|
||||
browser_->NotifyMoveOrResizeStarted();
|
||||
}
|
||||
}
|
||||
} else if (auto* client = event->As<x11::ClientMessageEvent>()) {
|
||||
if (client->type == gfx::GetAtom(kWMProtocols)) {
|
||||
} else if (auto* client = event.As<x11::ClientMessageEvent>()) {
|
||||
if (client->type == x11::GetAtom(kWMProtocols)) {
|
||||
x11::Atom protocol = static_cast<x11::Atom>(client->data.data32[0]);
|
||||
if (protocol == gfx::GetAtom(kWMDeleteWindow)) {
|
||||
if (protocol == x11::GetAtom(kWMDeleteWindow)) {
|
||||
// We have received a close message from the window manager.
|
||||
if (!browser_ || browser_->TryCloseBrowser()) {
|
||||
// Allow the close.
|
||||
@ -389,7 +373,7 @@ void CefWindowX11::ProcessXEvent(x11::Event* event) {
|
||||
|
||||
delete this;
|
||||
}
|
||||
} else if (protocol == gfx::GetAtom(kNetWMPing)) {
|
||||
} else if (protocol == x11::GetAtom(kNetWMPing)) {
|
||||
x11::ClientMessageEvent reply_event = *client;
|
||||
reply_event.window = parent_xwindow_;
|
||||
x11::SendEvent(reply_event, reply_event.window,
|
||||
@ -397,7 +381,7 @@ void CefWindowX11::ProcessXEvent(x11::Event* event) {
|
||||
x11::EventMask::SubstructureRedirect);
|
||||
}
|
||||
}
|
||||
} else if (auto* focus = event->As<x11::FocusEvent>()) {
|
||||
} else if (auto* focus = event.As<x11::FocusEvent>()) {
|
||||
if (focus->opcode == x11::FocusEvent::In) {
|
||||
// This message is received first followed by a "_NET_ACTIVE_WINDOW"
|
||||
// message sent to the root window. When X11DesktopHandler handles the
|
||||
@ -418,8 +402,9 @@ void CefWindowX11::ProcessXEvent(x11::Event* event) {
|
||||
if (focus_pending_)
|
||||
focus_pending_ = false;
|
||||
}
|
||||
} else if (auto* property = event->As<x11::PropertyNotifyEvent>()) {
|
||||
if (property->atom == gfx::GetAtom(kNetWMState)) {
|
||||
} else if (auto* property = event.As<x11::PropertyNotifyEvent>()) {
|
||||
const auto& wm_state_atom = x11::GetAtom(kNetWMState);
|
||||
if (property->atom == wm_state_atom) {
|
||||
// State change event like minimize/maximize.
|
||||
if (browser_.get()) {
|
||||
auto child = FindChild(xwindow_);
|
||||
@ -428,8 +413,9 @@ void CefWindowX11::ProcessXEvent(x11::Event* event) {
|
||||
// window so that resource usage will be reduced while the window is
|
||||
// minimized. |atom_list| may be empty.
|
||||
std::vector<x11::Atom> atom_list;
|
||||
ui::GetAtomArrayProperty(xwindow_, kNetWMState, &atom_list);
|
||||
ui::SetAtomArrayProperty(child, kNetWMState, kAtom, atom_list);
|
||||
x11::GetArrayProperty(xwindow_, wm_state_atom, &atom_list);
|
||||
x11::SetArrayProperty(child, wm_state_atom, x11::Atom::ATOM,
|
||||
atom_list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,11 +13,11 @@
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "ui/events/platform/platform_event_dispatcher.h"
|
||||
#include "ui/events/platform/x11/x11_event_source.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/gfx/x/connection.h"
|
||||
#include "ui/gfx/x/x11_atom_cache.h"
|
||||
|
||||
namespace ui {
|
||||
namespace x11 {
|
||||
class XScopedEventSelector;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class CefBrowserHostBase;
|
||||
// Object wrapper for an X11 Window.
|
||||
// Based on WindowTreeHostX11 and DesktopWindowTreeHostX11.
|
||||
class CefWindowX11 : public ui::PlatformEventDispatcher,
|
||||
public ui::XEventDispatcher {
|
||||
public x11::EventObserver {
|
||||
public:
|
||||
CefWindowX11(CefRefPtr<CefBrowserHostBase> browser,
|
||||
x11::Window parent_xwindow,
|
||||
@ -55,11 +55,8 @@ class CefWindowX11 : public ui::PlatformEventDispatcher,
|
||||
bool CanDispatchEvent(const ui::PlatformEvent& event) override;
|
||||
uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
|
||||
|
||||
// ui::XEventDispatcher methods:
|
||||
void CheckCanDispatchNextPlatformEvent(x11::Event* x11_event) override;
|
||||
void PlatformEventDispatchFinished() override;
|
||||
ui::PlatformEventDispatcher* GetPlatformEventDispatcher() override;
|
||||
bool DispatchXEvent(x11::Event* x11_event) override;
|
||||
// x11::EventObserver methods:
|
||||
void OnEvent(const x11::Event& event) override;
|
||||
|
||||
x11::Window xwindow() const { return xwindow_; }
|
||||
gfx::Rect bounds() const { return bounds_; }
|
||||
@ -69,8 +66,7 @@ class CefWindowX11 : public ui::PlatformEventDispatcher,
|
||||
private:
|
||||
void ContinueFocus();
|
||||
|
||||
bool IsTargetedBy(const x11::Event& x11_event) const;
|
||||
void ProcessXEvent(x11::Event* xev);
|
||||
void ProcessXEvent(const x11::Event& xev);
|
||||
|
||||
CefRefPtr<CefBrowserHostBase> browser_;
|
||||
|
||||
@ -80,7 +76,7 @@ class CefWindowX11 : public ui::PlatformEventDispatcher,
|
||||
x11::Window xwindow_;
|
||||
|
||||
// Events selected on |xwindow_|.
|
||||
std::unique_ptr<ui::XScopedEventSelector> xwindow_events_;
|
||||
std::unique_ptr<x11::XScopedEventSelector> xwindow_events_;
|
||||
|
||||
// Is the window mapped to the screen?
|
||||
bool window_mapped_ = false;
|
||||
@ -90,11 +86,6 @@ class CefWindowX11 : public ui::PlatformEventDispatcher,
|
||||
|
||||
bool focus_pending_ = false;
|
||||
|
||||
// Tells if this dispatcher can process next translated event based on a
|
||||
// previous check in ::CheckCanDispatchNextPlatformEvent based on a XID
|
||||
// target.
|
||||
x11::Event* current_xevent_ = nullptr;
|
||||
|
||||
// Must always be the last member.
|
||||
base::WeakPtrFactory<CefWindowX11> weak_ptr_factory_;
|
||||
|
||||
|
@ -607,26 +607,6 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
|
||||
const GURL& url) override {
|
||||
if (!AllowWebUIForURL(url))
|
||||
return false;
|
||||
|
||||
const auto host_id = GetChromeHostId(url.host());
|
||||
if (host_id != CHROME_UNKNOWN) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content::ContentWebUIControllerFactory::GetInstance()
|
||||
->UseWebUIBindingsForURL(browser_context, url) ||
|
||||
ChromeWebUIControllerFactory::GetInstance()->UseWebUIBindingsForURL(
|
||||
browser_context, url)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) {
|
||||
// Handler to rewrite chrome://about and chrome://sync URLs.
|
||||
handler->AddHandlerPair(&HandleChromeAboutAndChromeSyncRewrite,
|
||||
|
@ -264,7 +264,6 @@ class CefBrowserURLRequest::Context
|
||||
|
||||
if (request_flags & UR_FLAG_ALLOW_STORED_CREDENTIALS) {
|
||||
// Include SameSite cookies.
|
||||
resource_request->force_ignore_site_for_cookies = true;
|
||||
resource_request->site_for_cookies =
|
||||
net::SiteForCookies::FromOrigin(*resource_request->request_initiator);
|
||||
}
|
||||
@ -301,9 +300,10 @@ class CefBrowserURLRequest::Context
|
||||
if (request_body) {
|
||||
if (request_body->elements()->size() == 1) {
|
||||
const auto& element = (*request_body->elements())[0];
|
||||
if (element.type() == network::mojom::DataElementType::kFile) {
|
||||
if (element.type() == network::DataElement::Tag::kFile) {
|
||||
const auto& file_element = element.As<network::DataElementFile>();
|
||||
if (content_type.empty()) {
|
||||
const auto& extension = element.path().Extension();
|
||||
const auto& extension = file_element.path().Extension();
|
||||
if (!extension.empty()) {
|
||||
// Requests should not block on the disk! On POSIX this goes to
|
||||
// disk. http://code.google.com/p/chromium/issues/detail?id=59849
|
||||
@ -312,22 +312,23 @@ class CefBrowserURLRequest::Context
|
||||
net::GetMimeTypeFromExtension(extension.substr(1), &content_type);
|
||||
}
|
||||
}
|
||||
loader_->AttachFileForUpload(element.path(), content_type);
|
||||
} else if (element.type() == network::mojom::DataElementType::kBytes) {
|
||||
loader_->AttachFileForUpload(file_element.path(), content_type);
|
||||
} else if (element.type() == network::DataElement::Tag::kBytes) {
|
||||
const auto& bytes_element = element.As<network::DataElementBytes>();
|
||||
const auto& bytes = bytes_element.bytes();
|
||||
if (content_type.empty()) {
|
||||
content_type = net_service::kContentTypeApplicationFormURLEncoded;
|
||||
}
|
||||
loader_->AttachStringForUpload(
|
||||
std::string(element.bytes() + element.offset(),
|
||||
element.length() - element.offset()),
|
||||
content_type);
|
||||
bytes_element.AsStringPiece().as_string(), content_type);
|
||||
|
||||
if (request_flags & UR_FLAG_REPORT_UPLOAD_PROGRESS) {
|
||||
// Report the expected upload data size.
|
||||
upload_data_size_ = element.length() - element.offset();
|
||||
upload_data_size_ = bytes.size();
|
||||
}
|
||||
} else {
|
||||
NOTIMPLEMENTED() << "Unsupported element type: " << element.type();
|
||||
NOTIMPLEMENTED() << "Unsupported element type: "
|
||||
<< static_cast<int>(element.type());
|
||||
}
|
||||
} else if (request_body->elements()->size() > 1) {
|
||||
NOTIMPLEMENTED() << "Multi-part form data is not supported";
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "base/bind.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "net/base/load_flags.h"
|
||||
#include "net/cookies/cookie_options.h"
|
||||
#include "net/cookies/cookie_util.h"
|
||||
@ -29,6 +30,24 @@ network::mojom::CookieManager* GetCookieManager(
|
||||
->GetCookieManagerForBrowserProcess();
|
||||
}
|
||||
|
||||
net::CookieOptions GetCookieOptions(const network::ResourceRequest& request) {
|
||||
// Match the logic from InterceptionJob::FetchCookies and
|
||||
// ChromeContentBrowserClient::ShouldIgnoreSameSiteCookieRestrictionsWhenTopLevel.
|
||||
bool should_treat_as_first_party =
|
||||
request.url.SchemeIsCryptographic() &&
|
||||
request.site_for_cookies.scheme() == content::kChromeUIScheme;
|
||||
|
||||
// Match the logic from URLRequestHttpJob::AddCookieHeaderAndStart.
|
||||
net::CookieOptions options;
|
||||
options.set_include_httponly();
|
||||
options.set_same_site_cookie_context(
|
||||
net::cookie_util::ComputeSameSiteContextForRequest(
|
||||
request.method, request.url, request.site_for_cookies,
|
||||
request.request_initiator, should_treat_as_first_party));
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
//
|
||||
// LOADING COOKIES.
|
||||
//
|
||||
@ -174,18 +193,10 @@ void LoadCookies(content::BrowserContext* browser_context,
|
||||
return;
|
||||
}
|
||||
|
||||
// Match the logic in URLRequestHttpJob::AddCookieHeaderAndStart.
|
||||
net::CookieOptions options;
|
||||
options.set_include_httponly();
|
||||
options.set_same_site_cookie_context(
|
||||
net::cookie_util::ComputeSameSiteContextForRequest(
|
||||
request.method, request.url, request.site_for_cookies,
|
||||
request.request_initiator, request.force_ignore_site_for_cookies));
|
||||
|
||||
CEF_POST_TASK(
|
||||
CEF_UIT,
|
||||
base::BindOnce(LoadCookiesOnUIThread, browser_context, request.url,
|
||||
options, allow_cookie_callback, std::move(done_callback)));
|
||||
CEF_UIT, base::BindOnce(LoadCookiesOnUIThread, browser_context,
|
||||
request.url, GetCookieOptions(request),
|
||||
allow_cookie_callback, std::move(done_callback)));
|
||||
}
|
||||
|
||||
void SaveCookies(content::BrowserContext* browser_context,
|
||||
@ -209,13 +220,6 @@ void SaveCookies(content::BrowserContext* browser_context,
|
||||
if (!headers->GetDateValue(&response_date))
|
||||
response_date = base::Time();
|
||||
|
||||
net::CookieOptions options;
|
||||
options.set_include_httponly();
|
||||
options.set_same_site_cookie_context(
|
||||
net::cookie_util::ComputeSameSiteContextForRequest(
|
||||
request.method, request.url, request.site_for_cookies,
|
||||
request.request_initiator, request.force_ignore_site_for_cookies));
|
||||
|
||||
const base::StringPiece name(net_service::kHTTPSetCookieHeaderName);
|
||||
std::string cookie_string;
|
||||
size_t iter = 0;
|
||||
@ -243,8 +247,8 @@ void SaveCookies(content::BrowserContext* browser_context,
|
||||
CEF_POST_TASK(
|
||||
CEF_UIT,
|
||||
base::BindOnce(SaveCookiesOnUIThread, browser_context, request.url,
|
||||
options, total_count, std::move(allowed_cookies),
|
||||
std::move(done_callback)));
|
||||
GetCookieOptions(request), total_count,
|
||||
std::move(allowed_cookies), std::move(done_callback)));
|
||||
|
||||
} else {
|
||||
std::move(done_callback).Run(total_count, std::move(allowed_cookies));
|
||||
|
@ -488,7 +488,7 @@ void CefBrowserPlatformDelegateOsr::StartDragging(
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegateOsr::UpdateDragCursor(
|
||||
blink::DragOperation operation) {
|
||||
ui::mojom::DragOperation operation) {
|
||||
CefRefPtr<CefRenderHandler> handler =
|
||||
browser_->GetClient()->GetRenderHandler();
|
||||
if (handler.get()) {
|
||||
@ -512,7 +512,7 @@ void CefBrowserPlatformDelegateOsr::DragSourceEndedAt(
|
||||
content::RenderWidgetHostImpl* source_rwh = drag_start_rwh_.get();
|
||||
const gfx::Point client_loc(gfx::Point(x, y));
|
||||
const gfx::Point& screen_loc = GetScreenPoint(client_loc);
|
||||
blink::DragOperation drag_op = static_cast<blink::DragOperation>(op);
|
||||
ui::mojom::DragOperation drag_op = static_cast<ui::mojom::DragOperation>(op);
|
||||
|
||||
// |client_loc| and |screen_loc| are in the root coordinate space, for
|
||||
// non-root RenderWidgetHosts they need to be transformed.
|
||||
|
@ -81,7 +81,7 @@ class CefBrowserPlatformDelegateOsr
|
||||
const gfx::Vector2d& image_offset,
|
||||
const blink::mojom::DragEventSourceInfo& event_info,
|
||||
content::RenderWidgetHostImpl* source_rwh) override;
|
||||
void UpdateDragCursor(blink::DragOperation operation) override;
|
||||
void UpdateDragCursor(ui::mojom::DragOperation operation) override;
|
||||
void DragSourceEndedAt(int x, int y, cef_drag_operations_mask_t op) override;
|
||||
void DragSourceSystemDragEnded() override;
|
||||
void AccessibilityEventReceived(
|
||||
|
@ -607,11 +607,6 @@ void CefRenderWidgetHostViewOSR::InitAsPopup(
|
||||
Show();
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::InitAsFullscreen(
|
||||
content::RenderWidgetHostView* reference_host_view) {
|
||||
NOTREACHED() << "Fullscreen widgets are not supported in OSR";
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::UpdateCursor(
|
||||
const content::WebCursor& cursor) {}
|
||||
|
||||
@ -756,13 +751,6 @@ viz::SurfaceId CefRenderWidgetHostViewOSR::GetCurrentSurfaceId() const {
|
||||
: viz::SurfaceId();
|
||||
}
|
||||
|
||||
content::BrowserAccessibilityManager*
|
||||
CefRenderWidgetHostViewOSR::CreateBrowserAccessibilityManager(
|
||||
content::BrowserAccessibilityDelegate* delegate,
|
||||
bool for_root_frame) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ImeSetComposition(
|
||||
const CefString& text,
|
||||
const std::vector<CefCompositionUnderline>& underlines,
|
||||
|
@ -143,8 +143,6 @@ class CefRenderWidgetHostViewOSR
|
||||
void ResetFallbackToFirstNavigationSurface() override;
|
||||
void InitAsPopup(content::RenderWidgetHostView* parent_host_view,
|
||||
const gfx::Rect& pos) override;
|
||||
void InitAsFullscreen(
|
||||
content::RenderWidgetHostView* reference_host_view) override;
|
||||
void UpdateCursor(const content::WebCursor& cursor) override;
|
||||
void SetIsLoading(bool is_loading) override;
|
||||
void RenderProcessGone() override;
|
||||
@ -166,9 +164,6 @@ class CefRenderWidgetHostViewOSR
|
||||
#endif
|
||||
|
||||
viz::SurfaceId GetCurrentSurfaceId() const override;
|
||||
content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
|
||||
content::BrowserAccessibilityDelegate* delegate,
|
||||
bool for_root_frame) override;
|
||||
void ImeCompositionRangeChanged(
|
||||
const gfx::Range& range,
|
||||
const std::vector<gfx::Rect>& character_bounds) override;
|
||||
|
@ -163,7 +163,8 @@ void CefWebContentsViewOSR::StartDragging(
|
||||
}
|
||||
}
|
||||
|
||||
void CefWebContentsViewOSR::UpdateDragCursor(blink::DragOperation operation) {
|
||||
void CefWebContentsViewOSR::UpdateDragCursor(
|
||||
ui::mojom::DragOperation operation) {
|
||||
CefRefPtr<AlloyBrowserHostImpl> browser = GetBrowser();
|
||||
if (browser.get())
|
||||
browser->UpdateDragCursor(operation);
|
||||
|
@ -67,7 +67,7 @@ class CefWebContentsViewOSR : public content::WebContentsView,
|
||||
const gfx::Vector2d& image_offset,
|
||||
const blink::mojom::DragEventSourceInfo& event_info,
|
||||
content::RenderWidgetHostImpl* source_rwh) override;
|
||||
void UpdateDragCursor(blink::DragOperation operation) override;
|
||||
void UpdateDragCursor(ui::mojom::DragOperation operation) override;
|
||||
virtual void GotFocus(
|
||||
content::RenderWidgetHostImpl* render_widget_host) override;
|
||||
virtual void LostFocus(
|
||||
|
@ -27,9 +27,9 @@
|
||||
#include "chrome/browser/prefs/chrome_command_line_pref_store.h"
|
||||
#include "chrome/browser/printing/print_preview_sticky_settings.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
|
||||
#include "chrome/browser/ssl/ssl_config_service_manager.h"
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
#include "chrome/browser/ui/webui/print_preview/policy_settings.h"
|
||||
#include "chrome/common/buildflags.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/net/safe_search_util.h"
|
||||
@ -228,7 +228,6 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
|
||||
// Default profile preferences.
|
||||
AccessibilityUIMessageHandler::RegisterProfilePrefs(registry.get());
|
||||
chrome_browser_net::RegisterPredictionOptionsProfilePrefs(registry.get());
|
||||
DeviceIDFetcher::RegisterProfilePrefs(registry.get());
|
||||
extensions::ExtensionPrefs::RegisterProfilePrefs(registry.get());
|
||||
HostContentSettingsMap::RegisterProfilePrefs(registry.get());
|
||||
language::LanguagePrefs::RegisterProfilePrefs(registry.get());
|
||||
@ -254,6 +253,7 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
|
||||
registry->RegisterStringPref(
|
||||
prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string());
|
||||
registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, false);
|
||||
printing::PolicySettings::RegisterProfilePrefs(registry.get());
|
||||
printing::PrintPreviewStickySettings::RegisterProfilePrefs(registry.get());
|
||||
DownloadPrefs::RegisterProfilePrefs(registry.get());
|
||||
|
||||
|
@ -209,12 +209,7 @@ bool CefPrintViewManager::PrintToPDF(content::RenderFrameHost* rfh,
|
||||
FillInDictionaryFromPdfPrintSettings(settings, ++next_pdf_request_id_,
|
||||
pdf_print_state_->settings_);
|
||||
|
||||
mojo::AssociatedRemote<printing::mojom::PrintRenderFrame>
|
||||
print_render_frame_remote;
|
||||
rfh->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
&print_render_frame_remote);
|
||||
print_render_frame_remote->InitiatePrintPreview({},
|
||||
!!settings.selection_only);
|
||||
GetPrintRenderFrame(rfh)->InitiatePrintPreview({}, !!settings.selection_only);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -237,6 +232,17 @@ void CefPrintViewManager::DidShowPrintDialog() {
|
||||
PrintViewManager::DidShowPrintDialog();
|
||||
}
|
||||
|
||||
void CefPrintViewManager::RequestPrintPreview(
|
||||
mojom::RequestPrintPreviewParamsPtr params) {
|
||||
if (!pdf_print_state_) {
|
||||
PrintViewManager::RequestPrintPreview(std::move(params));
|
||||
return;
|
||||
}
|
||||
|
||||
GetPrintRenderFrame(pdf_print_state_->printing_rfh_)
|
||||
->PrintPreview(pdf_print_state_->settings_.Clone());
|
||||
}
|
||||
|
||||
void CefPrintViewManager::RenderFrameDeleted(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
if (pdf_print_state_ &&
|
||||
@ -261,22 +267,11 @@ bool CefPrintViewManager::OnMessageReceived(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
bool handled = true;
|
||||
if (!pdf_print_state_) {
|
||||
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(CefPrintViewManager, message,
|
||||
render_frame_host)
|
||||
IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview,
|
||||
OnRequestPrintPreview)
|
||||
IPC_MESSAGE_HANDLER(PrintHostMsg_ShowScriptedPrintPreview,
|
||||
OnShowScriptedPrintPreview)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
IPC_END_MESSAGE_MAP()
|
||||
|
||||
return PrintViewManager::OnMessageReceived(message, render_frame_host);
|
||||
}
|
||||
|
||||
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(CefPrintViewManager, message,
|
||||
render_frame_host)
|
||||
IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview,
|
||||
OnRequestPrintPreview_PrintToPdf)
|
||||
IPC_MESSAGE_HANDLER(PrintHostMsg_MetafileReadyForPrinting,
|
||||
OnMetafileReadyForPrinting_PrintToPdf)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
@ -311,34 +306,6 @@ const CefPrintViewManager* CefPrintViewManager::FromWebContents(
|
||||
contents->GetUserData(PrintViewManager::UserDataKey()));
|
||||
}
|
||||
|
||||
void CefPrintViewManager::OnRequestPrintPreview(
|
||||
content::RenderFrameHost* rfh,
|
||||
const PrintHostMsg_RequestPrintPreview_Params&) {
|
||||
InitializePrintPreview(rfh->GetFrameTreeNodeId());
|
||||
}
|
||||
|
||||
void CefPrintViewManager::OnShowScriptedPrintPreview(
|
||||
content::RenderFrameHost* rfh,
|
||||
bool source_is_modifiable) {
|
||||
InitializePrintPreview(rfh->GetFrameTreeNodeId());
|
||||
}
|
||||
|
||||
void CefPrintViewManager::OnRequestPrintPreview_PrintToPdf(
|
||||
content::RenderFrameHost* rfh,
|
||||
const PrintHostMsg_RequestPrintPreview_Params&) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
if (!pdf_print_state_)
|
||||
return;
|
||||
|
||||
DCHECK_EQ(pdf_print_state_->printing_rfh_, rfh);
|
||||
|
||||
mojo::AssociatedRemote<printing::mojom::PrintRenderFrame>
|
||||
print_render_frame_remote;
|
||||
rfh->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
&print_render_frame_remote);
|
||||
print_render_frame_remote->PrintPreview(pdf_print_state_->settings_.Clone());
|
||||
}
|
||||
|
||||
void CefPrintViewManager::OnMetafileReadyForPrinting_PrintToPdf(
|
||||
content::RenderFrameHost* rfh,
|
||||
const mojom::DidPreviewDocumentParams& params,
|
||||
@ -390,70 +357,4 @@ void CefPrintViewManager::TerminatePdfPrintJob() {
|
||||
pdf_print_state_.reset();
|
||||
}
|
||||
|
||||
void CefPrintViewManager::InitializePrintPreview(int frame_tree_node_id) {
|
||||
PrintPreviewDialogController* dialog_controller =
|
||||
PrintPreviewDialogController::GetInstance();
|
||||
if (!dialog_controller)
|
||||
return;
|
||||
|
||||
dialog_controller->PrintPreview(web_contents());
|
||||
|
||||
content::WebContents* preview_contents =
|
||||
dialog_controller->GetPrintPreviewForContents(web_contents());
|
||||
|
||||
extensions::CefExtensionWebContentsObserver::CreateForWebContents(
|
||||
preview_contents);
|
||||
|
||||
PrintPreviewHelper::CreateForWebContents(preview_contents);
|
||||
PrintPreviewHelper::FromWebContents(preview_contents)
|
||||
->Initialize(frame_tree_node_id);
|
||||
}
|
||||
|
||||
// CefPrintViewManager::PrintPreviewHelper
|
||||
|
||||
CefPrintViewManager::PrintPreviewHelper::PrintPreviewHelper(
|
||||
content::WebContents* contents)
|
||||
: content::WebContentsObserver(contents) {}
|
||||
|
||||
void CefPrintViewManager::PrintPreviewHelper::Initialize(
|
||||
int parent_frame_tree_node_id) {
|
||||
DCHECK_EQ(parent_frame_tree_node_id_,
|
||||
content::RenderFrameHost::kNoFrameTreeNodeId);
|
||||
DCHECK_NE(parent_frame_tree_node_id,
|
||||
content::RenderFrameHost::kNoFrameTreeNodeId);
|
||||
parent_frame_tree_node_id_ = parent_frame_tree_node_id;
|
||||
|
||||
auto context = web_contents()->GetBrowserContext();
|
||||
auto manager = content::BrowserContext::GetDownloadManager(context);
|
||||
|
||||
if (!context->GetDownloadManagerDelegate()) {
|
||||
manager->SetDelegate(new CefDownloadManagerDelegate(manager));
|
||||
}
|
||||
|
||||
auto browser_info =
|
||||
CefBrowserInfoManager::GetInstance()->GetBrowserInfoForFrameTreeNode(
|
||||
parent_frame_tree_node_id_);
|
||||
DCHECK(browser_info);
|
||||
if (!browser_info)
|
||||
return;
|
||||
|
||||
// Associate guest state information with the owner browser.
|
||||
browser_info->MaybeCreateFrame(web_contents()->GetMainFrame(),
|
||||
true /* is_guest_view */);
|
||||
}
|
||||
|
||||
void CefPrintViewManager::PrintPreviewHelper::WebContentsDestroyed() {
|
||||
auto browser_info =
|
||||
CefBrowserInfoManager::GetInstance()->GetBrowserInfoForFrameTreeNode(
|
||||
parent_frame_tree_node_id_);
|
||||
DCHECK(browser_info);
|
||||
if (!browser_info)
|
||||
return;
|
||||
|
||||
// Disassociate guest state information with the owner browser.
|
||||
browser_info->RemoveFrame(web_contents()->GetMainFrame());
|
||||
}
|
||||
|
||||
WEB_CONTENTS_USER_DATA_KEY_IMPL(CefPrintViewManager::PrintPreviewHelper)
|
||||
|
||||
} // namespace printing
|
||||
|
@ -43,6 +43,7 @@ class CefPrintViewManager : public PrintViewManager {
|
||||
void GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) override;
|
||||
void DidShowPrintDialog() override;
|
||||
void RequestPrintPreview(mojom::RequestPrintPreviewParamsPtr params) override;
|
||||
|
||||
// content::WebContentsObserver methods:
|
||||
void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
|
||||
@ -59,41 +60,14 @@ class CefPrintViewManager : public PrintViewManager {
|
||||
static const CefPrintViewManager* FromWebContents(
|
||||
const content::WebContents* contents);
|
||||
|
||||
// Used to track the lifespan of the print preview WebContents.
|
||||
class PrintPreviewHelper
|
||||
: public content::WebContentsObserver,
|
||||
public content::WebContentsUserData<PrintPreviewHelper> {
|
||||
public:
|
||||
void Initialize(int parent_frame_tree_node_id);
|
||||
void WebContentsDestroyed() override;
|
||||
|
||||
private:
|
||||
friend class content::WebContentsUserData<PrintPreviewHelper>;
|
||||
|
||||
explicit PrintPreviewHelper(content::WebContents* contents);
|
||||
|
||||
int parent_frame_tree_node_id_ = -1;
|
||||
|
||||
WEB_CONTENTS_USER_DATA_KEY_DECL();
|
||||
DISALLOW_COPY_AND_ASSIGN(PrintPreviewHelper);
|
||||
};
|
||||
|
||||
private:
|
||||
explicit CefPrintViewManager(content::WebContents* web_contents);
|
||||
|
||||
// IPC Message handlers.
|
||||
void OnRequestPrintPreview(content::RenderFrameHost* rfh,
|
||||
const PrintHostMsg_RequestPrintPreview_Params&);
|
||||
void OnShowScriptedPrintPreview(content::RenderFrameHost* rfh,
|
||||
bool source_is_modifiable);
|
||||
void OnRequestPrintPreview_PrintToPdf(
|
||||
content::RenderFrameHost* rfh,
|
||||
const PrintHostMsg_RequestPrintPreview_Params&);
|
||||
void OnMetafileReadyForPrinting_PrintToPdf(
|
||||
content::RenderFrameHost* rfh,
|
||||
const mojom::DidPreviewDocumentParams& params,
|
||||
const mojom::PreviewIds& ids);
|
||||
void InitializePrintPreview(int frame_tree_node_id);
|
||||
void TerminatePdfPrintJob();
|
||||
|
||||
// Used for printing to PDF. Only accessed on the browser process UI thread.
|
||||
|
@ -1,156 +0,0 @@
|
||||
// Copyright (c) 2012 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/printing/printing_message_filter.h"
|
||||
|
||||
#include "libcef/browser/printing/print_view_manager.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/task/post_task.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/printing/print_job_manager.h"
|
||||
#include "chrome/browser/printing/printer_query.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/keyed_service/content/browser_context_keyed_service_shutdown_notifier_factory.h"
|
||||
#include "components/printing/browser/print_manager_utils.h"
|
||||
#include "components/printing/common/print.mojom.h"
|
||||
#include "components/printing/common/print_messages.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 "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/child_process_host.h"
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
|
||||
using content::BrowserThread;
|
||||
|
||||
namespace printing {
|
||||
|
||||
namespace {
|
||||
|
||||
class CefPrintingMessageFilterShutdownNotifierFactory
|
||||
: public BrowserContextKeyedServiceShutdownNotifierFactory {
|
||||
public:
|
||||
static CefPrintingMessageFilterShutdownNotifierFactory* GetInstance();
|
||||
|
||||
private:
|
||||
friend struct base::LazyInstanceTraitsBase<
|
||||
CefPrintingMessageFilterShutdownNotifierFactory>;
|
||||
|
||||
CefPrintingMessageFilterShutdownNotifierFactory()
|
||||
: BrowserContextKeyedServiceShutdownNotifierFactory(
|
||||
"CefPrintingMessageFilter") {}
|
||||
|
||||
~CefPrintingMessageFilterShutdownNotifierFactory() override {}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefPrintingMessageFilterShutdownNotifierFactory);
|
||||
};
|
||||
|
||||
base::LazyInstance<CefPrintingMessageFilterShutdownNotifierFactory>::Leaky
|
||||
g_printing_message_filter_shutdown_notifier_factory =
|
||||
LAZY_INSTANCE_INITIALIZER;
|
||||
|
||||
// static
|
||||
CefPrintingMessageFilterShutdownNotifierFactory*
|
||||
CefPrintingMessageFilterShutdownNotifierFactory::GetInstance() {
|
||||
return g_printing_message_filter_shutdown_notifier_factory.Pointer();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
CefPrintingMessageFilter::CefPrintingMessageFilter(int render_process_id,
|
||||
Profile* profile)
|
||||
: content::BrowserMessageFilter(PrintMsgStart),
|
||||
render_process_id_(render_process_id),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_.get());
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
printing_shutdown_notifier_ =
|
||||
CefPrintingMessageFilterShutdownNotifierFactory::GetInstance()
|
||||
->Get(profile)
|
||||
->Subscribe(base::Bind(&CefPrintingMessageFilter::ShutdownOnUIThread,
|
||||
base::Unretained(this)));
|
||||
is_printing_enabled_.Init(prefs::kPrintingEnabled, profile->GetPrefs());
|
||||
is_printing_enabled_.MoveToSequence(content::GetIOThreadTaskRunner({}));
|
||||
}
|
||||
|
||||
void CefPrintingMessageFilter::EnsureShutdownNotifierFactoryBuilt() {
|
||||
CefPrintingMessageFilterShutdownNotifierFactory::GetInstance();
|
||||
}
|
||||
|
||||
CefPrintingMessageFilter::~CefPrintingMessageFilter() {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
}
|
||||
|
||||
void CefPrintingMessageFilter::ShutdownOnUIThread() {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
is_printing_enabled_.Destroy();
|
||||
printing_shutdown_notifier_.reset();
|
||||
}
|
||||
|
||||
void CefPrintingMessageFilter::OnDestruct() const {
|
||||
BrowserThread::DeleteOnUIThread::Destruct(this);
|
||||
}
|
||||
|
||||
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(PrintHostMsg_CheckForCancel, OnCheckForCancel)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
IPC_END_MESSAGE_MAP()
|
||||
return handled;
|
||||
}
|
||||
|
||||
void CefPrintingMessageFilter::OnScriptedPrint(
|
||||
const mojom::ScriptedPrintParams& params,
|
||||
IPC::Message* reply_msg) {
|
||||
std::unique_ptr<PrinterQuery> printer_query =
|
||||
queue_->PopPrinterQuery(params.cookie);
|
||||
if (!printer_query.get()) {
|
||||
printer_query =
|
||||
queue_->CreatePrinterQuery(render_process_id_, reply_msg->routing_id());
|
||||
}
|
||||
printer_query->GetSettings(
|
||||
PrinterQuery::GetSettingsAskParam::ASK_USER, params.expected_pages_count,
|
||||
params.has_selection, params.margin_type, params.is_scripted,
|
||||
params.is_modifiable,
|
||||
base::BindOnce(&CefPrintingMessageFilter::OnScriptedPrintReply, this,
|
||||
std::move(printer_query), reply_msg));
|
||||
}
|
||||
|
||||
void CefPrintingMessageFilter::OnScriptedPrintReply(
|
||||
std::unique_ptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg) {
|
||||
mojom::PrintPagesParams params;
|
||||
params.params = mojom::PrintParams::New();
|
||||
if (printer_query->last_status() == PrintingContext::OK &&
|
||||
printer_query->settings().dpi()) {
|
||||
RenderParamsFromPrintSettings(printer_query->settings(),
|
||||
params.params.get());
|
||||
params.params->document_cookie = printer_query->cookie();
|
||||
params.pages = PageRange::GetPages(printer_query->settings().ranges());
|
||||
}
|
||||
PrintHostMsg_ScriptedPrint::WriteReplyParams(reply_msg, params);
|
||||
Send(reply_msg);
|
||||
if (!params.params->dpi.IsEmpty() && params.params->document_cookie) {
|
||||
queue_->QueuePrinterQuery(std::move(printer_query));
|
||||
} else {
|
||||
printer_query->StopWorker();
|
||||
}
|
||||
}
|
||||
|
||||
void CefPrintingMessageFilter::OnCheckForCancel(const mojom::PreviewIds& ids,
|
||||
bool* cancel) {
|
||||
*cancel = false;
|
||||
}
|
||||
|
||||
} // namespace printing
|
@ -1,74 +0,0 @@
|
||||
// Copyright (c) 2012 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_PRINTING_PRINTING_MESSAGE_FILTER_H_
|
||||
#define CEF_LIBCEF_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/keyed_service/core/keyed_service_shutdown_notifier.h"
|
||||
#include "components/prefs/pref_member.h"
|
||||
#include "components/printing/common/print.mojom-forward.h"
|
||||
#include "content/public/browser/browser_message_filter.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
|
||||
class Profile;
|
||||
|
||||
namespace printing {
|
||||
|
||||
class PrintQueriesQueue;
|
||||
class PrinterQuery;
|
||||
|
||||
// This class filters out incoming printing related IPC messages for the
|
||||
// renderer process on the IPC thread.
|
||||
class CefPrintingMessageFilter : public content::BrowserMessageFilter {
|
||||
public:
|
||||
CefPrintingMessageFilter(int render_process_id, Profile* profile);
|
||||
|
||||
static void EnsureShutdownNotifierFactoryBuilt();
|
||||
|
||||
// content::BrowserMessageFilter methods.
|
||||
void OnDestruct() const override;
|
||||
bool OnMessageReceived(const IPC::Message& message) override;
|
||||
|
||||
private:
|
||||
friend class base::DeleteHelper<CefPrintingMessageFilter>;
|
||||
friend class content::BrowserThread;
|
||||
|
||||
~CefPrintingMessageFilter() override;
|
||||
|
||||
void ShutdownOnUIThread();
|
||||
|
||||
// The renderer host have to show to the user the print dialog and returns
|
||||
// the selected print settings. The task is handled by the print worker
|
||||
// thread and the UI thread. The reply occurs on the IO thread.
|
||||
void OnScriptedPrint(const mojom::ScriptedPrintParams& params,
|
||||
IPC::Message* reply_msg);
|
||||
void OnScriptedPrintReply(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);
|
||||
|
||||
std::unique_ptr<KeyedServiceShutdownNotifier::Subscription>
|
||||
printing_shutdown_notifier_;
|
||||
|
||||
BooleanPrefMember is_printing_enabled_;
|
||||
|
||||
const int render_process_id_;
|
||||
|
||||
scoped_refptr<PrintQueriesQueue> queue_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefPrintingMessageFilter);
|
||||
};
|
||||
|
||||
} // namespace printing
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_
|
@ -33,6 +33,6 @@ void CefMenuRunnerViews::CancelContextMenu() {
|
||||
|
||||
bool CefMenuRunnerViews::FormatLabel(base::string16& label) {
|
||||
// Remove the accelerator indicator (&) from label strings.
|
||||
const char16 replace[] = {L'&', 0};
|
||||
const base::string16::value_type replace[] = {L'&', 0};
|
||||
return base::ReplaceChars(label, replace, base::string16(), &label);
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ bool CefXmlReaderImpl::MoveToCarryingElement() {
|
||||
void CefXmlReaderImpl::AppendError(const CefString& error_str) {
|
||||
if (!error_buf_.str().empty())
|
||||
error_buf_ << L"\n";
|
||||
error_buf_ << error_str;
|
||||
error_buf_ << error_str.ToString();
|
||||
}
|
||||
|
||||
bool CefXmlReaderImpl::VerifyContext() {
|
||||
|
@ -3,41 +3,6 @@
|
||||
# governed by a BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import("//tools/json_schema_compiler/json_features.gni")
|
||||
#import("//tools/json_schema_compiler/json_schema_api.gni")
|
||||
|
||||
# TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See README.txt for
|
||||
# details.
|
||||
#schema_sources = [
|
||||
# # TODO(cef): Add CEF-specific Mojo APIs here.
|
||||
#]
|
||||
#
|
||||
#uncompiled_sources = [
|
||||
#]
|
||||
#
|
||||
#root_namespace = "extensions::api::cef::%(namespace)s"
|
||||
#schema_include_rules = "//cef/libcef/browser/extensions/api:extensions::api::cef::%(namespace)s"
|
||||
#schema_dependencies = [ "//extensions/common/api" ]
|
||||
#
|
||||
#generated_json_strings("api") {
|
||||
# sources = schema_sources
|
||||
# schemas = true
|
||||
# configs = [ "//build/config:precompiled_headers" ]
|
||||
# bundle_name = "Cef"
|
||||
#
|
||||
# deps = schema_dependencies
|
||||
#}
|
||||
#
|
||||
#function_registration("api_registration") {
|
||||
# sources = schema_sources
|
||||
# impl_dir = "//cef/libcef/browser/extensions/api"
|
||||
# configs = [ "//build/config:precompiled_headers" ]
|
||||
# bundle_name = "Cef"
|
||||
#
|
||||
# deps = [
|
||||
# ":api",
|
||||
# ]
|
||||
# deps += schema_dependencies
|
||||
#}
|
||||
|
||||
json_features("cef_api_features") {
|
||||
feature_type = "APIFeature"
|
||||
|
@ -1271,10 +1271,13 @@ void CefPostDataElementImpl::Set(const network::DataElement& element) {
|
||||
CHECK_READONLY_RETURN_VOID();
|
||||
}
|
||||
|
||||
if (element.type() == network::mojom::DataElementType::kBytes) {
|
||||
SetToBytes(element.length(), element.bytes());
|
||||
} else if (element.type() == network::mojom::DataElementType::kFile) {
|
||||
SetToFile(element.path().value());
|
||||
if (element.type() == network::DataElement::Tag::kBytes) {
|
||||
const auto& bytes_element = element.As<network::DataElementBytes>();
|
||||
const auto& bytes = bytes_element.bytes();
|
||||
SetToBytes(bytes.size(), bytes.data());
|
||||
} else if (element.type() == network::DataElement::Tag::kFile) {
|
||||
const auto& file_element = element.As<network::DataElementFile>();
|
||||
SetToFile(file_element.path().value());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,8 +171,10 @@ CEF_EXPORT int cef_string_utf16_cmp(const cef_string_utf16_t* str1,
|
||||
if (str1->length == 0 && str2->length == 0)
|
||||
return 0;
|
||||
#if defined(WCHAR_T_IS_UTF32)
|
||||
int r = base::c16memcmp(str1->str, str2->str,
|
||||
std::min(str1->length, str2->length));
|
||||
int r =
|
||||
base::c16memcmp(reinterpret_cast<base::string16::value_type*>(str1->str),
|
||||
reinterpret_cast<base::string16::value_type*>(str2->str),
|
||||
std::min(str1->length, str2->length));
|
||||
#else
|
||||
int r = wcsncmp(str1->str, str2->str, std::min(str1->length, str2->length));
|
||||
#endif
|
||||
@ -210,7 +212,8 @@ CEF_EXPORT int cef_string_wide_to_utf16(const wchar_t* src,
|
||||
cef_string_utf16_t* output) {
|
||||
base::string16 str;
|
||||
bool ret = base::WideToUTF16(src, src_len, &str);
|
||||
if (!cef_string_utf16_set(str.c_str(), str.length(), output, true))
|
||||
if (!cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
|
||||
str.length(), output, true))
|
||||
return false;
|
||||
return ret;
|
||||
}
|
||||
@ -219,7 +222,8 @@ CEF_EXPORT int cef_string_utf16_to_wide(const char16* src,
|
||||
size_t src_len,
|
||||
cef_string_wide_t* output) {
|
||||
std::wstring str;
|
||||
bool ret = base::UTF16ToWide(src, src_len, &str);
|
||||
bool ret = base::UTF16ToWide(
|
||||
reinterpret_cast<const base::string16::value_type*>(src), src_len, &str);
|
||||
if (!cef_string_wide_set(str.c_str(), str.length(), output, true))
|
||||
return false;
|
||||
return ret;
|
||||
@ -230,7 +234,8 @@ CEF_EXPORT int cef_string_utf8_to_utf16(const char* src,
|
||||
cef_string_utf16_t* output) {
|
||||
base::string16 str;
|
||||
bool ret = base::UTF8ToUTF16(src, src_len, &str);
|
||||
if (!cef_string_utf16_set(str.c_str(), str.length(), output, true))
|
||||
if (!cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
|
||||
str.length(), output, true))
|
||||
return false;
|
||||
return ret;
|
||||
}
|
||||
@ -239,7 +244,8 @@ CEF_EXPORT int cef_string_utf16_to_utf8(const char16* src,
|
||||
size_t src_len,
|
||||
cef_string_utf8_t* output) {
|
||||
std::string str;
|
||||
bool ret = base::UTF16ToUTF8(src, src_len, &str);
|
||||
bool ret = base::UTF16ToUTF8(
|
||||
reinterpret_cast<const base::string16::value_type*>(src), src_len, &str);
|
||||
if (!cef_string_utf8_set(str.c_str(), str.length(), output, true))
|
||||
return false;
|
||||
return ret;
|
||||
@ -256,7 +262,8 @@ CEF_EXPORT int cef_string_ascii_to_utf16(const char* src,
|
||||
size_t src_len,
|
||||
cef_string_utf16_t* output) {
|
||||
const base::string16& str = base::ASCIIToUTF16(std::string(src, src_len));
|
||||
return cef_string_utf16_set(str.c_str(), str.length(), output, true);
|
||||
return cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
|
||||
str.length(), output, true);
|
||||
}
|
||||
|
||||
CEF_EXPORT cef_string_userfree_wide_t cef_string_userfree_wide_alloc() {
|
||||
@ -296,13 +303,17 @@ CEF_EXPORT void cef_string_userfree_utf16_free(
|
||||
CEF_EXPORT int cef_string_utf16_to_lower(const char16* src,
|
||||
size_t src_len,
|
||||
cef_string_utf16_t* output) {
|
||||
const base::string16& str = base::i18n::ToLower(base::string16(src, src_len));
|
||||
return cef_string_utf16_set(str.c_str(), str.length(), output, true);
|
||||
const base::string16& str = base::i18n::ToLower(base::string16(
|
||||
reinterpret_cast<const base::string16::value_type*>(src), src_len));
|
||||
return cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
|
||||
str.length(), output, true);
|
||||
}
|
||||
|
||||
CEF_EXPORT int cef_string_utf16_to_upper(const char16* src,
|
||||
size_t src_len,
|
||||
cef_string_utf16_t* output) {
|
||||
const base::string16& str = base::i18n::ToUpper(base::string16(src, src_len));
|
||||
return cef_string_utf16_set(str.c_str(), str.length(), output, true);
|
||||
const base::string16& str = base::i18n::ToUpper(base::string16(
|
||||
reinterpret_cast<const base::string16::value_type*>(src), src_len));
|
||||
return cef_string_utf16_set(reinterpret_cast<const char16*>(str.c_str()),
|
||||
str.length(), output, true);
|
||||
}
|
||||
|
@ -76,7 +76,6 @@
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "content/public/renderer/render_view.h"
|
||||
#include "content/public/renderer/render_view_visitor.h"
|
||||
#include "content/renderer/render_widget.h"
|
||||
#include "extensions/common/switches.h"
|
||||
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container_manager.h"
|
||||
#include "extensions/renderer/renderer_extension_registry.h"
|
||||
@ -99,7 +98,6 @@
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
#include "third_party/blink/public/web/web_frame.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/public/web/web_prerenderer_client.h"
|
||||
#include "third_party/blink/public/web/web_security_policy.h"
|
||||
#include "third_party/blink/public/web/web_view.h"
|
||||
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
|
||||
@ -112,26 +110,6 @@
|
||||
|
||||
namespace {
|
||||
|
||||
// Stub implementation of blink::WebPrerendererClient.
|
||||
class CefPrerendererClient : public content::RenderViewObserver,
|
||||
public blink::WebPrerendererClient {
|
||||
public:
|
||||
explicit CefPrerendererClient(content::RenderView* render_view)
|
||||
: content::RenderViewObserver(render_view) {
|
||||
DCHECK(render_view);
|
||||
render_view->GetWebView()->SetPrerendererClient(this);
|
||||
}
|
||||
|
||||
private:
|
||||
~CefPrerendererClient() override {}
|
||||
|
||||
// RenderViewObserver methods:
|
||||
void OnDestruct() override { delete this; }
|
||||
|
||||
// WebPrerendererClient methods:
|
||||
bool IsPrefetchOnly() override { return false; }
|
||||
};
|
||||
|
||||
bool IsStandaloneExtensionProcess() {
|
||||
return extensions::ExtensionsEnabled() &&
|
||||
extensions::CefExtensionsRendererClient::
|
||||
@ -340,8 +318,6 @@ void AlloyContentRendererClient::RenderFrameCreated(
|
||||
|
||||
void AlloyContentRendererClient::RenderViewCreated(
|
||||
content::RenderView* render_view) {
|
||||
new CefPrerendererClient(render_view);
|
||||
|
||||
bool browser_created;
|
||||
base::Optional<bool> is_windowless;
|
||||
browser_manager_->RenderViewCreated(render_view, browser_created,
|
||||
@ -417,12 +393,11 @@ void AlloyContentRendererClient::WillSendRequest(
|
||||
const blink::WebURL& url,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies) {
|
||||
GURL* new_url) {
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
extensions_renderer_client_->WillSendRequest(
|
||||
frame, transition_type, url, site_for_cookies, initiator_origin,
|
||||
new_url, attach_same_site_cookies);
|
||||
extensions_renderer_client_->WillSendRequest(frame, transition_type, url,
|
||||
site_for_cookies,
|
||||
initiator_origin, new_url);
|
||||
if (!new_url->is_empty())
|
||||
return;
|
||||
}
|
||||
@ -439,8 +414,8 @@ bool AlloyContentRendererClient::IsLinkVisited(uint64_t link_hash) {
|
||||
|
||||
bool AlloyContentRendererClient::IsOriginIsolatedPepperPlugin(
|
||||
const base::FilePath& plugin_path) {
|
||||
return plugin_path ==
|
||||
base::FilePath::FromUTF8Unsafe(AlloyContentClient::kPDFPluginPath);
|
||||
// Isolate all the plugins (including the PDF plugin).
|
||||
return true;
|
||||
}
|
||||
|
||||
void AlloyContentRendererClient::AddSupportedKeySystems(
|
||||
|
@ -92,8 +92,7 @@ class AlloyContentRendererClient
|
||||
const blink::WebURL& url,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies) override;
|
||||
GURL* new_url) override;
|
||||
uint64_t VisitedLinkHash(const char* canonical_url, size_t length) override;
|
||||
bool IsLinkVisited(uint64_t link_hash) override;
|
||||
bool IsOriginIsolatedPepperPlugin(const base::FilePath& plugin_path) override;
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "third_party/blink/renderer/core/frame/local_frame.h"
|
||||
#include "third_party/blink/renderer/core/frame/settings.h"
|
||||
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
|
||||
#include "third_party/blink/renderer/core/loader/frame_load_request.h"
|
||||
#include "third_party/blink/renderer/platform/bindings/script_forbidden_scope.h"
|
||||
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
|
||||
#include "third_party/blink/renderer/platform/loader/fetch/resource_response.h"
|
||||
@ -185,11 +186,6 @@ v8::Local<v8::Value> ExecuteV8ScriptAndReturnValue(
|
||||
if (!frame)
|
||||
return v8::Local<v8::Value>();
|
||||
|
||||
blink::mojom::V8CacheOptions v8CacheOptions(
|
||||
blink::mojom::V8CacheOptions::kDefault);
|
||||
if (const blink::Settings* settings = frame->GetSettings())
|
||||
v8CacheOptions = settings->GetV8CacheOptions();
|
||||
|
||||
const blink::ScriptSourceCode ssc = blink::ScriptSourceCode(
|
||||
source, blink::ScriptSourceLocationType::kInternal,
|
||||
nullptr, /* cache_handler */
|
||||
@ -202,7 +198,8 @@ v8::Local<v8::Value> ExecuteV8ScriptAndReturnValue(
|
||||
auto result = blink::V8ScriptRunner::CompileAndRunScript(
|
||||
isolate, blink::ScriptState::From(context), frame->DomWindow(), ssc,
|
||||
ssc.Url(), blink::SanitizeScriptErrors::kDoNotSanitize,
|
||||
blink::ScriptFetchOptions(), std::move(v8CacheOptions),
|
||||
blink::ScriptFetchOptions(),
|
||||
blink::ExecuteScriptPolicy::kExecuteScriptWhenScriptsDisabled,
|
||||
blink::V8ScriptRunner::RethrowErrorsOption::Rethrow(""));
|
||||
|
||||
if (result.GetResultType() ==
|
||||
@ -218,14 +215,6 @@ bool IsScriptForbidden() {
|
||||
return blink::ScriptForbiddenScope::IsScriptForbidden();
|
||||
}
|
||||
|
||||
void RegisterURLSchemeAsLocal(const blink::WebString& scheme) {
|
||||
blink::SchemeRegistry::RegisterURLSchemeAsLocal(scheme);
|
||||
}
|
||||
|
||||
void RegisterURLSchemeAsSecure(const blink::WebString& scheme) {
|
||||
blink::SchemeRegistry::RegisterURLSchemeAsSecure(scheme);
|
||||
}
|
||||
|
||||
void RegisterURLSchemeAsSupportingFetchAPI(const blink::WebString& scheme) {
|
||||
blink::SchemeRegistry::RegisterURLSchemeAsSupportingFetchAPI(scheme);
|
||||
}
|
||||
@ -247,7 +236,21 @@ bool HasPluginFrameOwner(blink::WebLocalFrame* frame) {
|
||||
return core_frame->Owner() && core_frame->Owner()->IsPlugin();
|
||||
}
|
||||
|
||||
BLINK_EXPORT
|
||||
// Based on WebLocalFrameImpl::StartNavigation which was removed in
|
||||
// https://crrev.com/de4fc2a5fe.
|
||||
void StartNavigation(blink::WebLocalFrame* frame,
|
||||
const blink::WebURLRequest& request) {
|
||||
DCHECK(!request.IsNull());
|
||||
DCHECK(!request.Url().ProtocolIs("javascript"));
|
||||
|
||||
blink::FrameLoadRequest frame_load_request(nullptr,
|
||||
request.ToResourceRequest());
|
||||
blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*frame);
|
||||
blink::To<blink::LocalFrame>(core_frame)
|
||||
->Loader()
|
||||
.StartNavigation(frame_load_request, blink::WebFrameLoadType::kStandard);
|
||||
}
|
||||
|
||||
std::unique_ptr<blink::scheduler::WebResourceLoadingTaskRunnerHandle>
|
||||
CreateResourceLoadingTaskRunnerHandle(blink::WebLocalFrame* frame) {
|
||||
blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*frame);
|
||||
@ -256,7 +259,6 @@ CreateResourceLoadingTaskRunnerHandle(blink::WebLocalFrame* frame) {
|
||||
->CreateResourceLoadingTaskRunnerHandle();
|
||||
}
|
||||
|
||||
BLINK_EXPORT
|
||||
std::unique_ptr<blink::scheduler::WebResourceLoadingTaskRunnerHandle>
|
||||
CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle(
|
||||
blink::WebLocalFrame* frame) {
|
||||
|
@ -22,6 +22,7 @@ class WebElement;
|
||||
class WebLocalFrame;
|
||||
class WebNode;
|
||||
class WebString;
|
||||
class WebURLRequest;
|
||||
class WebURLResponse;
|
||||
class WebView;
|
||||
|
||||
@ -69,9 +70,6 @@ BLINK_EXPORT v8::Local<v8::Value> ExecuteV8ScriptAndReturnValue(
|
||||
|
||||
BLINK_EXPORT bool IsScriptForbidden();
|
||||
|
||||
BLINK_EXPORT void RegisterURLSchemeAsLocal(const blink::WebString& scheme);
|
||||
BLINK_EXPORT void RegisterURLSchemeAsSecure(const blink::WebString& scheme);
|
||||
|
||||
BLINK_EXPORT void RegisterURLSchemeAsSupportingFetchAPI(
|
||||
const blink::WebString& scheme);
|
||||
|
||||
@ -93,6 +91,9 @@ BLINK_EXPORT bool ResponseWasCached(const blink::WebURLResponse& response);
|
||||
// Returns true if the frame owner is a plugin.
|
||||
BLINK_EXPORT bool HasPluginFrameOwner(blink::WebLocalFrame* frame);
|
||||
|
||||
BLINK_EXPORT void StartNavigation(blink::WebLocalFrame* frame,
|
||||
const blink::WebURLRequest& request);
|
||||
|
||||
// Used by CefFrameImpl::CreateURLLoader.
|
||||
BLINK_EXPORT
|
||||
std::unique_ptr<blink::scheduler::WebResourceLoadingTaskRunnerHandle>
|
||||
|
@ -158,19 +158,15 @@ void CefBrowserManager::WebKitInitialized() {
|
||||
const CefAppManager::SchemeInfoList* schemes =
|
||||
CefAppManager::Get()->GetCustomSchemes();
|
||||
if (!schemes->empty()) {
|
||||
// Register the custom schemes. The |is_standard| value is excluded here
|
||||
// because it's not explicitly registered with Blink.
|
||||
// Register the custom schemes. Some attributes are excluded here because
|
||||
// they use url/url_util.h APIs instead.
|
||||
CefAppManager::SchemeInfoList::const_iterator it = schemes->begin();
|
||||
for (; it != schemes->end(); ++it) {
|
||||
const CefSchemeInfo& info = *it;
|
||||
const blink::WebString& scheme =
|
||||
blink::WebString::FromUTF8(info.scheme_name);
|
||||
if (info.is_local)
|
||||
blink_glue::RegisterURLSchemeAsLocal(scheme);
|
||||
if (info.is_display_isolated)
|
||||
blink::WebSecurityPolicy::RegisterURLSchemeAsDisplayIsolated(scheme);
|
||||
if (info.is_secure)
|
||||
blink_glue::RegisterURLSchemeAsSecure(scheme);
|
||||
if (info.is_fetch_enabled)
|
||||
blink_glue::RegisterURLSchemeAsSupportingFetchAPI(scheme);
|
||||
}
|
||||
|
@ -121,35 +121,13 @@ void CefExtensionsRendererClient::WillSendRequest(
|
||||
const blink::WebURL& url,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies) {
|
||||
if (initiator_origin &&
|
||||
initiator_origin->scheme() == extensions::kExtensionScheme) {
|
||||
const extensions::RendererExtensionRegistry* extension_registry =
|
||||
extensions::RendererExtensionRegistry::Get();
|
||||
const Extension* extension =
|
||||
extension_registry->GetByID(initiator_origin->host());
|
||||
if (extension) {
|
||||
int tab_id = extensions::ExtensionFrameHelper::Get(
|
||||
content::RenderFrame::FromWebFrame(frame))
|
||||
->tab_id();
|
||||
GURL request_url(url);
|
||||
if (extension->permissions_data()->GetPageAccess(request_url, tab_id,
|
||||
nullptr) ==
|
||||
extensions::PermissionsData::PageAccess::kAllowed ||
|
||||
extension->permissions_data()->GetContentScriptAccess(
|
||||
request_url, tab_id, nullptr) ==
|
||||
extensions::PermissionsData::PageAccess::kAllowed) {
|
||||
*attach_same_site_cookies = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GURL* new_url) {
|
||||
// Check whether the request should be allowed. If not allowed, we reset the
|
||||
// URL to something invalid to prevent the request and cause an error.
|
||||
if (url.ProtocolIs(extensions::kExtensionScheme) &&
|
||||
!resource_request_policy_->CanRequestResource(GURL(url), frame,
|
||||
transition_type)) {
|
||||
!resource_request_policy_->CanRequestResource(
|
||||
GURL(url), frame, transition_type,
|
||||
base::OptionalFromPtr(initiator_origin))) {
|
||||
*new_url = GURL(chrome::kExtensionInvalidRequestURL);
|
||||
}
|
||||
}
|
||||
|
@ -70,8 +70,7 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient {
|
||||
const blink::WebURL& url,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const url::Origin* initiator_origin,
|
||||
GURL* new_url,
|
||||
bool* attach_same_site_cookies);
|
||||
GURL* new_url);
|
||||
void RunScriptsAtDocumentStart(content::RenderFrame* render_frame);
|
||||
void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame);
|
||||
void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame);
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "content/public/renderer/render_view.h"
|
||||
#include "content/renderer/render_frame_impl.h"
|
||||
#include "third_party/blink/public/mojom/frame/frame.mojom-blink.h"
|
||||
#include "third_party/blink/public/platform/web_data.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
@ -300,11 +301,15 @@ std::unique_ptr<blink::WebURLLoader> CefFrameImpl::CreateURLLoader() {
|
||||
if (!url_loader_factory_)
|
||||
return nullptr;
|
||||
|
||||
// KeepAlive is not supported.
|
||||
mojo::PendingRemote<blink::mojom::KeepAliveHandle> keep_alive_handle =
|
||||
mojo::NullRemote();
|
||||
|
||||
return url_loader_factory_->CreateURLLoader(
|
||||
blink::WebURLRequest(),
|
||||
blink_glue::CreateResourceLoadingTaskRunnerHandle(frame_),
|
||||
blink_glue::CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle(
|
||||
frame_));
|
||||
blink_glue::CreateResourceLoadingMaybeUnfreezableTaskRunnerHandle(frame_),
|
||||
std::move(keep_alive_handle));
|
||||
}
|
||||
|
||||
std::unique_ptr<blink::ResourceLoadInfoNotifierWrapper>
|
||||
@ -543,7 +548,7 @@ void CefFrameImpl::OnLoadRequest(const CefMsg_LoadRequest_Params& params) {
|
||||
blink::WebURLRequest request;
|
||||
CefRequestImpl::Get(params, request);
|
||||
|
||||
frame_->StartNavigation(request);
|
||||
blink_glue::StartNavigation(frame_, request);
|
||||
}
|
||||
|
||||
// Enable deprecation warnings on Windows. See http://crbug.com/585142.
|
||||
|
@ -222,12 +222,11 @@ void CefRenderFrameObserver::OnLoadError() {
|
||||
const cef_errorcode_t errorCode =
|
||||
static_cast<cef_errorcode_t>(net::ERR_ABORTED);
|
||||
const std::string& errorText = net::ErrorToString(errorCode);
|
||||
const GURL failedUrl(frame_->GetURL().c_str());
|
||||
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
CefRefPtr<CefBrowserImpl> browserPtr =
|
||||
CefBrowserImpl::GetBrowserForMainFrame(frame->Top());
|
||||
load_handler->OnLoadError(browserPtr.get(), frame_, errorCode,
|
||||
errorText, failedUrl.spec());
|
||||
errorText, frame_->GetURL());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient {
|
||||
int64_t total_decoded_body_length,
|
||||
bool should_report_corb_blocking) override;
|
||||
void DidFail(const WebURLError&,
|
||||
base::TimeTicks finish_time,
|
||||
int64_t total_encoded_data_length,
|
||||
int64_t total_encoded_body_length,
|
||||
int64_t total_decoded_body_length) override;
|
||||
@ -127,7 +128,6 @@ class CefRenderURLRequest::Context
|
||||
|
||||
if (request_->GetFlags() & UR_FLAG_ALLOW_STORED_CREDENTIALS) {
|
||||
// Include SameSite cookies.
|
||||
resource_request->force_ignore_site_for_cookies = true;
|
||||
resource_request->site_for_cookies =
|
||||
net::SiteForCookies::FromOrigin(*resource_request->request_initiator);
|
||||
}
|
||||
@ -136,8 +136,9 @@ class CefRenderURLRequest::Context
|
||||
const auto& elements = *resource_request->request_body->elements();
|
||||
if (elements.size() > 0) {
|
||||
const auto& element = elements[0];
|
||||
if (element.type() == network::mojom::DataElementType::kBytes) {
|
||||
upload_data_size_ = element.length() - element.offset();
|
||||
if (element.type() == network::DataElement::Tag::kBytes) {
|
||||
const auto& bytes_element = element.As<network::DataElementBytes>();
|
||||
upload_data_size_ = bytes_element.bytes().size();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -378,6 +379,7 @@ void CefWebURLLoaderClient::DidFinishLoading(base::TimeTicks finish_time,
|
||||
}
|
||||
|
||||
void CefWebURLLoaderClient::DidFail(const WebURLError& error,
|
||||
base::TimeTicks finish_time,
|
||||
int64_t total_encoded_data_length,
|
||||
int64_t total_encoded_body_length,
|
||||
int64_t total_decoded_body_length) {
|
||||
|
@ -519,10 +519,5 @@ patches = [
|
||||
# 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',
|
||||
}
|
||||
]
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git base/BUILD.gn base/BUILD.gn
|
||||
index 9d0250c77571..100fc4b9d860 100644
|
||||
index 4516b3575892..db53b698a7d4 100644
|
||||
--- base/BUILD.gn
|
||||
+++ base/BUILD.gn
|
||||
@@ -33,6 +33,7 @@ import("//build/config/ui.gni")
|
||||
@@ -34,6 +34,7 @@ import("//build/config/ui.gni")
|
||||
import("//build/nocompile.gni")
|
||||
import("//build/timestamp.gni")
|
||||
import("//build_overrides/build.gni")
|
||||
@ -10,7 +10,7 @@ index 9d0250c77571..100fc4b9d860 100644
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
import("//third_party/icu/config.gni")
|
||||
@@ -1655,7 +1656,11 @@ component("base") {
|
||||
@@ -1666,7 +1667,11 @@ component("base") {
|
||||
"hash/md5_constexpr_internal.h",
|
||||
"hash/sha1.h",
|
||||
]
|
||||
@ -23,7 +23,7 @@ index 9d0250c77571..100fc4b9d860 100644
|
||||
sources += [
|
||||
"hash/md5_nacl.cc",
|
||||
"hash/md5_nacl.h",
|
||||
@@ -1858,6 +1863,12 @@ component("base") {
|
||||
@@ -1867,6 +1872,12 @@ component("base") {
|
||||
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
|
||||
index fed61eb62d74..af8ae804c1ff 100644
|
||||
index d403f389af0d..c8ff688fd11f 100644
|
||||
--- content/browser/child_process_security_policy_impl.cc
|
||||
+++ content/browser/child_process_security_policy_impl.cc
|
||||
@@ -1704,6 +1704,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
|
||||
@@ -1685,6 +1685,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
|
||||
// DeclarativeApiTest.PersistRules.
|
||||
if (actual_process_lock.matches_scheme(url::kDataScheme))
|
||||
return true;
|
||||
@ -13,7 +13,7 @@ index fed61eb62d74..af8ae804c1ff 100644
|
||||
+ !base::Contains(url::GetLocalSchemes(),
|
||||
+ lock_url.scheme_piece()) &&
|
||||
+ base::Contains(schemes_okay_to_request_in_any_process_,
|
||||
+ lock_url.scheme_piece())) {
|
||||
+ lock_url.scheme())) {
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index 9d66490cdb55..1e4a14311524 100644
|
||||
index 5928c561b5a3..6f342bb0e036 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -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) {
|
||||
@@ -1779,8 +1779,6 @@ config("thin_archive") {
|
||||
# archives.
|
||||
if ((is_posix && !is_nacl && (!is_apple || use_lld)) || is_fuchsia) {
|
||||
arflags = [ "-T" ]
|
||||
- } else if (is_win && use_lld) {
|
||||
- arflags = [ "/llvmlibthin" ]
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
|
||||
index 16bd4c2717ee..65e309d23866 100644
|
||||
index 40c07e2d724a..1cfe14f8cd6f 100644
|
||||
--- chrome/browser/BUILD.gn
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -12,6 +12,7 @@ import("//build/config/crypto.gni")
|
||||
@ -10,7 +10,7 @@ index 16bd4c2717ee..65e309d23866 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/browser/downgrade/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
@@ -1912,6 +1913,7 @@ static_library("browser") {
|
||||
@@ -1966,6 +1967,7 @@ static_library("browser") {
|
||||
"//build:chromeos_buildflags",
|
||||
"//build/config/compiler:compiler_buildflags",
|
||||
"//cc",
|
||||
@ -18,7 +18,7 @@ index 16bd4c2717ee..65e309d23866 100644
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2424,6 +2426,10 @@ static_library("browser") {
|
||||
@@ -2489,6 +2491,10 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ index 16bd4c2717ee..65e309d23866 100644
|
||||
if (is_android) {
|
||||
sources += [
|
||||
"after_startup_task_utils_android.cc",
|
||||
@@ -4975,7 +4981,7 @@ static_library("browser") {
|
||||
@@ -5104,7 +5110,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/app_controller_mac.mm chrome/browser/app_controller_mac.mm
|
||||
index 189055ae0abb..f12df6cab7a8 100644
|
||||
index e2eb5c2c73d0..601b582c6675 100644
|
||||
--- chrome/browser/app_controller_mac.mm
|
||||
+++ chrome/browser/app_controller_mac.mm
|
||||
@@ -1144,6 +1144,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
|
||||
@@ -1194,6 +1194,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 189055ae0abb..f12df6cab7a8 100644
|
||||
NSInteger tag = [sender tag];
|
||||
Profile* profile = [self lastProfile];
|
||||
DCHECK(profile);
|
||||
@@ -1152,6 +1153,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
|
||||
@@ -1202,6 +1203,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 189055ae0abb..f12df6cab7a8 100644
|
||||
}
|
||||
|
||||
// Same as |-commandDispatch:|, but executes commands using a disposition
|
||||
@@ -1549,6 +1551,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
|
||||
@@ -1599,6 +1601,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 189055ae0abb..f12df6cab7a8 100644
|
||||
// Avoid breaking unit tests which have no profile.
|
||||
if (profile) {
|
||||
BackgroundApplicationListModel applications(profile);
|
||||
@@ -1575,6 +1578,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
|
||||
@@ -1625,6 +1628,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -35,10 +35,10 @@ index 189055ae0abb..f12df6cab7a8 100644
|
||||
return dockMenu;
|
||||
}
|
||||
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
|
||||
index ee9693ce0bf9..29c6bfa6baa1 100644
|
||||
index 1ea08a7ad6ae..473ebde08451 100644
|
||||
--- chrome/browser/browser_process.h
|
||||
+++ chrome/browser/browser_process.h
|
||||
@@ -206,10 +206,12 @@ class BrowserProcess {
|
||||
@@ -202,10 +202,12 @@ class BrowserProcess {
|
||||
virtual DownloadStatusUpdater* download_status_updater() = 0;
|
||||
virtual DownloadRequestLimiter* download_request_limiter() = 0;
|
||||
|
||||
@ -52,10 +52,10 @@ index ee9693ce0bf9..29c6bfa6baa1 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 cfa6979b9fb5..e4f584d1e549 100644
|
||||
index 35510d179897..79cdc358903c 100644
|
||||
--- chrome/browser/browser_process_impl.cc
|
||||
+++ chrome/browser/browser_process_impl.cc
|
||||
@@ -959,24 +959,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
|
||||
@@ -957,24 +957,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
|
||||
return download_request_limiter_.get();
|
||||
}
|
||||
|
||||
@ -83,10 +83,10 @@ index cfa6979b9fb5..e4f584d1e549 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 e63afefc769d..afa0e2e59326 100644
|
||||
index 1d3c566cc59b..230c16644234 100644
|
||||
--- chrome/browser/browser_process_impl.h
|
||||
+++ chrome/browser/browser_process_impl.h
|
||||
@@ -165,9 +165,11 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
@@ -166,9 +166,11 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
void SetApplicationLocale(const std::string& actual_locale) override;
|
||||
DownloadStatusUpdater* download_status_updater() override;
|
||||
DownloadRequestLimiter* download_request_limiter() override;
|
||||
@ -99,10 +99,10 @@ index e63afefc769d..afa0e2e59326 100644
|
||||
safe_browsing::SafeBrowsingService* safe_browsing_service() override;
|
||||
subresource_filter::RulesetService* subresource_filter_ruleset_service()
|
||||
diff --git chrome/browser/lifetime/browser_close_manager.cc chrome/browser/lifetime/browser_close_manager.cc
|
||||
index 845abd9ea9ab..29a5cfb36448 100644
|
||||
index e0cafee5eedd..06ded156be3c 100644
|
||||
--- chrome/browser/lifetime/browser_close_manager.cc
|
||||
+++ chrome/browser/lifetime/browser_close_manager.cc
|
||||
@@ -147,12 +147,14 @@ void BrowserCloseManager::CloseBrowsers() {
|
||||
@@ -148,12 +148,14 @@ void BrowserCloseManager::CloseBrowsers() {
|
||||
// exit can restore all browsers open before exiting.
|
||||
ProfileManager::ShutdownSessionServices();
|
||||
#endif
|
||||
@ -118,10 +118,10 @@ 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 3ccad0af51e7..370475e9f5ff 100644
|
||||
index cbddcc52a8f6..02ab085c481c 100644
|
||||
--- chrome/browser/sessions/session_service.cc
|
||||
+++ chrome/browser/sessions/session_service.cc
|
||||
@@ -954,12 +954,19 @@ void SessionService::MaybeDeleteSessionOnlyData() {
|
||||
@@ -968,12 +968,19 @@ void SessionService::MaybeDeleteSessionOnlyData() {
|
||||
if (!profile() || profile()->AsTestingProfile())
|
||||
return;
|
||||
|
||||
|
@ -13,10 +13,10 @@ index ba0c5c3fc044..b4df9af95ecd 100644
|
||||
return false;
|
||||
}
|
||||
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||
index 2c9d816e1aff..a07928ddc18c 100644
|
||||
index 1dc23535c42a..4aae0399346f 100644
|
||||
--- chrome/browser/ui/browser.cc
|
||||
+++ chrome/browser/ui/browser.cc
|
||||
@@ -255,6 +255,20 @@
|
||||
@@ -257,6 +257,20 @@
|
||||
#include "components/captive_portal/content/captive_portal_tab_helper.h"
|
||||
#endif
|
||||
|
||||
@ -37,8 +37,8 @@ index 2c9d816e1aff..a07928ddc18c 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/extensions/extension_browser_window_helper.h"
|
||||
#endif
|
||||
@@ -477,6 +491,13 @@ Browser::Browser(const CreateParams& params)
|
||||
{
|
||||
@@ -480,6 +494,13 @@ Browser::Browser(const CreateParams& params)
|
||||
|
||||
tab_strip_model_->AddObserver(this);
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
@ -51,7 +51,7 @@ index 2c9d816e1aff..a07928ddc18c 100644
|
||||
location_bar_model_ = std::make_unique<LocationBarModelImpl>(
|
||||
location_bar_model_delegate_.get(), content::kMaxURLDisplayChars);
|
||||
|
||||
@@ -1335,6 +1356,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
@@ -1343,6 +1364,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
if (exclusive_access_manager_->HandleUserKeyEvent(event))
|
||||
return content::KeyboardEventProcessingResult::HANDLED;
|
||||
|
||||
@ -66,7 +66,7 @@ index 2c9d816e1aff..a07928ddc18c 100644
|
||||
return window()->PreHandleKeyboardEvent(event);
|
||||
}
|
||||
|
||||
@@ -1342,8 +1371,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
@@ -1350,8 +1379,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
const NativeWebKeyboardEvent& event) {
|
||||
DevToolsWindow* devtools_window =
|
||||
DevToolsWindow::GetInstanceForInspectedWebContents(source);
|
||||
@ -87,7 +87,7 @@ index 2c9d816e1aff..a07928ddc18c 100644
|
||||
}
|
||||
|
||||
bool Browser::TabsNeedBeforeUnloadFired() {
|
||||
@@ -1572,6 +1611,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
|
||||
@@ -1579,6 +1618,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
|
||||
return window->OpenURLFromTab(source, params);
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ index 2c9d816e1aff..a07928ddc18c 100644
|
||||
NavigateParams nav_params(this, params.url, params.transition);
|
||||
nav_params.FillNavigateParamsFromOpenURLParams(params);
|
||||
nav_params.source_contents = source;
|
||||
@@ -1684,6 +1731,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
@@ -1692,6 +1739,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 2c9d816e1aff..a07928ddc18c 100644
|
||||
}
|
||||
|
||||
void Browser::CloseContents(WebContents* source) {
|
||||
@@ -1711,6 +1760,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
@@ -1719,6 +1768,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
}
|
||||
|
||||
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@ -120,7 +120,7 @@ index 2c9d816e1aff..a07928ddc18c 100644
|
||||
if (!GetStatusBubble())
|
||||
return;
|
||||
|
||||
@@ -1718,6 +1769,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@@ -1726,6 +1777,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
GetStatusBubble()->SetURL(url);
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ index 2c9d816e1aff..a07928ddc18c 100644
|
||||
void Browser::ContentsMouseEvent(WebContents* source,
|
||||
bool motion,
|
||||
bool exited) {
|
||||
@@ -1834,6 +1896,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
@@ -1842,6 +1904,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 2c9d816e1aff..a07928ddc18c 100644
|
||||
}
|
||||
|
||||
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) {
|
||||
@@ -1870,6 +1936,8 @@ void Browser::RendererResponsive(
|
||||
@@ -1878,6 +1944,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 2c9d816e1aff..a07928ddc18c 100644
|
||||
}
|
||||
|
||||
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
|
||||
@@ -1916,11 +1984,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
@@ -1924,11 +1992,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
const blink::mojom::FullscreenOptions& options) {
|
||||
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
|
||||
requesting_frame, options.display_id);
|
||||
@ -174,8 +174,8 @@ index 2c9d816e1aff..a07928ddc18c 100644
|
||||
}
|
||||
|
||||
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
|
||||
@@ -2814,6 +2886,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
content_translate_driver->RemoveObserver(this);
|
||||
@@ -2826,6 +2898,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
content_translate_driver->RemoveTranslationObserver(this);
|
||||
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
|
||||
}
|
||||
+
|
||||
@ -184,18 +184,18 @@ index 2c9d816e1aff..a07928ddc18c 100644
|
||||
|
||||
void Browser::CloseFrame() {
|
||||
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
||||
index afd852999cd7..a2d2df4838f7 100644
|
||||
index 7287ec00c3f5..93df2551fab7 100644
|
||||
--- chrome/browser/ui/browser.h
|
||||
+++ chrome/browser/ui/browser.h
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "base/strings/string16.h"
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "base/timer/elapsed_timer.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/devtools/devtools_toggle_action.h"
|
||||
#include "chrome/browser/profiles/scoped_profile_keep_alive.h"
|
||||
#include "chrome/browser/ui/bookmarks/bookmark_bar.h"
|
||||
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper_observer.h"
|
||||
@@ -56,6 +57,10 @@
|
||||
@@ -58,6 +59,10 @@
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/shell_dialogs/select_file_dialog.h"
|
||||
|
||||
@ -206,7 +206,7 @@ index afd852999cd7..a2d2df4838f7 100644
|
||||
#if defined(OS_ANDROID)
|
||||
#error This file should only be included on desktop.
|
||||
#endif
|
||||
@@ -259,6 +264,11 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -269,6 +274,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 afd852999cd7..a2d2df4838f7 100644
|
||||
private:
|
||||
friend class Browser;
|
||||
friend class WindowSizerChromeOSTest;
|
||||
@@ -377,6 +387,12 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -386,6 +396,12 @@ class Browser : public TabStripModelObserver,
|
||||
return &signin_view_controller_;
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ index afd852999cd7..a2d2df4838f7 100644
|
||||
// Get the FindBarController for this browser, creating it if it does not
|
||||
// yet exist.
|
||||
FindBarController* GetFindBarController();
|
||||
@@ -762,6 +778,11 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -770,6 +786,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 afd852999cd7..a2d2df4838f7 100644
|
||||
void ContentsMouseEvent(content::WebContents* source,
|
||||
bool motion,
|
||||
bool exited) override;
|
||||
@@ -1229,6 +1250,10 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1240,6 +1261,10 @@ class Browser : public TabStripModelObserver,
|
||||
extension_browser_window_helper_;
|
||||
#endif
|
||||
|
||||
@ -255,10 +255,10 @@ index afd852999cd7..a2d2df4838f7 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 9e3369185322..95abb6f37561 100644
|
||||
index 4bf854459b2c..20e348eb9293 100644
|
||||
--- chrome/browser/ui/browser_navigator.cc
|
||||
+++ chrome/browser/ui/browser_navigator.cc
|
||||
@@ -435,6 +435,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
||||
@@ -453,6 +453,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
||||
std::unique_ptr<WebContents> target_contents =
|
||||
WebContents::Create(create_params);
|
||||
|
||||
@ -273,7 +273,7 @@ index 9e3369185322..95abb6f37561 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 6f917199c655..bf7802b8d707 100644
|
||||
index 899b0e532c45..2fad68ec3e51 100644
|
||||
--- chrome/browser/ui/browser_tabstrip.cc
|
||||
+++ chrome/browser/ui/browser_tabstrip.cc
|
||||
@@ -30,9 +30,13 @@ void AddTabAt(Browser* browser,
|
||||
|
@ -54,10 +54,10 @@ index cf62b79358e1..4fe90fde38ff 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 c932b27c6ab2..862c2205d12c 100644
|
||||
index b6b38ab9a251..048c6f8c544f 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(
|
||||
@@ -172,7 +172,7 @@ ContentSetting GetContentSettingFromRulesImpl(
|
||||
return rule.GetContentSetting();
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
||||
index d4de7dc10b2a..f5b030de54f0 100644
|
||||
index afee70a01862..e49e769b6366 100644
|
||||
--- chrome/browser/ui/BUILD.gn
|
||||
+++ chrome/browser/ui/BUILD.gn
|
||||
@@ -11,6 +11,7 @@ import("//build/config/features.gni")
|
||||
@@ -12,6 +12,7 @@ import("//build/config/features.gni")
|
||||
import("//build/config/linux/gtk/gtk.gni")
|
||||
import("//build/config/ozone.gni")
|
||||
import("//build/config/ui.gni")
|
||||
@ -10,7 +10,7 @@ index d4de7dc10b2a..f5b030de54f0 100644
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/assistant/assistant.gni")
|
||||
@@ -323,6 +324,10 @@ static_library("ui") {
|
||||
@@ -327,6 +328,10 @@ static_library("ui") {
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
@ -21,15 +21,15 @@ index d4de7dc10b2a..f5b030de54f0 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
|
||||
@@ -344,6 +349,7 @@ static_library("ui") {
|
||||
"//base/allocator:buildflags",
|
||||
@@ -349,6 +354,7 @@ static_library("ui") {
|
||||
"//build:branding_buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
"//cc/paint",
|
||||
+ "//cef/libcef/features",
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -1531,6 +1537,7 @@ static_library("ui") {
|
||||
@@ -1553,6 +1559,7 @@ static_library("ui") {
|
||||
"//components/page_load_metrics/browser",
|
||||
"//components/performance_manager:site_data_proto",
|
||||
"//components/printing/browser",
|
||||
@ -37,7 +37,7 @@ index d4de7dc10b2a..f5b030de54f0 100644
|
||||
"//components/profile_metrics",
|
||||
"//components/reading_list/features:flags",
|
||||
"//components/safe_browsing/core/common:safe_browsing_policy_handler",
|
||||
@@ -3299,7 +3306,9 @@ static_library("ui") {
|
||||
@@ -3370,7 +3377,9 @@ static_library("ui") {
|
||||
"views/frame/browser_desktop_window_tree_host_platform.h",
|
||||
]
|
||||
}
|
||||
@ -46,10 +46,10 @@ index d4de7dc10b2a..f5b030de54f0 100644
|
||||
+ sources += [ "views/frame/native_browser_frame_factory_ozone.cc" ]
|
||||
+ }
|
||||
}
|
||||
if (is_linux) {
|
||||
if (is_linux || is_chromeos_lacros) {
|
||||
sources += [
|
||||
diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc
|
||||
index f27414c41891..5ff3bfa8f724 100644
|
||||
index a23323638a17..7bbfb9964415 100644
|
||||
--- chrome/browser/ui/webui/net_export_ui.cc
|
||||
+++ chrome/browser/ui/webui/net_export_ui.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
@ -85,7 +85,7 @@ index f27414c41891..5ff3bfa8f724 100644
|
||||
// Cached pointer to SystemNetworkContextManager's NetExportFileWriter.
|
||||
net_log::NetExportFileWriter* file_writer_;
|
||||
|
||||
@@ -231,6 +243,13 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
|
||||
@@ -230,6 +242,13 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
|
||||
if (UsingMobileUI()) {
|
||||
StartNetLog(base::FilePath());
|
||||
} else {
|
||||
@ -99,7 +99,7 @@ index f27414c41891..5ff3bfa8f724 100644
|
||||
base::FilePath initial_dir = last_save_dir.Pointer()->empty() ?
|
||||
DownloadPrefs::FromBrowserContext(
|
||||
web_ui()->GetWebContents()->GetBrowserContext())->DownloadPath() :
|
||||
@@ -247,6 +266,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
@@ -246,6 +265,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
std::unique_ptr<base::DictionaryValue> ui_thread_polled_data(
|
||||
new base::DictionaryValue());
|
||||
|
||||
@ -107,7 +107,7 @@ index f27414c41891..5ff3bfa8f724 100644
|
||||
Profile* profile = Profile::FromWebUI(web_ui());
|
||||
SetIfNotNull(ui_thread_polled_data.get(), "prerenderInfo",
|
||||
chrome_browser_net::GetPrerenderInfo(profile));
|
||||
@@ -256,6 +276,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
@@ -255,6 +275,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
SetIfNotNull(ui_thread_polled_data.get(), "serviceProviders",
|
||||
chrome_browser_net::GetWindowsServiceProviders());
|
||||
#endif
|
||||
@ -115,7 +115,7 @@ index f27414c41891..5ff3bfa8f724 100644
|
||||
|
||||
file_writer_->StopNetLog(std::move(ui_thread_polled_data));
|
||||
}
|
||||
@@ -373,6 +394,42 @@ void NetExportMessageHandler::ShowSelectFileDialog(
|
||||
@@ -372,6 +393,42 @@ void NetExportMessageHandler::ShowSelectFileDialog(
|
||||
&file_type_info, 0, base::FilePath::StringType(), owning_window, nullptr);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
|
||||
index 957a3e09113f..1d8a5bdac349 100644
|
||||
index 19c5989c8b67..e85ce53a22a1 100644
|
||||
--- chrome/browser/chrome_content_browser_client.cc
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -1052,10 +1052,6 @@ void LaunchURL(const GURL& url,
|
||||
@@ -1067,10 +1067,6 @@ void LaunchURL(const GURL& url,
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ index 957a3e09113f..1d8a5bdac349 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
|
||||
@@ -1234,6 +1230,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
|
||||
@@ -1258,6 +1254,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
|
||||
return *greased_brand_version_list;
|
||||
}
|
||||
|
||||
@ -29,10 +29,10 @@ index 957a3e09113f..1d8a5bdac349 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 c6f87c148d16..bdc93db224d0 100644
|
||||
index 3ef2329ac8a6..3e3ede99e042 100644
|
||||
--- chrome/browser/chrome_content_browser_client.h
|
||||
+++ chrome/browser/chrome_content_browser_client.h
|
||||
@@ -101,7 +101,8 @@ class ChromeXrIntegrationClient;
|
||||
@@ -108,7 +108,8 @@ class ChromeXrIntegrationClient;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
|
||||
index 8af99f57cd5e..3801b8dc79af 100644
|
||||
index 102a4c5ce183..a6ce775156b4 100644
|
||||
--- chrome/browser/profiles/profile_manager.cc
|
||||
+++ chrome/browser/profiles/profile_manager.cc
|
||||
@@ -368,7 +368,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
@@ -390,7 +390,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 8af99f57cd5e..3801b8dc79af 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
|
||||
index ccbe94c5b66b..834a01d6be84 100644
|
||||
index 1be24b4ee39c..4288383cb2a8 100644
|
||||
--- chrome/browser/profiles/profile_manager.h
|
||||
+++ chrome/browser/profiles/profile_manager.h
|
||||
@@ -103,7 +103,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -106,7 +106,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 ccbe94c5b66b..834a01d6be84 100644
|
||||
|
||||
// Returns regular or off-the-record profile given its profile key.
|
||||
static Profile* GetProfileFromProfileKey(ProfileKey* profile_key);
|
||||
@@ -136,7 +136,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -139,7 +139,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 ccbe94c5b66b..834a01d6be84 100644
|
||||
|
||||
// Returns the directory where the first created profile is stored,
|
||||
// relative to the user data directory currently in use.
|
||||
@@ -145,7 +145,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -148,7 +148,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.
|
||||
@ -43,29 +43,27 @@ index ccbe94c5b66b..834a01d6be84 100644
|
||||
// Get the path of the last used profile, or if that's undefined, the default
|
||||
// profile.
|
||||
diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc
|
||||
index 4eb91c80e57a..02373b149bde 100644
|
||||
index 04bbd816692b..1af61cacc5cb 100644
|
||||
--- chrome/browser/profiles/renderer_updater.cc
|
||||
+++ chrome/browser/profiles/renderer_updater.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <utility>
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/signin/identity_manager_factory.h"
|
||||
@@ -57,8 +58,12 @@ void GetGuestViewDefaultContentSettingRules(
|
||||
@@ -58,8 +59,12 @@ void GetGuestViewDefaultContentSettingRules(
|
||||
|
||||
RendererUpdater::RendererUpdater(Profile* profile)
|
||||
: profile_(profile), identity_manager_observer_(this) {
|
||||
- identity_manager_ = IdentityManagerFactory::GetForProfile(profile);
|
||||
- identity_manager_observer_.Add(identity_manager_);
|
||||
+ if (cef::IsAlloyRuntimeEnabled()) {
|
||||
+ identity_manager_ = nullptr;
|
||||
+ } else {
|
||||
+ identity_manager_ = IdentityManagerFactory::GetForProfile(profile);
|
||||
+ identity_manager_observer_.Add(identity_manager_);
|
||||
identity_manager_ = IdentityManagerFactory::GetForProfile(profile);
|
||||
identity_manager_observer_.Add(identity_manager_);
|
||||
+ }
|
||||
#if defined(OS_CHROMEOS)
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
oauth2_login_manager_ =
|
||||
chromeos::OAuth2LoginManagerFactory::GetForProfile(profile_);
|
||||
|
@ -1,12 +1,12 @@
|
||||
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
|
||||
index 1cab7756e96f..77a8bdde7d62 100644
|
||||
index ae8aef3a076c..f7e6a91047ef 100644
|
||||
--- chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -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",
|
||||
+ "//components/gcm_driver:gcm_buildflags",
|
||||
"//components/language/core/common",
|
||||
"//components/prefs",
|
||||
"//components/safe_browsing/core:client_model_proto",
|
||||
@@ -23,6 +23,7 @@ static_library("safe_browsing") {
|
||||
"//chrome/common:constants",
|
||||
"//components/browser_sync",
|
||||
"//components/enterprise/common:strings",
|
||||
+ "//components/gcm_driver:gcm_buildflags",
|
||||
"//components/keyed_service/content",
|
||||
"//components/language/core/browser",
|
||||
"//components/page_info",
|
||||
|
@ -1,26 +1,27 @@
|
||||
diff --git chrome/browser/sharesheet/sharesheet_service_delegate.cc chrome/browser/sharesheet/sharesheet_service_delegate.cc
|
||||
index 1ddf613c138f..00c497b67533 100644
|
||||
index 0b22a38aefb2..c7be7da822f6 100644
|
||||
--- chrome/browser/sharesheet/sharesheet_service_delegate.cc
|
||||
+++ chrome/browser/sharesheet/sharesheet_service_delegate.cc
|
||||
@@ -21,8 +21,10 @@ SharesheetServiceDelegate::SharesheetServiceDelegate(
|
||||
content::WebContents* web_contents,
|
||||
@@ -19,8 +19,10 @@ SharesheetServiceDelegate::SharesheetServiceDelegate(
|
||||
gfx::NativeWindow native_window,
|
||||
SharesheetService* sharesheet_service)
|
||||
: id_(id),
|
||||
: native_window_(native_window),
|
||||
+#if defined(OS_CHROMEOS)
|
||||
sharesheet_bubble_view_(
|
||||
std::make_unique<SharesheetBubbleView>(web_contents, this)),
|
||||
std::make_unique<SharesheetBubbleView>(native_window, this)),
|
||||
+#endif
|
||||
sharesheet_service_(sharesheet_service) {}
|
||||
|
||||
SharesheetServiceDelegate::~SharesheetServiceDelegate() = default;
|
||||
@@ -31,18 +33,24 @@ void SharesheetServiceDelegate::ShowBubble(
|
||||
std::vector<TargetInfo> targets,
|
||||
apps::mojom::IntentPtr intent,
|
||||
sharesheet::CloseCallback close_callback) {
|
||||
@@ -36,21 +38,27 @@ void SharesheetServiceDelegate::ShowBubble(
|
||||
}
|
||||
return;
|
||||
}
|
||||
+#if defined(OS_CHROMEOS)
|
||||
sharesheet_bubble_view_->ShowBubble(std::move(targets), std::move(intent),
|
||||
std::move(close_callback));
|
||||
+#endif
|
||||
is_bubble_open_ = true;
|
||||
}
|
||||
|
||||
void SharesheetServiceDelegate::OnBubbleClosed(
|
||||
@ -28,7 +29,9 @@ index 1ddf613c138f..00c497b67533 100644
|
||||
+#if defined(OS_CHROMEOS)
|
||||
sharesheet_bubble_view_.release();
|
||||
+#endif
|
||||
sharesheet_service_->OnBubbleClosed(id_, active_action);
|
||||
sharesheet_service_->OnBubbleClosed(native_window_, active_action);
|
||||
// This object is now deleted and nothing can be accessed any more.
|
||||
// Therefore there is no need to set is_bubble_open_ to false.
|
||||
}
|
||||
|
||||
void SharesheetServiceDelegate::OnActionLaunched() {
|
||||
@ -38,7 +41,7 @@ index 1ddf613c138f..00c497b67533 100644
|
||||
}
|
||||
|
||||
void SharesheetServiceDelegate::OnTargetSelected(
|
||||
@@ -66,11 +74,15 @@ void SharesheetServiceDelegate::SetSharesheetSize(const int& width,
|
||||
@@ -74,11 +82,15 @@ void SharesheetServiceDelegate::SetSharesheetSize(const int& width,
|
||||
const int& height) {
|
||||
DCHECK_GT(width, 0);
|
||||
DCHECK_GT(height, 0);
|
||||
@ -55,12 +58,12 @@ index 1ddf613c138f..00c497b67533 100644
|
||||
|
||||
const gfx::VectorIcon* SharesheetServiceDelegate::GetVectorIcon(
|
||||
diff --git chrome/browser/sharesheet/sharesheet_service_delegate.h chrome/browser/sharesheet/sharesheet_service_delegate.h
|
||||
index e957b2c39772..80d9dc7b6c76 100644
|
||||
index 164a3a35a3f5..82b8c15820c9 100644
|
||||
--- chrome/browser/sharesheet/sharesheet_service_delegate.h
|
||||
+++ chrome/browser/sharesheet/sharesheet_service_delegate.h
|
||||
@@ -64,7 +64,9 @@ class SharesheetServiceDelegate : public SharesheetController {
|
||||
private:
|
||||
const uint32_t id_;
|
||||
@@ -65,7 +65,9 @@ class SharesheetServiceDelegate : public SharesheetController {
|
||||
gfx::NativeWindow native_window_;
|
||||
|
||||
base::string16 active_action_;
|
||||
+#if defined(OS_CHROMEOS)
|
||||
std::unique_ptr<SharesheetBubbleView> sharesheet_bubble_view_;
|
||||
|
@ -42,18 +42,18 @@ index 08cafea4eb1c..e21eff668695 100644
|
||||
theme_syncable_service_.reset(new ThemeSyncableService(profile_, this));
|
||||
|
||||
diff --git chrome/browser/themes/theme_service_factory.cc chrome/browser/themes/theme_service_factory.cc
|
||||
index caec77bbe3ba..92a813acc008 100644
|
||||
index 4f82e3d34746..b485befab711 100644
|
||||
--- chrome/browser/themes/theme_service_factory.cc
|
||||
+++ chrome/browser/themes/theme_service_factory.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "base/no_destructor.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/extensions/extension_system_factory.h"
|
||||
#include "chrome/browser/profiles/incognito_helpers.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -27,6 +28,10 @@
|
||||
@@ -30,6 +31,10 @@
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
#endif
|
||||
|
||||
@ -64,7 +64,7 @@ index caec77bbe3ba..92a813acc008 100644
|
||||
namespace {
|
||||
|
||||
const ThemeHelper& GetThemeHelper() {
|
||||
@@ -70,7 +75,15 @@ ThemeServiceFactory::ThemeServiceFactory()
|
||||
@@ -73,7 +78,15 @@ ThemeServiceFactory::ThemeServiceFactory()
|
||||
BrowserContextDependencyManager::GetInstance()) {
|
||||
DependsOn(extensions::ExtensionRegistryFactory::GetInstance());
|
||||
DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
index 1d19e684d0c2..382423f3f2ce 100644
|
||||
index dfa34db9255e..0a79d11c7e0c 100644
|
||||
--- chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
+++ chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
@@ -18,6 +18,7 @@
|
||||
@ -82,7 +82,7 @@ index 1d19e684d0c2..382423f3f2ce 100644
|
||||
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
|
||||
*status = chrome::mojom::PluginStatus::kAllowed;
|
||||
return;
|
||||
@@ -345,17 +368,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
|
||||
@@ -344,17 +367,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ index 1d19e684d0c2..382423f3f2ce 100644
|
||||
bool enabled = i < matching_plugins.size();
|
||||
if (!enabled) {
|
||||
diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc
|
||||
index c78907c1d4ea..8297fa6a0162 100644
|
||||
index e547d5f00617..831d5794ecde 100644
|
||||
--- chrome/browser/plugins/plugin_utils.cc
|
||||
+++ chrome/browser/plugins/plugin_utils.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
@ -149,7 +149,7 @@ index c78907c1d4ea..8297fa6a0162 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
@@ -168,6 +173,12 @@ base::flat_map<std::string, std::string>
|
||||
@@ -77,6 +82,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;
|
||||
@ -163,10 +163,10 @@ index c78907c1d4ea..8297fa6a0162 100644
|
||||
Profile* profile = Profile::FromBrowserContext(browser_context);
|
||||
const std::vector<std::string>& allowlist =
|
||||
diff --git chrome/common/google_url_loader_throttle.cc chrome/common/google_url_loader_throttle.cc
|
||||
index c1870b0f56ef..d32b8d54fb3f 100644
|
||||
index ce40f0039fe0..c8cbecb61455 100644
|
||||
--- chrome/common/google_url_loader_throttle.cc
|
||||
+++ chrome/common/google_url_loader_throttle.cc
|
||||
@@ -7,12 +7,17 @@
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "base/feature_list.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "build/build_config.h"
|
||||
@ -174,8 +174,9 @@ index c1870b0f56ef..d32b8d54fb3f 100644
|
||||
#include "chrome/common/chrome_features.h"
|
||||
#include "chrome/common/net/safe_search_util.h"
|
||||
#include "components/google/core/common/google_util.h"
|
||||
#include "net/base/url_util.h"
|
||||
@@ -14,6 +15,10 @@
|
||||
#include "services/network/public/mojom/url_response_head.mojom.h"
|
||||
#include "services/network/public/mojom/x_frame_options.mojom.h"
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+#include "cef/libcef/common/extensions/extensions_util.h"
|
||||
@ -184,7 +185,7 @@ index c1870b0f56ef..d32b8d54fb3f 100644
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "extensions/common/extension_urls.h"
|
||||
#endif
|
||||
@@ -152,6 +157,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse(
|
||||
@@ -153,6 +158,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse(
|
||||
const GURL& response_url,
|
||||
network::mojom::URLResponseHead* response_head,
|
||||
bool* defer) {
|
||||
@ -193,14 +194,14 @@ index c1870b0f56ef..d32b8d54fb3f 100644
|
||||
+ return;
|
||||
+#endif
|
||||
+
|
||||
// Built-in additional protection for the chrome web store origin.
|
||||
GURL webstore_url(extension_urls::GetWebstoreLaunchURL());
|
||||
if (response_url.SchemeIsHTTPOrHTTPS() &&
|
||||
// Built-in additional protection for the chrome web store origin by ensuring
|
||||
// that the X-Frame-Options protection mechanism is set to either DENY or
|
||||
// SAMEORIGIN.
|
||||
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
|
||||
index 7dbbe8742ca4..01a8b2e3eb24 100644
|
||||
index a1c26dfbd5cc..aaf96b069c32 100644
|
||||
--- chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -831,6 +831,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -848,6 +848,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
|
||||
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
|
||||
status == chrome::mojom::PluginStatus::kBlocked) &&
|
||||
@ -208,7 +209,7 @@ index 7dbbe8742ca4..01a8b2e3eb24 100644
|
||||
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
|
||||
identifier)) {
|
||||
status = chrome::mojom::PluginStatus::kAllowed;
|
||||
@@ -1029,7 +1030,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1046,7 +1047,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
plugin_auth_host.BindNewEndpointAndPassReceiver());
|
||||
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
|
||||
@ -218,7 +219,7 @@ index 7dbbe8742ca4..01a8b2e3eb24 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlocked: {
|
||||
@@ -1038,7 +1040,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1055,7 +1057,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
|
||||
placeholder->AllowLoading();
|
||||
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
|
||||
@ -228,7 +229,7 @@ index 7dbbe8742ca4..01a8b2e3eb24 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
|
||||
@@ -1048,7 +1051,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1065,7 +1068,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
group_name));
|
||||
RenderThread::Get()->RecordAction(
|
||||
UserMetricsAction("Plugin_BlockedByPolicy"));
|
||||
@ -238,7 +239,7 @@ index 7dbbe8742ca4..01a8b2e3eb24 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
|
||||
@@ -1056,7 +1060,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1073,7 +1077,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
IDR_BLOCKED_PLUGIN_HTML,
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
|
||||
group_name));
|
||||
@ -248,31 +249,13 @@ index 7dbbe8742ca4..01a8b2e3eb24 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kComponentUpdateRequired: {
|
||||
diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
||||
index f1370e70cc04..2109770d03e7 100644
|
||||
--- chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
||||
+++ chrome/renderer/plugins/chrome_plugin_placeholder.cc
|
||||
@@ -356,8 +356,11 @@ void ChromePluginPlaceholder::OnBlockedContent(
|
||||
|
||||
if (status ==
|
||||
content::RenderFrame::PeripheralContentStatus::CONTENT_STATUS_TINY) {
|
||||
- content_settings::ContentSettingsAgentImpl::Get(render_frame())
|
||||
- ->DidBlockContentType(ContentSettingsType::PLUGINS);
|
||||
+ content_settings::ContentSettingsAgentImpl *content_settings_agent =
|
||||
+ content_settings::ContentSettingsAgentImpl::Get(render_frame());
|
||||
+ if (content_settings_agent) {
|
||||
+ content_settings_agent->DidBlockContentType(ContentSettingsType::PLUGINS);
|
||||
+ }
|
||||
}
|
||||
|
||||
std::string message = base::StringPrintf(
|
||||
diff --git content/browser/browser_plugin/browser_plugin_guest.h content/browser/browser_plugin/browser_plugin_guest.h
|
||||
index 347c1f83b873..9d77ef57274d 100644
|
||||
index 06b6875bd37e..13c197b532ad 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,
|
||||
void EmbedderSystemDragEnded();
|
||||
void EndSystemDragIfApplicable();
|
||||
@@ -115,6 +115,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
|
||||
|
||||
gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const;
|
||||
|
||||
+ WebContentsImpl* owner_web_contents() const { return owner_web_contents_; }
|
||||
+
|
||||
|
@ -1,24 +1,24 @@
|
||||
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
|
||||
index fb7fa9ff4ed2..cf7be804968e 100644
|
||||
index 6a837ad9df98..7abef83f2a47 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
import("//build/config/buildflags_paint_preview.gni")
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/features.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//components/offline_pages/buildflags/features.gni")
|
||||
@@ -137,6 +138,7 @@ static_library("renderer") {
|
||||
|
||||
@@ -145,6 +146,7 @@ static_library("renderer") {
|
||||
deps = [
|
||||
"//base/allocator:buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
+ "//cef/libcef/features",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -218,6 +220,10 @@ static_library("renderer") {
|
||||
@@ -226,6 +228,10 @@ static_library("renderer") {
|
||||
|
||||
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
|
||||
index d9a02faddd91..09a349fcf2b8 100644
|
||||
index db85b6b2fcf5..bcf6867e8f4e 100644
|
||||
--- chrome/app/chrome_main_delegate.cc
|
||||
+++ chrome/app/chrome_main_delegate.cc
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "base/time/time.h"
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "base/trace_event/trace_event_impl.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/chrome_content_browser_client.h"
|
||||
#include "chrome/browser/chrome_resource_bundle_helper.h"
|
||||
#include "chrome/browser/defaults.h"
|
||||
@@ -378,6 +379,8 @@ struct MainFunction {
|
||||
@@ -381,6 +382,8 @@ struct MainFunction {
|
||||
|
||||
// Initializes the user data dir. Must be called before InitializeLocalState().
|
||||
void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
@ -19,7 +19,7 @@ index d9a02faddd91..09a349fcf2b8 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.
|
||||
@@ -644,7 +647,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
|
||||
@@ -658,7 +661,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
|
||||
}
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@ -29,7 +29,7 @@ index d9a02faddd91..09a349fcf2b8 100644
|
||||
base::sequence_manager::internal::ThreadControllerPowerMonitor::
|
||||
InitializeOnMainThread();
|
||||
#endif
|
||||
@@ -926,6 +931,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -943,6 +948,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
std::string process_type =
|
||||
command_line.GetSwitchValueASCII(switches::kProcessType);
|
||||
|
||||
@ -37,7 +37,7 @@ index d9a02faddd91..09a349fcf2b8 100644
|
||||
crash_reporter::InitializeCrashKeys();
|
||||
|
||||
#if defined(OS_POSIX)
|
||||
@@ -936,6 +942,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -953,6 +959,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
InitMacCrashReporter(command_line, process_type);
|
||||
SetUpInstallerPreferences(command_line);
|
||||
#endif
|
||||
@ -45,7 +45,7 @@ index d9a02faddd91..09a349fcf2b8 100644
|
||||
|
||||
#if defined(OS_WIN)
|
||||
child_process_logging::Init();
|
||||
@@ -1058,6 +1065,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1075,6 +1082,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
locale;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ index d9a02faddd91..09a349fcf2b8 100644
|
||||
#if defined(OS_POSIX) && !defined(OS_MAC)
|
||||
// Zygote needs to call InitCrashReporter() in RunZygote().
|
||||
if (process_type != switches::kZygoteProcess) {
|
||||
@@ -1090,6 +1098,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1107,6 +1115,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 d9a02faddd91..09a349fcf2b8 100644
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
MaybeInitializeGDI();
|
||||
@@ -1188,6 +1197,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1205,6 +1214,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
SetUpProfilingShutdownHandler();
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ index d9a02faddd91..09a349fcf2b8 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 =
|
||||
@@ -1204,6 +1214,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1221,6 +1231,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
|
||||
// Reset the command line for the newly spawned process.
|
||||
crash_keys::SetCrashKeysFromCommandLine(*command_line);
|
||||
@ -78,7 +78,7 @@ index d9a02faddd91..09a349fcf2b8 100644
|
||||
|
||||
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
|
||||
index 195da4bea79f..5f2c60e63623 100644
|
||||
index fee4d5f1a8ca..2e4fb506d851 100644
|
||||
--- chrome/browser/chrome_browser_main.cc
|
||||
+++ chrome/browser/chrome_browser_main.cc
|
||||
@@ -49,6 +49,7 @@
|
||||
@ -89,7 +89,7 @@ index 195da4bea79f..5f2c60e63623 100644
|
||||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/active_use_util.h"
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
@@ -893,8 +894,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
@@ -902,8 +903,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
#if !defined(OS_ANDROID)
|
||||
// Create the RunLoop for MainMessageLoopRun() to use, and pass a copy of
|
||||
// its QuitClosure to the BrowserProcessImpl to call when it is time to exit.
|
||||
@ -101,7 +101,7 @@ index 195da4bea79f..5f2c60e63623 100644
|
||||
|
||||
// These members must be initialized before returning from this function.
|
||||
// Android doesn't use StartupBrowserCreator.
|
||||
@@ -1615,11 +1618,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1634,11 +1637,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|.
|
||||
@ -113,9 +113,9 @@ index 195da4bea79f..5f2c60e63623 100644
|
||||
last_opened_profiles);
|
||||
- if (started) {
|
||||
+ if (started && g_run_loop) {
|
||||
#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
|
||||
// Initialize autoupdate timer. Timer callback costs basically nothing
|
||||
// when browser is not in persistent mode, so it's OK to let it ride on
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
#if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
|
||||
diff --git chrome/browser/notifications/notification_platform_bridge_mac.mm chrome/browser/notifications/notification_platform_bridge_mac.mm
|
||||
index 9e8fcb9f9f91..2a9eaca0fb0d 100644
|
||||
--- chrome/browser/notifications/notification_platform_bridge_mac.mm
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git third_party/widevine/cdm/BUILD.gn third_party/widevine/cdm/BUILD.gn
|
||||
index fa726c5a60fa..b84dd523542b 100644
|
||||
index 71bc09b46ad6..ddf0da9b330e 100644
|
||||
--- third_party/widevine/cdm/BUILD.gn
|
||||
+++ third_party/widevine/cdm/BUILD.gn
|
||||
@@ -6,6 +6,7 @@ import("//build/buildflag_header.gni")
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
|
||||
index 1d6121a4ba08..8e6735eca670 100644
|
||||
index 36ab5d592ecb..e61236132220 100644
|
||||
--- content/browser/devtools/devtools_instrumentation.h
|
||||
+++ content/browser/devtools/devtools_instrumentation.h
|
||||
@@ -12,6 +12,7 @@
|
||||
@ -55,10 +55,10 @@ 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 c5647d2dc509..1314c30b60c7 100644
|
||||
index 8ca399274164..d241798f4f28 100644
|
||||
--- third_party/blink/renderer/controller/BUILD.gn
|
||||
+++ third_party/blink/renderer/controller/BUILD.gn
|
||||
@@ -26,6 +26,7 @@ component("controller") {
|
||||
@@ -29,6 +29,7 @@ component("controller") {
|
||||
configs += [
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
@ -66,7 +66,7 @@ index c5647d2dc509..1314c30b60c7 100644
|
||||
"//third_party/blink/renderer:config",
|
||||
"//third_party/blink/renderer:inside_blink",
|
||||
"//third_party/blink/renderer:non_test_config",
|
||||
@@ -50,6 +51,8 @@ component("controller") {
|
||||
@@ -53,6 +54,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 c5647d2dc509..1314c30b60c7 100644
|
||||
|
||||
if (is_linux || is_chromeos) {
|
||||
diff --git ui/events/keycodes/BUILD.gn ui/events/keycodes/BUILD.gn
|
||||
index 4a2d0348caeb..42742d24ebed 100644
|
||||
index 86bbf620ff0d..6c06b461c6da 100644
|
||||
--- ui/events/keycodes/BUILD.gn
|
||||
+++ ui/events/keycodes/BUILD.gn
|
||||
@@ -19,6 +19,8 @@ source_set("xkb") {
|
||||
@ -87,7 +87,7 @@ index 4a2d0348caeb..42742d24ebed 100644
|
||||
+
|
||||
deps = [
|
||||
"//base",
|
||||
"//ui/events:dom_keycode_converter",
|
||||
"//build:chromeos_buildflags",
|
||||
diff --git ui/events/keycodes/keyboard_code_conversion_xkb.h ui/events/keycodes/keyboard_code_conversion_xkb.h
|
||||
index a1f9b78704fb..c7d3558251d9 100644
|
||||
--- ui/events/keycodes/keyboard_code_conversion_xkb.h
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
|
||||
index cdeecb35a998..1615185f2a65 100644
|
||||
index 21ab45886df2..ee7394fd10eb 100644
|
||||
--- chrome/browser/download/download_target_determiner.cc
|
||||
+++ chrome/browser/download/download_target_determiner.cc
|
||||
@@ -660,7 +660,7 @@ void IsHandledBySafePlugin(int render_process_id,
|
||||
@ -12,7 +12,7 @@ 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 e0437a2c3479..82896ca9e261 100644
|
||||
index c2bd9b8c3131..d1283cf3d9b2 100644
|
||||
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
@@ -132,6 +132,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
|
||||
@ -62,7 +62,7 @@ index 88fa7da1411e..98d0ea7650ed 100644
|
||||
#endif
|
||||
|
||||
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
|
||||
index f66e6bca5e2b..c99998449b6b 100644
|
||||
index 962bb7e2de76..40fc7e92c7cb 100644
|
||||
--- content/browser/devtools/devtools_http_handler.cc
|
||||
+++ content/browser/devtools/devtools_http_handler.cc
|
||||
@@ -570,7 +570,7 @@ void DevToolsHttpHandler::OnJsonRequest(
|
||||
@ -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 69c7f35e8b6e..0a549792040b 100644
|
||||
index 2b0f1c354cf2..2d2dde9412c3 100644
|
||||
--- content/browser/loader/navigation_url_loader_impl.cc
|
||||
+++ content/browser/loader/navigation_url_loader_impl.cc
|
||||
@@ -633,6 +633,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
|
||||
@@ -611,6 +611,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
|
||||
resource_request_->has_user_gesture,
|
||||
resource_request_->request_initiator, &loader_factory);
|
||||
|
||||
@ -92,7 +92,7 @@ index 69c7f35e8b6e..0a549792040b 100644
|
||||
if (loader_factory) {
|
||||
factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
|
||||
std::move(loader_factory));
|
||||
@@ -834,7 +841,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse(
|
||||
@@ -814,7 +821,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 69c7f35e8b6e..0a549792040b 100644
|
||||
|
||||
if (stale) {
|
||||
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
|
||||
index 7caf00713119..3a4058a247be 100644
|
||||
index 68fe71981ceb..1b9aa078b517 100644
|
||||
--- content/browser/plugin_service_impl.cc
|
||||
+++ content/browser/plugin_service_impl.cc
|
||||
@@ -276,6 +276,7 @@ bool PluginServiceImpl::GetPluginInfoArray(
|
||||
@@ -266,6 +266,7 @@ bool PluginServiceImpl::GetPluginInfoArray(
|
||||
bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
@ -113,7 +113,7 @@ index 7caf00713119..3a4058a247be 100644
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
@@ -293,7 +294,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
@@ -283,7 +284,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,
|
||||
@ -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 ad253601284f..13c689ff7e5e 100644
|
||||
index 9cc3d077d14b..94af64f0c960 100644
|
||||
--- content/browser/renderer_host/render_frame_message_filter.cc
|
||||
+++ content/browser/renderer_host/render_frame_message_filter.cc
|
||||
@@ -194,6 +194,7 @@ void RenderFrameMessageFilter::OverrideThreadForMessage(
|
||||
@@ -144,6 +144,7 @@ void RenderFrameMessageFilter::OverrideThreadForMessage(
|
||||
void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
@ -199,7 +199,7 @@ index ad253601284f..13c689ff7e5e 100644
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool* found,
|
||||
@@ -201,8 +202,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
@@ -151,8 +152,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
std::string* actual_mime_type) {
|
||||
bool allow_wildcard = true;
|
||||
*found = plugin_service_->GetPluginInfo(
|
||||
@ -212,11 +212,11 @@ index ad253601284f..13c689ff7e5e 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 ff2ee2302d2a..e4db2bc08b5a 100644
|
||||
index 100c3936190c..b6a37c4220d9 100644
|
||||
--- content/browser/renderer_host/render_frame_message_filter.h
|
||||
+++ content/browser/renderer_host/render_frame_message_filter.h
|
||||
@@ -75,6 +75,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter {
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
@@ -66,6 +66,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter {
|
||||
|
||||
void OnGetPluginInfo(int render_frame_id,
|
||||
const GURL& url,
|
||||
+ bool is_main_frame,
|
||||
@ -224,10 +224,10 @@ index ff2ee2302d2a..e4db2bc08b5a 100644
|
||||
const std::string& mime_type,
|
||||
bool* found,
|
||||
diff --git content/common/frame_messages.h content/common/frame_messages.h
|
||||
index 34e40d5fd8eb..aef36ad96a5a 100644
|
||||
index 4bb04980b544..4e1e448a8bfc 100644
|
||||
--- content/common/frame_messages.h
|
||||
+++ content/common/frame_messages.h
|
||||
@@ -440,9 +440,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
@@ -249,9 +249,10 @@ IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction,
|
||||
// type. If there is no matching plugin, |found| is false.
|
||||
// |actual_mime_type| is the actual mime type supported by the
|
||||
// found plugin.
|
||||
@ -240,31 +240,31 @@ index 34e40d5fd8eb..aef36ad96a5a 100644
|
||||
std::string /* mime_type */,
|
||||
bool /* found */,
|
||||
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
|
||||
index 3a2957836151..b3a3a2c7a649 100644
|
||||
index 4438e0417b3c..cdc59afa7f54 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 910000
|
||||
+// #pragma clang max_tokens_here 910000
|
||||
-#pragma clang max_tokens_here 830000
|
||||
+// #pragma clang max_tokens_here 830000
|
||||
|
||||
#include <utility>
|
||||
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index ce69e43769b2..ce91333894e5 100644
|
||||
index df6e463d1518..68ab6d8748eb 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "content/public/browser/certificate_request_result_type.h"
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "content/public/browser/generated_code_cache_settings.h"
|
||||
#include "content/public/browser/mojo_binder_policy_map.h"
|
||||
#include "content/public/browser/storage_partition_config.h"
|
||||
+#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/page_visibility_state.h"
|
||||
#include "content/public/common/window_container_type.mojom-forward.h"
|
||||
#include "device/vr/buildflags/buildflags.h"
|
||||
@@ -1678,6 +1679,14 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1686,6 +1687,14 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const base::Optional<url::Origin>& initiating_origin,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
|
||||
|
||||
@ -279,7 +279,7 @@ index ce69e43769b2..ce91333894e5 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.
|
||||
@@ -1749,6 +1758,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1757,6 +1766,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Used as part of the user agent string.
|
||||
virtual std::string GetProduct();
|
||||
|
||||
@ -315,7 +315,7 @@ index 98c59005599e..69752184745d 100644
|
||||
WebPluginInfo* plugin) = 0;
|
||||
|
||||
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
|
||||
index e9def973e93c..1fe148c4f429 100644
|
||||
index a4695ba832fc..3eb41cb569b1 100644
|
||||
--- content/public/renderer/content_renderer_client.h
|
||||
+++ content/public/renderer/content_renderer_client.h
|
||||
@@ -85,6 +85,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@ -328,7 +328,7 @@ index e9def973e93c..1fe148c4f429 100644
|
||||
// Notifies that a new RenderFrame has been created.
|
||||
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
|
||||
|
||||
@@ -308,6 +311,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -301,6 +304,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// This method may invalidate the frame.
|
||||
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
|
||||
|
||||
@ -340,10 +340,10 @@ index e9def973e93c..1fe148c4f429 100644
|
||||
// started.
|
||||
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
|
||||
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
|
||||
index 340642fd854c..c031facf8897 100644
|
||||
index fcb99889673b..9d50aa58f325 100644
|
||||
--- content/renderer/render_frame_impl.cc
|
||||
+++ content/renderer/render_frame_impl.cc
|
||||
@@ -3737,7 +3737,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
@@ -3639,7 +3639,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
std::string mime_type;
|
||||
bool found = false;
|
||||
Send(new FrameHostMsg_GetPluginInfo(
|
||||
@ -354,10 +354,10 @@ index 340642fd854c..c031facf8897 100644
|
||||
if (!found)
|
||||
return nullptr;
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index a4240c7c75a3..df18416ac09e 100644
|
||||
index aa1fc3821b47..922aacc8f08e 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -624,6 +624,8 @@ void RenderThreadImpl::Init() {
|
||||
@@ -609,6 +609,8 @@ void RenderThreadImpl::Init() {
|
||||
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
|
||||
URLLoaderThrottleProviderType::kFrame);
|
||||
|
||||
@ -367,10 +367,10 @@ index a4240c7c75a3..df18416ac09e 100644
|
||||
&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this)));
|
||||
|
||||
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
|
||||
index 1fa872443617..758812fbb3a2 100644
|
||||
index d21f7e95c856..98f3739e60fc 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -974,6 +974,15 @@ void RendererBlinkPlatformImpl::SetActiveURL(const blink::WebURL& url,
|
||||
@@ -996,6 +996,15 @@ void RendererBlinkPlatformImpl::SetActiveURL(const blink::WebURL& url,
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -387,10 +387,10 @@ index 1fa872443617..758812fbb3a2 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 0bbe077c86a7..723dca391001 100644
|
||||
index c8470ab1919a..2c000a557a0a 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -213,6 +213,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -218,6 +218,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
void SetActiveURL(const blink::WebURL& url,
|
||||
const blink::WebString& top_url) override;
|
||||
|
||||
|
@ -94,10 +94,10 @@ index 2aba28d210db..5413f08af93d 100644
|
||||
return RunContentProcess(params, runner.get());
|
||||
}
|
||||
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
|
||||
index 6f5d40dd324d..8fa1397f0353 100644
|
||||
index 811017f5d455..00e4020dea17 100644
|
||||
--- content/app/content_main_runner_impl.cc
|
||||
+++ content/app/content_main_runner_impl.cc
|
||||
@@ -46,6 +46,7 @@
|
||||
@@ -48,6 +48,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 6f5d40dd324d..8fa1397f0353 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"
|
||||
@@ -589,7 +590,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
@@ -629,7 +630,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
#else // !OS_WIN
|
||||
|
||||
#if defined(OS_MAC)
|
||||
@ -114,7 +114,7 @@ index 6f5d40dd324d..8fa1397f0353 100644
|
||||
#endif // defined(OS_MAC)
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
@@ -1039,6 +1040,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
@@ -1089,6 +1090,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
is_shutdown_ = true;
|
||||
}
|
||||
|
||||
@ -127,11 +127,11 @@ index 6f5d40dd324d..8fa1397f0353 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 30d5515b3af8..d59b4779afef 100644
|
||||
index 86c624e53cf9..090171f7db22 100644
|
||||
--- content/app/content_main_runner_impl.h
|
||||
+++ content/app/content_main_runner_impl.h
|
||||
@@ -39,7 +39,7 @@ class ContentMainDelegate;
|
||||
class ServiceManagerEnvironment;
|
||||
class MojoIpcSupport;
|
||||
struct ContentMainParams;
|
||||
|
||||
-class ContentMainRunnerImpl : public ContentMainRunner {
|
||||
@ -140,14 +140,14 @@ index 30d5515b3af8..d59b4779afef 100644
|
||||
static std::unique_ptr<ContentMainRunnerImpl> Create();
|
||||
|
||||
@@ -53,6 +53,8 @@ class ContentMainRunnerImpl : public ContentMainRunner {
|
||||
int Run(bool start_service_manager_only) override;
|
||||
int Run(bool start_minimal_browser) override;
|
||||
void Shutdown() override;
|
||||
|
||||
+ void ShutdownOnUIThread();
|
||||
+
|
||||
private:
|
||||
int RunServiceManager(MainFunctionParams& main_function_params,
|
||||
bool start_service_manager_only);
|
||||
int RunBrowser(MainFunctionParams& main_function_params,
|
||||
bool start_minimal_browser);
|
||||
diff --git content/common/set_process_title.cc content/common/set_process_title.cc
|
||||
index 8b829a488773..a69a08869728 100644
|
||||
--- content/common/set_process_title.cc
|
||||
|
@ -81,7 +81,7 @@ index 886372e11489..ad3bc2242883 100644
|
||||
g_crash_helper_enabled = true;
|
||||
return true;
|
||||
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
|
||||
index e71c5e51118b..1dca5b2c378f 100644
|
||||
index b84f727c9dc6..817df167e5a6 100644
|
||||
--- chrome/common/crash_keys.cc
|
||||
+++ chrome/common/crash_keys.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
@ -93,7 +93,7 @@ index e71c5e51118b..1dca5b2c378f 100644
|
||||
#include "base/base_switches.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/stl_util.h"
|
||||
@@ -27,7 +29,7 @@
|
||||
@@ -28,7 +30,7 @@
|
||||
namespace crash_keys {
|
||||
|
||||
// Return true if we DON'T want to upload this flag to the crash server.
|
||||
@ -102,7 +102,7 @@ index e71c5e51118b..1dca5b2c378f 100644
|
||||
static const char* const kIgnoreSwitches[] = {
|
||||
switches::kEnableLogging,
|
||||
switches::kFlagSwitchesBegin,
|
||||
@@ -80,7 +82,7 @@ static bool IsBoringSwitch(const std::string& flag) {
|
||||
@@ -81,7 +83,7 @@ static bool IsBoringSwitch(const std::string& flag) {
|
||||
}
|
||||
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) {
|
||||
@ -127,7 +127,7 @@ index bcf172e645a2..f879aa745adf 100644
|
||||
// on the given |command_line|.
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
|
||||
diff --git components/crash/core/app/breakpad_linux.cc components/crash/core/app/breakpad_linux.cc
|
||||
index 9d8370ef035f..9950cd16660e 100644
|
||||
index 9e850c0380b8..e06d0a26617a 100644
|
||||
--- components/crash/core/app/breakpad_linux.cc
|
||||
+++ components/crash/core/app/breakpad_linux.cc
|
||||
@@ -28,6 +28,7 @@
|
||||
@ -138,7 +138,7 @@ index 9d8370ef035f..9950cd16660e 100644
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/linux_util.h"
|
||||
@@ -718,7 +719,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
@@ -719,7 +720,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
info.process_type_length = 7;
|
||||
info.distro = base::g_linux_distro;
|
||||
info.distro_length = my_strlen(base::g_linux_distro);
|
||||
@ -147,7 +147,7 @@ index 9d8370ef035f..9950cd16660e 100644
|
||||
info.process_start_time = g_process_start_time;
|
||||
info.oom_size = base::g_oom_size;
|
||||
info.pid = g_pid;
|
||||
@@ -1732,10 +1733,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1733,10 +1734,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version);
|
||||
|
||||
writer.AddBoundary();
|
||||
@ -169,7 +169,7 @@ index 9d8370ef035f..9950cd16660e 100644
|
||||
if (info.pid > 0) {
|
||||
char pid_value_buf[kUint64StringSize];
|
||||
uint64_t pid_value_len = my_uint64_len(info.pid);
|
||||
@@ -1852,6 +1862,9 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1853,6 +1863,9 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
crash_reporter::internal::TransitionalCrashKeyStorage;
|
||||
CrashKeyStorage::Iterator crash_key_iterator(*info.crash_keys);
|
||||
const CrashKeyStorage::Entry* entry;
|
||||
@ -179,7 +179,7 @@ index 9d8370ef035f..9950cd16660e 100644
|
||||
while ((entry = crash_key_iterator.Next())) {
|
||||
size_t key_size, value_size;
|
||||
// Check for malformed messages.
|
||||
@@ -1862,7 +1875,13 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1863,7 +1876,13 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
? CrashKeyStorage::value_size - 1
|
||||
: my_strlen(entry->value);
|
||||
|
||||
@ -349,10 +349,10 @@ index aaa9ad1d58d7..14b98b2e6598 100644
|
||||
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/core/app/crashpad.cc components/crash/core/app/crashpad.cc
|
||||
index e1c66df6cecf..681dd496292e 100644
|
||||
index 64ca38330be7..4de20a66cd99 100644
|
||||
--- components/crash/core/app/crashpad.cc
|
||||
+++ components/crash/core/app/crashpad.cc
|
||||
@@ -151,7 +151,8 @@ void InitializeCrashpadImpl(bool initial_client,
|
||||
@@ -152,7 +152,8 @@ void InitializeCrashpadImpl(bool initial_client,
|
||||
// fallback. Forwarding is turned off for debug-mode builds even for the
|
||||
// browser process, because the system's crash reporter can take a very long
|
||||
// time to chew on symbols.
|
||||
|
@ -146,7 +146,7 @@ index 5761c6b965b5..aee4e6c96033 100644
|
||||
struct Data;
|
||||
|
||||
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
index 623c833fed68..af28fce9edfc 100644
|
||||
index 1d5951e8fc00..599dde825883 100644
|
||||
--- third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
+++ third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
@@ -12,6 +12,7 @@
|
||||
@ -177,8 +177,8 @@ index 623c833fed68..af28fce9edfc 100644
|
||||
public_deps = [
|
||||
@@ -77,6 +89,7 @@ static_library("handler") {
|
||||
"../snapshot",
|
||||
"../third_party/mini_chromium:chromeos_buildflags",
|
||||
"../tools:tool_support",
|
||||
"//build:chromeos_buildflags",
|
||||
+ "//cef/libcef/features",
|
||||
]
|
||||
|
||||
@ -248,7 +248,7 @@ index 2ec1147d2620..8ff9a72e0bd7 100644
|
||||
//! \brief Calls ProcessPendingReports() in response to ReportPending() having
|
||||
//! been called on any thread, as well as periodically on a timer.
|
||||
diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
index d00026605537..0fa0cacbbae2 100644
|
||||
index 737ee4e09f67..f5a8727f7e6b 100644
|
||||
--- third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
+++ third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
@@ -39,6 +39,7 @@
|
||||
@ -277,7 +277,7 @@ index d00026605537..0fa0cacbbae2 100644
|
||||
+ int max_uploads;
|
||||
+ int max_database_size;
|
||||
+ int max_database_age;
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
bool use_cros_crash_reporter = false;
|
||||
base::FilePath minidump_dir_for_tests;
|
||||
@@ -577,6 +585,9 @@ int HandlerMain(int argc,
|
||||
@ -287,7 +287,7 @@ index d00026605537..0fa0cacbbae2 100644
|
||||
+ kOptionMaxUploads,
|
||||
+ kOptionMaxDatabaseSize,
|
||||
+ kOptionMaxDatabaseAge,
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
kOptionUseCrosCrashReporter,
|
||||
kOptionMinidumpDirForTests,
|
||||
@@ -678,6 +689,9 @@ int HandlerMain(int argc,
|
||||
@ -325,7 +325,7 @@ index d00026605537..0fa0cacbbae2 100644
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
case kOptionUseCrosCrashReporter: {
|
||||
options.use_cros_crash_reporter = true;
|
||||
@@ -982,8 +1017,14 @@ int HandlerMain(int argc,
|
||||
|
@ -132,10 +132,18 @@ index 11bfec21cc9f..416de61f85fa 100644
|
||||
// A weak pointer to the current or pending RenderViewHost. We don't access
|
||||
// this through the host_contents because we want to deal with the pending
|
||||
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
|
||||
index 1702638ab5b9..49de950d83d8 100644
|
||||
index c2d194ec21be..3a7354f648ed 100644
|
||||
--- extensions/browser/extensions_browser_client.h
|
||||
+++ extensions/browser/extensions_browser_client.h
|
||||
@@ -63,6 +63,7 @@ class ComponentExtensionResourceManager;
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "ui/base/page_transition_types.h"
|
||||
|
||||
class ExtensionFunctionRegistry;
|
||||
+class GURL;
|
||||
class PrefService;
|
||||
|
||||
namespace base {
|
||||
@@ -62,6 +63,7 @@ class ComponentExtensionResourceManager;
|
||||
class Extension;
|
||||
class ExtensionCache;
|
||||
class ExtensionError;
|
||||
@ -143,7 +151,7 @@ index 1702638ab5b9..49de950d83d8 100644
|
||||
class ExtensionHostDelegate;
|
||||
class ExtensionSet;
|
||||
class ExtensionSystem;
|
||||
@@ -205,6 +206,14 @@ class ExtensionsBrowserClient {
|
||||
@@ -204,6 +206,14 @@ class ExtensionsBrowserClient {
|
||||
virtual std::unique_ptr<ExtensionHostDelegate>
|
||||
CreateExtensionHostDelegate() = 0;
|
||||
|
||||
@ -159,10 +167,10 @@ index 1702638ab5b9..49de950d83d8 100644
|
||||
// once each time the extensions system is loaded per browser_context. The
|
||||
// implementation may wish to use the BrowserContext to record the current
|
||||
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
|
||||
index f41d44299518..41e892cdf240 100644
|
||||
index 337921842180..c78e1d114a12 100644
|
||||
--- extensions/browser/process_manager.cc
|
||||
+++ extensions/browser/process_manager.cc
|
||||
@@ -411,9 +411,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
|
||||
@@ -395,9 +395,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
|
||||
return true; // TODO(kalman): return false here? It might break things...
|
||||
|
||||
DVLOG(1) << "CreateBackgroundHost " << extension->id();
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git .gn .gn
|
||||
index aed1fea955bd..3c5036a04706 100644
|
||||
index 0c25000917fb..cdaf3a6799c2 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -290,6 +290,8 @@ exec_script_whitelist =
|
||||
@@ -275,6 +275,8 @@ exec_script_whitelist =
|
||||
|
||||
"//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
|
||||
|
||||
@ -12,10 +12,10 @@ index aed1fea955bd..3c5036a04706 100644
|
||||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 85198646cd31..6c1dbf6921a2 100644
|
||||
index 86c82ac5cf8a..e355bb940181 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -232,6 +232,7 @@ group("gn_all") {
|
||||
@@ -234,6 +234,7 @@ group("gn_all") {
|
||||
|
||||
if (!is_ios && !is_fuchsia) {
|
||||
deps += [
|
||||
@ -56,18 +56,18 @@ index 982fbe8d3f0d..e757be4688f1 100644
|
||||
+ "studio path")
|
||||
}
|
||||
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
|
||||
index 4a475a66ebdf..9fcb9853f71d 100644
|
||||
index 6ad9c87a3adf..33716990c792 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -3,6 +3,7 @@
|
||||
# found in the LICENSE file.
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/locales.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/browser/resources/pdf/ink/ink.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/components/media_app_ui/media_app_ui.gni")
|
||||
@@ -332,6 +333,7 @@ template("chrome_paks") {
|
||||
@@ -344,6 +345,7 @@ template("chrome_paks") {
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ index 4a475a66ebdf..9fcb9853f71d 100644
|
||||
chrome_repack_locales("${target_name}_locales") {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
@@ -354,14 +356,17 @@ template("chrome_paks") {
|
||||
@@ -366,14 +368,17 @@ template("chrome_paks") {
|
||||
output_locales = locales
|
||||
}
|
||||
}
|
||||
@ -95,7 +95,7 @@ index 4a475a66ebdf..9fcb9853f71d 100644
|
||||
public_deps += [ ":${target_name}_200_percent" ]
|
||||
}
|
||||
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
|
||||
index a75484da690f..107e42c68592 100644
|
||||
index 5f5cb1c752f2..ef0a01caf9cd 100644
|
||||
--- chrome/installer/mini_installer/BUILD.gn
|
||||
+++ chrome/installer/mini_installer/BUILD.gn
|
||||
@@ -6,6 +6,7 @@ import("//build/config/compiler/compiler.gni")
|
||||
@ -106,18 +106,18 @@ index a75484da690f..107e42c68592 100644
|
||||
import("//chrome/process_version_rc_template.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//third_party/ffmpeg/ffmpeg_options.gni")
|
||||
@@ -144,11 +145,13 @@ template("generate_mini_installer") {
|
||||
inputs = [
|
||||
"$chrome_dll_file",
|
||||
"$root_out_dir/chrome.exe",
|
||||
- "$root_out_dir/locales/en-US.pak",
|
||||
"$root_out_dir/setup.exe",
|
||||
"//chrome/tools/build/win/makecab.py",
|
||||
release_file,
|
||||
]
|
||||
+ if (!enable_cef) {
|
||||
+ inputs += [ "$root_out_dir/locales/en-US.pak" ]
|
||||
+ }
|
||||
@@ -122,11 +123,13 @@ python2_action("mini_installer_archive") {
|
||||
inputs = [
|
||||
"$root_out_dir/chrome.dll",
|
||||
"$root_out_dir/chrome.exe",
|
||||
- "$root_out_dir/locales/en-US.pak",
|
||||
"$root_out_dir/setup.exe",
|
||||
"//chrome/tools/build/win/makecab.py",
|
||||
release_file,
|
||||
]
|
||||
+ if (!enable_cef) {
|
||||
+ inputs += [ "$root_out_dir/locales/en-US.pak" ]
|
||||
+ }
|
||||
|
||||
outputs = [
|
||||
# See also chrome.packed.7z conditionally added below.
|
||||
outputs = [
|
||||
# See also chrome.packed.7z conditionally added below.
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
|
||||
index cb06259b198c..c5e4c54de5b8 100644
|
||||
index 1343d7c03b07..79843c9d7ae7 100644
|
||||
--- tools/gritsettings/resource_ids.spec
|
||||
+++ tools/gritsettings/resource_ids.spec
|
||||
@@ -685,4 +685,13 @@
|
||||
@@ -703,4 +703,13 @@
|
||||
# Please read the header and find the right section above instead.
|
||||
|
||||
# Resource ids starting at 31000 are reserved for projects built on Chromium.
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git ui/base/ime/win/input_method_win_base.cc ui/base/ime/win/input_method_win_base.cc
|
||||
index fc9c8d3a0f2c..6098c4d1c9b9 100644
|
||||
index f07ce6fef458..c3d3b2eb50dd 100644
|
||||
--- ui/base/ime/win/input_method_win_base.cc
|
||||
+++ ui/base/ime/win/input_method_win_base.cc
|
||||
@@ -246,8 +246,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const {
|
||||
|
@ -25,10 +25,10 @@ index 0aaed76c1dda..517c3d8b5772 100644
|
||||
if (base::PathExists(sandbox_candidate))
|
||||
sandbox_binary = sandbox_candidate;
|
||||
diff --git ui/gl/init/gl_initializer_linux_x11.cc ui/gl/init/gl_initializer_linux_x11.cc
|
||||
index a5c030d5f3d3..a5a8c68d98c1 100644
|
||||
index fb6aab8f450c..115f88ed649e 100644
|
||||
--- ui/gl/init/gl_initializer_linux_x11.cc
|
||||
+++ ui/gl/init/gl_initializer_linux_x11.cc
|
||||
@@ -86,7 +86,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
|
||||
@@ -82,7 +82,7 @@ bool InitializeStaticEGLInternalFromLibrary(GLImplementation implementation) {
|
||||
if (implementation == kGLImplementationSwiftShaderGL) {
|
||||
#if BUILDFLAG(ENABLE_SWIFTSHADER)
|
||||
base::FilePath module_path;
|
||||
@ -37,12 +37,12 @@ index a5c030d5f3d3..a5a8c68d98c1 100644
|
||||
return false;
|
||||
module_path = module_path.Append("swiftshader/");
|
||||
|
||||
@@ -97,7 +97,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
|
||||
#endif
|
||||
@@ -94,7 +94,7 @@ bool InitializeStaticEGLInternalFromLibrary(GLImplementation implementation) {
|
||||
} else if (implementation == kGLImplementationEGLANGLE) {
|
||||
#if !BUILDFLAG(USE_STATIC_ANGLE)
|
||||
base::FilePath module_path;
|
||||
- if (!base::PathService::Get(base::DIR_MODULE, &module_path))
|
||||
+ if (!base::PathService::Get(base::DIR_ASSETS, &module_path))
|
||||
return false;
|
||||
|
||||
glesv2_path = module_path.Append(kGLESv2ANGLELibraryName);
|
||||
const char kGLESv2ANGLELibraryName[] = "libGLESv2.so";
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc
|
||||
index 4e231b615e8f..ffb027ebb0a3 100644
|
||||
index b125a023576b..2ed33e44379c 100644
|
||||
--- base/files/file_path_watcher_linux.cc
|
||||
+++ base/files/file_path_watcher_linux.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
@ -18,7 +18,7 @@ index 4e231b615e8f..ffb027ebb0a3 100644
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@@ -263,19 +265,16 @@ void InotifyReaderThreadDelegate::ThreadMain() {
|
||||
@@ -264,19 +266,16 @@ void InotifyReaderThreadDelegate::ThreadMain() {
|
||||
PlatformThread::SetName("inotify_reader");
|
||||
|
||||
// Make sure the file descriptors are good for use with select().
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
|
||||
index d8ad42a07552..57f725b1d088 100644
|
||||
index f659291023ac..3b8c88a37814 100644
|
||||
--- ui/gl/init/gl_initializer_mac.cc
|
||||
+++ ui/gl/init/gl_initializer_mac.cc
|
||||
@@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() {
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_embedder.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_embedder.cc
|
||||
index 045cc6e50916..205945f06910 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_embedder.cc
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_embedder.cc
|
||||
@@ -110,7 +110,7 @@ void MimeHandlerViewEmbedder::DidFinishNavigation(
|
||||
return;
|
||||
// We should've deleted the MimeHandlerViewEmbedder at this point if the frame
|
||||
// is sandboxed.
|
||||
- DCHECK(!render_frame_host_->IsSandboxed(
|
||||
+ DCHECK(!render_frame_host_ || !render_frame_host_->IsSandboxed(
|
||||
network::mojom::WebSandboxFlags::kPlugins));
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ index 96d1a51ec107..e8120a818b1f 100644
|
||||
+// This load will not send any cookies. For CEF usage.
|
||||
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17)
|
||||
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
|
||||
index dd533f15e3d0..3773c1b9cf2b 100644
|
||||
index 9d993cce5e0e..bc12684c73c6 100644
|
||||
--- net/url_request/url_request_http_job.cc
|
||||
+++ net/url_request/url_request_http_job.cc
|
||||
@@ -574,7 +574,8 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() {
|
||||
@@ -539,7 +539,8 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() {
|
||||
// Read cookies whenever allow_credentials() is true, even if the PrivacyMode
|
||||
// is being overridden by NetworkDelegate and will eventually block them, as
|
||||
// blocked cookies still need to be logged in that case.
|
||||
@ -24,10 +24,10 @@ index dd533f15e3d0..3773c1b9cf2b 100644
|
||||
request_->force_ignore_site_for_cookies();
|
||||
if (cookie_store->cookie_access_delegate() &&
|
||||
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
|
||||
index ee0150fbd6d0..03d167f6ccfd 100644
|
||||
index 355ca24e301c..3bdbde36de39 100644
|
||||
--- services/network/public/cpp/resource_request.cc
|
||||
+++ services/network/public/cpp/resource_request.cc
|
||||
@@ -128,7 +128,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
@@ -176,7 +176,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
}
|
||||
|
||||
bool ResourceRequest::SendsCookies() const {
|
||||
|
@ -41,10 +41,10 @@ index cc4b13a7b9c6..84f3b9ed7cf4 100644
|
||||
|
||||
} // namespace content
|
||||
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 19f90228473a..46e86591c898 100644
|
||||
index e23394ae63cd..3d8e02a0b189 100644
|
||||
--- content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2814,6 +2814,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
|
||||
@@ -2915,6 +2915,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
|
||||
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
|
||||
}
|
||||
|
||||
@ -57,10 +57,10 @@ index 19f90228473a..46e86591c898 100644
|
||||
const WebInputEvent& event) {
|
||||
if ((base::FeatureList::IsEnabled(
|
||||
diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h
|
||||
index aef170316a5e..2e1a0d1245c9 100644
|
||||
index 3dd95dcf37cb..024cc350fe96 100644
|
||||
--- content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -725,6 +725,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -743,6 +743,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
|
||||
void ProgressFlingIfNeeded(base::TimeTicks current_time);
|
||||
void StopFling();
|
||||
|
@ -1,16 +1,16 @@
|
||||
diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc
|
||||
index 69a0e4c0e6fb..6751d51b8435 100644
|
||||
index 4e04a86c2d06..6d82d55acd15 100644
|
||||
--- chrome/browser/download/download_prefs.cc
|
||||
+++ chrome/browser/download/download_prefs.cc
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/download/chrome_download_manager_delegate.h"
|
||||
#include "chrome/browser/download/download_core_service_factory.h"
|
||||
#include "chrome/browser/download/download_core_service_impl.h"
|
||||
@@ -57,6 +58,10 @@
|
||||
@@ -58,6 +59,10 @@
|
||||
#include "chrome/browser/ui/pdf/adobe_reader_info_win.h"
|
||||
#endif
|
||||
|
||||
@ -21,7 +21,7 @@ index 69a0e4c0e6fb..6751d51b8435 100644
|
||||
using content::BrowserContext;
|
||||
using content::BrowserThread;
|
||||
using content::DownloadManager;
|
||||
@@ -357,6 +362,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager(
|
||||
@@ -358,6 +363,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager(
|
||||
// static
|
||||
DownloadPrefs* DownloadPrefs::FromBrowserContext(
|
||||
content::BrowserContext* context) {
|
||||
@ -34,18 +34,18 @@ index 69a0e4c0e6fb..6751d51b8435 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc
|
||||
index 3fadaba3336f..5ef67b35883d 100644
|
||||
index 97cae92b96fa..6acf5188e1d6 100644
|
||||
--- chrome/browser/printing/print_preview_dialog_controller.cc
|
||||
+++ chrome/browser/printing/print_preview_dialog_controller.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "build/branding_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
|
||||
#include "chrome/browser/printing/print_view_manager.h"
|
||||
@@ -451,8 +452,11 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog(
|
||||
@@ -452,8 +453,11 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog(
|
||||
content::HostZoomMap::Get(preview_dialog->GetSiteInstance())
|
||||
->SetZoomLevelForHostAndScheme(print_url.scheme(), print_url.host(), 0);
|
||||
PrintViewManager::CreateForWebContents(preview_dialog);
|
||||
@ -58,13 +58,13 @@ index 3fadaba3336f..5ef67b35883d 100644
|
||||
// Add an entry to the map.
|
||||
preview_dialog_map_[preview_dialog] = initiator;
|
||||
diff --git chrome/browser/printing/print_view_manager_base.cc chrome/browser/printing/print_view_manager_base.cc
|
||||
index 277f2ca033d1..06465c4616a3 100644
|
||||
index ae1ab34986d1..b742e9fffaf3 100644
|
||||
--- chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "base/timer/timer.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/chrome_notification_types.h"
|
||||
@ -79,8 +79,8 @@ index 277f2ca033d1..06465c4616a3 100644
|
||||
+
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
#include "chrome/browser/printing/print_error_dialog.h"
|
||||
#endif
|
||||
@@ -196,8 +201,11 @@ PrintViewManager* GetPrintViewManager(int render_process_id,
|
||||
#include "chrome/browser/printing/print_view_manager.h"
|
||||
@@ -201,8 +206,11 @@ PrintViewManager* GetPrintViewManager(int render_process_id,
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
content::WebContents* web_contents =
|
||||
GetWebContentsForRenderFrame(render_process_id, render_frame_id);
|
||||
@ -95,10 +95,10 @@ index 277f2ca033d1..06465c4616a3 100644
|
||||
|
||||
void NotifySystemDialogCancelled(int render_process_id, int routing_id) {
|
||||
diff --git chrome/browser/printing/print_view_manager_base.h chrome/browser/printing/print_view_manager_base.h
|
||||
index e22cff218a56..6cff432e4f08 100644
|
||||
index 93103940036e..1b12b91cdf4b 100644
|
||||
--- chrome/browser/printing/print_view_manager_base.h
|
||||
+++ chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -118,9 +118,6 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
@@ -122,9 +122,6 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
// Manages the low-level talk to the printer.
|
||||
scoped_refptr<PrintJob> print_job_;
|
||||
|
||||
@ -108,22 +108,12 @@ index e22cff218a56..6cff432e4f08 100644
|
||||
// content::NotificationObserver implementation.
|
||||
void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
@@ -132,6 +129,9 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
// Cancels the print job.
|
||||
void NavigationStopped() override;
|
||||
|
||||
+ private:
|
||||
+ friend class TestPrintViewManager;
|
||||
+
|
||||
// printing::PrintManager:
|
||||
void OnDidPrintDocument(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
diff --git chrome/browser/resources/print_preview/ui/destination_dialog.html chrome/browser/resources/print_preview/ui/destination_dialog.html
|
||||
index 01ac8b5153e1..20f5e5b9d099 100644
|
||||
index df858712d3be..cd146ea0f26b 100644
|
||||
--- chrome/browser/resources/print_preview/ui/destination_dialog.html
|
||||
+++ chrome/browser/resources/print_preview/ui/destination_dialog.html
|
||||
@@ -133,10 +133,7 @@
|
||||
</print-preview-provisional-destination-resolver>
|
||||
@@ -25,10 +25,7 @@
|
||||
</print-preview-destination-list>
|
||||
</div>
|
||||
<div slot="button-container">
|
||||
- <cr-button on-click="onManageButtonClick_">
|
||||
@ -174,18 +164,18 @@ index 3d415a60d436..807ab41ee6ef 100644
|
||||
|
||||
ConstrainedWebDialogUI::~ConstrainedWebDialogUI() {
|
||||
diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
|
||||
index c48314e52e83..f0a64a0be931 100644
|
||||
index 181a4132f1be..4344ceaf83e5 100644
|
||||
--- chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
|
||||
+++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "base/task/thread_pool.h"
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/app_mode/app_mode_utils.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/download/download_prefs.h"
|
||||
@@ -53,6 +54,10 @@
|
||||
@@ -54,6 +55,10 @@
|
||||
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
|
||||
#endif
|
||||
|
||||
@ -196,7 +186,7 @@ index c48314e52e83..f0a64a0be931 100644
|
||||
namespace printing {
|
||||
|
||||
namespace {
|
||||
@@ -376,10 +381,27 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
|
||||
@@ -377,10 +382,27 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
|
||||
// If the directory is empty there is no reason to create it or use the
|
||||
// default location.
|
||||
if (path.empty()) {
|
||||
@ -224,7 +214,7 @@ index c48314e52e83..f0a64a0be931 100644
|
||||
// Get default download directory. This will be used as a fallback if the
|
||||
// save directory does not exist.
|
||||
DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(profile_);
|
||||
@@ -387,8 +409,7 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
|
||||
@@ -388,8 +410,7 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
|
||||
base::ThreadPool::PostTaskAndReplyWithResult(
|
||||
FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT},
|
||||
base::BindOnce(&SelectSaveDirectory, path, default_path),
|
||||
@ -234,7 +224,7 @@ index c48314e52e83..f0a64a0be931 100644
|
||||
}
|
||||
|
||||
void PdfPrinterHandler::PostPrintToPdfTask() {
|
||||
@@ -429,6 +450,40 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
|
||||
@@ -430,6 +451,40 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
|
||||
platform_util::GetTopLevel(preview_web_contents_->GetNativeView()), NULL);
|
||||
}
|
||||
|
||||
@ -273,21 +263,21 @@ index c48314e52e83..f0a64a0be931 100644
|
||||
+#endif // BUILDFLAG(ENABLE_CEF)
|
||||
+
|
||||
base::FilePath PdfPrinterHandler::GetSaveLocation() const {
|
||||
#if defined(OS_CHROMEOS)
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
drive::DriveIntegrationService* drive_service =
|
||||
diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.h chrome/browser/ui/webui/print_preview/pdf_printer_handler.h
|
||||
index 26954aeae08f..48afeb608f83 100644
|
||||
index d796486f6b74..1a7b0d23128d 100644
|
||||
--- chrome/browser/ui/webui/print_preview/pdf_printer_handler.h
|
||||
+++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "base/memory/ref_counted.h"
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/ui/webui/print_preview/printer_handler.h"
|
||||
#include "ui/shell_dialogs/select_file_dialog.h"
|
||||
|
||||
@@ -88,6 +89,15 @@ class PdfPrinterHandler : public PrinterHandler,
|
||||
@@ -89,6 +90,15 @@ class PdfPrinterHandler : public PrinterHandler,
|
||||
void OnDirectorySelected(const base::FilePath& filename,
|
||||
const base::FilePath& directory);
|
||||
|
||||
@ -304,27 +294,27 @@ index 26954aeae08f..48afeb608f83 100644
|
||||
base::FilePath GetSaveLocation() const;
|
||||
|
||||
diff --git chrome/browser/ui/webui/print_preview/print_preview_handler.cc chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||||
index adf2433423a5..6bfa66b75b93 100644
|
||||
index 67aa6bc0d76e..0fecbd87423b 100644
|
||||
--- chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||||
+++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "base/memory/ref_counted_memory.h"
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/app_mode/app_mode_utils.h"
|
||||
#include "chrome/browser/bad_message.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
@@ -1258,7 +1259,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
|
||||
@@ -1080,7 +1081,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
|
||||
}
|
||||
return extension_printer_handler_.get();
|
||||
}
|
||||
-#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
|
||||
+#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) && !BUILDFLAG(ENABLE_CEF)
|
||||
if (printer_type == PrinterType::kPrivet &&
|
||||
(base::FeatureList::IsEnabled(features::kForceEnablePrivetPrinting) ||
|
||||
GetPrefs()->GetBoolean(
|
||||
@@ -1269,6 +1270,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
|
||||
GetPrefs()->GetBoolean(prefs::kForceEnablePrivetPrinting)) {
|
||||
if (!privet_printer_handler_) {
|
||||
@@ -1089,6 +1090,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
|
||||
}
|
||||
return privet_printer_handler_.get();
|
||||
}
|
||||
@ -334,7 +324,7 @@ index adf2433423a5..6bfa66b75b93 100644
|
||||
#endif
|
||||
if (printer_type == PrinterType::kPdf) {
|
||||
if (!pdf_printer_handler_) {
|
||||
@@ -1341,6 +1345,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
|
||||
@@ -1151,6 +1155,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
|
||||
}
|
||||
|
||||
void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
|
||||
@ -342,7 +332,7 @@ index adf2433423a5..6bfa66b75b93 100644
|
||||
DCHECK(!identity_manager_);
|
||||
cloud_print_enabled_ =
|
||||
!base::Contains(printer_type_deny_list_, PrinterType::kCloud) &&
|
||||
@@ -1358,6 +1363,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
|
||||
@@ -1167,6 +1172,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
|
||||
|
||||
identity_manager_ = IdentityManagerFactory::GetForProfile(profile);
|
||||
identity_manager_->AddObserver(this);
|
||||
@ -351,18 +341,18 @@ index adf2433423a5..6bfa66b75b93 100644
|
||||
|
||||
void PrintPreviewHandler::UnregisterForGaiaCookieChanges() {
|
||||
diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
index a1ddf703d113..b0b1f0272dd3 100644
|
||||
index fb3328d0d75b..4dd94d59e195 100644
|
||||
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "base/synchronization/lock.h"
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/pdf/pdf_extension_util.h"
|
||||
#include "chrome/browser/printing/background_printing_manager.h"
|
||||
@@ -81,12 +82,16 @@ namespace printing {
|
||||
@@ -85,12 +86,16 @@ namespace printing {
|
||||
|
||||
namespace {
|
||||
|
||||
@ -372,7 +362,7 @@ index a1ddf703d113..b0b1f0272dd3 100644
|
||||
#if defined(OS_MAC)
|
||||
// U+0028 U+21E7 U+2318 U+0050 U+0029 in UTF8
|
||||
const char kBasicPrintShortcut[] = "\x28\xE2\x8c\xA5\xE2\x8C\x98\x50\x29";
|
||||
#elif !defined(OS_CHROMEOS)
|
||||
#elif !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
const char kBasicPrintShortcut[] = "(Ctrl+Shift+P)";
|
||||
#endif
|
||||
+#endif // !BUILDFLAG(ENABLE_CEF)
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
|
||||
index 8e648fa8d563..66a52ce51147 100644
|
||||
index 47a5b3c2a11e..0a37d7c1e753 100644
|
||||
--- chrome/browser/printing/print_job_worker.cc
|
||||
+++ chrome/browser/printing/print_job_worker.cc
|
||||
@@ -134,6 +134,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id)
|
||||
@@ -135,6 +135,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id)
|
||||
PrintingContext::Create(printing_context_delegate_.get())),
|
||||
thread_("Printing_Worker") {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
||||
@ -11,7 +11,7 @@ index 8e648fa8d563..66a52ce51147 100644
|
||||
|
||||
PrintJobWorker::~PrintJobWorker() {
|
||||
diff --git printing/printing_context.h printing/printing_context.h
|
||||
index 896d1b26f492..59d17b49f0d3 100644
|
||||
index 268e03d2b8d4..f1b573207b88 100644
|
||||
--- printing/printing_context.h
|
||||
+++ printing/printing_context.h
|
||||
@@ -134,6 +134,13 @@ class PRINTING_EXPORT PrintingContext {
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc
|
||||
index d50a4f5c0c1b..25679e8a8948 100644
|
||||
index 255c259a9b35..c40021deb1fc 100644
|
||||
--- content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -583,6 +583,8 @@ bool RenderViewHostImpl::IsRenderViewLive() {
|
||||
@@ -590,6 +590,8 @@ bool RenderViewHostImpl::IsRenderViewLive() {
|
||||
}
|
||||
|
||||
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
|
@ -1,23 +1,23 @@
|
||||
diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc
|
||||
index ed40422ac8cf..51ca618a2f09 100644
|
||||
index a0006aa682e7..b83d42c637a6 100644
|
||||
--- chrome/browser/renderer_preferences_util.cc
|
||||
+++ chrome/browser/renderer_preferences_util.cc
|
||||
@@ -34,7 +34,8 @@
|
||||
@@ -35,7 +35,8 @@
|
||||
#include "ui/base/cocoa/defaults_utils.h"
|
||||
#endif
|
||||
|
||||
-#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) && \
|
||||
-#if defined(USE_AURA) && (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
|
||||
+#if defined(USE_AURA) && (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
|
||||
+ defined(ENABLE_THEMES)
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
#include "chrome/browser/themes/theme_service_factory.h"
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
@@ -153,7 +154,8 @@ void UpdateFromSystemSettings(blink::RendererPreferences* prefs,
|
||||
@@ -154,7 +155,8 @@ void UpdateFromSystemSettings(blink::RendererPreferences* prefs,
|
||||
prefs->caret_blink_interval = interval;
|
||||
#endif
|
||||
|
||||
-#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) && \
|
||||
-#if defined(USE_AURA) && (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
|
||||
+#if defined(USE_AURA) && (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
|
||||
+ defined(ENABLE_THEMES)
|
||||
views::LinuxUI* linux_ui = views::LinuxUI::instance();
|
||||
if (linux_ui) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
|
||||
index 2b24b4ce2e22..ad23c2d74f00 100644
|
||||
index 9f745407ec48..6d4ae4266371 100644
|
||||
--- ui/base/resource/resource_bundle.cc
|
||||
+++ ui/base/resource/resource_bundle.cc
|
||||
@@ -875,6 +875,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
@@ -845,6 +845,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
: delegate_(delegate),
|
||||
locale_resources_data_lock_(new base::Lock),
|
||||
max_scale_factor_(SCALE_FACTOR_100P) {
|
||||
@ -15,7 +15,7 @@ index 2b24b4ce2e22..ad23c2d74f00 100644
|
||||
mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kMangleLocalizedStrings);
|
||||
}
|
||||
@@ -884,6 +890,11 @@ ResourceBundle::~ResourceBundle() {
|
||||
@@ -854,6 +860,11 @@ ResourceBundle::~ResourceBundle() {
|
||||
UnloadLocaleResources();
|
||||
}
|
||||
|
||||
@ -28,10 +28,10 @@ index 2b24b4ce2e22..ad23c2d74f00 100644
|
||||
void ResourceBundle::InitSharedInstance(Delegate* delegate) {
|
||||
DCHECK(g_shared_instance_ == nullptr) << "ResourceBundle initialized twice";
|
||||
diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h
|
||||
index 51dbdfab3962..a271d60679be 100644
|
||||
index 0432b8f0965f..264759c7393d 100644
|
||||
--- ui/base/resource/resource_bundle.h
|
||||
+++ ui/base/resource/resource_bundle.h
|
||||
@@ -172,6 +172,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
|
||||
@@ -192,6 +192,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
|
||||
// Return the global resource loader instance.
|
||||
static ResourceBundle& GetSharedInstance();
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index 92e5c944d44b..f27972a4e2b7 100644
|
||||
index dd16ddb90fa9..1d70818d0eff 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -678,10 +678,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
|
||||
@@ -657,10 +657,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
|
||||
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
|
||||
DCHECK(GetBackgroundColor());
|
||||
|
||||
@ -19,10 +19,10 @@ index 92e5c944d44b..f27972a4e2b7 100644
|
||||
}
|
||||
|
||||
base::Optional<DisplayFeature> RenderWidgetHostViewAura::GetDisplayFeature() {
|
||||
@@ -2056,6 +2058,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
@@ -2020,6 +2022,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
// This needs to happen only after |window_| has been initialized using
|
||||
// Init(), because it needs to have the layer.
|
||||
if (frame_sink_id_.is_valid())
|
||||
window_->SetEmbedFrameSinkId(frame_sink_id_);
|
||||
window_->SetEmbedFrameSinkId(frame_sink_id_);
|
||||
+
|
||||
+ // Do this after |window_| is created to avoid crashes on Win10.
|
||||
+ // See https://crbug.com/761389.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user