mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 94.0.4606.0 (#911515)
This commit is contained in:
@@ -131,7 +131,7 @@ std::u16string AlloyContentClient::GetLocalizedString(
|
||||
|
||||
base::StringPiece AlloyContentClient::GetDataResource(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) {
|
||||
ui::ResourceScaleFactor scale_factor) {
|
||||
base::StringPiece value =
|
||||
ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
|
||||
resource_id, scale_factor);
|
||||
|
@@ -28,8 +28,9 @@ class AlloyContentClient : public content::ContentClient {
|
||||
std::u16string GetLocalizedString(int message_id) override;
|
||||
std::u16string GetLocalizedString(int message_id,
|
||||
const std::u16string& replacement) override;
|
||||
base::StringPiece GetDataResource(int resource_id,
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
base::StringPiece GetDataResource(
|
||||
int resource_id,
|
||||
ui::ResourceScaleFactor scale_factor) override;
|
||||
base::RefCountedMemory* GetDataResourceBytes(int resource_id) override;
|
||||
gfx::Image& GetNativeImageNamed(int resource_id) override;
|
||||
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/synchronization/waitable_event.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/media/router/media_router_feature.h"
|
||||
#include "chrome/child/pdf_child_init.h"
|
||||
#include "chrome/common/chrome_constants.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
@@ -237,16 +236,15 @@ bool AlloyMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
base::NumberToString(settings_->uncaught_exception_stack_size));
|
||||
}
|
||||
|
||||
#if defined(OS_WIN)
|
||||
std::vector<std::string> disable_features;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
if (features::kCalculateNativeWinOcclusion.default_state ==
|
||||
base::FEATURE_ENABLED_BY_DEFAULT) {
|
||||
// TODO: Add support for occlusion detection in combination with native
|
||||
// parent windows (see issue #2805).
|
||||
disable_features.push_back(features::kCalculateNativeWinOcclusion.name);
|
||||
}
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
if (!disable_features.empty()) {
|
||||
DCHECK(!base::FeatureList::GetInstance());
|
||||
@@ -260,33 +258,7 @@ bool AlloyMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
command_line->AppendSwitchASCII(switches::kDisableFeatures,
|
||||
disable_features_str);
|
||||
}
|
||||
|
||||
std::vector<std::string> enable_features;
|
||||
|
||||
if (media_router::kDialMediaRouteProvider.default_state ==
|
||||
base::FEATURE_DISABLED_BY_DEFAULT) {
|
||||
// Enable discovery of DIAL devices.
|
||||
enable_features.push_back(media_router::kDialMediaRouteProvider.name);
|
||||
}
|
||||
|
||||
if (media_router::kCastMediaRouteProvider.default_state ==
|
||||
base::FEATURE_DISABLED_BY_DEFAULT) {
|
||||
// Enable discovery of Cast devices.
|
||||
enable_features.push_back(media_router::kCastMediaRouteProvider.name);
|
||||
}
|
||||
|
||||
if (!enable_features.empty()) {
|
||||
DCHECK(!base::FeatureList::GetInstance());
|
||||
std::string enable_features_str =
|
||||
command_line->GetSwitchValueASCII(switches::kEnableFeatures);
|
||||
for (auto feature_str : enable_features) {
|
||||
if (!enable_features_str.empty())
|
||||
enable_features_str += ",";
|
||||
enable_features_str += feature_str;
|
||||
}
|
||||
command_line->AppendSwitchASCII(switches::kEnableFeatures,
|
||||
enable_features_str);
|
||||
}
|
||||
#endif // defined(OS_WIN)
|
||||
}
|
||||
|
||||
if (application_) {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
base::FilePath CefResourceBundleDelegate::GetPathForResourcePack(
|
||||
const base::FilePath& pack_path,
|
||||
ui::ScaleFactor scale_factor) {
|
||||
ui::ResourceScaleFactor scale_factor) {
|
||||
// Only allow the cef pack file to load.
|
||||
if (!pack_loading_disabled_ && allow_pack_file_load_) {
|
||||
return pack_path;
|
||||
@@ -30,7 +30,7 @@ gfx::Image CefResourceBundleDelegate::GetNativeImageNamed(int resource_id) {
|
||||
|
||||
base::RefCountedStaticMemory* CefResourceBundleDelegate::LoadDataResourceBytes(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) {
|
||||
ui::ResourceScaleFactor scale_factor) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ absl::optional<std::string> CefResourceBundleDelegate::LoadDataResourceString(
|
||||
|
||||
bool CefResourceBundleDelegate::GetRawDataResource(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor,
|
||||
ui::ResourceScaleFactor scale_factor,
|
||||
base::StringPiece* value) const {
|
||||
auto application = CefAppManager::Get()->GetApplication();
|
||||
if (application) {
|
||||
|
@@ -22,18 +22,19 @@ class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate {
|
||||
|
||||
private:
|
||||
// ui::ResourceBundle::Delegate methods.
|
||||
base::FilePath GetPathForResourcePack(const base::FilePath& pack_path,
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
base::FilePath GetPathForResourcePack(
|
||||
const base::FilePath& pack_path,
|
||||
ui::ResourceScaleFactor scale_factor) override;
|
||||
base::FilePath GetPathForLocalePack(const base::FilePath& pack_path,
|
||||
const std::string& locale) override;
|
||||
gfx::Image GetImageNamed(int resource_id) override;
|
||||
gfx::Image GetNativeImageNamed(int resource_id) override;
|
||||
base::RefCountedStaticMemory* LoadDataResourceBytes(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
ui::ResourceScaleFactor scale_factor) override;
|
||||
absl::optional<std::string> LoadDataResourceString(int resource_id) override;
|
||||
bool GetRawDataResource(int resource_id,
|
||||
ui::ScaleFactor scale_factor,
|
||||
ui::ResourceScaleFactor scale_factor,
|
||||
base::StringPiece* value) const override;
|
||||
bool GetLocalizedString(int message_id, std::u16string* value) const override;
|
||||
|
||||
|
@@ -29,7 +29,7 @@ CefRefPtr<CefBinaryValue> CefResourceBundleImpl::GetDataResourceForScale(
|
||||
|
||||
base::RefCountedMemory* result =
|
||||
ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
|
||||
resource_id, static_cast<ui::ScaleFactor>(scale_factor));
|
||||
resource_id, static_cast<ui::ResourceScaleFactor>(scale_factor));
|
||||
if (!result)
|
||||
return nullptr;
|
||||
|
||||
|
@@ -219,9 +219,8 @@ void OverrideUserDataDir(CefSettings* settings,
|
||||
}
|
||||
|
||||
// Same as ui::ResourceBundle::IsScaleFactorSupported.
|
||||
bool IsScaleFactorSupported(ui::ScaleFactor scale_factor) {
|
||||
const std::vector<ui::ScaleFactor>& supported_scale_factors =
|
||||
ui::GetSupportedScaleFactors();
|
||||
bool IsScaleFactorSupported(ui::ResourceScaleFactor scale_factor) {
|
||||
const auto& supported_scale_factors = ui::GetSupportedResourceScaleFactors();
|
||||
return std::find(supported_scale_factors.begin(),
|
||||
supported_scale_factors.end(),
|
||||
scale_factor) != supported_scale_factors.end();
|
||||
|
@@ -30,7 +30,7 @@ void OverrideUserDataDir(CefSettings* settings,
|
||||
const base::CommandLine* command_line);
|
||||
|
||||
// Returns true if |scale_factor| is supported by this platform.
|
||||
bool IsScaleFactorSupported(ui::ScaleFactor scale_factor);
|
||||
bool IsScaleFactorSupported(ui::ResourceScaleFactor scale_factor);
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
// Look for binary files (*.bin, *.dat, *.pak, chrome-sandbox, libGLESv2.so,
|
||||
|
@@ -1026,7 +1026,7 @@ CefListValueImpl::CefListValueImpl(base::ListValue* value,
|
||||
|
||||
base::ListValue* CefListValueImpl::CopyValue() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
return const_value().DeepCopy();
|
||||
return static_cast<base::ListValue*>(const_value().DeepCopy());
|
||||
}
|
||||
|
||||
base::ListValue* CefListValueImpl::CopyOrDetachValue(
|
||||
@@ -1099,9 +1099,9 @@ bool CefListValueImpl::IsEqual(CefRefPtr<CefListValue> that) {
|
||||
CefRefPtr<CefListValue> CefListValueImpl::Copy() {
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
return new CefListValueImpl(const_value().DeepCopy(), nullptr,
|
||||
CefListValueImpl::kOwnerWillDelete, false,
|
||||
nullptr);
|
||||
return new CefListValueImpl(
|
||||
static_cast<base::ListValue*>(const_value().DeepCopy()), nullptr,
|
||||
CefListValueImpl::kOwnerWillDelete, false, nullptr);
|
||||
}
|
||||
|
||||
bool CefListValueImpl::SetSize(size_t size) {
|
||||
|
Reference in New Issue
Block a user