Update to Chromium version 97.0.4692.0 (#938553)
- Remove CefRequestContextHandler::OnBeforePluginLoad and CefRequestContext::PurgePluginListCache (fixes issue #3047). These methods stopped being relevant after the removal of Flash support in January 2021. The last remaining PPAPI plugin (PDF viewer) will switch to a non-plugin implementation in the near future (see https://crbug.com/702993#c58) and functionality related to plugin filtering has already been removed in https://crrev.com/343ae351c9.
This commit is contained in:
parent
e83d8d6a13
commit
66648c2343
2
BUILD.gn
2
BUILD.gn
|
@ -620,8 +620,6 @@ static_library("libcef_static") {
|
|||
"libcef/browser/osr/web_contents_view_osr.cc",
|
||||
"libcef/browser/osr/web_contents_view_osr.h",
|
||||
"libcef/browser/path_util_impl.cc",
|
||||
"libcef/browser/plugins/plugin_service_filter.cc",
|
||||
"libcef/browser/plugins/plugin_service_filter.h",
|
||||
"libcef/browser/prefs/browser_prefs.cc",
|
||||
"libcef/browser/prefs/browser_prefs.h",
|
||||
"libcef/browser/prefs/pref_store.cc",
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/96.0.4664.0'
|
||||
'chromium_checkout': 'refs/tags/97.0.4692.0'
|
||||
}
|
||||
|
|
|
@ -480,7 +480,7 @@
|
|||
'tests/ceftests/osr_accessibility_unittest.cc',
|
||||
'tests/ceftests/osr_display_unittest.cc',
|
||||
'tests/ceftests/parser_unittest.cc',
|
||||
'tests/ceftests/plugin_unittest.cc',
|
||||
'tests/ceftests/pdf_viewer_unittest.cc',
|
||||
'tests/ceftests/preference_unittest.cc',
|
||||
'tests/ceftests/print_unittest.cc',
|
||||
'tests/ceftests/process_message_unittest.cc',
|
||||
|
@ -563,7 +563,7 @@
|
|||
'tests/ceftests/frame_unittest.cc',
|
||||
'tests/ceftests/message_router_unittest.cc',
|
||||
'tests/ceftests/navigation_unittest.cc',
|
||||
'tests/ceftests/plugin_unittest.cc',
|
||||
'tests/ceftests/pdf_viewer_unittest.cc',
|
||||
'tests/ceftests/preference_unittest.cc',
|
||||
'tests/ceftests/process_message_unittest.cc',
|
||||
'tests/ceftests/request_handler_unittest.cc',
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=2e42334fc22050e207e5a0af6fe290a592e4105f$
|
||||
// $hash=77e2da51f7af8b4fbb317d8cdab5e5e7c9d3300d$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_
|
||||
|
@ -165,17 +165,6 @@ typedef struct _cef_request_context_t {
|
|||
int(CEF_CALLBACK* clear_scheme_handler_factories)(
|
||||
struct _cef_request_context_t* self);
|
||||
|
||||
///
|
||||
// Tells all renderer processes associated with this context to throw away
|
||||
// their plugin list cache. If |reload_pages| is true (1) they will also
|
||||
// reload all pages with plugins.
|
||||
// cef_request_context_handler_t::OnBeforePluginLoad may be called to rebuild
|
||||
// the plugin list cache.
|
||||
///
|
||||
void(CEF_CALLBACK* purge_plugin_list_cache)(
|
||||
struct _cef_request_context_t* self,
|
||||
int reload_pages);
|
||||
|
||||
///
|
||||
// Returns true (1) if a preference with the specified |name| exists. This
|
||||
// function must be called on the browser process UI thread.
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=fa148db8a0ecd79966814086fb92e439687be701$
|
||||
// $hash=8fa983ddbdb8ad3199a0e495e0b6928b37128913$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_
|
||||
|
@ -70,34 +70,6 @@ typedef struct _cef_request_context_handler_t {
|
|||
struct _cef_request_context_handler_t* self,
|
||||
struct _cef_request_context_t* request_context);
|
||||
|
||||
///
|
||||
// Called on multiple browser process threads before a plugin instance is
|
||||
// loaded. |mime_type| is the mime type of the plugin that will be loaded.
|
||||
// |plugin_url| is the content URL that the plugin will load and may be NULL.
|
||||
// |is_main_frame| will be true (1) if the plugin is being loaded in the main
|
||||
// (top-level) frame, |top_origin_url| is the URL for the top-level frame that
|
||||
// contains the plugin when loading a specific plugin instance or NULL when
|
||||
// building the initial list of enabled plugins for 'navigator.plugins'
|
||||
// JavaScript state. |plugin_info| includes additional information about the
|
||||
// plugin that will be loaded. |plugin_policy| is the recommended policy.
|
||||
// Modify |plugin_policy| and return true (1) to change the policy. Return
|
||||
// false (0) to use the recommended policy. The default plugin policy can be
|
||||
// set at runtime using the `--plugin-policy=[allow|detect|block]` command-
|
||||
// line flag. Decisions to mark a plugin as disabled by setting
|
||||
// |plugin_policy| to PLUGIN_POLICY_DISABLED may be cached when
|
||||
// |top_origin_url| is NULL. To purge the plugin list cache and potentially
|
||||
// trigger new calls to this function call
|
||||
// cef_request_context_t::PurgePluginListCache.
|
||||
///
|
||||
int(CEF_CALLBACK* on_before_plugin_load)(
|
||||
struct _cef_request_context_handler_t* self,
|
||||
const cef_string_t* mime_type,
|
||||
const cef_string_t* plugin_url,
|
||||
int is_main_frame,
|
||||
const cef_string_t* top_origin_url,
|
||||
struct _cef_web_plugin_info_t* plugin_info,
|
||||
cef_plugin_policy_t* plugin_policy);
|
||||
|
||||
///
|
||||
// Called on the browser process IO thread before a resource request is
|
||||
// initiated. The |browser| and |frame| values represent the source of the
|
||||
|
|
|
@ -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 "21ac25aebdb49a8e8088c6fbee802b04fd07b501"
|
||||
#define CEF_API_HASH_UNIVERSAL "6f6a9c0f3b420cd3120cf4f5924cbc91f5095abd"
|
||||
#if defined(OS_WIN)
|
||||
#define CEF_API_HASH_PLATFORM "1d81ccb5ba2f6d658abde2faeb490c8f7f6a60fe"
|
||||
#define CEF_API_HASH_PLATFORM "5835e67ed251fec96837b475df44248a286e422f"
|
||||
#elif defined(OS_MAC)
|
||||
#define CEF_API_HASH_PLATFORM "d6bd1ab64a160962ee0306625da5dd2a0cae8b31"
|
||||
#define CEF_API_HASH_PLATFORM "b8187d9f99b028d767dfd6a40490190c25a3d901"
|
||||
#elif defined(OS_LINUX)
|
||||
#define CEF_API_HASH_PLATFORM "0b5227787444955a548b7544b2cdcda95a354506"
|
||||
#define CEF_API_HASH_PLATFORM "d7199dfd396052e1517e55f18ea75d3d61336538"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -179,15 +179,6 @@ class CefRequestContext : public virtual CefBaseRefCounted {
|
|||
/*--cef()--*/
|
||||
virtual bool ClearSchemeHandlerFactories() = 0;
|
||||
|
||||
///
|
||||
// Tells all renderer processes associated with this context to throw away
|
||||
// their plugin list cache. If |reload_pages| is true they will also reload
|
||||
// all pages with plugins. CefRequestContextHandler::OnBeforePluginLoad may
|
||||
// be called to rebuild the plugin list cache.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void PurgePluginListCache(bool reload_pages) = 0;
|
||||
|
||||
///
|
||||
// Returns true if a preference with the specified |name| exists. This method
|
||||
// must be called on the browser process UI thread.
|
||||
|
|
|
@ -63,34 +63,6 @@ class CefRequestContextHandler : public virtual CefBaseRefCounted {
|
|||
virtual void OnRequestContextInitialized(
|
||||
CefRefPtr<CefRequestContext> request_context) {}
|
||||
|
||||
///
|
||||
// Called on multiple browser process threads before a plugin instance is
|
||||
// loaded. |mime_type| is the mime type of the plugin that will be loaded.
|
||||
// |plugin_url| is the content URL that the plugin will load and may be empty.
|
||||
// |is_main_frame| will be true if the plugin is being loaded in the main
|
||||
// (top-level) frame, |top_origin_url| is the URL for the top-level frame that
|
||||
// contains the plugin when loading a specific plugin instance or empty when
|
||||
// building the initial list of enabled plugins for 'navigator.plugins'
|
||||
// JavaScript state. |plugin_info| includes additional information about the
|
||||
// plugin that will be loaded. |plugin_policy| is the recommended policy.
|
||||
// Modify |plugin_policy| and return true to change the policy. Return false
|
||||
// to use the recommended policy. The default plugin policy can be set at
|
||||
// runtime using the `--plugin-policy=[allow|detect|block]` command-line flag.
|
||||
// Decisions to mark a plugin as disabled by setting |plugin_policy| to
|
||||
// PLUGIN_POLICY_DISABLED may be cached when |top_origin_url| is empty. To
|
||||
// purge the plugin list cache and potentially trigger new calls to this
|
||||
// method call CefRequestContext::PurgePluginListCache.
|
||||
///
|
||||
/*--cef(optional_param=plugin_url,optional_param=top_origin_url)--*/
|
||||
virtual bool OnBeforePluginLoad(const CefString& mime_type,
|
||||
const CefString& plugin_url,
|
||||
bool is_main_frame,
|
||||
const CefString& top_origin_url,
|
||||
CefRefPtr<CefWebPluginInfo> plugin_info,
|
||||
PluginPolicy* plugin_policy) {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the browser process IO thread before a resource request is
|
||||
// initiated. The |browser| and |frame| values represent the source of the
|
||||
|
|
|
@ -1206,7 +1206,7 @@ bool AlloyBrowserHostImpl::TakeFocus(content::WebContents* source,
|
|||
}
|
||||
|
||||
bool AlloyBrowserHostImpl::HandleContextMenu(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
content::RenderFrameHost& render_frame_host,
|
||||
const content::ContextMenuParams& params) {
|
||||
return HandleContextMenu(web_contents(), params);
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
|||
bool proceed,
|
||||
bool* proceed_to_fire_unload) override;
|
||||
bool TakeFocus(content::WebContents* source, bool reverse) override;
|
||||
bool HandleContextMenu(content::RenderFrameHost* render_frame_host,
|
||||
bool HandleContextMenu(content::RenderFrameHost& render_frame_host,
|
||||
const content::ContextMenuParams& params) override;
|
||||
content::KeyboardEventProcessingResult PreHandleKeyboardEvent(
|
||||
content::WebContents* source,
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "libcef/browser/net_service/login_delegate.h"
|
||||
#include "libcef/browser/net_service/proxy_url_loader_factory.h"
|
||||
#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/print_view_manager.h"
|
||||
#include "libcef/browser/speech_recognition_manager_delegate.h"
|
||||
|
@ -469,13 +468,9 @@ base::FilePath GetRootCachePath() {
|
|||
|
||||
} // namespace
|
||||
|
||||
AlloyContentBrowserClient::AlloyContentBrowserClient() {
|
||||
plugin_service_filter_.reset(new CefPluginServiceFilter);
|
||||
content::PluginServiceImpl::GetInstance()->SetFilter(
|
||||
plugin_service_filter_.get());
|
||||
}
|
||||
AlloyContentBrowserClient::AlloyContentBrowserClient() = default;
|
||||
|
||||
AlloyContentBrowserClient::~AlloyContentBrowserClient() {}
|
||||
AlloyContentBrowserClient::~AlloyContentBrowserClient() = default;
|
||||
|
||||
std::unique_ptr<content::BrowserMainParts>
|
||||
AlloyContentBrowserClient::CreateBrowserMainParts(
|
||||
|
|
|
@ -22,7 +22,6 @@ class AlloyBrowserMainParts;
|
|||
class CefDevToolsDelegate;
|
||||
|
||||
namespace content {
|
||||
class PluginServiceFilter;
|
||||
class SiteInstance;
|
||||
} // namespace content
|
||||
|
||||
|
@ -236,8 +235,6 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
|||
content::SiteInstance* site_instance);
|
||||
|
||||
AlloyBrowserMainParts* browser_main_parts_ = nullptr;
|
||||
|
||||
std::unique_ptr<content::PluginServiceFilter> plugin_service_filter_;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_ALLOY_ALLOY_CONTENT_BROWSER_CLIENT_H_
|
||||
|
|
|
@ -285,7 +285,7 @@ void CefBrowserContentsDelegate::RenderViewReady() {
|
|||
}
|
||||
}
|
||||
|
||||
void CefBrowserContentsDelegate::RenderProcessGone(
|
||||
void CefBrowserContentsDelegate::PrimaryMainFrameRenderProcessGone(
|
||||
base::TerminationStatus status) {
|
||||
cef_termination_status_t ts = TS_ABNORMAL_TERMINATION;
|
||||
if (status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED)
|
||||
|
|
|
@ -114,7 +114,8 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate,
|
|||
content::RenderFrameHost::LifecycleState new_state) override;
|
||||
void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
|
||||
void RenderViewReady() override;
|
||||
void RenderProcessGone(base::TerminationStatus status) override;
|
||||
void PrimaryMainFrameRenderProcessGone(
|
||||
base::TerminationStatus status) override;
|
||||
void OnFrameFocused(content::RenderFrameHost* render_frame_host) override;
|
||||
void DocumentAvailableInMainFrame(
|
||||
content::RenderFrameHost* render_frame_host) override;
|
||||
|
|
|
@ -314,10 +314,6 @@ void CefBrowserContext::OnRenderFrameDeleted(
|
|||
CEF_POST_TASK(CEF_IOT, base::BindOnce(&CefIOThreadState::RemoveHandler,
|
||||
iothread_state_, global_id));
|
||||
}
|
||||
|
||||
if (is_main_frame) {
|
||||
ClearPluginLoadDecision(global_id.child_id);
|
||||
}
|
||||
}
|
||||
|
||||
CefRefPtr<CefRequestContextHandler> CefBrowserContext::GetHandler(
|
||||
|
@ -349,58 +345,6 @@ bool CefBrowserContext::IsAssociatedContext(
|
|||
return false;
|
||||
}
|
||||
|
||||
void CefBrowserContext::AddPluginLoadDecision(
|
||||
int render_process_id,
|
||||
const base::FilePath& plugin_path,
|
||||
bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
chrome::mojom::PluginStatus status) {
|
||||
CEF_REQUIRE_UIT();
|
||||
DCHECK_GE(render_process_id, 0);
|
||||
DCHECK(!plugin_path.empty());
|
||||
|
||||
plugin_load_decision_map_.insert(std::make_pair(
|
||||
std::make_pair(std::make_pair(render_process_id, plugin_path),
|
||||
std::make_pair(is_main_frame, main_frame_origin)),
|
||||
status));
|
||||
}
|
||||
|
||||
bool CefBrowserContext::HasPluginLoadDecision(
|
||||
int render_process_id,
|
||||
const base::FilePath& plugin_path,
|
||||
bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
chrome::mojom::PluginStatus* status) const {
|
||||
CEF_REQUIRE_UIT();
|
||||
DCHECK(frame_util::IsValidChildId(render_process_id));
|
||||
DCHECK(!plugin_path.empty());
|
||||
|
||||
PluginLoadDecisionMap::const_iterator it = plugin_load_decision_map_.find(
|
||||
std::make_pair(std::make_pair(render_process_id, plugin_path),
|
||||
std::make_pair(is_main_frame, main_frame_origin)));
|
||||
if (it == plugin_load_decision_map_.end())
|
||||
return false;
|
||||
|
||||
*status = it->second;
|
||||
return true;
|
||||
}
|
||||
|
||||
void CefBrowserContext::ClearPluginLoadDecision(int render_process_id) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
if (!frame_util::IsValidChildId(render_process_id)) {
|
||||
plugin_load_decision_map_.clear();
|
||||
} else {
|
||||
PluginLoadDecisionMap::iterator it = plugin_load_decision_map_.begin();
|
||||
while (it != plugin_load_decision_map_.end()) {
|
||||
if (it->first.first.first == render_process_id)
|
||||
it = plugin_load_decision_map_.erase(it);
|
||||
else
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserContext::RegisterSchemeHandlerFactory(
|
||||
const CefString& scheme_name,
|
||||
const CefString& domain_name,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "base/callback.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/sequenced_task_runner_helpers.h"
|
||||
#include "base/task/sequenced_task_runner_helpers.h"
|
||||
#include "chrome/common/plugin.mojom.h"
|
||||
#include "services/network/public/mojom/network_context.mojom.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
|
@ -153,24 +153,6 @@ class CefBrowserContext {
|
|||
bool IsAssociatedContext(const content::GlobalRenderFrameHostId& global_id,
|
||||
bool require_frame_match) const;
|
||||
|
||||
// Remember the plugin load decision for plugin status requests that arrive
|
||||
// via CefPluginServiceFilter::IsPluginAvailable.
|
||||
void AddPluginLoadDecision(int render_process_id,
|
||||
const base::FilePath& plugin_path,
|
||||
bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
chrome::mojom::PluginStatus status);
|
||||
bool HasPluginLoadDecision(int render_process_id,
|
||||
const base::FilePath& plugin_path,
|
||||
bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
chrome::mojom::PluginStatus* status) const;
|
||||
|
||||
// Clear the plugin load decisions associated with |render_process_id|, or all
|
||||
// plugin load decisions if |render_process_id| is
|
||||
// content::ChildProcessHost::kInvalidUniqueID.
|
||||
void ClearPluginLoadDecision(int render_process_id);
|
||||
|
||||
// Called from CefRequestContextImpl methods of the same name.
|
||||
void RegisterSchemeHandlerFactory(const CefString& scheme_name,
|
||||
const CefString& domain_name,
|
||||
|
@ -243,14 +225,6 @@ class CefBrowserContext {
|
|||
// Map IDs to CefRequestContextHandler objects.
|
||||
CefRequestContextHandlerMap handler_map_;
|
||||
|
||||
// Map (render_process_id, plugin_path, is_main_frame, main_frame_origin) to
|
||||
// plugin load decision.
|
||||
typedef std::map<
|
||||
std::pair<std::pair<int, base::FilePath>, std::pair<bool, url::Origin>>,
|
||||
chrome::mojom::PluginStatus>
|
||||
PluginLoadDecisionMap;
|
||||
PluginLoadDecisionMap plugin_load_decision_map_;
|
||||
|
||||
// Set of global IDs associated with this context.
|
||||
typedef std::set<content::GlobalRenderFrameHostId> RenderIdSet;
|
||||
RenderIdSet render_id_set_;
|
||||
|
|
|
@ -8,14 +8,15 @@
|
|||
|
||||
#include "include/cef_client.h"
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "libcef/browser/browser_info.h"
|
||||
|
||||
#include "base/sequenced_task_runner.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "cef/libcef/common/mojom/cef.mojom.h"
|
||||
#include "content/public/browser/global_routing_id.h"
|
||||
#include "content/public/browser/render_process_host_observer.h"
|
||||
|
@ -123,7 +124,7 @@ class CefBrowserInfoManager : public content::RenderProcessHostObserver {
|
|||
bool* is_guest_view = nullptr);
|
||||
|
||||
// Returns all existing CefBrowserInfo objects.
|
||||
typedef std::list<scoped_refptr<CefBrowserInfo>> BrowserInfoList;
|
||||
using BrowserInfoList = std::list<scoped_refptr<CefBrowserInfo>>;
|
||||
BrowserInfoList GetBrowserInfoList();
|
||||
|
||||
// Returns true if the navigation should be allowed to proceed, or false if
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "libcef/browser/request_context_impl.h"
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "chrome/browser/chrome_browser_main_extra_parts.h"
|
||||
|
||||
// Wrapper that owns and initialize the browser memory-related extra parts.
|
||||
|
|
|
@ -329,7 +329,8 @@ void CefDevToolsFrontend::ReadyToCommitNavigation(
|
|||
return;
|
||||
}
|
||||
|
||||
std::string origin = navigation_handle->GetURL().GetOrigin().spec();
|
||||
std::string origin =
|
||||
navigation_handle->GetURL().DeprecatedGetOriginAsURL().spec();
|
||||
auto it = extensions_api_.find(origin);
|
||||
if (it == extensions_api_.end())
|
||||
return;
|
||||
|
|
|
@ -618,11 +618,6 @@ void CefExtensionSystem::UnloadExtension(const std::string& extension_id,
|
|||
registry_->RemoveEnabled(extension->id());
|
||||
NotifyExtensionUnloaded(extension.get(), reason);
|
||||
}
|
||||
|
||||
content::NotificationService::current()->Notify(
|
||||
extensions::NOTIFICATION_EXTENSION_REMOVED,
|
||||
content::Source<content::BrowserContext>(browser_context_),
|
||||
content::Details<const Extension>(extension.get()));
|
||||
}
|
||||
|
||||
// Implementation based on ExtensionService::NotifyExtensionLoaded.
|
||||
|
|
|
@ -63,13 +63,14 @@ void CefMimeHandlerViewGuestDelegate::OnGuestDetached() {
|
|||
}
|
||||
|
||||
bool CefMimeHandlerViewGuestDelegate::HandleContextMenu(
|
||||
content::WebContents* web_contents,
|
||||
content::RenderFrameHost& render_frame_host,
|
||||
const content::ContextMenuParams& params) {
|
||||
CefRefPtr<AlloyBrowserHostImpl> owner_browser =
|
||||
AlloyBrowserHostImpl::GetBrowserForContents(owner_web_contents_);
|
||||
DCHECK(owner_browser);
|
||||
|
||||
return owner_browser->HandleContextMenu(web_contents, params);
|
||||
return owner_browser->HandleContextMenu(
|
||||
content::WebContents::FromRenderFrameHost(&render_frame_host), params);
|
||||
}
|
||||
|
||||
} // namespace extensions
|
||||
|
|
|
@ -25,7 +25,7 @@ class CefMimeHandlerViewGuestDelegate : public MimeHandlerViewGuestDelegate {
|
|||
content::WebContents::CreateParams* params) override;
|
||||
void OnGuestAttached() override;
|
||||
void OnGuestDetached() override;
|
||||
bool HandleContextMenu(content::WebContents* web_contents,
|
||||
bool HandleContextMenu(content::RenderFrameHost& render_frame_host,
|
||||
const content::ContextMenuParams& params) override;
|
||||
|
||||
private:
|
||||
|
|
|
@ -75,7 +75,6 @@ const char kChromeUIWebUIHostsHost[] = "webui-hosts";
|
|||
// additional changes. Do not add new hosts to this list without also manually
|
||||
// testing all related functionality in CEF.
|
||||
const char* kAllowedWebUIHosts[] = {
|
||||
content::kChromeUIAppCacheInternalsHost,
|
||||
chrome::kChromeUIAccessibilityHost,
|
||||
content::kChromeUIBlobInternalsHost,
|
||||
chrome::kChromeUIChromeURLsHost,
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/sequenced_task_runner.h"
|
||||
#include "base/sequenced_task_runner_helpers.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/task/sequenced_task_runner_helpers.h"
|
||||
#include "services/network/public/mojom/url_loader_factory.mojom.h"
|
||||
|
||||
namespace content {
|
||||
|
|
|
@ -159,20 +159,6 @@ gfx::Rect GetViewBounds(AlloyBrowserHostImpl* browser) {
|
|||
return gfx::Rect(rc.x, rc.y, rc.width, rc.height);
|
||||
}
|
||||
|
||||
float GetDeviceScaleFactor(AlloyBrowserHostImpl* browser) {
|
||||
if (!browser)
|
||||
return kDefaultScaleFactor;
|
||||
|
||||
CefScreenInfo screen_info(kDefaultScaleFactor, 0, 0, false, CefRect(),
|
||||
CefRect());
|
||||
CefRefPtr<CefRenderHandler> handler = browser->client()->GetRenderHandler();
|
||||
CHECK(handler);
|
||||
if (!handler->GetScreenInfo(browser, screen_info))
|
||||
return kDefaultScaleFactor;
|
||||
|
||||
return screen_info.device_scale_factor;
|
||||
}
|
||||
|
||||
ui::ImeTextSpan::UnderlineStyle GetImeUnderlineStyle(
|
||||
cef_composition_underline_style_t style) {
|
||||
switch (style) {
|
||||
|
@ -210,8 +196,6 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
|||
DCHECK(render_widget_host_);
|
||||
DCHECK(!render_widget_host_->GetView());
|
||||
|
||||
SetCurrentDeviceScaleFactor(kDefaultScaleFactor);
|
||||
|
||||
if (parent_host_view_) {
|
||||
browser_impl_ = parent_host_view_->browser_impl();
|
||||
DCHECK(browser_impl_);
|
||||
|
@ -671,7 +655,7 @@ void CefRenderWidgetHostViewOSR::UpdateTooltipUnderCursor(
|
|||
|
||||
gfx::Size CefRenderWidgetHostViewOSR::GetCompositorViewportPixelSize() {
|
||||
return gfx::ScaleToCeiledSize(GetRequestedRendererSize(),
|
||||
GetCurrentDeviceScaleFactor());
|
||||
GetDeviceScaleFactor());
|
||||
}
|
||||
|
||||
uint32_t CefRenderWidgetHostViewOSR::GetCaptureSequenceNumber() const {
|
||||
|
@ -688,45 +672,42 @@ void CefRenderWidgetHostViewOSR::CopyFromSurface(
|
|||
}
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::GetScreenInfo(display::ScreenInfo* results) {
|
||||
if (!browser_impl_.get())
|
||||
return;
|
||||
display::ScreenInfos CefRenderWidgetHostViewOSR::GetNewScreenInfosForUpdate() {
|
||||
display::ScreenInfo display_screen_info;
|
||||
|
||||
CefScreenInfo screen_info(kDefaultScaleFactor, 0, 0, false, CefRect(),
|
||||
CefRect());
|
||||
if (browser_impl_) {
|
||||
CefScreenInfo screen_info(kDefaultScaleFactor, 0, 0, false, CefRect(),
|
||||
CefRect());
|
||||
|
||||
CefRefPtr<CefRenderHandler> handler =
|
||||
browser_impl_->client()->GetRenderHandler();
|
||||
CHECK(handler);
|
||||
if (!handler->GetScreenInfo(browser_impl_.get(), screen_info) ||
|
||||
screen_info.rect.width == 0 || screen_info.rect.height == 0 ||
|
||||
screen_info.available_rect.width == 0 ||
|
||||
screen_info.available_rect.height == 0) {
|
||||
// If a screen rectangle was not provided, try using the view rectangle
|
||||
// instead. Otherwise, popup views may be drawn incorrectly, or not at
|
||||
// all.
|
||||
CefRect screenRect;
|
||||
handler->GetViewRect(browser_impl_.get(), screenRect);
|
||||
CHECK_GT(screenRect.width, 0);
|
||||
CHECK_GT(screenRect.height, 0);
|
||||
|
||||
if (screen_info.rect.width == 0 || screen_info.rect.height == 0) {
|
||||
screen_info.rect = screenRect;
|
||||
}
|
||||
|
||||
if (screen_info.available_rect.width == 0 ||
|
||||
CefRefPtr<CefRenderHandler> handler =
|
||||
browser_impl_->client()->GetRenderHandler();
|
||||
CHECK(handler);
|
||||
if (!handler->GetScreenInfo(browser_impl_.get(), screen_info) ||
|
||||
screen_info.rect.width == 0 || screen_info.rect.height == 0 ||
|
||||
screen_info.available_rect.width == 0 ||
|
||||
screen_info.available_rect.height == 0) {
|
||||
screen_info.available_rect = screenRect;
|
||||
// If a screen rectangle was not provided, try using the view rectangle
|
||||
// instead. Otherwise, popup views may be drawn incorrectly, or not at
|
||||
// all.
|
||||
CefRect screenRect;
|
||||
handler->GetViewRect(browser_impl_.get(), screenRect);
|
||||
CHECK_GT(screenRect.width, 0);
|
||||
CHECK_GT(screenRect.height, 0);
|
||||
|
||||
if (screen_info.rect.width == 0 || screen_info.rect.height == 0) {
|
||||
screen_info.rect = screenRect;
|
||||
}
|
||||
|
||||
if (screen_info.available_rect.width == 0 ||
|
||||
screen_info.available_rect.height == 0) {
|
||||
screen_info.available_rect = screenRect;
|
||||
}
|
||||
}
|
||||
|
||||
display_screen_info = ScreenInfoFrom(screen_info);
|
||||
}
|
||||
|
||||
*results = ScreenInfoFrom(screen_info);
|
||||
}
|
||||
|
||||
display::ScreenInfos CefRenderWidgetHostViewOSR::GetScreenInfos() {
|
||||
display::ScreenInfo screen_info;
|
||||
GetScreenInfo(&screen_info);
|
||||
return display::ScreenInfos(screen_info);
|
||||
return display::ScreenInfos(display_screen_info);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::TransformPointToRootSurface(
|
||||
|
@ -1311,7 +1292,7 @@ bool CefRenderWidgetHostViewOSR::ShouldRouteEvents() const {
|
|||
// Do not route events that are currently targeted to page popups such as
|
||||
// <select> element drop-downs, since these cannot contain cross-process
|
||||
// frames.
|
||||
if (!render_widget_host_->delegate()->IsWidgetForMainFrame(
|
||||
if (!render_widget_host_->delegate()->IsWidgetForPrimaryMainFrame(
|
||||
render_widget_host_)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1401,8 +1382,7 @@ void CefRenderWidgetHostViewOSR::UpdateFrameRate() {
|
|||
SetFrameRate();
|
||||
|
||||
if (video_consumer_) {
|
||||
video_consumer_->SetFrameRate(
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
video_consumer_->SetFrameRate(base::Microseconds(frame_rate_threshold_us_));
|
||||
}
|
||||
|
||||
// Notify the guest hosts if any.
|
||||
|
@ -1411,8 +1391,7 @@ void CefRenderWidgetHostViewOSR::UpdateFrameRate() {
|
|||
}
|
||||
|
||||
gfx::Size CefRenderWidgetHostViewOSR::SizeInPixels() {
|
||||
return gfx::ScaleToCeiledSize(GetViewBounds().size(),
|
||||
GetCurrentDeviceScaleFactor());
|
||||
return gfx::ScaleToCeiledSize(GetViewBounds().size(), GetDeviceScaleFactor());
|
||||
}
|
||||
|
||||
#if defined(OS_MAC)
|
||||
|
@ -1493,25 +1472,26 @@ void CefRenderWidgetHostViewOSR::SetFrameRate() {
|
|||
|
||||
if (compositor_) {
|
||||
compositor_->SetDisplayVSyncParameters(
|
||||
base::TimeTicks::Now(),
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
base::TimeTicks::Now(), base::Microseconds(frame_rate_threshold_us_));
|
||||
}
|
||||
|
||||
if (video_consumer_) {
|
||||
video_consumer_->SetFrameRate(
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
video_consumer_->SetFrameRate(base::Microseconds(frame_rate_threshold_us_));
|
||||
}
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::SetDeviceScaleFactor() {
|
||||
bool CefRenderWidgetHostViewOSR::SetScreenInfo() {
|
||||
// This method should not be called while the resize hold is active.
|
||||
DCHECK(!hold_resize_);
|
||||
|
||||
const float new_scale_factor = ::GetDeviceScaleFactor(browser_impl_.get());
|
||||
if (new_scale_factor == GetCurrentDeviceScaleFactor())
|
||||
return false;
|
||||
display::ScreenInfo current_info = screen_infos_.current();
|
||||
|
||||
SetCurrentDeviceScaleFactor(new_scale_factor);
|
||||
// This will result in a call to GetNewScreenInfosForUpdate().
|
||||
UpdateScreenInfo();
|
||||
if (screen_infos_.current() == current_info) {
|
||||
// Nothing changed.
|
||||
return false;
|
||||
}
|
||||
|
||||
// Notify the guest hosts if any.
|
||||
for (auto guest_host_view : guest_host_views_) {
|
||||
|
@ -1521,22 +1501,13 @@ bool CefRenderWidgetHostViewOSR::SetDeviceScaleFactor() {
|
|||
auto guest_view_osr =
|
||||
static_cast<CefRenderWidgetHostViewOSR*>(rwhi->GetView());
|
||||
if (guest_view_osr) {
|
||||
guest_view_osr->SetCurrentDeviceScaleFactor(new_scale_factor);
|
||||
guest_view_osr->SetScreenInfo();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SetCurrentDeviceScaleFactor(float scale) {
|
||||
// Initialize a display struct as needed, to cache the scale factor.
|
||||
if (screen_infos_.screen_infos.empty()) {
|
||||
screen_infos_ = display::ScreenInfos(display::ScreenInfo());
|
||||
}
|
||||
screen_infos_.mutable_current().device_scale_factor = scale;
|
||||
UpdateScreenInfo();
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::SetViewBounds() {
|
||||
// This method should not be called while the resize hold is active.
|
||||
DCHECK(!hold_resize_);
|
||||
|
@ -1554,9 +1525,9 @@ bool CefRenderWidgetHostViewOSR::SetViewBounds() {
|
|||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::SetRootLayerSize(bool force) {
|
||||
const bool scale_factor_changed = SetDeviceScaleFactor();
|
||||
const bool screen_info_changed = SetScreenInfo();
|
||||
const bool view_bounds_changed = SetViewBounds();
|
||||
if (!force && !scale_factor_changed && !view_bounds_changed)
|
||||
if (!force && !screen_info_changed && !view_bounds_changed)
|
||||
return false;
|
||||
|
||||
GetRootLayer()->SetBounds(gfx::Rect(GetViewBounds().size()));
|
||||
|
@ -1564,11 +1535,11 @@ bool CefRenderWidgetHostViewOSR::SetRootLayerSize(bool force) {
|
|||
if (compositor_) {
|
||||
compositor_local_surface_id_allocator_.GenerateId();
|
||||
compositor_->SetScaleAndSize(
|
||||
GetCurrentDeviceScaleFactor(), SizeInPixels(),
|
||||
GetDeviceScaleFactor(), SizeInPixels(),
|
||||
compositor_local_surface_id_allocator_.GetCurrentLocalSurfaceId());
|
||||
}
|
||||
|
||||
return (scale_factor_changed || view_bounds_changed);
|
||||
return (screen_info_changed || view_bounds_changed);
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::ResizeRootLayer() {
|
||||
|
|
|
@ -158,8 +158,7 @@ class CefRenderWidgetHostViewOSR
|
|||
const gfx::Rect& src_rect,
|
||||
const gfx::Size& output_size,
|
||||
base::OnceCallback<void(const SkBitmap&)> callback) override;
|
||||
void GetScreenInfo(display::ScreenInfo* results) override;
|
||||
display::ScreenInfos GetScreenInfos() override;
|
||||
display::ScreenInfos GetNewScreenInfosForUpdate() override;
|
||||
void TransformPointToRootSurface(gfx::PointF* point) override;
|
||||
gfx::Rect GetBoundsInRootWindow() override;
|
||||
|
||||
|
@ -283,8 +282,7 @@ class CefRenderWidgetHostViewOSR
|
|||
|
||||
private:
|
||||
void SetFrameRate();
|
||||
bool SetDeviceScaleFactor();
|
||||
void SetCurrentDeviceScaleFactor(float scale);
|
||||
bool SetScreenInfo();
|
||||
bool SetViewBounds();
|
||||
bool SetRootLayerSize(bool force);
|
||||
|
||||
|
|
|
@ -140,6 +140,8 @@ void CefWebContentsViewOSR::RenderViewHostChanged(
|
|||
|
||||
void CefWebContentsViewOSR::SetOverscrollControllerEnabled(bool enabled) {}
|
||||
|
||||
void CefWebContentsViewOSR::OnCapturerCountChanged() {}
|
||||
|
||||
#if defined(OS_MAC)
|
||||
bool CefWebContentsViewOSR::CloseTabAfterEventTrackingIfNeeded() {
|
||||
return false;
|
||||
|
|
|
@ -55,6 +55,7 @@ class CefWebContentsViewOSR : public content::WebContentsView,
|
|||
void RenderViewHostChanged(content::RenderViewHost* old_host,
|
||||
content::RenderViewHost* new_host) override;
|
||||
void SetOverscrollControllerEnabled(bool enabled) override;
|
||||
void OnCapturerCountChanged() override;
|
||||
|
||||
#if defined(OS_MAC)
|
||||
bool CloseTabAfterEventTrackingIfNeeded() override;
|
||||
|
|
|
@ -1,163 +0,0 @@
|
|||
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that can
|
||||
// be found in the LICENSE file.
|
||||
|
||||
#include "libcef/browser/plugins/plugin_service_filter.h"
|
||||
|
||||
#include "include/cef_request_context_handler.h"
|
||||
#include "libcef/browser/browser_context.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
#include "libcef/browser/web_plugin_impl.h"
|
||||
#include "libcef/common/alloy/alloy_content_client.h"
|
||||
#include "libcef/common/frame_util.h"
|
||||
|
||||
#include "extensions/common/constants.h"
|
||||
|
||||
CefPluginServiceFilter::CefPluginServiceFilter() {}
|
||||
|
||||
bool CefPluginServiceFilter::IsPluginAvailable(
|
||||
int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
content::WebPluginInfo* plugin) {
|
||||
CEF_REQUIRE_UIT();
|
||||
DCHECK_GT(render_process_id, 0);
|
||||
|
||||
chrome::mojom::PluginStatus status = chrome::mojom::PluginStatus::kAllowed;
|
||||
|
||||
// Perform origin check here because we're passing an empty origin value to
|
||||
// IsPluginAvailable() below.
|
||||
const GURL& policy_url = main_frame_origin.GetURL();
|
||||
if (!policy_url.is_empty() &&
|
||||
policy_url.scheme() == extensions::kExtensionScheme) {
|
||||
// Always allow extension origins to load plugins.
|
||||
// TODO(extensions): Revisit this decision once CEF supports more than just
|
||||
// the PDF extension.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Blink requires this method to return a consistent value during renderer
|
||||
// process initialization and page load, so we always call IsPluginAvailable()
|
||||
// with an empty origin. If we return false then the plugin will not be listed
|
||||
// in navigator.plugins and navigating to the plugin mime type will trigger
|
||||
// the download code path. If we return true then individual plugin instance
|
||||
// loads will be evaluated in
|
||||
// AlloyContentRendererClient::OverrideCreatePlugin, which will result in a
|
||||
// call to CefPluginInfoMessageFilter::PluginsLoaded to retrieve the actual
|
||||
// load decision with a non-empty origin. That will determine whether the
|
||||
// plugin load is allowed or the plugin placeholder is displayed.
|
||||
return IsPluginAvailable(render_process_id, render_frame_id, url,
|
||||
is_main_frame, url::Origin(), plugin, &status);
|
||||
}
|
||||
|
||||
bool CefPluginServiceFilter::CanLoadPlugin(int render_process_id,
|
||||
const base::FilePath& path) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefPluginServiceFilter::IsPluginAvailable(
|
||||
int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
content::WebPluginInfo* plugin,
|
||||
chrome::mojom::PluginStatus* status) {
|
||||
CEF_REQUIRE_UIT();
|
||||
DCHECK_GT(render_process_id, 0);
|
||||
|
||||
if (*status == chrome::mojom::PluginStatus::kNotFound) {
|
||||
// The plugin does not exist so no need to query the handler.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (plugin->path == CefString(AlloyContentClient::kPDFPluginPath)) {
|
||||
// Always allow the internal PDF plugin to load.
|
||||
*status = chrome::mojom::PluginStatus::kAllowed;
|
||||
return true;
|
||||
}
|
||||
|
||||
const GURL& policy_url = main_frame_origin.GetURL();
|
||||
if (!policy_url.is_empty() &&
|
||||
policy_url.scheme() == extensions::kExtensionScheme) {
|
||||
// Always allow extension origins to load plugins.
|
||||
// TODO(extensions): Revisit this decision once CEF supports more than just
|
||||
// the PDF extension.
|
||||
*status = chrome::mojom::PluginStatus::kAllowed;
|
||||
return true;
|
||||
}
|
||||
|
||||
const auto global_id = frame_util::MakeGlobalId(
|
||||
render_process_id, render_frame_id, /*allow_invalid_frame_id=*/true);
|
||||
auto browser_context = CefBrowserContext::FromGlobalId(global_id, false);
|
||||
CefRefPtr<CefRequestContextHandler> handler;
|
||||
if (browser_context) {
|
||||
handler = browser_context->GetHandler(global_id, false);
|
||||
}
|
||||
|
||||
if (!handler) {
|
||||
// No handler so go with the default plugin load decision.
|
||||
return *status != chrome::mojom::PluginStatus::kDisabled;
|
||||
}
|
||||
|
||||
// Check for a cached plugin load decision.
|
||||
if (browser_context->HasPluginLoadDecision(render_process_id, plugin->path,
|
||||
is_main_frame, main_frame_origin,
|
||||
status)) {
|
||||
return *status != chrome::mojom::PluginStatus::kDisabled;
|
||||
}
|
||||
|
||||
CefRefPtr<CefWebPluginInfoImpl> pluginInfo(new CefWebPluginInfoImpl(*plugin));
|
||||
|
||||
cef_plugin_policy_t plugin_policy = PLUGIN_POLICY_ALLOW;
|
||||
switch (*status) {
|
||||
case chrome::mojom::PluginStatus::kAllowed:
|
||||
plugin_policy = PLUGIN_POLICY_ALLOW;
|
||||
break;
|
||||
case chrome::mojom::PluginStatus::kBlocked:
|
||||
case chrome::mojom::PluginStatus::kBlockedByPolicy:
|
||||
case chrome::mojom::PluginStatus::kOutdatedBlocked:
|
||||
case chrome::mojom::PluginStatus::kOutdatedDisallowed:
|
||||
case chrome::mojom::PluginStatus::kUnauthorized:
|
||||
plugin_policy = PLUGIN_POLICY_BLOCK;
|
||||
break;
|
||||
case chrome::mojom::PluginStatus::kDisabled:
|
||||
plugin_policy = PLUGIN_POLICY_DISABLE;
|
||||
break;
|
||||
case chrome::mojom::PluginStatus::kPlayImportantContent:
|
||||
plugin_policy = PLUGIN_POLICY_DETECT_IMPORTANT;
|
||||
break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
break;
|
||||
}
|
||||
|
||||
if (handler->OnBeforePluginLoad(plugin->mime_types[0].mime_type,
|
||||
url.possibly_invalid_spec(), is_main_frame,
|
||||
policy_url.possibly_invalid_spec(),
|
||||
pluginInfo.get(), &plugin_policy)) {
|
||||
switch (plugin_policy) {
|
||||
case PLUGIN_POLICY_ALLOW:
|
||||
*status = chrome::mojom::PluginStatus::kAllowed;
|
||||
break;
|
||||
case PLUGIN_POLICY_DETECT_IMPORTANT:
|
||||
*status = chrome::mojom::PluginStatus::kPlayImportantContent;
|
||||
break;
|
||||
case PLUGIN_POLICY_BLOCK:
|
||||
*status = chrome::mojom::PluginStatus::kBlocked;
|
||||
break;
|
||||
case PLUGIN_POLICY_DISABLE:
|
||||
*status = chrome::mojom::PluginStatus::kDisabled;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Cache the plugin load decision.
|
||||
browser_context->AddPluginLoadDecision(render_process_id, plugin->path,
|
||||
is_main_frame, main_frame_origin,
|
||||
*status);
|
||||
|
||||
return *status != chrome::mojom::PluginStatus::kDisabled;
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
// Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that can
|
||||
// be found in the LICENSE file.
|
||||
|
||||
#ifndef CEF_LIBCEF_BROWSER_PLUGINS_PLUGIN_SERVICE_FILTER_H_
|
||||
#define CEF_LIBCEF_BROWSER_PLUGINS_PLUGIN_SERVICE_FILTER_H_
|
||||
|
||||
#include "chrome/common/plugin.mojom.h"
|
||||
#include "content/public/browser/plugin_service_filter.h"
|
||||
|
||||
#include "include/internal/cef_types.h"
|
||||
|
||||
#include "base/macros.h"
|
||||
|
||||
namespace content {
|
||||
class ResourceContext;
|
||||
}
|
||||
|
||||
class CefPluginServiceFilter : public content::PluginServiceFilter {
|
||||
public:
|
||||
CefPluginServiceFilter();
|
||||
|
||||
// Called whenever the plugin list is queried. For example, when choosing the
|
||||
// plugin to handle a mime type or when determining the plugins that will be
|
||||
// exposed to JavaScript via 'navigator.plugins'.
|
||||
bool IsPluginAvailable(int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
content::WebPluginInfo* plugin) override;
|
||||
|
||||
bool CanLoadPlugin(int render_process_id,
|
||||
const base::FilePath& path) override;
|
||||
|
||||
// Called from the above IsPluginAvailable method and from
|
||||
// PluginInfoHostImpl::Context::FindEnabledPlugin.
|
||||
// Returns false if the plugin is not found or disabled. May call
|
||||
// CefRequestContextHandler::OnBeforePluginLoad if possible/necessary.
|
||||
// See related discussion in issue #2015.
|
||||
bool IsPluginAvailable(int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
content::WebPluginInfo* plugin,
|
||||
chrome::mojom::PluginStatus* status);
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(CefPluginServiceFilter);
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_PLUGINS_PLUGIN_SERVICE_FILTER_H_
|
|
@ -303,6 +303,7 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
|
|||
|
||||
// Based on Profile::RegisterProfilePrefs.
|
||||
registry->RegisterBooleanPref(prefs::kSearchSuggestEnabled, false);
|
||||
registry->RegisterStringPref(prefs::kSessionExitType, std::string());
|
||||
|
||||
// Spell checking preferences.
|
||||
// Modify defaults from SpellcheckServiceFactory::RegisterProfilePrefs.
|
||||
|
|
|
@ -107,12 +107,6 @@ void CefPrefStore::CommitPendingWrite(
|
|||
std::move(synchronous_done_callback));
|
||||
}
|
||||
|
||||
void CefPrefStore::CommitPendingWriteSynchronously() {
|
||||
// This method was added for one very specific use case and is intentionally
|
||||
// not implemented for other pref stores.
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void CefPrefStore::SchedulePendingLossyWrites() {}
|
||||
|
||||
void CefPrefStore::ClearMutableValues() {
|
||||
|
|
|
@ -49,7 +49,6 @@ class CefPrefStore : public PersistentPrefStore {
|
|||
virtual void CommitPendingWrite(
|
||||
base::OnceClosure done_callback,
|
||||
base::OnceClosure synchronous_done_callback) override;
|
||||
void CommitPendingWriteSynchronously() override;
|
||||
void SchedulePendingLossyWrites() override;
|
||||
void ClearMutableValues() override;
|
||||
void OnStoreDeletionFromDisk() override;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "base/compiler_specific.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/sequenced_task_runner_helpers.h"
|
||||
#include "base/task/sequenced_task_runner_helpers.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "printing/print_dialog_gtk_interface.h"
|
||||
#include "printing/printing_context_linux.h"
|
||||
|
|
|
@ -325,9 +325,10 @@ void CefPrintViewManager::NavigationStopped() {
|
|||
PrintViewManager::NavigationStopped();
|
||||
}
|
||||
|
||||
void CefPrintViewManager::RenderProcessGone(base::TerminationStatus status) {
|
||||
void CefPrintViewManager::PrimaryMainFrameRenderProcessGone(
|
||||
base::TerminationStatus status) {
|
||||
TerminatePdfPrintJob();
|
||||
PrintViewManager::RenderProcessGone(status);
|
||||
PrintViewManager::PrimaryMainFrameRenderProcessGone(status);
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
@ -77,7 +77,8 @@ class CefPrintViewManager : public PrintViewManager,
|
|||
// content::WebContentsObserver methods:
|
||||
void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override;
|
||||
void NavigationStopped() override;
|
||||
void RenderProcessGone(base::TerminationStatus status) override;
|
||||
void PrimaryMainFrameRenderProcessGone(
|
||||
base::TerminationStatus status) override;
|
||||
|
||||
// Inline versions of the content::WebContentsUserData methods to avoid
|
||||
// ambiguous warnings due to the PrintViewManager base class also extending
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/plugin_service.h"
|
||||
#include "content/public/browser/ssl_host_state_delegate.h"
|
||||
#include "content/public/common/child_process_host.h"
|
||||
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
||||
|
@ -399,13 +398,6 @@ bool CefRequestContextImpl::ClearSchemeHandlerFactories() {
|
|||
return true;
|
||||
}
|
||||
|
||||
void CefRequestContextImpl::PurgePluginListCache(bool reload_pages) {
|
||||
GetBrowserContext(
|
||||
content::GetUIThreadTaskRunner({}),
|
||||
base::BindOnce(&CefRequestContextImpl::PurgePluginListCacheInternal, this,
|
||||
reload_pages));
|
||||
}
|
||||
|
||||
bool CefRequestContextImpl::HasPreference(const CefString& name) {
|
||||
if (!VerifyBrowserContext())
|
||||
return false;
|
||||
|
@ -705,19 +697,6 @@ void CefRequestContextImpl::EnsureBrowserContext() {
|
|||
DCHECK(browser_context());
|
||||
}
|
||||
|
||||
void CefRequestContextImpl::PurgePluginListCacheInternal(
|
||||
bool reload_pages,
|
||||
CefBrowserContext::Getter browser_context_getter) {
|
||||
auto browser_context = browser_context_getter.Run();
|
||||
if (!browser_context)
|
||||
return;
|
||||
|
||||
browser_context->ClearPluginLoadDecision(
|
||||
content::ChildProcessHost::kInvalidUniqueID);
|
||||
content::PluginService::GetInstance()->PurgePluginListCache(
|
||||
browser_context->AsBrowserContext(), false);
|
||||
}
|
||||
|
||||
void CefRequestContextImpl::ClearCertificateExceptionsInternal(
|
||||
CefRefPtr<CefCompletionCallback> callback,
|
||||
CefBrowserContext::Getter browser_context_getter) {
|
||||
|
|
|
@ -68,7 +68,6 @@ class CefRequestContextImpl : public CefRequestContext {
|
|||
const CefString& domain_name,
|
||||
CefRefPtr<CefSchemeHandlerFactory> factory) override;
|
||||
bool ClearSchemeHandlerFactories() override;
|
||||
void PurgePluginListCache(bool reload_pages) override;
|
||||
bool HasPreference(const CefString& name) override;
|
||||
CefRefPtr<CefValue> GetPreference(const CefString& name) override;
|
||||
CefRefPtr<CefDictionaryValue> GetAllPreferences(
|
||||
|
@ -144,9 +143,6 @@ class CefRequestContextImpl : public CefRequestContext {
|
|||
// Make sure the browser context exists. Only called on the UI thread.
|
||||
void EnsureBrowserContext();
|
||||
|
||||
void PurgePluginListCacheInternal(
|
||||
bool reload_pages,
|
||||
CefBrowserContext::Getter browser_context_getter);
|
||||
void ClearCertificateExceptionsInternal(
|
||||
CefRefPtr<CefCompletionCallback> callback,
|
||||
CefBrowserContext::Getter browser_context_getter);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "include/cef_server.h"
|
||||
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "net/server/http_server.h"
|
||||
|
||||
namespace base {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "chrome/browser/ui/views/frame/browser_view.h"
|
||||
#include "chrome/browser/ui/views/theme_copying_widget.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "ui/compositor/compositor.h"
|
||||
#include "ui/compositor/layer.h"
|
||||
|
||||
#if defined(USE_AURA)
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "pdf/pdf_ppapi.h"
|
||||
#include "sandbox/policy/switches.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "third_party/blink/public/common/switches.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/base/ui_base_paths.h"
|
||||
|
@ -204,7 +205,7 @@ bool AlloyMainDelegate::BasicStartupComplete(int* exit_code) {
|
|||
|
||||
if (settings_->javascript_flags.length > 0) {
|
||||
command_line->AppendSwitchASCII(
|
||||
switches::kJavaScriptFlags,
|
||||
blink::switches::kJavaScriptFlags,
|
||||
CefString(&settings_->javascript_flags).ToString());
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "components/embedder_support/switches.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "sandbox/policy/switches.h"
|
||||
#include "third_party/blink/public/common/switches.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
|
||||
#if defined(OS_MAC)
|
||||
|
@ -100,7 +101,7 @@ bool ChromeMainDelegateCef::BasicStartupComplete(int* exit_code) {
|
|||
|
||||
if (settings_->javascript_flags.length > 0) {
|
||||
command_line->AppendSwitchASCII(
|
||||
switches::kJavaScriptFlags,
|
||||
blink::switches::kJavaScriptFlags,
|
||||
CefString(&settings_->javascript_flags).ToString());
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ bool CefParseURL(const CefString& url, CefURLParts& parts) {
|
|||
CefString(&parts.username).FromString(gurl.username());
|
||||
CefString(&parts.password).FromString(gurl.password());
|
||||
CefString(&parts.host).FromString(gurl.host());
|
||||
CefString(&parts.origin).FromString(gurl.GetOrigin().spec());
|
||||
CefString(&parts.origin).FromString(gurl.DeprecatedGetOriginAsURL().spec());
|
||||
CefString(&parts.port).FromString(gurl.port());
|
||||
CefString(&parts.path).FromString(gurl.path());
|
||||
CefString(&parts.query).FromString(gurl.query());
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "include/cef_task.h"
|
||||
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
|
||||
class CefTaskRunnerImpl : public CefTaskRunner {
|
||||
public:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define CEF_LIBCEF_COMMON_TASK_RUNNER_MANAGER_H_
|
||||
#pragma once
|
||||
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
|
||||
// Exposes global sequenced task runners in the main and render processes.
|
||||
// Prefer using base::ThreadPool for tasks that do not need to be globally
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
#include "libcef/renderer/browser_impl.h"
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/task/current_thread.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "chrome/common/plugin.mojom.h"
|
||||
#include "chrome/renderer/media/chrome_key_systems_provider.h"
|
||||
#include "content/public/renderer/content_renderer_client.h"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "chrome/renderer/chrome_content_renderer_client.h"
|
||||
|
||||
class CefRenderManager;
|
||||
|
|
|
@ -12,10 +12,12 @@
|
|||
#include "base/strings/string_util.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/extensions/extension_constants.h"
|
||||
#include "chrome/common/pdf_util.h"
|
||||
#include "chrome/common/url_constants.h"
|
||||
#include "content/public/renderer/render_frame.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/renderer/guest_view/mime_handler_view/post_message_support.h"
|
||||
#include "pdf/pdf_features.h"
|
||||
#include "services/service_manager/public/cpp/interface_provider.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
|
@ -27,17 +29,14 @@ CefPrintRenderFrameHelperDelegate::CefPrintRenderFrameHelperDelegate(
|
|||
bool is_windowless)
|
||||
: is_windowless_(is_windowless) {}
|
||||
|
||||
CefPrintRenderFrameHelperDelegate::~CefPrintRenderFrameHelperDelegate() {}
|
||||
CefPrintRenderFrameHelperDelegate::~CefPrintRenderFrameHelperDelegate() =
|
||||
default;
|
||||
|
||||
// Return the PDF object element if |frame| is the out of process PDF extension.
|
||||
blink::WebElement CefPrintRenderFrameHelperDelegate::GetPdfElement(
|
||||
blink::WebLocalFrame* frame) {
|
||||
GURL url = frame->GetDocument().Url();
|
||||
bool inside_print_preview = url.GetOrigin() == chrome::kChromeUIPrintURL;
|
||||
bool inside_pdf_extension =
|
||||
url.SchemeIs(extensions::kExtensionScheme) &&
|
||||
url.host_piece() == extension_misc::kPdfExtensionId;
|
||||
if (inside_print_preview || inside_pdf_extension) {
|
||||
if (IsPdfInternalPluginAllowedOrigin(frame->GetSecurityOrigin())) {
|
||||
DCHECK(!base::FeatureList::IsEnabled(chrome_pdf::features::kPdfUnseasoned));
|
||||
// <object> with id="plugin" is created in
|
||||
// chrome/browser/resources/pdf/pdf_viewer_base.js.
|
||||
auto viewer_element = frame->GetDocument().GetElementById("viewer");
|
||||
|
@ -49,7 +48,17 @@ blink::WebElement CefPrintRenderFrameHelperDelegate::GetPdfElement(
|
|||
}
|
||||
}
|
||||
NOTREACHED();
|
||||
return blink::WebElement();
|
||||
}
|
||||
|
||||
if (frame->Parent() &&
|
||||
IsPdfInternalPluginAllowedOrigin(frame->Parent()->GetSecurityOrigin())) {
|
||||
DCHECK(base::FeatureList::IsEnabled(chrome_pdf::features::kPdfUnseasoned));
|
||||
auto plugin_element = frame->GetDocument().QuerySelector("embed");
|
||||
DCHECK(!plugin_element.IsNull());
|
||||
return plugin_element;
|
||||
}
|
||||
|
||||
return blink::WebElement();
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "base/location.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
class CefTrackNode;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=38ae668703b71d27d2bcd7cd9230817edd5b8f41$
|
||||
// $hash=2c880c966ce6c72b764d41e2bf25d34a50f98fea$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/request_context_cpptoc.h"
|
||||
|
@ -233,20 +233,6 @@ int CEF_CALLBACK request_context_clear_scheme_handler_factories(
|
|||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK
|
||||
request_context_purge_plugin_list_cache(struct _cef_request_context_t* self,
|
||||
int reload_pages) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefRequestContextCppToC::Get(self)->PurgePluginListCache(
|
||||
reload_pages ? true : false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK
|
||||
request_context_has_preference(struct _cef_request_context_t* self,
|
||||
const cef_string_t* name) {
|
||||
|
@ -575,8 +561,6 @@ CefRequestContextCppToC::CefRequestContextCppToC() {
|
|||
request_context_register_scheme_handler_factory;
|
||||
GetStruct()->clear_scheme_handler_factories =
|
||||
request_context_clear_scheme_handler_factories;
|
||||
GetStruct()->purge_plugin_list_cache =
|
||||
request_context_purge_plugin_list_cache;
|
||||
GetStruct()->has_preference = request_context_has_preference;
|
||||
GetStruct()->get_preference = request_context_get_preference;
|
||||
GetStruct()->get_all_preferences = request_context_get_all_preferences;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=9172186519dc33742d7c302e7276c5ce8536a95b$
|
||||
// $hash=5d94f8128092dfa61a980dbb77c254c40abde8a5$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/request_context_handler_cpptoc.h"
|
||||
|
@ -18,7 +18,6 @@
|
|||
#include "libcef_dll/ctocpp/frame_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/request_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -42,43 +41,6 @@ void CEF_CALLBACK request_context_handler_on_request_context_initialized(
|
|||
CefRequestContextCToCpp::Wrap(request_context));
|
||||
}
|
||||
|
||||
int CEF_CALLBACK request_context_handler_on_before_plugin_load(
|
||||
struct _cef_request_context_handler_t* self,
|
||||
const cef_string_t* mime_type,
|
||||
const cef_string_t* plugin_url,
|
||||
int is_main_frame,
|
||||
const cef_string_t* top_origin_url,
|
||||
struct _cef_web_plugin_info_t* plugin_info,
|
||||
cef_plugin_policy_t* plugin_policy) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: mime_type; type: string_byref_const
|
||||
DCHECK(mime_type);
|
||||
if (!mime_type)
|
||||
return 0;
|
||||
// Verify param: plugin_info; type: refptr_diff
|
||||
DCHECK(plugin_info);
|
||||
if (!plugin_info)
|
||||
return 0;
|
||||
// Verify param: plugin_policy; type: simple_byaddr
|
||||
DCHECK(plugin_policy);
|
||||
if (!plugin_policy)
|
||||
return 0;
|
||||
// Unverified params: plugin_url, top_origin_url
|
||||
|
||||
// Execute
|
||||
bool _retval = CefRequestContextHandlerCppToC::Get(self)->OnBeforePluginLoad(
|
||||
CefString(mime_type), CefString(plugin_url), is_main_frame ? true : false,
|
||||
CefString(top_origin_url), CefWebPluginInfoCToCpp::Wrap(plugin_info),
|
||||
plugin_policy);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_resource_request_handler_t* CEF_CALLBACK
|
||||
request_context_handler_get_resource_request_handler(
|
||||
struct _cef_request_context_handler_t* self,
|
||||
|
@ -131,8 +93,6 @@ request_context_handler_get_resource_request_handler(
|
|||
CefRequestContextHandlerCppToC::CefRequestContextHandlerCppToC() {
|
||||
GetStruct()->on_request_context_initialized =
|
||||
request_context_handler_on_request_context_initialized;
|
||||
GetStruct()->on_before_plugin_load =
|
||||
request_context_handler_on_before_plugin_load;
|
||||
GetStruct()->get_resource_request_handler =
|
||||
request_context_handler_get_resource_request_handler;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=67bc021917c8f7d1e386859bbfae6e007b292f45$
|
||||
// $hash=018255aa904d057d87b35e9af87b702103e770de$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/request_context_ctocpp.h"
|
||||
|
@ -225,18 +225,6 @@ bool CefRequestContextCToCpp::ClearSchemeHandlerFactories() {
|
|||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
void CefRequestContextCToCpp::PurgePluginListCache(bool reload_pages) {
|
||||
cef_request_context_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, purge_plugin_list_cache))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
_struct->purge_plugin_list_cache(_struct, reload_pages);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
bool CefRequestContextCToCpp::HasPreference(const CefString& name) {
|
||||
cef_request_context_t* _struct = GetStruct();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=3e68482578ce8edfa73bef03a7f943194f3b7f34$
|
||||
// $hash=c3a1ed5aa4a0d3921f37b03f90222f542dfb0f68$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_
|
||||
|
@ -52,7 +52,6 @@ class CefRequestContextCToCpp
|
|||
const CefString& domain_name,
|
||||
CefRefPtr<CefSchemeHandlerFactory> factory) override;
|
||||
bool ClearSchemeHandlerFactories() override;
|
||||
void PurgePluginListCache(bool reload_pages) override;
|
||||
bool HasPreference(const CefString& name) override;
|
||||
CefRefPtr<CefValue> GetPreference(const CefString& name) override;
|
||||
CefRefPtr<CefDictionaryValue> GetAllPreferences(
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=e857bba04c337c16c2ea4ebce2e99c00d10280e1$
|
||||
// $hash=37ab9af3a8f6a52893418915598d6bfff1b8a5b4$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/request_context_handler_ctocpp.h"
|
||||
|
@ -17,7 +17,6 @@
|
|||
#include "libcef_dll/cpptoc/frame_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_context_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/resource_request_handler_ctocpp.h"
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
@ -42,52 +41,15 @@ void CefRequestContextHandlerCToCpp::OnRequestContextInitialized(
|
|||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
bool CefRequestContextHandlerCToCpp::OnBeforePluginLoad(
|
||||
const CefString& mime_type,
|
||||
const CefString& plugin_url,
|
||||
bool is_main_frame,
|
||||
const CefString& top_origin_url,
|
||||
CefRefPtr<CefWebPluginInfo> plugin_info,
|
||||
PluginPolicy* plugin_policy) {
|
||||
cef_request_context_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_before_plugin_load))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: mime_type; type: string_byref_const
|
||||
DCHECK(!mime_type.empty());
|
||||
if (mime_type.empty())
|
||||
return false;
|
||||
// Verify param: plugin_info; type: refptr_diff
|
||||
DCHECK(plugin_info.get());
|
||||
if (!plugin_info.get())
|
||||
return false;
|
||||
// Verify param: plugin_policy; type: simple_byaddr
|
||||
DCHECK(plugin_policy);
|
||||
if (!plugin_policy)
|
||||
return false;
|
||||
// Unverified params: plugin_url, top_origin_url
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->on_before_plugin_load(
|
||||
_struct, mime_type.GetStruct(), plugin_url.GetStruct(), is_main_frame,
|
||||
top_origin_url.GetStruct(), CefWebPluginInfoCppToC::Wrap(plugin_info),
|
||||
plugin_policy);
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefRefPtr<CefResourceRequestHandler> CefRequestContextHandlerCToCpp::
|
||||
GetResourceRequestHandler(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request,
|
||||
bool is_navigation,
|
||||
bool is_download,
|
||||
const CefString& request_initiator,
|
||||
bool& disable_default_handling) {
|
||||
CefRefPtr<CefResourceRequestHandler>
|
||||
CefRequestContextHandlerCToCpp::GetResourceRequestHandler(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
CefRefPtr<CefRequest> request,
|
||||
bool is_navigation,
|
||||
bool is_download,
|
||||
const CefString& request_initiator,
|
||||
bool& disable_default_handling) {
|
||||
cef_request_context_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_resource_request_handler))
|
||||
return nullptr;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=448e862b43cb41f8f01519501733ef9bbe0d1607$
|
||||
// $hash=bb1dcb4926176951e75b42fe5f1ff3891332ecdb$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_HANDLER_CTOCPP_H_
|
||||
|
@ -37,12 +37,6 @@ class CefRequestContextHandlerCToCpp
|
|||
// CefRequestContextHandler methods.
|
||||
void OnRequestContextInitialized(
|
||||
CefRefPtr<CefRequestContext> request_context) override;
|
||||
bool OnBeforePluginLoad(const CefString& mime_type,
|
||||
const CefString& plugin_url,
|
||||
bool is_main_frame,
|
||||
const CefString& top_origin_url,
|
||||
CefRefPtr<CefWebPluginInfo> plugin_info,
|
||||
PluginPolicy* plugin_policy) override;
|
||||
CefRefPtr<CefResourceRequestHandler> GetResourceRequestHandler(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
|
|
|
@ -110,6 +110,10 @@ patches = [
|
|||
# https://bitbucket.org/chromiumembedded/cef/issues/3031
|
||||
#
|
||||
# Fix minimize & fullscreen behavior on initial Widget creation.
|
||||
#
|
||||
# Allow override of RWHVBase::GetNewScreenInfosForUpdate() which is now
|
||||
# required due to https://crrev.com/96938eb36e in order to use
|
||||
# RWHVBase::UpdateScreenInfo() with OSR.
|
||||
'name': 'views_widget',
|
||||
},
|
||||
{
|
||||
|
@ -299,12 +303,6 @@ patches = [
|
|||
'name': 'rwh_background_color_1984',
|
||||
},
|
||||
{
|
||||
# Pass is_main_frame to PluginServiceFilter::IsPluginAvailable.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2015
|
||||
#
|
||||
# Pass the render process id to PluginServiceFilter::IsPluginAvailable.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=626728#c15
|
||||
#
|
||||
# Expose RFH via NavigationHandle for retrieval in DidFinishNavigation on
|
||||
# network error.
|
||||
# https://groups.google.com/a/chromium.org/d/msg/chromium-dev/6iAQPx_hwh8/gaTR5f1GAQAJ
|
||||
|
@ -327,9 +325,6 @@ patches = [
|
|||
'name': 'content_2015',
|
||||
},
|
||||
{
|
||||
# Pass is_main_frame to PluginServiceFilter::IsPluginAvailable.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2015
|
||||
#
|
||||
# Add ContentRendererClient::DevToolsAgent[Attached|Detached] methods.
|
||||
'name': 'webkit_plugin_info_2015',
|
||||
},
|
||||
|
@ -369,12 +364,6 @@ patches = [
|
|||
# https://bitbucket.org/chromiumembedded/cef/issues/2540
|
||||
'name': 'mac_fling_scheduler_2540',
|
||||
},
|
||||
{
|
||||
# Linux: Use poll instead of select to fix crash during startup.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/2466
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/3237729/
|
||||
'name': 'linux_poll_2466',
|
||||
},
|
||||
{
|
||||
# Allow ResourceBundle creation/destruction on the main thread and usage on
|
||||
# the UI thread.
|
||||
|
@ -523,13 +512,6 @@ patches = [
|
|||
# https://bitbucket.org/chromiumembedded/cef/issues/3105
|
||||
'name': 'browser_security_policy_1081397',
|
||||
},
|
||||
{
|
||||
# Linux: Fix undefined symbol: ResourceMapper::MapToJavaDrawableId in
|
||||
# ChromePageInfoClient::GetJavaResourceId.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=1099927
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/3236818
|
||||
'name': 'linux_chrome_page_info_1099927',
|
||||
},
|
||||
{
|
||||
# Fix build errors with enable_background_mode=false.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=1100085
|
||||
|
@ -538,12 +520,6 @@ patches = [
|
|||
# https://bitbucket.org/chromiumembedded/cef/issues/2969
|
||||
'name': 'chrome_browser_background_mode_1100085',
|
||||
},
|
||||
{
|
||||
# Windows: Fix cef_sandbox compile error due to missing include.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=1049498#c14
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/3238990/
|
||||
'name': 'base_string_piece_1049498',
|
||||
},
|
||||
{
|
||||
# Linux: Fix ATK assertion error when generating ARM build config.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=1123214
|
||||
|
@ -554,12 +530,6 @@ patches = [
|
|||
# visible to CEF.
|
||||
'name': 'linux_ui_ozone',
|
||||
},
|
||||
{
|
||||
# Windows: Fix cef_sandbox compile error: ignoring return value of function
|
||||
# declared with 'nodiscard' attribute [-Werror,-Wunused-result]
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/3237648
|
||||
'name': 'base_thread_restrictions_3237648',
|
||||
},
|
||||
{
|
||||
# Windows: Fix crash when |sandbox_info| parameter is nullptr.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/3210
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git base/command_line.cc base/command_line.cc
|
||||
index 735a1e8bcbe6f..d284d2c86b11b 100644
|
||||
index 23e663d81584f..46972a8c42f03 100644
|
||||
--- base/command_line.cc
|
||||
+++ base/command_line.cc
|
||||
@@ -338,11 +338,10 @@ void CommandLine::AppendSwitchPath(StringPiece switch_string,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git base/BUILD.gn base/BUILD.gn
|
||||
index afd0690c72de4..07a2889100e39 100644
|
||||
index 7c1c51e1a468e..0ccb2cebd2832 100644
|
||||
--- base/BUILD.gn
|
||||
+++ base/BUILD.gn
|
||||
@@ -34,6 +34,7 @@ import("//build/config/ui.gni")
|
||||
|
@ -10,7 +10,7 @@ index afd0690c72de4..07a2889100e39 100644
|
|||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
import("//third_party/icu/config.gni")
|
||||
@@ -1783,7 +1784,11 @@ component("base") {
|
||||
@@ -1784,7 +1785,11 @@ component("base") {
|
||||
"hash/md5_constexpr_internal.h",
|
||||
"hash/sha1.h",
|
||||
]
|
||||
|
@ -23,7 +23,7 @@ index afd0690c72de4..07a2889100e39 100644
|
|||
sources += [
|
||||
"hash/md5_nacl.cc",
|
||||
"hash/md5_nacl.h",
|
||||
@@ -2030,6 +2035,12 @@ component("base") {
|
||||
@@ -2036,6 +2041,12 @@ component("base") {
|
||||
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff --git base/strings/string_piece.h base/strings/string_piece.h
|
||||
index 5ceb3a40eb01b..89476bfa41e9b 100644
|
||||
--- base/strings/string_piece.h
|
||||
+++ base/strings/string_piece.h
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
+#include <algorithm>
|
||||
#include <iosfwd>
|
||||
#include <limits>
|
||||
#include <string>
|
|
@ -1,26 +0,0 @@
|
|||
diff --git base/threading/thread_restrictions.cc base/threading/thread_restrictions.cc
|
||||
index a892d9bb96bfe..33d13529aeadd 100644
|
||||
--- base/threading/thread_restrictions.cc
|
||||
+++ base/threading/thread_restrictions.cc
|
||||
@@ -267,18 +267,18 @@ void DisallowUnresponsiveTasks() {
|
||||
|
||||
// static
|
||||
void PermanentThreadAllowance::AllowBlocking() {
|
||||
- *GetBlockingDisallowedTls().Set(std::make_unique<BooleanWithStack>(false));
|
||||
+ GetBlockingDisallowedTls().Set(std::make_unique<BooleanWithStack>(false));
|
||||
}
|
||||
|
||||
// static
|
||||
void PermanentThreadAllowance::AllowBaseSyncPrimitives() {
|
||||
- *GetBaseSyncPrimitivesDisallowedTls().Set(
|
||||
+ GetBaseSyncPrimitivesDisallowedTls().Set(
|
||||
std::make_unique<BooleanWithStack>(false));
|
||||
}
|
||||
|
||||
// static
|
||||
void PermanentSingletonAllowance::AllowSingleton() {
|
||||
- *GetSingletonDisallowedTls().Set(std::make_unique<BooleanWithStack>(false));
|
||||
+ GetSingletonDisallowedTls().Set(std::make_unique<BooleanWithStack>(false));
|
||||
}
|
||||
|
||||
} // namespace base
|
|
@ -1,8 +1,8 @@
|
|||
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
|
||||
index 3d56ff6e97575..1af9338f883fb 100644
|
||||
index 1b3d5cfdfc484..9ad7de56ca84f 100644
|
||||
--- content/browser/scheduler/browser_task_executor.cc
|
||||
+++ content/browser/scheduler/browser_task_executor.cc
|
||||
@@ -285,7 +285,7 @@ BrowserTaskExecutor::OnUserInputStart() {
|
||||
@@ -315,7 +315,7 @@ BrowserTaskExecutor::OnUserInputStart() {
|
||||
|
||||
// static
|
||||
void BrowserTaskExecutor::Shutdown() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
|
||||
index 4801a199a29d3..11a1d3b328142 100644
|
||||
index 85a68f06ccc71..a57f47d70084b 100644
|
||||
--- content/browser/child_process_security_policy_impl.cc
|
||||
+++ content/browser/child_process_security_policy_impl.cc
|
||||
@@ -1778,6 +1778,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
|
||||
@@ -1770,6 +1770,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin(
|
||||
// DeclarativeApiTest.PersistRules.
|
||||
if (actual_process_lock.matches_scheme(url::kDataScheme))
|
||||
return true;
|
||||
|
@ -20,10 +20,10 @@ index 4801a199a29d3..11a1d3b328142 100644
|
|||
|
||||
// TODO(wjmaclean): We should update the ProcessLock comparison API
|
||||
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
|
||||
index 50bdac2c30caa..2546c845e756a 100644
|
||||
index 75c69841ae368..5f3f082c8775d 100644
|
||||
--- content/browser/renderer_host/navigation_request.cc
|
||||
+++ content/browser/renderer_host/navigation_request.cc
|
||||
@@ -5737,6 +5737,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithoutFinalFrameHost(
|
||||
@@ -5793,6 +5793,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithoutFinalFrameHost(
|
||||
network::mojom::WebSandboxFlags sandbox_flags) {
|
||||
// Calculate an approximation of the origin. The sandbox/csp are ignored.
|
||||
url::Origin origin = GetOriginForURLLoaderFactoryUnchecked(this);
|
||||
|
@ -36,7 +36,7 @@ index 50bdac2c30caa..2546c845e756a 100644
|
|||
|
||||
// Apply sandbox flags.
|
||||
// See https://html.spec.whatwg.org/#sandboxed-origin-browsing-context-flag
|
||||
@@ -5770,6 +5776,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithFinalFrameHost() {
|
||||
@@ -5826,6 +5832,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithFinalFrameHost() {
|
||||
if (IsSameDocument() || IsPageActivation())
|
||||
return GetRenderFrameHost()->GetLastCommittedOrigin();
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index f4421666b3d10..66ca782d2fe68 100644
|
||||
index bc3de06d0255b..ed84c1120d19d 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -1766,8 +1766,6 @@ config("thin_archive") {
|
||||
@@ -1765,8 +1765,6 @@ config("thin_archive") {
|
||||
# confuses lldb.
|
||||
if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
|
||||
arflags = [ "-T" ]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
|
||||
index 1f848e0760118..29bfa6e602430 100644
|
||||
index 803485153c7fb..f334eccf6bd13 100644
|
||||
--- chrome/browser/BUILD.gn
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -13,6 +13,7 @@ import("//build/config/features.gni")
|
||||
|
@ -10,7 +10,7 @@ index 1f848e0760118..29bfa6e602430 100644
|
|||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/browser/downgrade/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
@@ -1932,6 +1933,7 @@ static_library("browser") {
|
||||
@@ -1944,6 +1945,7 @@ static_library("browser") {
|
||||
"//build:os_buildflags",
|
||||
"//build/config/compiler:compiler_buildflags",
|
||||
"//cc",
|
||||
|
@ -18,7 +18,7 @@ index 1f848e0760118..29bfa6e602430 100644
|
|||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2540,6 +2542,10 @@ static_library("browser") {
|
||||
@@ -2553,6 +2555,10 @@ static_library("browser") {
|
||||
deps += [ "//chrome/browser/ui/webui/connectors_internals:mojo_bindings" ]
|
||||
}
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@ index f091754b8d814..7bf45f611e8ac 100644
|
|||
std::unique_ptr<BackgroundModeManager> manager) = 0;
|
||||
#endif
|
||||
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
|
||||
index 2f7791ecdde11..093592fdbd3c5 100644
|
||||
index 9a2c1534cb690..1f2eb75dd575a 100644
|
||||
--- chrome/browser/browser_process_impl.cc
|
||||
+++ chrome/browser/browser_process_impl.cc
|
||||
@@ -1005,18 +1005,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
|
||||
@@ -1006,18 +1006,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
|
||||
return download_request_limiter_.get();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/browser_about_handler.cc chrome/browser/browser_about_handler.cc
|
||||
index ba0c5c3fc0446..b4df9af95ecd1 100644
|
||||
index 9e534ff1683f1..de406f5879be0 100644
|
||||
--- chrome/browser/browser_about_handler.cc
|
||||
+++ chrome/browser/browser_about_handler.cc
|
||||
@@ -70,6 +70,9 @@ bool HandleNonNavigationAboutURL(const GURL& url) {
|
||||
|
@ -13,10 +13,10 @@ index ba0c5c3fc0446..b4df9af95ecd1 100644
|
|||
return false;
|
||||
}
|
||||
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
||||
index c764e3607d274..8a26710f982df 100644
|
||||
index 030680ad08612..2dc5a81b00618 100644
|
||||
--- chrome/browser/ui/browser.cc
|
||||
+++ chrome/browser/ui/browser.cc
|
||||
@@ -265,6 +265,20 @@
|
||||
@@ -267,6 +267,20 @@
|
||||
#include "components/captive_portal/content/captive_portal_tab_helper.h"
|
||||
#endif
|
||||
|
||||
|
@ -51,7 +51,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
location_bar_model_ = std::make_unique<LocationBarModelImpl>(
|
||||
location_bar_model_delegate_.get(), content::kMaxURLDisplayChars);
|
||||
|
||||
@@ -1329,6 +1350,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
@@ -1321,6 +1342,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
||||
if (exclusive_access_manager_->HandleUserKeyEvent(event))
|
||||
return content::KeyboardEventProcessingResult::HANDLED;
|
||||
|
||||
|
@ -66,7 +66,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
return window()->PreHandleKeyboardEvent(event);
|
||||
}
|
||||
|
||||
@@ -1336,8 +1365,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
@@ -1328,8 +1357,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
||||
const NativeWebKeyboardEvent& event) {
|
||||
DevToolsWindow* devtools_window =
|
||||
DevToolsWindow::GetInstanceForInspectedWebContents(source);
|
||||
|
@ -87,7 +87,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
}
|
||||
|
||||
bool Browser::TabsNeedBeforeUnloadFired() {
|
||||
@@ -1562,6 +1601,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
|
||||
@@ -1550,6 +1589,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
|
||||
return window->OpenURLFromTab(source, params);
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
NavigateParams nav_params(this, params.url, params.transition);
|
||||
nav_params.FillNavigateParamsFromOpenURLParams(params);
|
||||
nav_params.source_contents = source;
|
||||
@@ -1661,6 +1708,15 @@ void Browser::AddNewContents(WebContents* source,
|
||||
@@ -1649,6 +1696,15 @@ void Browser::AddNewContents(WebContents* source,
|
||||
source, disposition);
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
chrome::AddWebContents(this, source, std::move(new_contents), target_url,
|
||||
disposition, initial_rect);
|
||||
}
|
||||
@@ -1679,6 +1735,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
@@ -1667,6 +1723,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
||||
bool to_different_document) {
|
||||
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
|
||||
UpdateWindowForLoadingStateChanged(source, to_different_document);
|
||||
|
@ -127,7 +127,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
}
|
||||
|
||||
void Browser::CloseContents(WebContents* source) {
|
||||
@@ -1706,6 +1764,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
@@ -1694,6 +1752,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
||||
}
|
||||
|
||||
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
|
@ -136,7 +136,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
if (!GetStatusBubble())
|
||||
return;
|
||||
|
||||
@@ -1713,6 +1773,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@@ -1701,6 +1761,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
GetStatusBubble()->SetURL(url);
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
void Browser::ContentsMouseEvent(WebContents* source,
|
||||
bool motion,
|
||||
bool exited) {
|
||||
@@ -1829,6 +1900,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
@@ -1817,6 +1888,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
||||
|
||||
// Make the tab show up in the task manager.
|
||||
task_manager::WebContentsTags::CreateForTabContents(new_contents);
|
||||
|
@ -165,7 +165,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
}
|
||||
|
||||
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) {
|
||||
@@ -1871,6 +1946,8 @@ void Browser::RendererResponsive(
|
||||
@@ -1859,6 +1934,8 @@ void Browser::RendererResponsive(
|
||||
void Browser::DidNavigatePrimaryMainFramePostCommit(WebContents* web_contents) {
|
||||
if (web_contents == tab_strip_model_->GetActiveWebContents())
|
||||
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE);
|
||||
|
@ -174,7 +174,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
}
|
||||
|
||||
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
|
||||
@@ -1910,11 +1987,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
@@ -1898,11 +1975,15 @@ void Browser::EnterFullscreenModeForTab(
|
||||
const blink::mojom::FullscreenOptions& options) {
|
||||
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
|
||||
requesting_frame, options.display_id);
|
||||
|
@ -190,7 +190,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
}
|
||||
|
||||
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
|
||||
@@ -2757,6 +2838,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
@@ -2745,6 +2826,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
||||
content_translate_driver->RemoveTranslationObserver(this);
|
||||
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ index c764e3607d274..8a26710f982df 100644
|
|||
|
||||
void Browser::TabDetachedAtImpl(content::WebContents* contents,
|
||||
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
||||
index 69911da4fe7b9..2adcba6abef01 100644
|
||||
index 0c31ee896f98e..2e24c282103ac 100644
|
||||
--- chrome/browser/ui/browser.h
|
||||
+++ chrome/browser/ui/browser.h
|
||||
@@ -21,6 +21,7 @@
|
||||
|
@ -261,7 +261,7 @@ index 69911da4fe7b9..2adcba6abef01 100644
|
|||
// Get the FindBarController for this browser, creating it if it does not
|
||||
// yet exist.
|
||||
FindBarController* GetFindBarController();
|
||||
@@ -799,6 +822,11 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -798,6 +821,11 @@ class Browser : public TabStripModelObserver,
|
||||
void SetContentsBounds(content::WebContents* source,
|
||||
const gfx::Rect& bounds) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
|
@ -273,7 +273,7 @@ index 69911da4fe7b9..2adcba6abef01 100644
|
|||
void ContentsMouseEvent(content::WebContents* source,
|
||||
bool motion,
|
||||
bool exited) override;
|
||||
@@ -1189,6 +1217,8 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1190,6 +1218,8 @@ class Browser : public TabStripModelObserver,
|
||||
const std::string initial_workspace_;
|
||||
bool initial_visible_on_all_workspaces_state_;
|
||||
|
||||
|
@ -282,7 +282,7 @@ index 69911da4fe7b9..2adcba6abef01 100644
|
|||
CreationSource creation_source_ = CreationSource::kUnknown;
|
||||
|
||||
UnloadController unload_controller_;
|
||||
@@ -1246,6 +1276,10 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1247,6 +1277,10 @@ class Browser : public TabStripModelObserver,
|
||||
extension_browser_window_helper_;
|
||||
#endif
|
||||
|
||||
|
@ -294,7 +294,7 @@ index 69911da4fe7b9..2adcba6abef01 100644
|
|||
|
||||
// The following factory is used for chrome update coalescing.
|
||||
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
|
||||
index ca5ad72b0707e..ea229dbf98656 100644
|
||||
index fe7825b8253d3..1e0f20e653266 100644
|
||||
--- chrome/browser/ui/browser_navigator.cc
|
||||
+++ chrome/browser/ui/browser_navigator.cc
|
||||
@@ -451,6 +451,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
index 05dd1c1b9741a..322dcb5feed00 100644
|
||||
index 22fdc95ba9c3f..2a0e3cc7f65c8 100644
|
||||
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
|
@ -21,7 +21,7 @@ index 05dd1c1b9741a..322dcb5feed00 100644
|
|||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "chrome/browser/extensions/api/content_settings/content_settings_custom_extension_provider.h"
|
||||
@@ -51,7 +56,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
||||
@@ -55,7 +60,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
|
||||
DependsOn(SupervisedUserSettingsServiceFactory::GetInstance());
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
@ -33,9 +33,9 @@ index 05dd1c1b9741a..322dcb5feed00 100644
|
|||
+ }
|
||||
+#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -111,6 +122,9 @@ scoped_refptr<RefcountedKeyedService>
|
||||
// Used by way of ShouldRestoreOldSessionCookies().
|
||||
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
|
||||
@@ -119,6 +130,9 @@ scoped_refptr<RefcountedKeyedService>
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
@ -45,7 +45,7 @@ index 05dd1c1b9741a..322dcb5feed00 100644
|
|||
// These must be registered before before the HostSettings are passed over to
|
||||
// the IOThread. Simplest to do this on construction.
|
||||
settings_map->RegisterProvider(
|
||||
@@ -123,6 +137,9 @@ scoped_refptr<RefcountedKeyedService>
|
||||
@@ -131,6 +145,9 @@ scoped_refptr<RefcountedKeyedService>
|
||||
// the case where profile->IsOffTheRecord() is true? And what is the
|
||||
// interaction with profile->IsGuestSession()?
|
||||
false));
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
index fa211d7a0d997..cea251366f5d9 100644
|
||||
index 965687102de1a..e6588160367d6 100644
|
||||
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
@@ -278,6 +278,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
@@ -285,6 +285,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
|
||||
return callback.get();
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ index fa211d7a0d997..cea251366f5d9 100644
|
|||
enum class UmaEnumIdLookupType {
|
||||
GeneralEnumId,
|
||||
ContextSpecificEnumId,
|
||||
@@ -491,6 +498,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
@@ -498,6 +505,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
|
||||
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
|
||||
return 1;
|
||||
|
||||
|
@ -27,7 +27,7 @@ index fa211d7a0d997..cea251366f5d9 100644
|
|||
id = CollapseCommandsForUMA(id);
|
||||
const auto& map = GetIdcToUmaMap(type);
|
||||
auto it = map.find(id);
|
||||
@@ -673,6 +684,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
@@ -680,6 +691,14 @@ RenderViewContextMenu::RenderViewContextMenu(
|
||||
system_app_ = GetBrowser() && GetBrowser()->app_controller()
|
||||
? GetBrowser()->app_controller()->system_app()
|
||||
: nullptr;
|
||||
|
@ -42,7 +42,7 @@ index fa211d7a0d997..cea251366f5d9 100644
|
|||
}
|
||||
|
||||
RenderViewContextMenu::~RenderViewContextMenu() = default;
|
||||
@@ -1031,6 +1050,12 @@ void RenderViewContextMenu::InitMenu() {
|
||||
@@ -1038,6 +1057,12 @@ void RenderViewContextMenu::InitMenu() {
|
||||
// menu, meaning that each menu item added/removed in this function will cause
|
||||
// it to visibly jump on the screen (see b/173569669).
|
||||
AppendQuickAnswersItems();
|
||||
|
@ -55,8 +55,8 @@ index fa211d7a0d997..cea251366f5d9 100644
|
|||
}
|
||||
|
||||
Profile* RenderViewContextMenu::GetProfile() const {
|
||||
@@ -2849,6 +2874,12 @@ void RenderViewContextMenu::RegisterMenuShownCallbackForTesting(
|
||||
*GetMenuShownCallback() = std::move(cb);
|
||||
@@ -2870,6 +2895,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
|
||||
execute_plugin_action_callback_ = std::move(cb);
|
||||
}
|
||||
|
||||
+// static
|
||||
|
@ -69,12 +69,12 @@ index fa211d7a0d997..cea251366f5d9 100644
|
|||
RenderViewContextMenu::GetHandlersForLinkUrl() {
|
||||
ProtocolHandlerRegistry::ProtocolHandlerList handlers =
|
||||
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h
|
||||
index 17efc6e786bfb..58b5ea1f2750b 100644
|
||||
index 1e776354a073d..dcbe1b14c4e75 100644
|
||||
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
|
||||
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
|
||||
@@ -113,6 +113,12 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
|
||||
static void RegisterMenuShownCallbackForTesting(
|
||||
base::OnceCallback<void(RenderViewContextMenu*)> cb);
|
||||
@@ -124,6 +124,12 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
|
||||
base::OnceCallback<void(content::RenderFrameHost*,
|
||||
blink::mojom::PluginActionType)> cb);
|
||||
|
||||
+ // Registers a callback that will be called each time a context menu is
|
||||
+ // created.
|
||||
|
@ -85,7 +85,7 @@ index 17efc6e786bfb..58b5ea1f2750b 100644
|
|||
protected:
|
||||
Profile* GetProfile() const;
|
||||
|
||||
@@ -312,6 +318,9 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
|
||||
@@ -326,6 +332,9 @@ class RenderViewContextMenu : public RenderViewContextMenuBase,
|
||||
// built.
|
||||
bool is_protocol_submenu_valid_ = false;
|
||||
|
||||
|
@ -96,7 +96,7 @@ index 17efc6e786bfb..58b5ea1f2750b 100644
|
|||
// "Use enhanced spell check" items.
|
||||
std::unique_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_;
|
||||
diff --git chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
|
||||
index 13a65de79e185..0901c4cade4f1 100644
|
||||
index 413fbf44e4547..2cc82a103013e 100644
|
||||
--- chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
|
||||
+++ chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
|
||||
@@ -136,6 +136,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent,
|
||||
|
@ -110,10 +110,10 @@ index 13a65de79e185..0901c4cade4f1 100644
|
|||
// that Ctrl+C, Ctrl+V, Ctrl+X, Ctrl-A, etc do what they normally do.
|
||||
switch (command_id) {
|
||||
diff --git components/renderer_context_menu/render_view_context_menu_base.cc components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
index f40f15c23bfb2..06d4d197ce137 100644
|
||||
index eb360c977683c..57d1d80b4dc83 100644
|
||||
--- components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
+++ components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
@@ -376,6 +376,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {
|
||||
@@ -377,6 +377,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ index f40f15c23bfb2..06d4d197ce137 100644
|
|||
command_executed_ = true;
|
||||
RecordUsedItem(id);
|
||||
diff --git components/renderer_context_menu/render_view_context_menu_base.h components/renderer_context_menu/render_view_context_menu_base.h
|
||||
index 2b7d7d98615d1..9e47cb40c728c 100644
|
||||
index bd36610e71183..a77e1cb2e4167 100644
|
||||
--- components/renderer_context_menu/render_view_context_menu_base.h
|
||||
+++ components/renderer_context_menu/render_view_context_menu_base.h
|
||||
@@ -86,6 +86,9 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
||||
index e9a748c91f743..1b4cc72352e67 100644
|
||||
index 711454d213148..5a8a0d53c16f1 100644
|
||||
--- chrome/browser/ui/BUILD.gn
|
||||
+++ chrome/browser/ui/BUILD.gn
|
||||
@@ -11,6 +11,7 @@ import("//build/config/features.gni")
|
||||
|
@ -10,7 +10,7 @@ index e9a748c91f743..1b4cc72352e67 100644
|
|||
import("//chrome/browser/buildflags.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/assistant/assistant.gni")
|
||||
@@ -357,6 +358,10 @@ static_library("ui") {
|
||||
@@ -365,6 +366,10 @@ static_library("ui") {
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
|
@ -21,7 +21,7 @@ index e9a748c91f743..1b4cc72352e67 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
|
||||
@@ -379,6 +384,7 @@ static_library("ui") {
|
||||
@@ -387,6 +392,7 @@ static_library("ui") {
|
||||
"//build:branding_buildflags",
|
||||
"//build:chromeos_buildflags",
|
||||
"//cc/paint",
|
||||
|
@ -29,7 +29,7 @@ index e9a748c91f743..1b4cc72352e67 100644
|
|||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -5053,6 +5059,7 @@ static_library("ui") {
|
||||
@@ -5066,6 +5072,7 @@ static_library("ui") {
|
||||
if (enable_basic_printing) {
|
||||
deps += [
|
||||
"//components/printing/browser",
|
||||
|
@ -38,11 +38,11 @@ index e9a748c91f743..1b4cc72352e67 100644
|
|||
]
|
||||
}
|
||||
diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc
|
||||
index a57128a2803fe..1015d50db53ee 100644
|
||||
index b75dec8d7d0ab..00eb11e9f937c 100644
|
||||
--- chrome/browser/ui/webui/net_export_ui.cc
|
||||
+++ chrome/browser/ui/webui/net_export_ui.cc
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/profiles/profile_window.cc chrome/browser/profiles/profile_window.cc
|
||||
index c00884e06f960..858fdb75529f8 100644
|
||||
index f235f69b4d940..2e5bbf4502117 100644
|
||||
--- chrome/browser/profiles/profile_window.cc
|
||||
+++ chrome/browser/profiles/profile_window.cc
|
||||
@@ -272,7 +272,9 @@ void BubbleViewModeFromAvatarBubbleMode(BrowserWindow::AvatarBubbleMode mode,
|
||||
|
@ -29,7 +29,7 @@ index 38970b9869c05..35dd0be0030ed 100644
|
|||
|
||||
chrome::RecordDialogCreation(
|
||||
diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
index 7f8f15b406de5..d0cf255156980 100644
|
||||
index 2e51405eed232..47202c3caceeb 100644
|
||||
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
||||
@@ -512,7 +512,9 @@ void ProfileMenuViewBase::ShowBubble(profiles::BubbleViewMode view_mode,
|
||||
|
|
|
@ -85,10 +85,10 @@ index 1466666f50f4e..704fda78a1842 100644
|
|||
virtual bool IsSignedIn() = 0;
|
||||
|
||||
diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc
|
||||
index d8df8be6d9d54..f21f0d40a8e2c 100644
|
||||
index 9d99f3fd9a703..93fade3dc13f0 100644
|
||||
--- chrome/browser/profiles/profile_impl.cc
|
||||
+++ chrome/browser/profiles/profile_impl.cc
|
||||
@@ -989,7 +989,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
@@ -994,7 +994,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
|
||||
|
||||
otr_profiles_[otr_profile_id] = std::move(otr_profile);
|
||||
|
||||
|
@ -100,10 +100,10 @@ index d8df8be6d9d54..f21f0d40a8e2c 100644
|
|||
return raw_otr_profile;
|
||||
}
|
||||
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
|
||||
index 8aa1fb3410e95..4509880095d9a 100644
|
||||
index 9263de5dec839..caab6922b8dcb 100644
|
||||
--- chrome/browser/profiles/profile_manager.cc
|
||||
+++ chrome/browser/profiles/profile_manager.cc
|
||||
@@ -501,7 +501,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
@@ -499,7 +499,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
base::Unretained(this)));
|
||||
#endif
|
||||
|
||||
|
@ -113,7 +113,7 @@ index 8aa1fb3410e95..4509880095d9a 100644
|
|||
}
|
||||
|
||||
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
|
||||
index d6120ff3abd2e..2f03384a0b32d 100644
|
||||
index fca117d60623e..a3c29f0f9c0c2 100644
|
||||
--- chrome/browser/profiles/profile_manager.h
|
||||
+++ chrome/browser/profiles/profile_manager.h
|
||||
@@ -123,7 +123,7 @@ class ProfileManager : public Profile::Delegate {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
|
||||
index d03245c9fe864..6a8899f3487a6 100644
|
||||
index 05b55cf0f5a0b..1505fceabdcc6 100644
|
||||
--- chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -26,6 +26,7 @@ static_library("safe_browsing") {
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
|
||||
index 21f6cb93a3778..31134a9495858 100644
|
||||
index 54bff316490a5..fa472b2c9cd61 100644
|
||||
--- chrome/browser/themes/theme_service.cc
|
||||
+++ chrome/browser/themes/theme_service.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "base/task/thread_pool.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/browser_features.h"
|
||||
#include "chrome/browser/extensions/extension_service.h"
|
||||
#include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
|
||||
#include "chrome/browser/new_tab_page/chrome_colors/chrome_colors_service.h"
|
||||
@@ -58,6 +59,10 @@
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
@@ -62,6 +63,10 @@
|
||||
#include "ui/base/layout.h"
|
||||
#include "ui/color/color_provider.h"
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+#include "cef/libcef/common/extensions/extensions_util.h"
|
||||
|
@ -21,7 +21,7 @@ index 21f6cb93a3778..31134a9495858 100644
|
|||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "base/scoped_observation.h"
|
||||
#include "extensions/browser/extension_registry_observer.h"
|
||||
@@ -281,11 +286,19 @@ void ThemeService::Init() {
|
||||
@@ -348,11 +353,19 @@ void ThemeService::Init() {
|
||||
// OnExtensionServiceReady. Otherwise, the ThemeObserver won't be
|
||||
// constructed in time to observe the corresponding events.
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
|
|
@ -1,28 +1,27 @@
|
|||
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
index 30017a7261496..ac208ec1fee24 100644
|
||||
index 2cf61c44809a9..e6948ab525700 100644
|
||||
--- chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
+++ chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "base/task_runner_util.h"
|
||||
#include "base/task/task_runner_util.h"
|
||||
#include "build/branding_buildflags.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
|
||||
@@ -53,6 +54,11 @@
|
||||
@@ -53,6 +54,10 @@
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+#include "cef/libcef/browser/plugins/plugin_service_filter.h"
|
||||
+#include "cef/libcef/common/extensions/extensions_util.h"
|
||||
+#endif
|
||||
+
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "components/guest_view/browser/guest_view_base.h"
|
||||
#include "extensions/browser/extension_registry.h"
|
||||
@@ -102,6 +108,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
@@ -102,6 +107,9 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
extensions::ExtensionRegistry* extension_registry,
|
||||
int process_id,
|
||||
const GURL& resource) {
|
||||
|
@ -32,7 +31,7 @@ index 30017a7261496..ac208ec1fee24 100644
|
|||
extensions::WebViewRendererState* renderer_state =
|
||||
extensions::WebViewRendererState::GetInstance();
|
||||
std::string partition_id;
|
||||
@@ -130,14 +139,18 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
@@ -130,14 +138,18 @@ bool IsPluginLoadingAccessibleResourceInWebView(
|
||||
|
||||
PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile)
|
||||
: render_process_id_(render_process_id),
|
||||
|
@ -54,68 +53,8 @@ index 30017a7261496..ac208ec1fee24 100644
|
|||
}
|
||||
|
||||
PluginInfoHostImpl::Context::~Context() {}
|
||||
@@ -217,6 +230,15 @@ void PluginInfoHostImpl::Context::DecidePluginStatus(
|
||||
PluginMetadata::SecurityStatus security_status,
|
||||
const std::string& plugin_identifier,
|
||||
chrome::mojom::PluginStatus* status) const {
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ // Don't override the user decision.
|
||||
+ if (cef::IsAlloyRuntimeEnabled() &&
|
||||
+ (*status == chrome::mojom::PluginStatus::kBlocked ||
|
||||
+ *status == chrome::mojom::PluginStatus::kDisabled)) {
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) {
|
||||
*status = chrome::mojom::PluginStatus::kAllowed;
|
||||
return;
|
||||
@@ -324,17 +346,41 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin(
|
||||
return false;
|
||||
}
|
||||
|
||||
+ const bool is_main_frame =
|
||||
+ main_frame_origin.IsSameOriginWith(url::Origin::Create(url));
|
||||
+ size_t i = 0;
|
||||
+
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ if (cef::IsAlloyRuntimeEnabled()) {
|
||||
+ CefPluginServiceFilter* filter = static_cast<CefPluginServiceFilter*>(
|
||||
+ PluginService::GetInstance()->GetFilter());
|
||||
+ DCHECK(filter);
|
||||
+
|
||||
+ for (; i < matching_plugins.size(); ++i) {
|
||||
+ if (filter->IsPluginAvailable(render_process_id_, render_frame_id,
|
||||
+ url, is_main_frame, main_frame_origin,
|
||||
+ &matching_plugins[i], status)) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+#endif // BUILDFLAG(ENABLE_CEF)
|
||||
+
|
||||
content::PluginServiceFilter* filter =
|
||||
PluginService::GetInstance()->GetFilter();
|
||||
- size_t i = 0;
|
||||
for (; i < matching_plugins.size(); ++i) {
|
||||
if (!filter ||
|
||||
filter->IsPluginAvailable(render_process_id_, render_frame_id, url,
|
||||
- main_frame_origin, &matching_plugins[i])) {
|
||||
+ is_main_frame, main_frame_origin,
|
||||
+ &matching_plugins[i])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
// If we broke out of the loop, we have found an enabled plugin.
|
||||
bool enabled = i < matching_plugins.size();
|
||||
if (!enabled) {
|
||||
diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc
|
||||
index a0b3175223f3e..a1117001ad1fc 100644
|
||||
index 7999b960694ab..5c1848a0afadf 100644
|
||||
--- chrome/browser/plugins/plugin_utils.cc
|
||||
+++ chrome/browser/plugins/plugin_utils.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
|
@ -124,9 +63,9 @@ index a0b3175223f3e..a1117001ad1fc 100644
|
|||
#include "base/values.h"
|
||||
+#include "cef/libcef/features/runtime.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/common/plugin_utils.h"
|
||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||
@@ -15,6 +16,10 @@
|
||||
#include "components/content_settings/core/common/content_settings_types.h"
|
||||
@@ -14,6 +15,10 @@
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
|
||||
|
@ -137,7 +76,7 @@ index a0b3175223f3e..a1117001ad1fc 100644
|
|||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
@@ -77,6 +82,12 @@ base::flat_map<std::string, std::string>
|
||||
@@ -69,6 +74,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;
|
||||
|
@ -186,10 +125,10 @@ index 8c2547056ec26..2ab3252dca708 100644
|
|||
// 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 5ff5939031672..01742ddfef449 100644
|
||||
index 14c199c88ba6a..a4bb52c01c2f5 100644
|
||||
--- chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -943,6 +943,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -947,6 +947,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
|
||||
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
|
||||
status == chrome::mojom::PluginStatus::kBlocked) &&
|
||||
|
@ -197,7 +136,7 @@ index 5ff5939031672..01742ddfef449 100644
|
|||
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
|
||||
identifier)) {
|
||||
status = chrome::mojom::PluginStatus::kAllowed;
|
||||
@@ -1144,7 +1145,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1148,7 +1149,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
plugin_auth_host.BindNewEndpointAndPassReceiver());
|
||||
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
|
||||
|
@ -207,7 +146,7 @@ index 5ff5939031672..01742ddfef449 100644
|
|||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlocked: {
|
||||
@@ -1153,7 +1155,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1157,7 +1159,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
|
||||
placeholder->AllowLoading();
|
||||
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
|
||||
|
@ -217,7 +156,7 @@ index 5ff5939031672..01742ddfef449 100644
|
|||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
|
||||
@@ -1163,7 +1166,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1167,7 +1170,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
group_name));
|
||||
RenderThread::Get()->RecordAction(
|
||||
UserMetricsAction("Plugin_BlockedByPolicy"));
|
||||
|
@ -227,7 +166,7 @@ index 5ff5939031672..01742ddfef449 100644
|
|||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
|
||||
@@ -1171,7 +1175,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1175,7 +1179,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
IDR_BLOCKED_PLUGIN_HTML,
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
|
||||
group_name));
|
||||
|
@ -238,10 +177,10 @@ index 5ff5939031672..01742ddfef449 100644
|
|||
}
|
||||
}
|
||||
diff --git content/browser/browser_plugin/browser_plugin_guest.h content/browser/browser_plugin/browser_plugin_guest.h
|
||||
index d596ac1b51e87..64dfdd8cddccb 100644
|
||||
index 567d0f56294f8..1526e57fc0aeb 100644
|
||||
--- content/browser/browser_plugin/browser_plugin_guest.h
|
||||
+++ content/browser/browser_plugin/browser_plugin_guest.h
|
||||
@@ -116,6 +116,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
|
||||
@@ -117,6 +117,8 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
|
||||
|
||||
gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
|
||||
index 0d6bbf294add1..8b438ff31e2a6 100644
|
||||
index 84b3ee712d563..daf84bffa9aae 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -5,6 +5,7 @@
|
||||
|
@ -18,7 +18,7 @@ index 0d6bbf294add1..8b438ff31e2a6 100644
|
|||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -241,6 +243,10 @@ static_library("renderer") {
|
||||
@@ -242,6 +244,10 @@ static_library("renderer") {
|
||||
|
||||
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
|
||||
index 2404d62d189df..4daa969021dd5 100644
|
||||
index 50654aa1cecba..4e545d447109e 100644
|
||||
--- chrome/app/chrome_main_delegate.cc
|
||||
+++ chrome/app/chrome_main_delegate.cc
|
||||
@@ -29,6 +29,7 @@
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "base/trace_event/trace_event_impl.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
|
@ -10,7 +10,7 @@ index 2404d62d189df..4daa969021dd5 100644
|
|||
#include "chrome/browser/chrome_content_browser_client.h"
|
||||
#include "chrome/browser/chrome_resource_bundle_helper.h"
|
||||
#include "chrome/browser/defaults.h"
|
||||
@@ -386,6 +387,8 @@ struct MainFunction {
|
||||
@@ -388,6 +389,8 @@ struct MainFunction {
|
||||
|
||||
// Initializes the user data dir. Must be called before InitializeLocalState().
|
||||
void InitializeUserDataDir(base::CommandLine* command_line) {
|
||||
|
@ -19,7 +19,7 @@ index 2404d62d189df..4daa969021dd5 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.
|
||||
@@ -712,7 +715,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
|
||||
@@ -714,7 +717,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
|
||||
}
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
@ -29,7 +29,7 @@ index 2404d62d189df..4daa969021dd5 100644
|
|||
base::sequence_manager::internal::ThreadControllerPowerMonitor::
|
||||
InitializeOnMainThread();
|
||||
#endif
|
||||
@@ -1007,6 +1012,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1012,6 +1017,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
std::string process_type =
|
||||
command_line.GetSwitchValueASCII(switches::kProcessType);
|
||||
|
||||
|
@ -37,7 +37,7 @@ index 2404d62d189df..4daa969021dd5 100644
|
|||
crash_reporter::InitializeCrashKeys();
|
||||
|
||||
#if defined(OS_POSIX)
|
||||
@@ -1017,6 +1023,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1022,6 +1028,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
InitMacCrashReporter(command_line, process_type);
|
||||
SetUpInstallerPreferences(command_line);
|
||||
#endif
|
||||
|
@ -45,7 +45,7 @@ index 2404d62d189df..4daa969021dd5 100644
|
|||
|
||||
#if defined(OS_WIN)
|
||||
child_process_logging::Init();
|
||||
@@ -1140,6 +1147,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1148,6 +1155,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
locale;
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ index 2404d62d189df..4daa969021dd5 100644
|
|||
#if defined(OS_POSIX) && !defined(OS_MAC)
|
||||
// Zygote needs to call InitCrashReporter() in RunZygote().
|
||||
if (process_type != switches::kZygoteProcess) {
|
||||
@@ -1172,6 +1180,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1180,6 +1188,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 2404d62d189df..4daa969021dd5 100644
|
|||
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
MaybePatchGdiGetFontData();
|
||||
@@ -1270,6 +1279,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1278,6 +1287,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
SetUpProfilingShutdownHandler();
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ index 2404d62d189df..4daa969021dd5 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 =
|
||||
@@ -1286,6 +1296,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1294,6 +1304,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
|
||||
// Reset the command line for the newly spawned process.
|
||||
crash_keys::SetCrashKeysFromCommandLine(*command_line);
|
||||
|
@ -78,7 +78,7 @@ index 2404d62d189df..4daa969021dd5 100644
|
|||
|
||||
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
|
||||
index 15a26590d35e4..5f95666dd7967 100644
|
||||
index 98cc7f60b50f1..21d5ef9c23c7b 100644
|
||||
--- chrome/browser/chrome_browser_main.cc
|
||||
+++ chrome/browser/chrome_browser_main.cc
|
||||
@@ -50,6 +50,7 @@
|
||||
|
@ -101,7 +101,7 @@ index 15a26590d35e4..5f95666dd7967 100644
|
|||
|
||||
// These members must be initialized before returning from this function.
|
||||
// Android doesn't use StartupBrowserCreator.
|
||||
@@ -1690,11 +1693,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
@@ -1692,11 +1695,14 @@ 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|.
|
||||
|
@ -156,7 +156,7 @@ index 95d1ebc190910..13cdfa52db108 100644
|
|||
+#endif
|
||||
}
|
||||
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
|
||||
index 4ba206e769e7e..1d2cf1b866dfa 100644
|
||||
index c640ba0cc074e..0f099b6a88b40 100644
|
||||
--- chrome/browser/chrome_content_browser_client.cc
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -28,6 +28,7 @@
|
||||
|
@ -167,7 +167,7 @@ index 4ba206e769e7e..1d2cf1b866dfa 100644
|
|||
#include "chrome/browser/accessibility/accessibility_labels_service.h"
|
||||
#include "chrome/browser/accessibility/accessibility_labels_service_factory.h"
|
||||
#include "chrome/browser/after_startup_task_utils.h"
|
||||
@@ -3674,9 +3675,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
@@ -3672,9 +3673,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
&search::HandleNewTabURLReverseRewrite);
|
||||
#endif // defined(OS_ANDROID)
|
||||
|
||||
|
@ -179,7 +179,7 @@ index 4ba206e769e7e..1d2cf1b866dfa 100644
|
|||
}
|
||||
|
||||
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
|
||||
@@ -5288,7 +5291,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
@@ -5302,7 +5305,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
|
||||
network_service);
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ index 4ba206e769e7e..1d2cf1b866dfa 100644
|
|||
content::BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -5306,6 +5309,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -5320,6 +5323,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
|
||||
network_context_params->user_agent = GetUserAgent();
|
||||
network_context_params->accept_language = GetApplicationLocale();
|
||||
}
|
||||
|
@ -198,10 +198,10 @@ index 4ba206e769e7e..1d2cf1b866dfa 100644
|
|||
|
||||
std::vector<base::FilePath>
|
||||
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
|
||||
index 0c8939e57e814..25c0a2acff7dd 100644
|
||||
index 99ab233c779f3..0813b9156c3b5 100644
|
||||
--- chrome/browser/chrome_content_browser_client.h
|
||||
+++ chrome/browser/chrome_content_browser_client.h
|
||||
@@ -548,7 +548,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
@@ -545,7 +545,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
override;
|
||||
void OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) override;
|
||||
|
@ -211,7 +211,7 @@ index 0c8939e57e814..25c0a2acff7dd 100644
|
|||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
|
||||
index d5ed8faa24cfb..a30a0eed11278 100644
|
||||
index a55c24300b40b..47369c7079e6f 100644
|
||||
--- chrome/browser/prefs/browser_prefs.cc
|
||||
+++ chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
|
@ -222,7 +222,7 @@ index d5ed8faa24cfb..a30a0eed11278 100644
|
|||
#include "chrome/browser/about_flags.h"
|
||||
#include "chrome/browser/accessibility/accessibility_labels_service.h"
|
||||
#include "chrome/browser/accessibility/accessibility_ui.h"
|
||||
@@ -167,6 +168,10 @@
|
||||
@@ -164,6 +165,10 @@
|
||||
#include "chrome/browser/background/background_mode_manager.h"
|
||||
#endif
|
||||
|
||||
|
@ -233,7 +233,7 @@ index d5ed8faa24cfb..a30a0eed11278 100644
|
|||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "chrome/browser/accessibility/animation_policy_prefs.h"
|
||||
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
|
||||
@@ -1195,6 +1200,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
@@ -1214,6 +1219,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
SessionDataService::RegisterProfilePrefs(registry);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
|
||||
index 12c161774914c..c681383e3a947 100644
|
||||
index 4571235afb4fa..af507323d9097 100644
|
||||
--- chrome/browser/ui/browser_command_controller.cc
|
||||
+++ chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -351,8 +351,10 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
@@ -369,8 +369,10 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
|
||||
// CommandUpdaterDelegate and CommandUpdater declare this function so we
|
||||
// choose to not implement CommandUpdaterDelegate inside this class and
|
||||
// therefore command_updater_ doesn't have the delegate set).
|
||||
|
@ -14,7 +14,7 @@ index 12c161774914c..c681383e3a947 100644
|
|||
|
||||
// No commands are enabled if there is not yet any selected tab.
|
||||
// TODO(pkasting): It seems like we should not need this, because either
|
||||
@@ -965,11 +967,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
@@ -980,11 +982,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
|
||||
// BrowserCommandController, private:
|
||||
|
||||
bool BrowserCommandController::IsShowingMainUI() {
|
||||
|
@ -129,10 +129,10 @@ index d32af8b258530..b883d7204ecec 100644
|
|||
BrowserFrame(const BrowserFrame&) = delete;
|
||||
BrowserFrame& operator=(const BrowserFrame&) = delete;
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
|
||||
index 9f57e739baf84..f0d42b0c98a05 100644
|
||||
index 2fd995c53c6c7..ab53c371ff540 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -289,11 +289,10 @@ using content::WebContents;
|
||||
@@ -290,11 +290,10 @@ using content::WebContents;
|
||||
using views::ColumnSet;
|
||||
using web_modal::WebContentsModalDialogHost;
|
||||
|
||||
|
@ -147,7 +147,7 @@ index 9f57e739baf84..f0d42b0c98a05 100644
|
|||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// UMA histograms that record animation smoothness for tab loading animation.
|
||||
@@ -608,11 +607,22 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
@@ -676,11 +675,22 @@ class BrowserView::SidePanelButtonHighlighter : public views::ViewObserver {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BrowserView, public:
|
||||
|
||||
|
@ -171,7 +171,7 @@ index 9f57e739baf84..f0d42b0c98a05 100644
|
|||
SetShowIcon(::ShouldShowWindowIcon(browser_.get()));
|
||||
|
||||
// In forced app mode, all size controls are always disabled. Otherwise, use
|
||||
@@ -626,7 +636,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
@@ -694,7 +704,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
}
|
||||
|
||||
browser_->tab_strip_model()->AddObserver(this);
|
||||
|
@ -179,7 +179,7 @@ index 9f57e739baf84..f0d42b0c98a05 100644
|
|||
|
||||
// Top container holds tab strip region and toolbar and lives at the front of
|
||||
// the view hierarchy.
|
||||
@@ -672,8 +681,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
@@ -740,8 +749,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
|
||||
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
|
||||
devtools_web_view_, contents_web_view_));
|
||||
|
||||
|
@ -197,7 +197,7 @@ index 9f57e739baf84..f0d42b0c98a05 100644
|
|||
|
||||
contents_separator_ =
|
||||
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
|
||||
@@ -1523,6 +1539,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
@@ -1603,6 +1619,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
|
||||
if (immersive_mode_controller_->IsEnabled())
|
||||
return false;
|
||||
|
||||
|
@ -206,7 +206,7 @@ index 9f57e739baf84..f0d42b0c98a05 100644
|
|||
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
|
||||
}
|
||||
|
||||
@@ -2645,7 +2663,8 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const {
|
||||
@@ -2741,7 +2759,8 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const {
|
||||
}
|
||||
|
||||
void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
|
@ -216,7 +216,7 @@ index 9f57e739baf84..f0d42b0c98a05 100644
|
|||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
EnsureFocusOrder();
|
||||
@@ -3097,8 +3116,10 @@ void BrowserView::Layout() {
|
||||
@@ -3200,8 +3219,10 @@ void BrowserView::Layout() {
|
||||
|
||||
// TODO(jamescook): Why was this in the middle of layout code?
|
||||
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
|
||||
|
@ -229,7 +229,7 @@ index 9f57e739baf84..f0d42b0c98a05 100644
|
|||
|
||||
// Some of the situations when the BrowserView is laid out are:
|
||||
// - Enter/exit immersive fullscreen mode.
|
||||
@@ -3161,6 +3182,11 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -3264,6 +3285,11 @@ void BrowserView::AddedToWidget() {
|
||||
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
|
||||
#endif
|
||||
|
||||
|
@ -240,8 +240,8 @@ index 9f57e739baf84..f0d42b0c98a05 100644
|
|||
+
|
||||
toolbar_->Init();
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
@@ -3196,13 +3222,9 @@ void BrowserView::AddedToWidget() {
|
||||
// TODO(pbos): Manage this either inside SidePanel or the corresponding button
|
||||
@@ -3313,13 +3339,9 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
EnsureFocusOrder();
|
||||
|
||||
|
@ -258,7 +258,7 @@ index 9f57e739baf84..f0d42b0c98a05 100644
|
|||
|
||||
MaybeInitializeWebUITabStrip();
|
||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||
index 05dd759a2cf5b..377ac51e75f3d 100644
|
||||
index 9c99d9de95f54..91933cf820fe8 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -125,11 +125,16 @@ class BrowserView : public BrowserWindow,
|
||||
|
@ -278,7 +278,7 @@ index 05dd759a2cf5b..377ac51e75f3d 100644
|
|||
void set_frame(BrowserFrame* frame) { frame_ = frame; }
|
||||
BrowserFrame* frame() const { return frame_; }
|
||||
|
||||
@@ -695,6 +700,12 @@ class BrowserView : public BrowserWindow,
|
||||
@@ -698,6 +703,12 @@ class BrowserView : public BrowserWindow,
|
||||
return accessibility_focus_highlight_.get();
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ index 05dd759a2cf5b..377ac51e75f3d 100644
|
|||
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
|
||||
// interface to keep these two classes decoupled and testable.
|
||||
diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
index c31b8240eb455..70e8cc8854596 100644
|
||||
index c8b67cf98846a..bad018719d95b 100644
|
||||
--- chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
@@ -39,6 +39,10 @@
|
||||
|
@ -306,7 +306,7 @@ index c31b8240eb455..70e8cc8854596 100644
|
|||
using views::View;
|
||||
using web_modal::WebContentsModalDialogHost;
|
||||
using web_modal::ModalDialogHostObserver;
|
||||
@@ -446,6 +450,11 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
|
||||
@@ -457,6 +461,11 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
|
||||
|
||||
int BrowserViewLayout::LayoutToolbar(int top) {
|
||||
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
|
||||
|
@ -319,10 +319,10 @@ index c31b8240eb455..70e8cc8854596 100644
|
|||
bool toolbar_visible = delegate_->IsToolbarVisible();
|
||||
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
|
||||
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
index 140c0df49ea46..7d4ac470dcc9a 100644
|
||||
index 745f4e89e5775..234d6dfed0c26 100644
|
||||
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
|
||||
@@ -591,37 +591,53 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
@@ -558,37 +558,53 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
|
||||
}
|
||||
|
||||
bool BrowserTabStripController::IsFrameCondensed() const {
|
||||
|
@ -377,7 +377,7 @@ index 140c0df49ea46..7d4ac470dcc9a 100644
|
|||
}
|
||||
|
||||
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
index 31e062d75daeb..c6d700e702e56 100644
|
||||
index f9688138a7e87..03835b5e28506 100644
|
||||
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -167,12 +167,13 @@ auto& GetViewCommandMap() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
|
||||
index 6aa16d20faa3b..5c4fd217ae936 100644
|
||||
index b1c7f6ed1b779..60b9cf0a9479f 100644
|
||||
--- content/browser/devtools/devtools_instrumentation.h
|
||||
+++ content/browser/devtools/devtools_instrumentation.h
|
||||
@@ -90,7 +90,7 @@ bool ApplyUserAgentMetadataOverrides(
|
||||
@@ -95,7 +95,7 @@ bool ApplyUserAgentMetadataOverrides(
|
||||
FrameTreeNode* frame_tree_node,
|
||||
absl::optional<blink::UserAgentMetadata>* override_out);
|
||||
|
||||
|
@ -47,7 +47,7 @@ index 57072bf1263ae..0a93446e4d21c 100644
|
|||
blink::mojom::V8CacheOptions GetV8CacheOptions();
|
||||
|
||||
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
|
||||
index 103fe625bb488..81c79036aa465 100644
|
||||
index c4d5cb83938e1..954c1c213e4a8 100644
|
||||
--- third_party/blink/renderer/controller/BUILD.gn
|
||||
+++ third_party/blink/renderer/controller/BUILD.gn
|
||||
@@ -33,6 +33,7 @@ component("controller") {
|
||||
|
@ -58,7 +58,7 @@ index 103fe625bb488..81c79036aa465 100644
|
|||
"//third_party/blink/renderer:config",
|
||||
"//third_party/blink/renderer:inside_blink",
|
||||
"//third_party/blink/renderer:non_test_config",
|
||||
@@ -57,6 +58,8 @@ component("controller") {
|
||||
@@ -58,6 +59,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",
|
||||
|
|
|
@ -1,68 +1,5 @@
|
|||
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
|
||||
index c5a29d75151a6..c5b198483cb4a 100644
|
||||
--- chrome/browser/download/download_target_determiner.cc
|
||||
+++ chrome/browser/download/download_target_determiner.cc
|
||||
@@ -683,7 +683,7 @@ void IsHandledBySafePlugin(int render_process_id,
|
||||
content::PluginService* plugin_service =
|
||||
content::PluginService::GetInstance();
|
||||
bool plugin_found = plugin_service->GetPluginInfo(
|
||||
- render_process_id, routing_id, url, url::Origin(), mime_type, false,
|
||||
+ render_process_id, routing_id, url, true, url::Origin(), mime_type, false,
|
||||
&is_stale, &plugin_info, &actual_mime_type);
|
||||
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 4e6a0f8e664b3..e34a49e4fc654 100644
|
||||
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
@@ -129,6 +129,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
|
||||
int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& plugin_content_url,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
content::WebPluginInfo* plugin) {
|
||||
base::AutoLock auto_lock(lock_);
|
||||
diff --git chrome/browser/plugins/chrome_plugin_service_filter.h chrome/browser/plugins/chrome_plugin_service_filter.h
|
||||
index 937d3d5bc84fd..ac327392dcf37 100644
|
||||
--- chrome/browser/plugins/chrome_plugin_service_filter.h
|
||||
+++ chrome/browser/plugins/chrome_plugin_service_filter.h
|
||||
@@ -64,6 +64,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter,
|
||||
bool IsPluginAvailable(int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& plugin_content_url,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
content::WebPluginInfo* plugin) override;
|
||||
|
||||
diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
|
||||
index 6b260a40b14a2..b6198889273ce 100644
|
||||
--- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
|
||||
+++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc
|
||||
@@ -65,7 +65,7 @@ bool IsPDFPluginEnabled(content::NavigationHandle* navigation_handle,
|
||||
|
||||
content::WebPluginInfo plugin_info;
|
||||
return content::PluginService::GetInstance()->GetPluginInfo(
|
||||
- process_id, routing_id, navigation_handle->GetURL(),
|
||||
+ process_id, routing_id, navigation_handle->GetURL(), false,
|
||||
web_contents->GetMainFrame()->GetLastCommittedOrigin(), kPDFMimeType,
|
||||
false /* allow_wildcard */, is_stale, &plugin_info,
|
||||
nullptr /* actual_mime_type */);
|
||||
diff --git chrome/browser/ui/views/frame/browser_root_view.cc chrome/browser/ui/views/frame/browser_root_view.cc
|
||||
index 6e2d09885b457..da23a0211754b 100644
|
||||
--- chrome/browser/ui/views/frame/browser_root_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_root_view.cc
|
||||
@@ -85,7 +85,7 @@ void OnFindURLMimeType(const GURL& url,
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
content::WebPluginInfo plugin;
|
||||
result = result || content::PluginService::GetInstance()->GetPluginInfo(
|
||||
- process_id, routing_id, url, url::Origin(), mime_type,
|
||||
+ process_id, routing_id, url, true, url::Origin(), mime_type,
|
||||
false, nullptr, &plugin, nullptr);
|
||||
#endif
|
||||
|
||||
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
|
||||
index 18b58f53a9df7..80452f68f24fb 100644
|
||||
index 687de58ebbf49..b2588b21b2462 100644
|
||||
--- content/browser/devtools/devtools_http_handler.cc
|
||||
+++ content/browser/devtools/devtools_http_handler.cc
|
||||
@@ -575,7 +575,7 @@ void DevToolsHttpHandler::OnJsonRequest(
|
||||
|
@ -75,10 +12,10 @@ index 18b58f53a9df7..80452f68f24fb 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 06517d7afaaa2..e368b300c5e30 100644
|
||||
index 20748b3098d8b..f6a7e94f8d0af 100644
|
||||
--- content/browser/loader/navigation_url_loader_impl.cc
|
||||
+++ content/browser/loader/navigation_url_loader_impl.cc
|
||||
@@ -670,6 +670,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
|
||||
@@ -660,6 +660,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(
|
||||
resource_request_->has_user_gesture, initiating_origin,
|
||||
&loader_factory);
|
||||
|
||||
|
@ -92,149 +29,8 @@ index 06517d7afaaa2..e368b300c5e30 100644
|
|||
if (loader_factory) {
|
||||
factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
|
||||
std::move(loader_factory));
|
||||
@@ -838,7 +845,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(
|
||||
- render_process_id, routing_id, resource_request_->url, url::Origin(),
|
||||
+ render_process_id, routing_id, resource_request_->url, true, url::Origin(),
|
||||
head->mime_type, /*allow_wildcard=*/false, &stale, &plugin, nullptr);
|
||||
|
||||
if (stale) {
|
||||
diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc
|
||||
index bec7bccadfec4..5a45990eb71ed 100644
|
||||
--- content/browser/plugin_service_impl.cc
|
||||
+++ content/browser/plugin_service_impl.cc
|
||||
@@ -266,6 +266,7 @@ bool PluginServiceImpl::GetPluginInfoArray(
|
||||
bool PluginServiceImpl::GetPluginInfo(int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
@@ -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,
|
||||
- main_frame_origin, &plugins[i])) {
|
||||
+ is_main_frame, main_frame_origin,
|
||||
+ &plugins[i])) {
|
||||
*info = plugins[i];
|
||||
if (actual_mime_type)
|
||||
*actual_mime_type = mime_types[i];
|
||||
diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h
|
||||
index b0fb11b4d5ba7..1bce64c6b20ee 100644
|
||||
--- content/browser/plugin_service_impl.h
|
||||
+++ content/browser/plugin_service_impl.h
|
||||
@@ -54,6 +54,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
|
||||
bool GetPluginInfo(int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/browser/renderer_host/plugin_registry_impl.cc content/browser/renderer_host/plugin_registry_impl.cc
|
||||
index 54a561c009464..a51afa5c74141 100644
|
||||
--- content/browser/renderer_host/plugin_registry_impl.cc
|
||||
+++ content/browser/renderer_host/plugin_registry_impl.cc
|
||||
@@ -30,6 +30,7 @@ void PluginRegistryImpl::Bind(
|
||||
}
|
||||
|
||||
void PluginRegistryImpl::GetPlugins(bool refresh,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
GetPluginsCallback callback) {
|
||||
auto* plugin_service = PluginServiceImpl::GetInstance();
|
||||
@@ -51,10 +52,11 @@ void PluginRegistryImpl::GetPlugins(bool refresh,
|
||||
|
||||
plugin_service->GetPlugins(base::BindOnce(
|
||||
&PluginRegistryImpl::GetPluginsComplete, weak_factory_.GetWeakPtr(),
|
||||
- main_frame_origin, std::move(callback)));
|
||||
+ is_main_frame, main_frame_origin, std::move(callback)));
|
||||
}
|
||||
|
||||
void PluginRegistryImpl::GetPluginsComplete(
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
GetPluginsCallback callback,
|
||||
const std::vector<WebPluginInfo>& all_plugins) {
|
||||
@@ -77,6 +79,7 @@ void PluginRegistryImpl::GetPluginsComplete(
|
||||
// TODO(crbug.com/621724): Pass an url::Origin instead of a GURL.
|
||||
if (!filter || filter->IsPluginAvailable(render_process_id_, routing_id,
|
||||
main_frame_origin.GetURL(),
|
||||
+ is_main_frame,
|
||||
main_frame_origin, &plugin)) {
|
||||
auto plugin_blink = blink::mojom::PluginInfo::New();
|
||||
plugin_blink->name = plugin.name;
|
||||
diff --git content/browser/renderer_host/plugin_registry_impl.h content/browser/renderer_host/plugin_registry_impl.h
|
||||
index 632ae86c6fd69..55b749ec12421 100644
|
||||
--- content/browser/renderer_host/plugin_registry_impl.h
|
||||
+++ content/browser/renderer_host/plugin_registry_impl.h
|
||||
@@ -24,11 +24,13 @@ class PluginRegistryImpl : public blink::mojom::PluginRegistry {
|
||||
|
||||
// blink::mojom::PluginRegistry
|
||||
void GetPlugins(bool refresh,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
GetPluginsCallback callback) override;
|
||||
|
||||
private:
|
||||
- void GetPluginsComplete(const url::Origin& main_frame_origin,
|
||||
+ void GetPluginsComplete(bool is_main_frame,
|
||||
+ const url::Origin& main_frame_origin,
|
||||
GetPluginsCallback callback,
|
||||
const std::vector<WebPluginInfo>& all_plugins);
|
||||
|
||||
diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 6520b9b7e90aa..60af548b678cc 100644
|
||||
--- content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -12341,6 +12341,7 @@ void RenderFrameHostImpl::BindHungDetectorHost(
|
||||
}
|
||||
|
||||
void RenderFrameHostImpl::GetPluginInfo(const GURL& url,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
GetPluginInfoCallback callback) {
|
||||
@@ -12348,7 +12349,8 @@ void RenderFrameHostImpl::GetPluginInfo(const GURL& url,
|
||||
WebPluginInfo info;
|
||||
std::string actual_mime_type;
|
||||
bool found = PluginServiceImpl::GetInstance()->GetPluginInfo(
|
||||
- GetProcess()->GetID(), routing_id_, url, main_frame_origin, mime_type,
|
||||
+ GetProcess()->GetID(), routing_id_, url, is_main_frame,
|
||||
+ main_frame_origin, mime_type,
|
||||
allow_wildcard, nullptr, &info, &actual_mime_type);
|
||||
std::move(callback).Run(found, info, actual_mime_type);
|
||||
}
|
||||
diff --git content/browser/renderer_host/render_frame_host_impl.h content/browser/renderer_host/render_frame_host_impl.h
|
||||
index 86666516a0131..c1e11fbfda6fb 100644
|
||||
--- content/browser/renderer_host/render_frame_host_impl.h
|
||||
+++ content/browser/renderer_host/render_frame_host_impl.h
|
||||
@@ -2614,6 +2614,7 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
int32_t plugin_child_id,
|
||||
const base::FilePath& path) override;
|
||||
void GetPluginInfo(const GURL& url,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
GetPluginInfoCallback callback) override;
|
||||
diff --git content/common/pepper_plugin.mojom content/common/pepper_plugin.mojom
|
||||
index c20ff8254421b..84659f627e2f8 100644
|
||||
--- content/common/pepper_plugin.mojom
|
||||
+++ content/common/pepper_plugin.mojom
|
||||
@@ -29,6 +29,7 @@ interface PepperHost {
|
||||
// found plugin.
|
||||
[Sync]
|
||||
GetPluginInfo(url.mojom.Url url,
|
||||
+ bool is_main_frame,
|
||||
url.mojom.Origin main_frame_origin,
|
||||
string mime_type) =>
|
||||
(bool found,
|
||||
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
|
||||
index 248a90c768200..1ba2f15d5778d 100644
|
||||
index 85f0857a66fd6..00ff3cb1cfaec 100644
|
||||
--- content/public/browser/content_browser_client.cc
|
||||
+++ content/public/browser/content_browser_client.cc
|
||||
@@ -9,7 +9,7 @@
|
||||
|
@ -246,7 +42,7 @@ index 248a90c768200..1ba2f15d5778d 100644
|
|||
|
||||
#include <utility>
|
||||
|
||||
@@ -874,7 +874,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
@@ -867,7 +867,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
void ContentBrowserClient::OnNetworkServiceCreated(
|
||||
network::mojom::NetworkService* network_service) {}
|
||||
|
||||
|
@ -255,7 +51,7 @@ index 248a90c768200..1ba2f15d5778d 100644
|
|||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -883,6 +883,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
|
||||
@@ -876,6 +876,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
|
||||
cert_verifier_creation_params) {
|
||||
network_context_params->user_agent = GetUserAgent();
|
||||
network_context_params->accept_language = "en-us,en";
|
||||
|
@ -264,7 +60,7 @@ index 248a90c768200..1ba2f15d5778d 100644
|
|||
|
||||
std::vector<base::FilePath>
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index 7dfc30f346a94..8adbde6963711 100644
|
||||
index ec5a3515a248f..637e4edfc2738 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -33,6 +33,7 @@
|
||||
|
@ -275,7 +71,7 @@ index 7dfc30f346a94..8adbde6963711 100644
|
|||
#include "content/public/browser/web_ui_browser_interface_broker_registry.h"
|
||||
#include "content/public/common/page_visibility_state.h"
|
||||
#include "content/public/common/window_container_type.mojom-forward.h"
|
||||
@@ -1618,7 +1619,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1619,7 +1620,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
//
|
||||
// If |relative_partition_path| is the empty string, it means this needs to
|
||||
// create the default NetworkContext for the BrowserContext.
|
||||
|
@ -284,7 +80,7 @@ index 7dfc30f346a94..8adbde6963711 100644
|
|||
BrowserContext* context,
|
||||
bool in_memory,
|
||||
const base::FilePath& relative_partition_path,
|
||||
@@ -1802,6 +1803,15 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1803,6 +1804,15 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const absl::optional<url::Origin>& initiating_origin,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
|
||||
|
||||
|
@ -300,7 +96,7 @@ index 7dfc30f346a94..8adbde6963711 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.
|
||||
@@ -1879,6 +1889,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1880,6 +1890,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Used as part of the user agent string.
|
||||
virtual std::string GetProduct();
|
||||
|
||||
|
@ -311,35 +107,11 @@ index 7dfc30f346a94..8adbde6963711 100644
|
|||
// Returns the user agent.Content may cache this value.
|
||||
virtual std::string GetUserAgent();
|
||||
|
||||
diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h
|
||||
index edcc4c1747123..29eea000a9100 100644
|
||||
--- content/public/browser/plugin_service.h
|
||||
+++ content/public/browser/plugin_service.h
|
||||
@@ -78,6 +78,7 @@ class CONTENT_EXPORT PluginService {
|
||||
virtual bool GetPluginInfo(int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/public/browser/plugin_service_filter.h content/public/browser/plugin_service_filter.h
|
||||
index 570b5a4738b94..923a5f7195c53 100644
|
||||
--- content/public/browser/plugin_service_filter.h
|
||||
+++ content/public/browser/plugin_service_filter.h
|
||||
@@ -30,6 +30,7 @@ class PluginServiceFilter {
|
||||
virtual bool IsPluginAvailable(int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
WebPluginInfo* plugin) = 0;
|
||||
|
||||
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
|
||||
index f3852c0eef152..03b751225575e 100644
|
||||
index 0b098038d2f56..bd85dbf2727c1 100644
|
||||
--- content/public/renderer/content_renderer_client.h
|
||||
+++ content/public/renderer/content_renderer_client.h
|
||||
@@ -82,6 +82,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -86,6 +86,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// binding requests from RenderProcessHost::BindReceiver().
|
||||
virtual void ExposeInterfacesToBrowser(mojo::BinderMap* binders) {}
|
||||
|
||||
|
@ -349,7 +121,7 @@ index f3852c0eef152..03b751225575e 100644
|
|||
// Notifies that a new RenderFrame has been created.
|
||||
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
|
||||
|
||||
@@ -293,6 +296,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -297,6 +300,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// This method may invalidate the frame.
|
||||
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
|
||||
|
||||
|
@ -360,25 +132,11 @@ index f3852c0eef152..03b751225575e 100644
|
|||
// Allows subclasses to enable some runtime features before Blink has
|
||||
// started.
|
||||
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
|
||||
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
|
||||
index 78ec20c40e5db..406a25890ddb8 100644
|
||||
--- content/renderer/render_frame_impl.cc
|
||||
+++ content/renderer/render_frame_impl.cc
|
||||
@@ -3278,7 +3278,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
WebPluginInfo info;
|
||||
std::string mime_type;
|
||||
bool found = false;
|
||||
- GetPepperHost()->GetPluginInfo(params.url, frame_->Top()->GetSecurityOrigin(),
|
||||
+ GetPepperHost()->GetPluginInfo(params.url, frame_->Parent() == nullptr,
|
||||
+ frame_->Top()->GetSecurityOrigin(),
|
||||
params.mime_type.Utf8(), &found, &info,
|
||||
&mime_type);
|
||||
if (!found)
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index 1546f52724fc7..776efe8247abd 100644
|
||||
index 4f7ea9bd9117e..3e325c0514de0 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -616,6 +616,8 @@ void RenderThreadImpl::Init() {
|
||||
@@ -663,6 +663,8 @@ void RenderThreadImpl::Init() {
|
||||
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
|
||||
blink::URLLoaderThrottleProviderType::kFrame);
|
||||
|
||||
|
@ -388,10 +146,10 @@ index 1546f52724fc7..776efe8247abd 100644
|
|||
&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this)));
|
||||
|
||||
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
|
||||
index bbfe51c4bcfd5..b81c93789993c 100644
|
||||
index 6616ad76bc307..95524ec98ce5c 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -1093,6 +1093,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
|
||||
@@ -1086,6 +1086,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -408,10 +166,10 @@ index bbfe51c4bcfd5..b81c93789993c 100644
|
|||
RendererBlinkPlatformImpl::GetCodeCacheHost() {
|
||||
base::AutoLock lock(code_cache_host_lock_);
|
||||
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
|
||||
index 6c0a233f70d81..38f15d507f2a2 100644
|
||||
index 745204f21d304..87b7767fcba68 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -264,6 +264,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -262,6 +262,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
const blink::WebURL& url,
|
||||
blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) override;
|
||||
|
||||
|
@ -421,27 +179,3 @@ index 6c0a233f70d81..38f15d507f2a2 100644
|
|||
// Tells this platform that the renderer is locked to a site (i.e., a scheme
|
||||
// plus eTLD+1, such as https://google.com), or to a more specific origin.
|
||||
void SetIsLockedToSite();
|
||||
diff --git content/shell/browser/shell_plugin_service_filter.cc content/shell/browser/shell_plugin_service_filter.cc
|
||||
index c25b7d1a18432..7e007d964f1a1 100644
|
||||
--- content/shell/browser/shell_plugin_service_filter.cc
|
||||
+++ content/shell/browser/shell_plugin_service_filter.cc
|
||||
@@ -17,6 +17,7 @@ bool ShellPluginServiceFilter::IsPluginAvailable(
|
||||
int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
WebPluginInfo* plugin) {
|
||||
return plugin->name == u"Blink Test Plugin" ||
|
||||
diff --git content/shell/browser/shell_plugin_service_filter.h content/shell/browser/shell_plugin_service_filter.h
|
||||
index e9d0bed90ea65..12d1acb37619f 100644
|
||||
--- content/shell/browser/shell_plugin_service_filter.h
|
||||
+++ content/shell/browser/shell_plugin_service_filter.h
|
||||
@@ -24,6 +24,7 @@ class ShellPluginServiceFilter : public PluginServiceFilter {
|
||||
bool IsPluginAvailable(int render_process_id,
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
+ bool is_main_frame,
|
||||
const url::Origin& main_frame_origin,
|
||||
WebPluginInfo* plugin) override;
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ index a26c5c2e053ed..c88c4c1b81f9b 100644
|
|||
return RunContentProcess(params, runner.get());
|
||||
}
|
||||
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
|
||||
index 915ae322cb6a2..781277e45de4c 100644
|
||||
index 6b59da3a0d069..4db71e0402eef 100644
|
||||
--- content/app/content_main_runner_impl.cc
|
||||
+++ content/app/content_main_runner_impl.cc
|
||||
@@ -45,6 +45,7 @@
|
||||
|
@ -134,7 +134,7 @@ index 915ae322cb6a2..781277e45de4c 100644
|
|||
#include "base/time/time.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -1146,6 +1147,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
@@ -1167,6 +1168,11 @@ void ContentMainRunnerImpl::Shutdown() {
|
||||
is_shutdown_ = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -366,10 +366,10 @@ index 39557cce47443..236806090021a 100644
|
|||
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/core/app/crashpad.cc components/crash/core/app/crashpad.cc
|
||||
index 42938c3994679..3e8eaeebd7b2b 100644
|
||||
index 40648c1166d8e..3270c3816b120 100644
|
||||
--- components/crash/core/app/crashpad.cc
|
||||
+++ components/crash/core/app/crashpad.cc
|
||||
@@ -152,7 +152,8 @@ void InitializeCrashpadImpl(bool initial_client,
|
||||
@@ -155,7 +155,8 @@ bool 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.
|
||||
|
@ -380,7 +380,7 @@ index 42938c3994679..3e8eaeebd7b2b 100644
|
|||
->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled);
|
||||
}
|
||||
diff --git components/crash/core/app/crashpad_mac.mm components/crash/core/app/crashpad_mac.mm
|
||||
index e3fc1fb2bcab3..56395d7100f94 100644
|
||||
index dc041c43371fd..1d060ae55c586 100644
|
||||
--- components/crash/core/app/crashpad_mac.mm
|
||||
+++ components/crash/core/app/crashpad_mac.mm
|
||||
@@ -16,11 +16,14 @@
|
||||
|
@ -454,7 +454,7 @@ index e3fc1fb2bcab3..56395d7100f94 100644
|
|||
} // @autoreleasepool
|
||||
return process_annotations;
|
||||
}();
|
||||
@@ -141,10 +162,10 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -141,10 +162,10 @@ bool PlatformCrashpadInitialization(
|
||||
|
||||
if (initial_client) {
|
||||
@autoreleasepool {
|
||||
|
@ -469,7 +469,7 @@ index e3fc1fb2bcab3..56395d7100f94 100644
|
|||
|
||||
// Is there a way to recover if this fails?
|
||||
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
||||
@@ -173,6 +194,12 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -173,6 +194,12 @@ bool PlatformCrashpadInitialization(
|
||||
"--reset-own-crash-exception-port-to-system-default");
|
||||
}
|
||||
|
||||
|
@ -480,10 +480,10 @@ index e3fc1fb2bcab3..56395d7100f94 100644
|
|||
+ crash_reporter_client->GetCrashOptionalArguments(&arguments);
|
||||
+
|
||||
bool result = GetCrashpadClient().StartHandler(
|
||||
handler_path, database_path, metrics_path, url,
|
||||
handler_path, *database_path, metrics_path, url,
|
||||
GetProcessSimpleAnnotations(), arguments, true, false);
|
||||
diff --git components/crash/core/app/crashpad_win.cc components/crash/core/app/crashpad_win.cc
|
||||
index 7dd251b2fdda8..3d358889ea6f2 100644
|
||||
index 1a8f42cb4e2ea..fbdeab5d54584 100644
|
||||
--- components/crash/core/app/crashpad_win.cc
|
||||
+++ components/crash/core/app/crashpad_win.cc
|
||||
@@ -36,8 +36,8 @@ void GetPlatformCrashpadAnnotations(
|
||||
|
@ -511,7 +511,7 @@ index 7dd251b2fdda8..3d358889ea6f2 100644
|
|||
#endif
|
||||
}
|
||||
|
||||
@@ -71,7 +73,9 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -71,7 +73,9 @@ bool PlatformCrashpadInitialization(
|
||||
base::FilePath metrics_path; // Only valid in the browser process.
|
||||
|
||||
const char kPipeNameVar[] = "CHROME_CRASHPAD_PIPE_NAME";
|
||||
|
@ -521,7 +521,7 @@ index 7dd251b2fdda8..3d358889ea6f2 100644
|
|||
std::unique_ptr<base::Environment> env(base::Environment::Create());
|
||||
|
||||
CrashReporterClient* crash_reporter_client = GetCrashReporterClient();
|
||||
@@ -92,9 +96,11 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -92,9 +96,11 @@ bool PlatformCrashpadInitialization(
|
||||
|
||||
std::string url = crash_reporter_client->GetUploadUrl();
|
||||
|
||||
|
@ -533,7 +533,7 @@ index 7dd251b2fdda8..3d358889ea6f2 100644
|
|||
|
||||
base::FilePath exe_file(exe_path);
|
||||
if (exe_file.empty()) {
|
||||
@@ -105,13 +111,14 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -105,13 +111,14 @@ bool PlatformCrashpadInitialization(
|
||||
exe_file = base::FilePath(exe_file_path);
|
||||
}
|
||||
|
||||
|
@ -553,7 +553,7 @@ index 7dd251b2fdda8..3d358889ea6f2 100644
|
|||
if (!user_data_dir.empty()) {
|
||||
start_arguments.push_back(std::string("--user-data-dir=") +
|
||||
user_data_dir);
|
||||
@@ -122,9 +129,12 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
@@ -122,9 +129,12 @@ bool PlatformCrashpadInitialization(
|
||||
start_arguments.push_back("/prefetch:7");
|
||||
} else {
|
||||
base::FilePath exe_dir = exe_file.DirName();
|
||||
|
|
|
@ -184,10 +184,10 @@ index f66da69a4cedb..01c6d05fdb446 100644
|
|||
|
||||
if (crashpad_is_win) {
|
||||
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
index b7e445fd9f3ed..c5f1a3c3ceee7 100644
|
||||
index 60f172b6c8017..f3fac02aac2e4 100644
|
||||
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
@@ -263,6 +263,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
|
||||
@@ -264,6 +264,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
|
||||
if (minidump_process_snapshot.Initialize(reader)) {
|
||||
parameters =
|
||||
BreakpadHTTPFormParametersFromMinidump(&minidump_process_snapshot);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
|
||||
index 516504c2ce442..60899c8e4f7bf 100644
|
||||
index 79ea44500f6e7..f1c4da868f12e 100644
|
||||
--- components/embedder_support/user_agent_utils.cc
|
||||
+++ components/embedder_support/user_agent_utils.cc
|
||||
@@ -14,6 +14,7 @@
|
||||
|
@ -8,9 +8,9 @@ index 516504c2ce442..60899c8e4f7bf 100644
|
|||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/common/cef_switches.h"
|
||||
#include "components/embedder_support/switches.h"
|
||||
#include "components/version_info/version_info.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
@@ -172,6 +173,12 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
|
||||
#include "components/policy/core/common/policy_pref_names.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
@@ -189,6 +190,12 @@ const blink::UserAgentBrandList& GetBrandVersionList(
|
||||
} // namespace
|
||||
|
||||
std::string GetProduct() {
|
||||
|
|
|
@ -60,7 +60,7 @@ index 5c903a13a14ed..c85964a7bab17 100644
|
|||
std::unique_ptr<StreamContainer> stream_container(
|
||||
new StreamContainer(tab_id, embedded, handler_url, extension_id,
|
||||
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
|
||||
index 941d1ab4ec0f1..e887234ad9a5f 100644
|
||||
index 790ee41f5be0d..adcc503b592f3 100644
|
||||
--- extensions/browser/extension_host.cc
|
||||
+++ extensions/browser/extension_host.cc
|
||||
@@ -62,11 +62,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
|
||||
|
@ -125,7 +125,7 @@ index 941d1ab4ec0f1..e887234ad9a5f 100644
|
|||
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
|
||||
|
||||
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
|
||||
index fe86adeadc40e..2d4d9fe819fb3 100644
|
||||
index 9a479775963fc..e3e24dca23594 100644
|
||||
--- extensions/browser/extension_host.h
|
||||
+++ extensions/browser/extension_host.h
|
||||
@@ -53,6 +53,12 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
|
@ -150,7 +150,7 @@ index fe86adeadc40e..2d4d9fe819fb3 100644
|
|||
content::RenderFrameHost* main_frame_host() const { return main_frame_host_; }
|
||||
content::RenderProcessHost* render_process_host() const;
|
||||
bool has_loaded_once() const { return has_loaded_once_; }
|
||||
@@ -188,7 +194,8 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
@@ -189,7 +195,8 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
content::BrowserContext* browser_context_;
|
||||
|
||||
// The host for our HTML content.
|
||||
|
@ -196,7 +196,7 @@ index 0d21ebc927042..a08ebcbafc252 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 4f33f582342d8..9e31be3254cfe 100644
|
||||
index 60d33c01de75b..6387238ef497f 100644
|
||||
--- extensions/browser/process_manager.cc
|
||||
+++ extensions/browser/process_manager.cc
|
||||
@@ -393,9 +393,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
|
||||
|
|
|
@ -12,7 +12,7 @@ index e2e2dcebcdcdb..35443d0e2af1a 100644
|
|||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 3f59615361652..db2d917fcc230 100644
|
||||
index 8b6f4bf90557a..6071a3a625a8c 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -16,6 +16,7 @@ import("//build/config/sanitizers/sanitizers.gni")
|
||||
|
@ -79,7 +79,7 @@ index d2266b28b33f8..a7ff6d9b68f38 100644
|
|||
+_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow
|
||||
+
|
||||
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
|
||||
index 0d34dbed6909c..52d1de37a6c28 100644
|
||||
index faedbc470f68c..bb084da13544c 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -4,6 +4,7 @@
|
||||
|
@ -102,7 +102,7 @@ index 0d34dbed6909c..52d1de37a6c28 100644
|
|||
sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ]
|
||||
deps += [ "//extensions:extensions_browser_resources" ]
|
||||
diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni
|
||||
index e9dfe6bb49914..1d15880a0e8a9 100644
|
||||
index 3425f1fef4917..edc0dc42bdb7d 100644
|
||||
--- chrome/chrome_repack_locales.gni
|
||||
+++ chrome/chrome_repack_locales.gni
|
||||
@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni")
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
|
||||
index 4e80d8de30827..2525656bfe7b5 100644
|
||||
index dda65e37e4db1..faf5d99f87e5d 100644
|
||||
--- tools/gritsettings/resource_ids.spec
|
||||
+++ tools/gritsettings/resource_ids.spec
|
||||
@@ -887,6 +887,15 @@
|
||||
@@ -895,6 +895,15 @@
|
||||
# END "everything else" section.
|
||||
# Everything but chrome/, components/, content/, and ios/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn
|
||||
index 5ade3efc432df..3f313f9c30aed 100644
|
||||
index b8752f6295ab6..641c507e96bfd 100644
|
||||
--- third_party/libxml/BUILD.gn
|
||||
+++ third_party/libxml/BUILD.gn
|
||||
@@ -137,6 +137,7 @@ static_library("libxml") {
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
diff --git chrome/browser/ui/page_info/chrome_page_info_client.cc chrome/browser/ui/page_info/chrome_page_info_client.cc
|
||||
index e2972da9e548d..2f356616ed97c 100644
|
||||
--- chrome/browser/ui/page_info/chrome_page_info_client.cc
|
||||
+++ chrome/browser/ui/page_info/chrome_page_info_client.cc
|
||||
@@ -17,5 +17,9 @@ std::unique_ptr<PageInfoDelegate> ChromePageInfoClient::CreatePageInfoDelegate(
|
||||
}
|
||||
|
||||
int ChromePageInfoClient::GetJavaResourceId(int native_resource_id) {
|
||||
+#if defined(OS_ANDROID)
|
||||
return ResourceMapper::MapToJavaDrawableId(native_resource_id);
|
||||
+#else
|
||||
+ return 0;
|
||||
+#endif
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc
|
||||
index 0c37e08d78825..29afdf7ea865b 100644
|
||||
--- base/files/file_path_watcher_linux.cc
|
||||
+++ base/files/file_path_watcher_linux.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "base/files/file_path_watcher.h"
|
||||
|
||||
#include <errno.h>
|
||||
+#include <poll.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <sys/inotify.h>
|
||||
@@ -13,6 +14,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <algorithm>
|
||||
+#include <array>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@@ -273,20 +275,13 @@ LazyInstance<InotifyReader>::Leaky g_inotify_reader = LAZY_INSTANCE_INITIALIZER;
|
||||
void InotifyReaderThreadDelegate::ThreadMain() {
|
||||
PlatformThread::SetName("inotify_reader");
|
||||
|
||||
- // Make sure the file descriptors are good for use with select().
|
||||
- CHECK_LE(0, inotify_fd_);
|
||||
- CHECK_GT(FD_SETSIZE, inotify_fd_);
|
||||
+ std::array<pollfd, 1> fdarray{{{inotify_fd_, POLLIN, 0}}};
|
||||
|
||||
while (true) {
|
||||
- fd_set rfds;
|
||||
- FD_ZERO(&rfds);
|
||||
- FD_SET(inotify_fd_, &rfds);
|
||||
-
|
||||
// Wait until some inotify events are available.
|
||||
- int select_result =
|
||||
- HANDLE_EINTR(select(inotify_fd_ + 1, &rfds, nullptr, nullptr, nullptr));
|
||||
- if (select_result < 0) {
|
||||
- DPLOG(WARNING) << "select failed";
|
||||
+ int poll_result = HANDLE_EINTR(poll(fdarray.data(), fdarray.size(), -1));
|
||||
+ if (poll_result < 0) {
|
||||
+ DPLOG(WARNING) << "poll failed";
|
||||
return;
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
diff --git ui/ozone/BUILD.gn ui/ozone/BUILD.gn
|
||||
index bf4dba1d1da49..520979a04f77f 100644
|
||||
index 9cd6dc2cb2cbd..8c535634bf7d2 100644
|
||||
--- ui/ozone/BUILD.gn
|
||||
+++ ui/ozone/BUILD.gn
|
||||
@@ -354,6 +354,8 @@ action("generate_test_support_constructor_list") {
|
||||
@@ -355,6 +355,8 @@ action("generate_test_support_constructor_list") {
|
||||
]
|
||||
|
||||
deps = [ ":generate_ozone_platform_list" ]
|
||||
|
|
|
@ -43,7 +43,7 @@ index 9641285fde742..51cc852fcc165 100644
|
|||
current_->RemoveDestructionObserver(destruction_observer);
|
||||
}
|
||||
diff --git base/task/current_thread.h base/task/current_thread.h
|
||||
index bdcd661bfa282..823a1d02ca858 100644
|
||||
index b69284cd85576..111185c0ab9a8 100644
|
||||
--- base/task/current_thread.h
|
||||
+++ base/task/current_thread.h
|
||||
@@ -127,6 +127,12 @@ class BASE_EXPORT CurrentThread {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h
|
||||
index cdbc0273838e5..ee2809a0bb98a 100644
|
||||
index a48a7be8932e0..7c8492a9e6f62 100644
|
||||
--- content/browser/web_contents/web_contents_view.h
|
||||
+++ content/browser/web_contents/web_contents_view.h
|
||||
@@ -22,7 +22,7 @@ struct DropData;
|
||||
|
@ -12,7 +12,7 @@ index cdbc0273838e5..ee2809a0bb98a 100644
|
|||
virtual ~WebContentsView() {}
|
||||
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index df1d12a9dcd38..6338faaf64f87 100644
|
||||
index ded1894a7d1d7..6ea82766e8e87 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -210,6 +210,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
|
@ -48,7 +48,7 @@ index df1d12a9dcd38..6338faaf64f87 100644
|
|||
WebContents* source,
|
||||
const content::OpenURLParams& params) {
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
index 663322919d453..fafab123461c6 100644
|
||||
index b47ce186faba9..2f80ab128b4e0 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
@@ -144,6 +144,7 @@ class MimeHandlerViewGuest
|
||||
|
@ -68,21 +68,18 @@ index 663322919d453..fafab123461c6 100644
|
|||
bool is_embedder_fullscreen_ = false;
|
||||
bool plugin_can_save_ = false;
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
||||
index ec7bf1f089928..dbd4304e31f8c 100644
|
||||
index 5d4bff64cbe16..b085c2ef1f7c5 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
||||
@@ -8,9 +8,9 @@
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
+#include "content/public/browser/web_contents.h"
|
||||
|
||||
namespace content {
|
||||
-class WebContents;
|
||||
struct ContextMenuParams;
|
||||
} // namespace content
|
||||
|
||||
@@ -27,6 +27,14 @@ class MimeHandlerViewGuestDelegate {
|
||||
class RenderFrameHost;
|
||||
@@ -27,6 +28,14 @@ class MimeHandlerViewGuestDelegate {
|
||||
|
||||
virtual ~MimeHandlerViewGuestDelegate() {}
|
||||
|
||||
|
@ -95,5 +92,5 @@ index ec7bf1f089928..dbd4304e31f8c 100644
|
|||
+ virtual void OnGuestDetached() {}
|
||||
+
|
||||
// Handles context menu, or returns false if unhandled.
|
||||
virtual bool HandleContextMenu(content::WebContents* web_contents,
|
||||
const content::ContextMenuParams& params);
|
||||
//
|
||||
// The `render_frame_host` represents the frame that requests the context menu
|
||||
|
|
|
@ -10,7 +10,7 @@ index 96d1a51ec1078..e8120a818b1f2 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 ef4933bc2ccec..2741bbdb93671 100644
|
||||
index 2e1817d58e838..e06bad87e88a1 100644
|
||||
--- net/url_request/url_request_http_job.cc
|
||||
+++ net/url_request/url_request_http_job.cc
|
||||
@@ -588,7 +588,8 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() {
|
||||
|
@ -24,10 +24,10 @@ index ef4933bc2ccec..2741bbdb93671 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 a24972bd0d082..bdbc608a67ea5 100644
|
||||
index da7f97cf0ec17..9b305323df042 100644
|
||||
--- services/network/public/cpp/resource_request.cc
|
||||
+++ services/network/public/cpp/resource_request.cc
|
||||
@@ -258,7 +258,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
@@ -266,7 +266,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {
|
||||
}
|
||||
|
||||
bool ResourceRequest::SendsCookies() const {
|
||||
|
|
|
@ -41,10 +41,10 @@ index cc4b13a7b9c67..84f3b9ed7cf49 100644
|
|||
|
||||
} // namespace content
|
||||
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index cc527298ebe3c..bb9906d0b8712 100644
|
||||
index e36c419fcffac..ec518d5893249 100644
|
||||
--- content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -3059,6 +3059,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
|
||||
@@ -3076,6 +3076,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
|
||||
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
|
||||
}
|
||||
|
||||
|
@ -57,10 +57,10 @@ index cc527298ebe3c..bb9906d0b8712 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 da1bc9c7e01c6..ff876c3f04d3e 100644
|
||||
index 5c533dae5c058..738dfa89027ec 100644
|
||||
--- content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -763,6 +763,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -769,6 +769,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
|
||||
void ProgressFlingIfNeeded(base::TimeTicks current_time);
|
||||
void StopFling();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc
|
||||
index 5f5f6cc2d1024..ab5e0d1517c01 100644
|
||||
index a45799d6fc9ee..d884e88e754cc 100644
|
||||
--- chrome/browser/download/download_prefs.cc
|
||||
+++ chrome/browser/download/download_prefs.cc
|
||||
@@ -24,6 +24,7 @@
|
||||
|
@ -21,7 +21,7 @@ index 5f5f6cc2d1024..ab5e0d1517c01 100644
|
|||
using content::BrowserContext;
|
||||
using content::BrowserThread;
|
||||
using content::DownloadManager;
|
||||
@@ -349,6 +354,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager(
|
||||
@@ -340,6 +345,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager(
|
||||
// static
|
||||
DownloadPrefs* DownloadPrefs::FromBrowserContext(
|
||||
content::BrowserContext* context) {
|
||||
|
@ -58,7 +58,7 @@ index 434d4781e2342..2bdd03803c6f8 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 2011d52338081..362d741d50a33 100644
|
||||
index c3388853baa3c..dcbf66193ea23 100644
|
||||
--- chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
|
@ -107,7 +107,7 @@ index 2011d52338081..362d741d50a33 100644
|
|||
auto* printer_query_ptr = printer_query.get();
|
||||
printer_query_ptr->SetSettings(
|
||||
diff --git chrome/browser/printing/print_view_manager_base.h chrome/browser/printing/print_view_manager_base.h
|
||||
index c4bcf96d0ac01..c549e3bf2ca36 100644
|
||||
index 0efcaba73efa2..4625a2895048d 100644
|
||||
--- chrome/browser/printing/print_view_manager_base.h
|
||||
+++ chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -149,9 +149,6 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
|
@ -314,10 +314,10 @@ index b3a6eaa270877..aa4e84fea1387 100644
|
|||
base::FilePath GetSaveLocation() const;
|
||||
|
||||
diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
index 7695cf2a3a2e2..887e047b83b72 100644
|
||||
index 05b1c96ce17dc..c5025271210fa 100644
|
||||
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
@@ -29,6 +29,7 @@
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
|
@ -325,7 +325,7 @@ index 7695cf2a3a2e2..887e047b83b72 100644
|
|||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/pdf/pdf_extension_util.h"
|
||||
#include "chrome/browser/printing/background_printing_manager.h"
|
||||
@@ -102,6 +103,13 @@ const char16_t kBasicPrintShortcut[] = u"\u0028\u21e7\u2318\u0050\u0029";
|
||||
@@ -98,6 +99,13 @@ const char16_t kBasicPrintShortcut[] = u"\u0028\u21e7\u2318\u0050\u0029";
|
||||
const char16_t kBasicPrintShortcut[] = u"(Ctrl+Shift+P)";
|
||||
#endif
|
||||
|
||||
|
@ -339,7 +339,7 @@ index 7695cf2a3a2e2..887e047b83b72 100644
|
|||
constexpr char kInvalidArgsForDidStartPreview[] =
|
||||
"Invalid arguments for DidStartPreview";
|
||||
constexpr char kInvalidPageNumberForDidPreviewPage[] =
|
||||
@@ -391,7 +399,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
|
||||
@@ -343,7 +351,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
|
||||
chrome::kCloudPrintCertificateErrorLearnMoreURL);
|
||||
|
||||
#if !defined(OS_CHROMEOS)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
|
||||
index 288b9f89129de..698f90ab66f2d 100644
|
||||
index 4b508191cf196..3c91214e09a69 100644
|
||||
--- chrome/browser/printing/print_job_worker.cc
|
||||
+++ chrome/browser/printing/print_job_worker.cc
|
||||
@@ -148,6 +148,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id)
|
||||
|
|
|
@ -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 21cbb423d083a..4e92422e467e2 100644
|
||||
index 621a961ba0d44..18eae69091d70 100644
|
||||
--- content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -627,6 +627,8 @@ bool RenderViewHostImpl::IsRenderViewLive() {
|
||||
@@ -630,6 +630,8 @@ bool RenderViewHostImpl::IsRenderViewLive() {
|
||||
}
|
||||
|
||||
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
|
||||
index 4803daaa1eadc..b66a19afc4b76 100644
|
||||
index 1b4d235071561..e5c795b4ab0b7 100644
|
||||
--- ui/base/resource/resource_bundle.cc
|
||||
+++ ui/base/resource/resource_bundle.cc
|
||||
@@ -841,6 +841,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
@@ -890,6 +890,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
: delegate_(delegate),
|
||||
locale_resources_data_lock_(new base::Lock),
|
||||
max_scale_factor_(k100Percent) {
|
||||
|
@ -15,7 +15,7 @@ index 4803daaa1eadc..b66a19afc4b76 100644
|
|||
mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kMangleLocalizedStrings);
|
||||
}
|
||||
@@ -850,6 +856,11 @@ ResourceBundle::~ResourceBundle() {
|
||||
@@ -899,6 +905,11 @@ ResourceBundle::~ResourceBundle() {
|
||||
UnloadLocaleResources();
|
||||
}
|
||||
|
||||
|
@ -28,10 +28,10 @@ index 4803daaa1eadc..b66a19afc4b76 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 098b9128f6515..a74e733afd228 100644
|
||||
index f192e3e05f993..bb7cb1e0fa323 100644
|
||||
--- ui/base/resource/resource_bundle.h
|
||||
+++ ui/base/resource/resource_bundle.h
|
||||
@@ -194,6 +194,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
|
||||
@@ -209,6 +209,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle {
|
||||
ResourceBundle(const ResourceBundle&) = delete;
|
||||
ResourceBundle& operator=(const ResourceBundle&) = delete;
|
||||
|
||||
|
|
|
@ -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 239088813b9fa..c80c751b5f9bf 100644
|
||||
index 2b1be225cb402..c2b422f47a970 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -662,10 +662,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
|
||||
@@ -668,10 +668,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
|
||||
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
|
||||
DCHECK(GetBackgroundColor());
|
||||
|
||||
|
@ -19,7 +19,7 @@ index 239088813b9fa..c80c751b5f9bf 100644
|
|||
}
|
||||
|
||||
absl::optional<DisplayFeature> RenderWidgetHostViewAura::GetDisplayFeature() {
|
||||
@@ -2141,6 +2143,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
@@ -2149,6 +2151,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.
|
||||
window_->SetEmbedFrameSinkId(frame_sink_id_);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc
|
||||
index a0b46c8619458..dee22b1fc7286 100644
|
||||
index 84efb47a4e53f..e00f8fddbb742 100644
|
||||
--- chrome/browser/net/profile_network_context_service.cc
|
||||
+++ chrome/browser/net/profile_network_context_service.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
|
@ -10,7 +10,7 @@ index a0b46c8619458..dee22b1fc7286 100644
|
|||
#include "chrome/browser/browser_features.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/content_settings/cookie_settings_factory.h"
|
||||
@@ -677,7 +678,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
|
||||
@@ -695,7 +696,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
|
||||
|
||||
// Configure on-disk storage for non-OTR profiles. OTR profiles just use
|
||||
// default behavior (in memory storage, default sizes).
|
||||
|
@ -31,7 +31,7 @@ index a0b46c8619458..dee22b1fc7286 100644
|
|||
PrefService* local_state = g_browser_process->local_state();
|
||||
// Configure the HTTP cache path and size.
|
||||
base::FilePath base_cache_path;
|
||||
@@ -690,7 +703,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
|
||||
@@ -708,7 +721,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
|
||||
base_cache_path.Append(chrome::kCacheDirname);
|
||||
network_context_params->http_cache_max_size =
|
||||
local_state->GetInteger(prefs::kDiskCacheSize);
|
||||
|
@ -42,10 +42,10 @@ index a0b46c8619458..dee22b1fc7286 100644
|
|||
::network::mojom::NetworkContextFilePaths::New();
|
||||
|
||||
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
|
||||
index 5c3c232d596d6..18e80cb883bc1 100644
|
||||
index f0cb1076a0970..82e39282f42d3 100644
|
||||
--- net/cookies/cookie_monster.cc
|
||||
+++ net/cookies/cookie_monster.cc
|
||||
@@ -509,6 +509,25 @@ void CookieMonster::SetCookieableSchemes(
|
||||
@@ -522,6 +522,25 @@ void CookieMonster::SetCookieableSchemes(
|
||||
MaybeRunCookieCallback(std::move(callback), true);
|
||||
}
|
||||
|
||||
|
@ -123,10 +123,10 @@ index c09630b639542..a8b207b85a87e 100644
|
|||
|
||||
void CookieManager::SetForceKeepSessionState() {
|
||||
diff --git services/network/network_context.cc services/network/network_context.cc
|
||||
index f8fddf1b0a2c7..35cac9272725a 100644
|
||||
index 88a71e97b2eb1..de4a5dd25002d 100644
|
||||
--- services/network/network_context.cc
|
||||
+++ services/network/network_context.cc
|
||||
@@ -2144,16 +2144,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2160,16 +2160,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
network_service_->network_quality_estimator());
|
||||
}
|
||||
|
||||
|
@ -157,10 +157,10 @@ index f8fddf1b0a2c7..35cac9272725a 100644
|
|||
trust_token_store_ = std::make_unique<PendingTrustTokenStore>();
|
||||
|
||||
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
|
||||
index f3f625cc6d545..0c2a270cdad2c 100644
|
||||
index 502e989d74e8a..45893a96e7b8d 100644
|
||||
--- services/network/public/mojom/network_context.mojom
|
||||
+++ services/network/public/mojom/network_context.mojom
|
||||
@@ -311,6 +311,9 @@ struct NetworkContextParams {
|
||||
@@ -315,6 +315,9 @@ struct NetworkContextParams {
|
||||
// cookies. Otherwise it should be false.
|
||||
bool persist_session_cookies = false;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue