Update to Chromium version 93.0.4577.0 (#902210)

This commit is contained in:
Marshall Greenblatt
2021-07-23 12:40:13 -04:00
parent 1ffa5528b3
commit b4ea0496e7
141 changed files with 1188 additions and 1061 deletions

View File

@@ -298,6 +298,9 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
registry->RegisterFilePathPref(prefs::kDiskCacheDir, cache_path);
registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0);
// Based on Profile::RegisterProfilePrefs.
registry->RegisterBooleanPref(prefs::kSearchSuggestEnabled, false);
// Spell checking preferences.
// Modify defaults from SpellcheckServiceFactory::RegisterProfilePrefs.
std::string spellcheck_lang =

View File

@@ -107,6 +107,12 @@ 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() {
@@ -155,7 +161,11 @@ bool CefPrefStore::GetString(const std::string& key, std::string* value) const {
if (!prefs_.GetValue(key, &stored_value) || !stored_value)
return false;
return stored_value->GetAsString(value);
if (value && stored_value->is_string()) {
*value = stored_value->GetString();
return true;
}
return stored_value->is_string();
}
bool CefPrefStore::GetInteger(const std::string& key, int* value) const {
@@ -163,7 +173,11 @@ bool CefPrefStore::GetInteger(const std::string& key, int* value) const {
if (!prefs_.GetValue(key, &stored_value) || !stored_value)
return false;
return stored_value->GetAsInteger(value);
if (value && stored_value->is_int()) {
*value = stored_value->GetInt();
return true;
}
return stored_value->is_int();
}
bool CefPrefStore::GetBoolean(const std::string& key, bool* value) const {
@@ -171,7 +185,11 @@ bool CefPrefStore::GetBoolean(const std::string& key, bool* value) const {
if (!prefs_.GetValue(key, &stored_value) || !stored_value)
return false;
return stored_value->GetAsBoolean(value);
if (value && stored_value->is_bool()) {
*value = stored_value->GetBool();
return true;
}
return stored_value->is_bool();
}
void CefPrefStore::SetBlockAsyncRead(bool block_async_read) {

View File

@@ -49,6 +49,7 @@ 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;

View File

@@ -371,7 +371,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
}
void PopulateWebPreferences(content::RenderViewHost* rvh,
blink::web_pref::WebPreferences& web) {
blink::web_pref::WebPreferences& web,
SkColor& base_background_color) {
REQUIRE_ALLOY_RUNTIME();
CefRefPtr<AlloyBrowserHostImpl> browser = static_cast<AlloyBrowserHostImpl*>(
extensions::GetOwnerBrowserForHost(rvh, nullptr).get());
@@ -421,11 +422,11 @@ void PopulateWebPreferences(content::RenderViewHost* rvh,
web.picture_in_picture_enabled = browser->IsPictureInPictureSupported();
// Set the background color for the WebView.
web.base_background_color = browser->GetBackgroundColor();
base_background_color = browser->GetBackgroundColor();
} else {
// We don't know for sure that the browser will be windowless but assume
// that the global windowless state is likely to be accurate.
web.base_background_color =
base_background_color =
CefContext::Get()->GetBackgroundColor(nullptr, STATE_DEFAULT);
}
}

View File

@@ -8,6 +8,8 @@
#include "include/internal/cef_types_wrappers.h"
#include "third_party/skia/include/core/SkColor.h"
class CommandLinePrefStore;
namespace blink {
@@ -48,7 +50,8 @@ void SetCefPrefs(const CefBrowserSettings& cef,
// Populate WebPreferences based on a combination of command-line values,
// PrefService and CefBrowserSettings.
void PopulateWebPreferences(content::RenderViewHost* rvh,
blink::web_pref::WebPreferences& web);
blink::web_pref::WebPreferences& web,
SkColor& base_background_color);
bool PopulateWebPreferencesAfterNavigation(
content::WebContents* web_contents,
blink::web_pref::WebPreferences& web);