Commit 5a1c6424 authored by Marshall Greenblatt's avatar Marshall Greenblatt
Browse files

Update to Chromium version 74.0.3706.0 (#632463)

parent 6bfb5ab3
......@@ -105,8 +105,6 @@ import("//media/media_options.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//ppapi/buildflags/buildflags.gni")
import("//printing/buildflags/buildflags.gni")
import("//services/catalog/public/tools/catalog.gni")
import("//services/service_manager/public/service_manifest.gni")
import("//third_party/icu/config.gni")
import("//third_party/widevine/cdm/widevine.gni")
import("//tools/grit/repack.gni")
......@@ -685,7 +683,6 @@ static_library("libcef_static") {
"//components/printing/renderer",
"//components/proxy_config",
"//components/safe_browsing/db:test_database_manager",
"//components/services/pdf_compositor:pdf_compositor_manifest",
"//components/services/pdf_compositor/public/cpp:factory",
"//components/services/pdf_compositor/public/interfaces",
"//components/tracing",
......@@ -726,7 +723,6 @@ static_library("libcef_static") {
"//services/network/public/cpp",
"//services/service_manager/embedder",
"//services/service_manager/public/cpp",
"//services/service_manager/runner/common",
"//skia",
"//storage/browser",
"//third_party/blink/public:blink",
......@@ -1147,13 +1143,13 @@ source_set("cef_packaged_service_manifests") {
deps = [
"//base",
"//chrome/common:mojo_bindings",
"//chrome/services/printing:manifest",
"//components/services/pdf_compositor:pdf_compositor_manifest",
"//chrome/services/printing/public/cpp:manifest",
"//components/services/pdf_compositor/public/cpp:manifest",
"//components/spellcheck/common:interfaces",
"//components/startup_metric_utils/common:interfaces",
"//extensions/buildflags",
"//printing/buildflags",
"//services/proxy_resolver:proxy_resolver_manifest",
"//services/proxy_resolver/public/cpp:manifest",
"//services/service_manager/public/cpp",
]
}
......
......@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/73.0.3683.0'
'chromium_checkout': 'refs/tags/74.0.3706.0'
}
......@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=8e5c27c998b6aabcaf43a4cc7f97064d49eaf8b9$
// $hash=48b5fa68109eed1ea30fa0c805218ebd258c0573$
//
#ifndef CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_
......@@ -237,7 +237,7 @@ typedef struct _cef_delete_cookies_callback_t {
///
// Method that will be called upon completion. |num_deleted| will be the
// number of cookies that were deleted or -1 if unknown.
// number of cookies that were deleted.
///
void(CEF_CALLBACK* on_complete)(struct _cef_delete_cookies_callback_t* self,
int num_deleted);
......
......@@ -221,7 +221,7 @@ class CefDeleteCookiesCallback : public virtual CefBaseRefCounted {
public:
///
// Method that will be called upon completion. |num_deleted| will be the
// number of cookies that were deleted or -1 if unknown.
// number of cookies that were deleted.
///
/*--cef()--*/
virtual void OnComplete(int num_deleted) = 0;
......
......@@ -62,6 +62,7 @@
#include "components/navigation_interception/intercept_navigation_throttle.h"
#include "components/navigation_interception/navigation_params.h"
#include "components/services/pdf_compositor/public/interfaces/pdf_compositor.mojom.h"
#include "components/version_info/version_info.h"
#include "content/browser/frame_host/navigation_handle_impl.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/plugin_service_impl.h"
......@@ -821,7 +822,8 @@ void CefContentBrowserClient::GetQuotaSettings(
storage::OptionalQuotaSettingsCallback callback) {
const base::FilePath& cache_path = partition->GetPath();
storage::GetNominalDynamicSettings(
cache_path, cache_path.empty() /* is_incognito */, std::move(callback));
cache_path, cache_path.empty() /* is_incognito */,
storage::GetDefaultDiskInfoHelper(), std::move(callback));
}
content::MediaObserver* CefContentBrowserClient::GetMediaObserver() {
......@@ -1025,10 +1027,14 @@ CefContentBrowserClient::CreateThrottlesForNavigation(
frame_id = CefFrameHostImpl::kInvalidFrameId;
}
// Must use SynchronyMode::kSync to ensure that OnBeforeBrowse is always
// called before OnBeforeResourceLoad.
std::unique_ptr<content::NavigationThrottle> throttle =
std::make_unique<navigation_interception::InterceptNavigationThrottle>(
navigation_handle, base::Bind(&NavigationOnUIThread, is_main_frame,
frame_id, parent_frame_id));
navigation_handle,
base::Bind(&NavigationOnUIThread, is_main_frame, frame_id,
parent_frame_id),
navigation_interception::SynchronyMode::kSync);
throttles.push_back(std::move(throttle));
return throttles;
......@@ -1181,6 +1187,20 @@ std::string CefContentBrowserClient::GetUserAgent() const {
return content::BuildUserAgentFromProduct(GetProduct());
}
blink::UserAgentMetadata CefContentBrowserClient::GetUserAgentMetadata() const {
blink::UserAgentMetadata metadata;
metadata.brand = version_info::GetProductName();
metadata.version = version_info::GetVersionNumber();
metadata.platform = version_info::GetOSType();
// TODO(mkwst): Poke at BuildUserAgentFromProduct to split out these pieces.
metadata.architecture = "";
metadata.model = "";
return metadata;
}
void CefContentBrowserClient::RegisterCustomScheme(const std::string& scheme) {
// Register as a Web-safe scheme so that requests for the scheme from a
// render process will be allowed in resource_dispatcher_host_impl.cc
......
......@@ -165,6 +165,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
std::string GetProduct() const override;
std::string GetChromeProduct() const override;
std::string GetUserAgent() const override;
blink::UserAgentMetadata GetUserAgentMetadata() const override;
// Perform browser process registration for the custom scheme.
void RegisterCustomScheme(const std::string& scheme);
......
......@@ -40,7 +40,8 @@ class VisitCookiesCallback : public base::RefCounted<VisitCookiesCallback> {
CefRefPtr<CefCookieVisitor> visitor)
: cookie_store_getter_(cookie_store_getter), visitor_(visitor) {}
void Run(const net::CookieList& list) {
void Run(const net::CookieList& list,
const net::CookieStatusList& excluded_list) {
CEF_REQUIRE_IOT();
int total = list.size(), count = 0;
......@@ -591,8 +592,11 @@ void CefCookieManagerImpl::DeleteCookiesInternal(
delete_info, base::Bind(DeleteCookiesCallbackImpl, callback));
} else {
// Delete all matching host and domain cookies.
cookie_store->DeleteCookieAsync(
url, cookie_name, base::Bind(DeleteCookiesCallbackImpl, callback, -1));
net::CookieDeletionInfo delete_info;
delete_info.url = url;
delete_info.name = cookie_name;
cookie_store->DeleteAllMatchingInfoAsync(
delete_info, base::Bind(DeleteCookiesCallbackImpl, callback));
}
}
......
......@@ -21,7 +21,7 @@ CefComponentExtensionResourceManager::~CefComponentExtensionResourceManager() {}
bool CefComponentExtensionResourceManager::IsComponentExtensionResource(
const base::FilePath& extension_path,
const base::FilePath& resource_path,
int* resource_id) const {
ComponentExtensionResourceInfo* resource_info) const {
base::FilePath directory_path = extension_path;
base::FilePath resources_dir;
base::FilePath relative_path;
......@@ -32,12 +32,13 @@ bool CefComponentExtensionResourceManager::IsComponentExtensionResource(
relative_path = relative_path.Append(resource_path);
relative_path = relative_path.NormalizePathSeparators();
std::map<base::FilePath, int>::const_iterator entry =
path_to_resource_id_.find(relative_path);
if (entry != path_to_resource_id_.end())
*resource_id = entry->second;
auto entry = path_to_resource_info_.find(relative_path);
if (entry != path_to_resource_info_.end()) {
*resource_info = entry->second;
return true;
}
return entry != path_to_resource_id_.end();
return false;
}
const ui::TemplateReplacements*
......@@ -47,16 +48,16 @@ CefComponentExtensionResourceManager::GetTemplateReplacementsForExtension(
}
void CefComponentExtensionResourceManager::AddComponentResourceEntries(
const GritResourceMap* entries,
const GzippedGritResourceMap* entries,
size_t size) {
for (size_t i = 0; i < size; ++i) {
base::FilePath resource_path =
base::FilePath().AppendASCII(entries[i].name);
resource_path = resource_path.NormalizePathSeparators();
DCHECK(path_to_resource_id_.find(resource_path) ==
path_to_resource_id_.end());
path_to_resource_id_[resource_path] = entries[i].value;
DCHECK(!base::ContainsKey(path_to_resource_info_, resource_path));
path_to_resource_info_[resource_path] = {entries[i].value,
entries[i].gzipped};
}
}
......
......@@ -10,7 +10,7 @@
#include "base/files/file_path.h"
#include "extensions/browser/component_extension_resource_manager.h"
struct GritResourceMap;
struct GzippedGritResourceMap;
namespace extensions {
......@@ -21,18 +21,21 @@ class CefComponentExtensionResourceManager
~CefComponentExtensionResourceManager() override;
// Overridden from ComponentExtensionResourceManager:
bool IsComponentExtensionResource(const base::FilePath& extension_path,
const base::FilePath& resource_path,
int* resource_id) const override;
bool IsComponentExtensionResource(
const base::FilePath& extension_path,
const base::FilePath& resource_path,
ComponentExtensionResourceInfo* resource_info) const override;
const ui::TemplateReplacements* GetTemplateReplacementsForExtension(
const std::string& extension_id) const override;
private:
void AddComponentResourceEntries(const GritResourceMap* entries, size_t size);
void AddComponentResourceEntries(const GzippedGritResourceMap* entries,
size_t size);
// A map from a resource path to the resource ID. Used by
// IsComponentExtensionResource.
std::map<base::FilePath, int> path_to_resource_id_;
std::map<base::FilePath, ComponentExtensionResourceInfo>
path_to_resource_info_;
DISALLOW_COPY_AND_ASSIGN(CefComponentExtensionResourceManager);
};
......
......@@ -127,8 +127,8 @@ CefExtensionsBrowserClient::MaybeCreateResourceBundleRequestJob(
base::FilePath CefExtensionsBrowserClient::GetBundleResourcePath(
const network::ResourceRequest& request,
const base::FilePath& extension_resources_path,
int* resource_id) const {
*resource_id = 0;
ComponentExtensionResourceInfo* resource_id) const {
*resource_id = {0};
return base::FilePath();
}
......@@ -136,7 +136,7 @@ void CefExtensionsBrowserClient::LoadResourceFromResourceBundle(
const network::ResourceRequest& request,
network::mojom::URLLoaderRequest loader,
const base::FilePath& resource_relative_path,
int resource_id,
const ComponentExtensionResourceInfo& resource_id,
const std::string& content_security_policy,
network::mojom::URLLoaderClientPtr client,
bool send_cors_header) {
......
......@@ -54,12 +54,12 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
base::FilePath GetBundleResourcePath(
const network::ResourceRequest& request,
const base::FilePath& extension_resources_path,
int* resource_id) const override;
ComponentExtensionResourceInfo* resource_id) const override;
void LoadResourceFromResourceBundle(
const network::ResourceRequest& request,
network::mojom::URLLoaderRequest loader,
const base::FilePath& resource_relative_path,
int resource_id,
const ComponentExtensionResourceInfo& resource_id,
const std::string& content_security_policy,
network::mojom::URLLoaderClientPtr client,
bool send_cors_header) override;
......
......@@ -30,8 +30,7 @@ class CefSimpleMenuModel : public ui::MenuModel {
public:
// The Delegate can be NULL, though if it is items can't be checked or
// disabled.
explicit CefSimpleMenuModel(CefMenuModelImpl* impl)
: impl_(impl), menu_model_delegate_(NULL) {}
explicit CefSimpleMenuModel(CefMenuModelImpl* impl) : impl_(impl) {}
// MenuModel methods.
bool HasIcons() const override { return false; }
......@@ -161,18 +160,8 @@ class CefSimpleMenuModel : public ui::MenuModel {
void MenuWillClose() override { impl_->MenuWillClose(); }
void SetMenuModelDelegate(
ui::MenuModelDelegate* menu_model_delegate) override {
menu_model_delegate_ = menu_model_delegate;
}
ui::MenuModelDelegate* GetMenuModelDelegate() const override {
return menu_model_delegate_;
}
private:
CefMenuModelImpl* impl_;
ui::MenuModelDelegate* menu_model_delegate_;
DISALLOW_COPY_AND_ASSIGN(CefSimpleMenuModel);
};
......
......@@ -17,7 +17,6 @@
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/common/renderer_preferences.h"
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/events/keycodes/keyboard_code_conversion_x.h"
......@@ -26,6 +25,7 @@
#include "ui/gfx/font_render_params.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
#include "ui/views/widget/widget.h"
#include "third_party/blink/public/mojom/renderer_preferences.mojom.h"
namespace {
......@@ -94,7 +94,7 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() {
// As an additional requirement on Linux, we must set the colors for the
// render widgets in webkit.
content::RendererPreferences* prefs =
blink::mojom::RendererPreferences* prefs =
browser_->web_contents()->GetMutableRendererPrefs();
prefs->focus_ring_color = SkColorSetARGB(255, 229, 151, 0);
......
......@@ -5,7 +5,6 @@
#include "libcef/browser/native/menu_2.h"
#include "ui/base/models/menu_model.h"
#include "ui/views/controls/menu/menu_listener.h"
namespace views {
......@@ -44,16 +43,8 @@ MenuWrapper::MenuAction Menu2::GetMenuAction() const {
return wrapper_->GetMenuAction();
}
void Menu2::AddMenuListener(MenuListener* listener) {
wrapper_->AddMenuListener(listener);
}
void Menu2::RemoveMenuListener(MenuListener* listener) {
wrapper_->RemoveMenuListener(listener);
}
void Menu2::SetMinimumWidth(int width) {
wrapper_->SetMinimumWidth(width);
}
} // namespace
} // namespace views
......@@ -67,12 +67,6 @@ class Menu2 {
// nothing.
MenuWrapper::MenuAction GetMenuAction() const;
// Add a listener to receive a callback when the menu opens.
void AddMenuListener(MenuListener* listener);
// Remove a menu listener.
void RemoveMenuListener(MenuListener* listener);
// Accessors.
ui::MenuModel* model() const { return model_; }
......
......@@ -18,7 +18,6 @@ class MenuModel;
namespace views {
class MenuInsertionDelegateWin;
class MenuListener;
// An interface that wraps an object that implements a menu.
class MenuWrapper {
......@@ -58,12 +57,6 @@ class MenuWrapper {
// nothing.
virtual MenuAction GetMenuAction() const = 0;
// Add a listener to receive a callback when the menu opens.
virtual void AddMenuListener(MenuListener* listener) = 0;
// Remove a menu listener.
virtual void RemoveMenuListener(MenuListener* listener) = 0;
// Sets the minimum width of the menu.
virtual void SetMinimumWidth(int width) = 0;
};
......
......@@ -31,7 +31,6 @@
#include "ui/native_theme/native_theme.h"
#include "ui/views/controls/menu/menu_config.h"
#include "ui/views/controls/menu/menu_insertion_delegate_win.h"
#include "ui/views/controls/menu/menu_listener.h"
using ui::NativeTheme;
......@@ -323,7 +322,6 @@ class CefNativeMenuWin::MenuHostWindow {
2,
NULL);
}
} else {
// Draw the separator
draw_item_struct->rcItem.top +=
......@@ -438,10 +436,6 @@ void CefNativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
HHOOK hhook = SetWindowsHookEx(WH_MSGFILTER, MenuMessageHook,
GetModuleHandle(NULL), ::GetCurrentThreadId());
// Mark that any registered listeners have not been called for this particular
// opening of the menu.
listeners_called_ = false;
// Command dispatch is done through WM_MENUCOMMAND, handled by the host
// window.
menu_to_select_ = NULL;
......@@ -520,14 +514,6 @@ CefNativeMenuWin::MenuAction CefNativeMenuWin::GetMenuAction() const {
return menu_action_;
}
void CefNativeMenuWin::AddMenuListener(MenuListener* listener) {
listeners_.AddObserver(listener);
}
void CefNativeMenuWin::RemoveMenuListener(MenuListener* listener) {
listeners_.RemoveObserver(listener);
}
void CefNativeMenuWin::SetMinimumWidth(int width) {
NOTIMPLEMENTED();
}
......@@ -576,14 +562,6 @@ LRESULT CALLBACK CefNativeMenuWin::MenuMessageHook(int n_code,
if (!this_ptr)
return result;
// The first time this hook is called, that means the menu has successfully
// opened, so call the callback function on all of our listeners.
if (!this_ptr->listeners_called_) {
for (auto& observer : this_ptr->listeners_)
observer.OnMenuOpened();
this_ptr->listeners_called_ = true;
}
MSG* msg = reinterpret_cast<MSG*>(l_param);
if (msg->message == WM_LBUTTONUP || msg->message == WM_RBUTTONUP) {
HighlightedMenuItemInfo info;
......
......@@ -40,8 +40,6 @@ class CefNativeMenuWin : public MenuWrapper {
void UpdateStates() override;
HMENU GetNativeMenu() const override;
MenuAction GetMenuAction() const override;
void AddMenuListener(MenuListener* listener) override;
void RemoveMenuListener(MenuListener* listener) override;
void SetMinimumWidth(int width) override;
private:
......@@ -139,13 +137,6 @@ class CefNativeMenuWin : public MenuWrapper {
// The action that took place during the call to RunMenuAt.
MenuAction menu_action_;
// A list of listeners to call when the menu opens.
base::ObserverList<MenuListener>::Unchecked listeners_;
// Keep track of whether the listeners have already been called at least
// once.
bool listeners_called_;
// See comment in MenuMessageHook for details on these.
CefNativeMenuWin* menu_to_select_;
int position_to_select_;
......
......@@ -92,7 +92,7 @@ void CefCookieStoreProxy::GetCookieListWithOptionsAsync(
cookie_store->GetCookieListWithOptionsAsync(url, options,
std::move(callback));
} else if (!callback.is_null()) {
std::move(callback).Run(net::CookieList());
std::move(callback).Run(net::CookieList(), net::CookieStatusList());
}
}
......@@ -101,18 +101,7 @@ void CefCookieStoreProxy::GetAllCookiesAsync(GetCookieListCallback callback) {
if (cookie_store) {
cookie_store->GetAllCookiesAsync(std::move(callback));
} else if (!callback.is_null()) {
std::move(callback).Run(net::CookieList());
}
}
void CefCookieStoreProxy::DeleteCookieAsync(const GURL& url,
const std::string& cookie_name,
base::OnceClosure callback) {
net::CookieStore* cookie_store = GetCookieStore();
if (cookie_store) {
cookie_store->DeleteCookieAsync(url, cookie_name, std::move(callback));
} else if (!callback.is_null()) {
std::move(callback).Run();
std::move(callback).Run(net::CookieList(), net::CookieStatusList());
}
}
......
......@@ -30,9 +30,6 @@ class CefCookieStoreProxy : public net::CookieStore {
const net::CookieOptions& options,
GetCookieListCallback callback) override;
void GetAllCookiesAsync(GetCookieListCallback callback) override;
void DeleteCookieAsync(const GURL& url,
const std::string& cookie_name,
base::OnceClosure callback) override;
void DeleteCanonicalCookieAsync(const net::CanonicalCookie& cookie,
DeleteCallback callback) override;
void DeleteAllCreatedInTimeRangeAsync(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment