mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 76.0.3809.0 (#665002)
OSR tests will be fixed by a follow-up merge of Viz support (see issue #2575).
This commit is contained in:
committed by
Marshall Greenblatt
parent
5892ffc382
commit
cc0db5f166
@@ -165,8 +165,8 @@ void CefAudioPushSink::Close() {
|
||||
stop_stream_ = true;
|
||||
cef_audio_handler_->OnAudioStreamStopped(browser_.get(), audio_stream_id_);
|
||||
|
||||
const CloseCallback& cb = base::ResetAndReturn(&close_callback_);
|
||||
if (!cb.is_null())
|
||||
cb.Run(this);
|
||||
if (!close_callback_.is_null()) {
|
||||
std::move(close_callback_).Run(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -569,6 +569,28 @@ ProfileKey* CefBrowserContext::GetProfileKey() const {
|
||||
return key_.get();
|
||||
}
|
||||
|
||||
policy::SchemaRegistryService*
|
||||
CefBrowserContext::GetPolicySchemaRegistryService() {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
policy::UserCloudPolicyManager* CefBrowserContext::GetUserCloudPolicyManager() {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
policy::ProfilePolicyConnector* CefBrowserContext::GetProfilePolicyConnector() {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const policy::ProfilePolicyConnector*
|
||||
CefBrowserContext::GetProfilePolicyConnector() const {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const CefRequestContextSettings& CefBrowserContext::GetSettings() const {
|
||||
return settings_;
|
||||
}
|
||||
@@ -581,7 +603,7 @@ HostContentSettingsMap* CefBrowserContext::GetHostContentSettingsMap() {
|
||||
// that can be stored in the settings map (for example, default values set
|
||||
// via DefaultProvider::SetWebsiteSetting).
|
||||
host_content_settings_map_ =
|
||||
new HostContentSettingsMap(GetPrefs(), false, false, false, false);
|
||||
new HostContentSettingsMap(GetPrefs(), false, false, false);
|
||||
|
||||
// Change the default plugin policy.
|
||||
const base::CommandLine* command_line =
|
||||
|
@@ -180,6 +180,11 @@ class CefBrowserContext : public ChromeProfileStub,
|
||||
bool AllowsBrowserWindows() const override { return false; }
|
||||
const PrefService* GetPrefs() const override;
|
||||
ProfileKey* GetProfileKey() const override;
|
||||
policy::SchemaRegistryService* GetPolicySchemaRegistryService() override;
|
||||
policy::UserCloudPolicyManager* GetUserCloudPolicyManager() override;
|
||||
policy::ProfilePolicyConnector* GetProfilePolicyConnector() override;
|
||||
const policy::ProfilePolicyConnector* GetProfilePolicyConnector()
|
||||
const override;
|
||||
|
||||
// Values checked in ProfileNetworkContextService::CreateNetworkContextParams
|
||||
// when creating the NetworkContext.
|
||||
|
@@ -2153,7 +2153,7 @@ void CefBrowserHostImpl::UpdateTargetURL(content::WebContents* source,
|
||||
|
||||
bool CefBrowserHostImpl::DidAddMessageToConsole(
|
||||
content::WebContents* source,
|
||||
int32_t level,
|
||||
blink::mojom::ConsoleMessageLevel level,
|
||||
const base::string16& message,
|
||||
int32_t line_no,
|
||||
const base::string16& source_id) {
|
||||
@@ -2163,13 +2163,16 @@ bool CefBrowserHostImpl::DidAddMessageToConsole(
|
||||
// Use LOGSEVERITY_DEBUG for unrecognized |level| values.
|
||||
cef_log_severity_t log_level = LOGSEVERITY_DEBUG;
|
||||
switch (level) {
|
||||
case 0:
|
||||
case blink::mojom::ConsoleMessageLevel::kVerbose:
|
||||
log_level = LOGSEVERITY_DEBUG;
|
||||
break;
|
||||
case blink::mojom::ConsoleMessageLevel::kInfo:
|
||||
log_level = LOGSEVERITY_INFO;
|
||||
break;
|
||||
case 1:
|
||||
case blink::mojom::ConsoleMessageLevel::kWarning:
|
||||
log_level = LOGSEVERITY_WARNING;
|
||||
break;
|
||||
case 2:
|
||||
case blink::mojom::ConsoleMessageLevel::kError:
|
||||
log_level = LOGSEVERITY_ERROR;
|
||||
break;
|
||||
}
|
||||
|
@@ -387,7 +387,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
void CloseContents(content::WebContents* source) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
bool DidAddMessageToConsole(content::WebContents* source,
|
||||
int32_t level,
|
||||
blink::mojom::ConsoleMessageLevel log_level,
|
||||
const base::string16& message,
|
||||
int32_t line_no,
|
||||
const base::string16& source_id) override;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#include "libcef/common/content_client.h"
|
||||
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/message_loop/message_pump.h"
|
||||
#include "base/message_loop/message_pump_for_ui.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
@@ -108,6 +108,6 @@ std::unique_ptr<base::MessagePump> MessagePumpFactoryForUI() {
|
||||
void InitMessagePumpFactoryForUI() {
|
||||
const CefSettings& settings = CefContext::Get()->settings();
|
||||
if (settings.external_message_pump) {
|
||||
base::MessageLoop::InitMessagePumpForUIFactory(MessagePumpFactoryForUI);
|
||||
base::MessagePump::OverrideMessagePumpForUIFactory(MessagePumpFactoryForUI);
|
||||
}
|
||||
}
|
||||
|
@@ -14,15 +14,16 @@
|
||||
#include "libcef/common/net_service/util.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "chrome/browser/net/chrome_net_log_helper.h"
|
||||
#include "chrome/browser/net/system_network_context_manager.h"
|
||||
#include "chrome/browser/policy/chrome_browser_policy_connector.h"
|
||||
#include "chrome/browser/printing/print_job_manager.h"
|
||||
#include "chrome/browser/ui/prefs/pref_watcher.h"
|
||||
#include "components/net_log/chrome_net_log.h"
|
||||
#include "components/net_log/net_export_file_writer.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "content/browser/startup_helper.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "net/log/net_log_capture_mode.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
#include "services/network/public/cpp/shared_url_loader_factory.h"
|
||||
|
||||
@@ -34,7 +35,6 @@ ChromeBrowserProcessStub::ChromeBrowserProcessStub()
|
||||
|
||||
ChromeBrowserProcessStub::~ChromeBrowserProcessStub() {
|
||||
DCHECK((!initialized_ && !context_initialized_) || shutdown_);
|
||||
g_browser_process = NULL;
|
||||
}
|
||||
|
||||
void ChromeBrowserProcessStub::Initialize() {
|
||||
@@ -81,6 +81,14 @@ void ChromeBrowserProcessStub::Shutdown() {
|
||||
SystemNetworkContextManager::DeleteInstance();
|
||||
}
|
||||
|
||||
// Release any references to |local_state_| that are held by objects
|
||||
// associated with a Profile. The Profile will be deleted later.
|
||||
for (const auto& profile : CefBrowserContext::GetAll()) {
|
||||
PrefWatcher* pref_watcher = PrefWatcher::Get(profile);
|
||||
if (pref_watcher)
|
||||
pref_watcher->Shutdown();
|
||||
}
|
||||
|
||||
local_state_.reset();
|
||||
browser_policy_connector_.reset();
|
||||
|
||||
@@ -319,6 +327,11 @@ ChromeBrowserProcessStub::optimization_guide_service() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
StartupData* ChromeBrowserProcessStub::startup_data() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
||||
void ChromeBrowserProcessStub::StartAutoupdateTimer() {}
|
||||
#endif
|
||||
@@ -332,7 +345,8 @@ net_log::ChromeNetLog* ChromeBrowserProcessStub::net_log() {
|
||||
if (command_line.HasSwitch(network::switches::kLogNetLog)) {
|
||||
net_log_->StartWritingToFile(
|
||||
command_line.GetSwitchValuePath(network::switches::kLogNetLog),
|
||||
GetNetCaptureModeFromCommandLine(command_line),
|
||||
net::GetNetCaptureModeFromCommandLine(command_line,
|
||||
network::switches::kLogNetLog),
|
||||
command_line.GetCommandLineString(), std::string());
|
||||
}
|
||||
}
|
||||
|
@@ -87,6 +87,7 @@ class ChromeBrowserProcessStub : public BrowserProcess {
|
||||
override;
|
||||
optimization_guide::OptimizationGuideService* optimization_guide_service()
|
||||
override;
|
||||
StartupData* startup_data() override;
|
||||
|
||||
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
||||
void StartAutoupdateTimer() override;
|
||||
|
@@ -40,11 +40,11 @@
|
||||
#include "libcef/common/net/scheme_registration.h"
|
||||
#include "libcef/common/net_service/util.h"
|
||||
#include "libcef/common/request_impl.h"
|
||||
#include "libcef/common/service_manifests/builtin_service_manifests.h"
|
||||
#include "libcef/common/service_manifests/cef_content_browser_overlay_manifest.h"
|
||||
#include "libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h"
|
||||
#include "libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h"
|
||||
#include "libcef/common/service_manifests/cef_content_utility_overlay_manifest.h"
|
||||
#include "libcef/common/service_manifests/cef_packaged_service_manifests.h"
|
||||
#include "libcef/common/service_manifests/cef_renderer_manifest.h"
|
||||
|
||||
#include "base/base_switches.h"
|
||||
@@ -69,9 +69,13 @@
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
#include "chrome/grit/browser_resources.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "chrome/services/printing/printing_service.h"
|
||||
#include "chrome/services/printing/public/mojom/constants.mojom.h"
|
||||
#include "components/navigation_interception/intercept_navigation_throttle.h"
|
||||
#include "components/navigation_interception/navigation_params.h"
|
||||
#include "components/services/heap_profiling/heap_profiling_service.h"
|
||||
#include "components/services/heap_profiling/public/mojom/constants.mojom.h"
|
||||
#include "components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.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"
|
||||
@@ -108,9 +112,12 @@
|
||||
#include "extensions/browser/io_thread_extension_message_filter.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/common/switches.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "net/ssl/ssl_cert_request_info.h"
|
||||
#include "ppapi/host/ppapi_host.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
#include "services/proxy_resolver/proxy_resolver_service.h"
|
||||
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
|
||||
#include "services/service_manager/embedder/switches.h"
|
||||
#include "services/service_manager/public/mojom/connector.mojom.h"
|
||||
#include "services/service_manager/sandbox/switches.h"
|
||||
@@ -519,12 +526,13 @@ CefContentBrowserClient* CefContentBrowserClient::Get() {
|
||||
CefContentClient::Get()->browser());
|
||||
}
|
||||
|
||||
content::BrowserMainParts* CefContentBrowserClient::CreateBrowserMainParts(
|
||||
std::unique_ptr<content::BrowserMainParts>
|
||||
CefContentBrowserClient::CreateBrowserMainParts(
|
||||
const content::MainFunctionParams& parameters) {
|
||||
browser_main_parts_ = new CefBrowserMainParts(parameters);
|
||||
browser_main_parts_->AddParts(
|
||||
ChromeService::GetInstance()->CreateExtraParts());
|
||||
return browser_main_parts_;
|
||||
return base::WrapUnique(browser_main_parts_);
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::RenderProcessWillLaunch(
|
||||
@@ -553,16 +561,16 @@ void CefContentBrowserClient::RenderProcessWillLaunch(
|
||||
host->Send(
|
||||
new CefProcessMsg_SetIsIncognitoProcess(profile->IsOffTheRecord()));
|
||||
|
||||
service_manager::mojom::ServicePtr service;
|
||||
service_manager::mojom::ServicePtrInfo service;
|
||||
*service_request = mojo::MakeRequest(&service);
|
||||
service_manager::mojom::PIDReceiverPtr pid_receiver;
|
||||
service_manager::Identity renderer_identity = host->GetChildIdentity();
|
||||
mojo::Remote<service_manager::mojom::ProcessMetadata> metadata;
|
||||
ChromeService::GetInstance()->connector()->RegisterServiceInstance(
|
||||
service_manager::Identity(chrome::mojom::kRendererServiceName,
|
||||
renderer_identity.instance_group(),
|
||||
renderer_identity.instance_id(),
|
||||
base::Token::CreateRandom()),
|
||||
std::move(service), mojo::MakeRequest(&pid_receiver));
|
||||
std::move(service), metadata.BindNewPipeAndPassReceiver());
|
||||
}
|
||||
|
||||
bool CefContentBrowserClient::ShouldUseProcessPerSite(
|
||||
@@ -701,23 +709,41 @@ void CefContentBrowserClient::SiteInstanceDeleting(
|
||||
site_instance->GetId()));
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::RegisterIOThreadServiceHandlers(
|
||||
content::ServiceManagerConnection* connection) {
|
||||
// For spell checking.
|
||||
connection->AddServiceRequestHandler(
|
||||
chrome::mojom::kServiceName,
|
||||
ChromeService::GetInstance()->CreateChromeServiceRequestHandler());
|
||||
void CefContentBrowserClient::RunServiceInstance(
|
||||
const service_manager::Identity& identity,
|
||||
mojo::PendingReceiver<service_manager::mojom::Service>* receiver) {
|
||||
const std::string& service_name = identity.name();
|
||||
if (service_name == printing::mojom::kServiceName) {
|
||||
service_manager::Service::RunAsyncUntilTermination(
|
||||
printing::CreatePdfCompositorService(std::move(*receiver)));
|
||||
return;
|
||||
}
|
||||
if (service_name == printing::mojom::kChromePrintingServiceName) {
|
||||
service_manager::Service::RunAsyncUntilTermination(
|
||||
std::make_unique<printing::PrintingService>(std::move(*receiver)));
|
||||
return;
|
||||
}
|
||||
if (service_name == proxy_resolver::mojom::kProxyResolverServiceName) {
|
||||
service_manager::Service::RunAsyncUntilTermination(
|
||||
std::make_unique<proxy_resolver::ProxyResolverService>(
|
||||
std::move(*receiver)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::RegisterOutOfProcessServices(
|
||||
OutOfProcessServiceMap* services) {
|
||||
(*services)[printing::mojom::kServiceName] =
|
||||
base::BindRepeating(&base::ASCIIToUTF16, "PDF Compositor Service");
|
||||
(*services)[printing::mojom::kChromePrintingServiceName] =
|
||||
base::BindRepeating(&base::ASCIIToUTF16, "Printing Service");
|
||||
(*services)[proxy_resolver::mojom::kProxyResolverServiceName] =
|
||||
base::BindRepeating(&l10n_util::GetStringUTF16,
|
||||
IDS_UTILITY_PROCESS_PROXY_RESOLVER_NAME);
|
||||
void CefContentBrowserClient::RunServiceInstanceOnIOThread(
|
||||
const service_manager::Identity& identity,
|
||||
mojo::PendingReceiver<service_manager::mojom::Service>* receiver) {
|
||||
if (identity.name() == chrome::mojom::kServiceName) {
|
||||
ChromeService::GetInstance()->CreateChromeServiceRequestHandler().Run(
|
||||
std::move(*receiver));
|
||||
return;
|
||||
}
|
||||
if (identity.name() == heap_profiling::mojom::kServiceName) {
|
||||
heap_profiling::HeapProfilingService::GetServiceFactory().Run(
|
||||
std::move(*receiver));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
base::Optional<service_manager::Manifest>
|
||||
@@ -726,10 +752,6 @@ CefContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
|
||||
return GetCefContentBrowserOverlayManifest();
|
||||
} else if (name == content::mojom::kGpuServiceName) {
|
||||
return GetCefContentGpuOverlayManifest();
|
||||
} else if (name == content::mojom::kPackagedServicesServiceName) {
|
||||
service_manager::Manifest overlay;
|
||||
overlay.packaged_services = GetCefPackagedServiceManifests();
|
||||
return overlay;
|
||||
} else if (name == content::mojom::kRendererServiceName) {
|
||||
return GetCefContentRendererOverlayManifest();
|
||||
} else if (name == content::mojom::kUtilityServiceName) {
|
||||
@@ -741,7 +763,9 @@ CefContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
|
||||
|
||||
std::vector<service_manager::Manifest>
|
||||
CefContentBrowserClient::GetExtraServiceManifests() {
|
||||
return std::vector<service_manager::Manifest>{GetCefRendererManifest()};
|
||||
auto manifests = GetBuiltinServiceManifests();
|
||||
manifests.push_back(GetCefRendererManifest());
|
||||
return manifests;
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
@@ -949,14 +973,14 @@ void CefContentBrowserClient::AllowCertificateError(
|
||||
int cert_error,
|
||||
const net::SSLInfo& ssl_info,
|
||||
const GURL& request_url,
|
||||
content::ResourceType resource_type,
|
||||
bool is_main_frame_request,
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::Callback<void(content::CertificateRequestResultType)>&
|
||||
callback) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
if (resource_type != content::ResourceType::kMainFrame) {
|
||||
if (!is_main_frame_request) {
|
||||
// A sub-resource has a certificate error. The user doesn't really
|
||||
// have a context for making the right decision, so block the request
|
||||
// hard.
|
||||
@@ -1339,8 +1363,6 @@ bool CefContentBrowserClient::HandleExternalProtocol(
|
||||
bool is_main_frame,
|
||||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture,
|
||||
const std::string& method,
|
||||
const net::HttpRequestHeaders& headers,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactory*& out_factory) {
|
||||
if (net_service::IsEnabled()) {
|
||||
@@ -1350,8 +1372,6 @@ bool CefContentBrowserClient::HandleExternalProtocol(
|
||||
|
||||
CefRefPtr<CefRequestImpl> requestPtr = new CefRequestImpl();
|
||||
requestPtr->SetURL(url.spec());
|
||||
requestPtr->SetMethod(method);
|
||||
requestPtr->Set(headers);
|
||||
requestPtr->SetReadOnly(true);
|
||||
|
||||
net_util::HandleExternalProtocol(requestPtr, web_contents_getter);
|
||||
|
@@ -41,7 +41,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
static CefContentBrowserClient* Get();
|
||||
|
||||
// ContentBrowserClient implementation.
|
||||
content::BrowserMainParts* CreateBrowserMainParts(
|
||||
std::unique_ptr<content::BrowserMainParts> CreateBrowserMainParts(
|
||||
const content::MainFunctionParams& parameters) override;
|
||||
void RenderProcessWillLaunch(
|
||||
content::RenderProcessHost* host,
|
||||
@@ -61,9 +61,14 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool IsHandledURL(const GURL& url) override;
|
||||
void SiteInstanceGotProcess(content::SiteInstance* site_instance) override;
|
||||
void SiteInstanceDeleting(content::SiteInstance* site_instance) override;
|
||||
void RegisterIOThreadServiceHandlers(
|
||||
content::ServiceManagerConnection* connection) override;
|
||||
void RegisterOutOfProcessServices(OutOfProcessServiceMap* services) override;
|
||||
void RunServiceInstance(
|
||||
const service_manager::Identity& identity,
|
||||
mojo::PendingReceiver<service_manager::mojom::Service>* receiver)
|
||||
override;
|
||||
void RunServiceInstanceOnIOThread(
|
||||
const service_manager::Identity& identity,
|
||||
mojo::PendingReceiver<service_manager::mojom::Service>* receiver)
|
||||
override;
|
||||
base::Optional<service_manager::Manifest> GetServiceManifestOverlay(
|
||||
base::StringPiece name) override;
|
||||
std::vector<service_manager::Manifest> GetExtraServiceManifests() override;
|
||||
@@ -93,7 +98,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
int cert_error,
|
||||
const net::SSLInfo& ssl_info,
|
||||
const GURL& request_url,
|
||||
content::ResourceType resource_type,
|
||||
bool is_main_frame_request,
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::Callback<void(content::CertificateRequestResultType)>&
|
||||
@@ -186,8 +191,6 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool is_main_frame,
|
||||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture,
|
||||
const std::string& method,
|
||||
const net::HttpRequestHeaders& headers,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactory*& out_factory) override;
|
||||
bool HandleExternalProtocol(
|
||||
|
@@ -35,8 +35,8 @@
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/chrome_elf/chrome_elf_main.h"
|
||||
#include "chrome/install_static/initialize_from_primary_module.h"
|
||||
#include "chrome_elf/chrome_elf_main.h"
|
||||
#include "components/crash/content/app/crashpad.h"
|
||||
#include "content/public/app/sandbox_helper_win.h"
|
||||
#include "sandbox/win/src/sandbox_types.h"
|
||||
@@ -636,4 +636,7 @@ void CefContext::FinalizeShutdown() {
|
||||
sm_main_params_.reset(NULL);
|
||||
sm_main_delegate_.reset(NULL);
|
||||
main_delegate_.reset(NULL);
|
||||
|
||||
delete g_browser_process;
|
||||
g_browser_process = NULL;
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ CefComponentExtensionResourceManager::~CefComponentExtensionResourceManager() {}
|
||||
bool CefComponentExtensionResourceManager::IsComponentExtensionResource(
|
||||
const base::FilePath& extension_path,
|
||||
const base::FilePath& resource_path,
|
||||
ComponentExtensionResourceInfo* resource_info) const {
|
||||
int* resource_id) const {
|
||||
base::FilePath directory_path = extension_path;
|
||||
base::FilePath resources_dir;
|
||||
base::FilePath relative_path;
|
||||
@@ -34,7 +34,7 @@ bool CefComponentExtensionResourceManager::IsComponentExtensionResource(
|
||||
|
||||
auto entry = path_to_resource_info_.find(relative_path);
|
||||
if (entry != path_to_resource_info_.end()) {
|
||||
*resource_info = entry->second;
|
||||
*resource_id = entry->second;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ CefComponentExtensionResourceManager::GetTemplateReplacementsForExtension(
|
||||
}
|
||||
|
||||
void CefComponentExtensionResourceManager::AddComponentResourceEntries(
|
||||
const GzippedGritResourceMap* entries,
|
||||
const GritResourceMap* entries,
|
||||
size_t size) {
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
base::FilePath resource_path =
|
||||
@@ -56,8 +56,7 @@ void CefComponentExtensionResourceManager::AddComponentResourceEntries(
|
||||
resource_path = resource_path.NormalizePathSeparators();
|
||||
|
||||
DCHECK(!base::ContainsKey(path_to_resource_info_, resource_path));
|
||||
path_to_resource_info_[resource_path] = {entries[i].value,
|
||||
entries[i].gzipped};
|
||||
path_to_resource_info_[resource_path] = entries[i].value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#include "base/files/file_path.h"
|
||||
#include "extensions/browser/component_extension_resource_manager.h"
|
||||
|
||||
struct GzippedGritResourceMap;
|
||||
struct GritResourceMap;
|
||||
|
||||
namespace extensions {
|
||||
|
||||
@@ -21,21 +21,18 @@ class CefComponentExtensionResourceManager
|
||||
~CefComponentExtensionResourceManager() override;
|
||||
|
||||
// Overridden from ComponentExtensionResourceManager:
|
||||
bool IsComponentExtensionResource(
|
||||
const base::FilePath& extension_path,
|
||||
const base::FilePath& resource_path,
|
||||
ComponentExtensionResourceInfo* resource_info) const override;
|
||||
bool IsComponentExtensionResource(const base::FilePath& extension_path,
|
||||
const base::FilePath& resource_path,
|
||||
int* resource_id) const override;
|
||||
const ui::TemplateReplacements* GetTemplateReplacementsForExtension(
|
||||
const std::string& extension_id) const override;
|
||||
|
||||
private:
|
||||
void AddComponentResourceEntries(const GzippedGritResourceMap* entries,
|
||||
size_t size);
|
||||
void AddComponentResourceEntries(const GritResourceMap* entries, size_t size);
|
||||
|
||||
// A map from a resource path to the resource ID. Used by
|
||||
// IsComponentExtensionResource.
|
||||
std::map<base::FilePath, ComponentExtensionResourceInfo>
|
||||
path_to_resource_info_;
|
||||
std::map<base::FilePath, int> path_to_resource_info_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefComponentExtensionResourceManager);
|
||||
};
|
||||
|
@@ -122,21 +122,21 @@ CefExtensionsBrowserClient::MaybeCreateResourceBundleRequestJob(
|
||||
base::FilePath CefExtensionsBrowserClient::GetBundleResourcePath(
|
||||
const network::ResourceRequest& request,
|
||||
const base::FilePath& extension_resources_path,
|
||||
ComponentExtensionResourceInfo* resource_info) const {
|
||||
int* resource_id) const {
|
||||
return chrome_url_request_util::GetBundleResourcePath(
|
||||
request, extension_resources_path, resource_info);
|
||||
request, extension_resources_path, resource_id);
|
||||
}
|
||||
|
||||
void CefExtensionsBrowserClient::LoadResourceFromResourceBundle(
|
||||
const network::ResourceRequest& request,
|
||||
network::mojom::URLLoaderRequest loader,
|
||||
const base::FilePath& resource_relative_path,
|
||||
const ComponentExtensionResourceInfo& resource_info,
|
||||
const int resource_id,
|
||||
const std::string& content_security_policy,
|
||||
network::mojom::URLLoaderClientPtr client,
|
||||
bool send_cors_header) {
|
||||
chrome_url_request_util::LoadResourceFromResourceBundle(
|
||||
request, std::move(loader), resource_relative_path, resource_info,
|
||||
request, std::move(loader), resource_relative_path, resource_id,
|
||||
content_security_policy, std::move(client), send_cors_header);
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ PrefService* CefExtensionsBrowserClient::GetPrefServiceForContext(
|
||||
|
||||
void CefExtensionsBrowserClient::GetEarlyExtensionPrefsObservers(
|
||||
content::BrowserContext* context,
|
||||
std::vector<ExtensionPrefsObserver*>* observers) const {}
|
||||
std::vector<EarlyExtensionPrefsObserver*>* observers) const {}
|
||||
|
||||
ProcessManagerDelegate* CefExtensionsBrowserClient::GetProcessManagerDelegate()
|
||||
const {
|
||||
@@ -299,10 +299,6 @@ void CefExtensionsBrowserClient::BroadcastEventToRenderers(
|
||||
GURL());
|
||||
}
|
||||
|
||||
net::NetLog* CefExtensionsBrowserClient::GetNetLog() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ExtensionCache* CefExtensionsBrowserClient::GetExtensionCache() {
|
||||
// Only used by Chrome via ExtensionService.
|
||||
NOTREACHED();
|
||||
|
@@ -52,12 +52,12 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
|
||||
base::FilePath GetBundleResourcePath(
|
||||
const network::ResourceRequest& request,
|
||||
const base::FilePath& extension_resources_path,
|
||||
ComponentExtensionResourceInfo* resource_info) const override;
|
||||
int* resource_id) const override;
|
||||
void LoadResourceFromResourceBundle(
|
||||
const network::ResourceRequest& request,
|
||||
network::mojom::URLLoaderRequest loader,
|
||||
const base::FilePath& resource_relative_path,
|
||||
const ComponentExtensionResourceInfo& resource_info,
|
||||
const int resource_id,
|
||||
const std::string& content_security_policy,
|
||||
network::mojom::URLLoaderClientPtr client,
|
||||
bool send_cors_header) override;
|
||||
@@ -73,7 +73,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
|
||||
content::BrowserContext* context) override;
|
||||
void GetEarlyExtensionPrefsObservers(
|
||||
content::BrowserContext* context,
|
||||
std::vector<ExtensionPrefsObserver*>* observers) const override;
|
||||
std::vector<EarlyExtensionPrefsObserver*>* observers) const override;
|
||||
ProcessManagerDelegate* GetProcessManagerDelegate() const override;
|
||||
std::unique_ptr<ExtensionHostDelegate> CreateExtensionHostDelegate() override;
|
||||
bool CreateBackgroundExtensionHost(const Extension* extension,
|
||||
@@ -100,7 +100,6 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
|
||||
events::HistogramValue histogram_value,
|
||||
const std::string& event_name,
|
||||
std::unique_ptr<base::ListValue> args) override;
|
||||
net::NetLog* GetNetLog() override;
|
||||
ExtensionCache* GetExtensionCache() override;
|
||||
bool IsBackgroundUpdateAllowed() override;
|
||||
bool IsMinBrowserVersionSupported(const std::string& min_version) override;
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#include "libcef/common/cef_switches.h"
|
||||
#include "libcef/common/content_client.h"
|
||||
|
||||
#include "base/build_time.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
@@ -160,8 +161,7 @@ CreateLogVerifiersForKnownLogs() {
|
||||
for (const auto& log : certificate_transparency::GetKnownLogs()) {
|
||||
scoped_refptr<const net::CTLogVerifier> log_verifier =
|
||||
net::CTLogVerifier::Create(
|
||||
base::StringPiece(log.log_key, log.log_key_length), log.log_name,
|
||||
log.log_dns_domain);
|
||||
base::StringPiece(log.log_key, log.log_key_length), log.log_name);
|
||||
// Make sure no null logs enter verifiers. Parsing of all statically
|
||||
// configured logs should always succeed, unless there has been binary or
|
||||
// memory corruption.
|
||||
@@ -308,7 +308,8 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
|
||||
|
||||
io_state_->storage_->set_host_resolver(
|
||||
net::HostResolver::CreateStandaloneResolver(io_state_->net_log_));
|
||||
io_state_->storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
|
||||
io_state_->storage_->set_cert_verifier(
|
||||
net::CertVerifier::CreateDefault(/*cert_net_fetcher=*/nullptr));
|
||||
|
||||
std::unique_ptr<net::TransportSecurityState> transport_security_state(
|
||||
new net::TransportSecurityState);
|
||||
@@ -323,12 +324,11 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
|
||||
new net::MultiLogCTVerifier());
|
||||
ct_verifier->AddLogs(ct_logs);
|
||||
io_state_->storage_->set_cert_transparency_verifier(std::move(ct_verifier));
|
||||
|
||||
std::unique_ptr<certificate_transparency::ChromeCTPolicyEnforcer>
|
||||
ct_policy_enforcer(
|
||||
new certificate_transparency::ChromeCTPolicyEnforcer);
|
||||
ct_policy_enforcer->set_enforce_net_security_expiration(
|
||||
settings_.enable_net_security_expiration ? true : false);
|
||||
ct_policy_enforcer(new certificate_transparency::ChromeCTPolicyEnforcer(
|
||||
base::GetBuildTime(),
|
||||
certificate_transparency::GetDisqualifiedLogs(),
|
||||
certificate_transparency::GetLogsOperatedByGoogle()));
|
||||
io_state_->storage_->set_ct_policy_enforcer(std::move(ct_policy_enforcer));
|
||||
|
||||
std::unique_ptr<net::ProxyResolutionService> system_proxy_service =
|
||||
|
@@ -148,7 +148,7 @@ class InterceptedRequest : public network::mojom::URLLoader,
|
||||
void OnUploadProgress(int64_t current_position,
|
||||
int64_t total_size,
|
||||
OnUploadProgressCallback callback) override;
|
||||
void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override;
|
||||
void OnReceiveCachedMetadata(mojo_base::BigBuffer data) override;
|
||||
void OnTransferSizeUpdated(int32_t transfer_size_diff) override;
|
||||
void OnStartLoadingResponseBody(
|
||||
mojo::ScopedDataPipeConsumerHandle body) override;
|
||||
@@ -528,9 +528,8 @@ void InterceptedRequest::OnUploadProgress(int64_t current_position,
|
||||
std::move(callback).Run();
|
||||
}
|
||||
|
||||
void InterceptedRequest::OnReceiveCachedMetadata(
|
||||
const std::vector<uint8_t>& data) {
|
||||
target_client_->OnReceiveCachedMetadata(data);
|
||||
void InterceptedRequest::OnReceiveCachedMetadata(mojo_base::BigBuffer data) {
|
||||
target_client_->OnReceiveCachedMetadata(std::move(data));
|
||||
}
|
||||
|
||||
void InterceptedRequest::OnTransferSizeUpdated(int32_t transfer_size_diff) {
|
||||
|
@@ -104,6 +104,7 @@ struct PopulateAxNodeAttributes {
|
||||
case ax::mojom::IntAttribute::kInPageLinkTargetId:
|
||||
case ax::mojom::IntAttribute::kErrormessageId:
|
||||
case ax::mojom::IntAttribute::kDetailsId:
|
||||
case ax::mojom::IntAttribute::kDropeffect:
|
||||
case ax::mojom::IntAttribute::kMemberOfId:
|
||||
case ax::mojom::IntAttribute::kNextFocusId:
|
||||
case ax::mojom::IntAttribute::kNextOnLineId:
|
||||
@@ -111,6 +112,7 @@ struct PopulateAxNodeAttributes {
|
||||
case ax::mojom::IntAttribute::kPreviousOnLineId:
|
||||
case ax::mojom::IntAttribute::kSetSize:
|
||||
case ax::mojom::IntAttribute::kPosInSet:
|
||||
case ax::mojom::IntAttribute::kPopupForId:
|
||||
attributes->SetInt(ToString(attr.first), attr.second);
|
||||
break;
|
||||
case ax::mojom::IntAttribute::kDefaultActionVerb:
|
||||
|
@@ -46,7 +46,7 @@
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "media/base/video_frame.h"
|
||||
#include "ui/compositor/compositor_vsync_manager.h"
|
||||
#include "ui/compositor/compositor.h"
|
||||
#include "ui/events/blink/blink_event_util.h"
|
||||
#include "ui/events/gesture_detection/gesture_provider_config_helper.h"
|
||||
#include "ui/events/gesture_detection/motion_event.h"
|
||||
@@ -521,13 +521,14 @@ void CefRenderWidgetHostViewOSR::Show() {
|
||||
delegated_frame_host_->AttachToCompositor(compositor_.get());
|
||||
delegated_frame_host_->WasShown(
|
||||
GetLocalSurfaceIdAllocation().local_surface_id(),
|
||||
GetRootLayer()->bounds().size(), false);
|
||||
GetRootLayer()->bounds().size(), base::nullopt);
|
||||
#endif
|
||||
|
||||
// Note that |render_widget_host_| will retrieve size parameters from the
|
||||
// DelegatedFrameHost, so it must have WasShown called after.
|
||||
if (render_widget_host_)
|
||||
render_widget_host_->WasShown(false);
|
||||
render_widget_host_->WasShown(
|
||||
base::nullopt /* record_tab_switch_time_request */);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::Hide() {
|
||||
@@ -898,9 +899,7 @@ void CefRenderWidgetHostViewOSR::SetIsLoading(bool is_loading) {
|
||||
forward_touch_to_popup_ = false;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::RenderProcessGone(
|
||||
base::TerminationStatus status,
|
||||
int error_code) {
|
||||
void CefRenderWidgetHostViewOSR::RenderProcessGone() {
|
||||
Destroy();
|
||||
}
|
||||
|
||||
@@ -1729,11 +1728,19 @@ void CefRenderWidgetHostViewOSR::SetFrameRate() {
|
||||
|
||||
frame_rate_threshold_us_ = 1000000 / frame_rate;
|
||||
|
||||
if (compositor) {
|
||||
compositor->vsync_manager()->UpdateVSyncParameters(
|
||||
#if defined(OS_MACOSX)
|
||||
if (browser_compositor_) {
|
||||
browser_compositor_->UpdateVSyncParameters(
|
||||
base::TimeTicks::Now(),
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
}
|
||||
#else
|
||||
if (compositor) {
|
||||
compositor->SetDisplayVSyncParameters(
|
||||
base::TimeTicks::Now(),
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (copy_frame_generator_.get()) {
|
||||
copy_frame_generator_->set_frame_rate_threshold_us(
|
||||
|
@@ -160,8 +160,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
content::RenderWidgetHostViewGuest* guest_view) override;
|
||||
void UpdateCursor(const content::WebCursor& cursor) override;
|
||||
void SetIsLoading(bool is_loading) override;
|
||||
void RenderProcessGone(base::TerminationStatus status,
|
||||
int error_code) override;
|
||||
void RenderProcessGone() override;
|
||||
void Destroy() override;
|
||||
void SetTooltipText(const base::string16& tooltip_text) override;
|
||||
content::CursorManager* GetCursorManager() override;
|
||||
|
@@ -183,6 +183,10 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
|
||||
#endif
|
||||
}
|
||||
|
||||
// Browser process preferences.
|
||||
// Based on chrome/browser/browser_process_impl.cc RegisterPrefs.
|
||||
registry->RegisterBooleanPref(prefs::kAllowCrossOriginAuthPrompt, false);
|
||||
|
||||
// Browser UI preferences.
|
||||
// Based on chrome/browser/ui/browser_ui_prefs.cc RegisterBrowserPrefs.
|
||||
registry->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true);
|
||||
|
@@ -9,25 +9,20 @@
|
||||
// static
|
||||
CefRefPtr<CefLabelButton> CefLabelButton::CreateLabelButton(
|
||||
CefRefPtr<CefButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
return CefBasicLabelButtonImpl::Create(delegate, text, with_frame);
|
||||
const CefString& text) {
|
||||
return CefBasicLabelButtonImpl::Create(delegate, text);
|
||||
}
|
||||
|
||||
// static
|
||||
CefRefPtr<CefBasicLabelButtonImpl> CefBasicLabelButtonImpl::Create(
|
||||
CefRefPtr<CefButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
const CefString& text) {
|
||||
CEF_REQUIRE_UIT_RETURN(nullptr);
|
||||
CefRefPtr<CefBasicLabelButtonImpl> label_button =
|
||||
new CefBasicLabelButtonImpl(delegate);
|
||||
label_button->Initialize();
|
||||
if (!text.empty())
|
||||
label_button->SetText(text);
|
||||
if (with_frame) {
|
||||
label_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON);
|
||||
}
|
||||
return label_button;
|
||||
}
|
||||
|
||||
|
@@ -25,8 +25,7 @@ class CefBasicLabelButtonImpl : public CefLabelButtonImpl<views::LabelButton,
|
||||
// Create a new CefLabelButton instance. |delegate| may be nullptr.
|
||||
static CefRefPtr<CefBasicLabelButtonImpl> Create(
|
||||
CefRefPtr<CefButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame);
|
||||
const CefString& text);
|
||||
|
||||
// CefViewAdapter methods:
|
||||
std::string GetDebugType() override { return "LabelButton"; }
|
||||
|
@@ -12,16 +12,14 @@
|
||||
// static
|
||||
CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
|
||||
CefRefPtr<CefMenuButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
return CefMenuButtonImpl::Create(delegate, text, with_frame);
|
||||
const CefString& text) {
|
||||
return CefMenuButtonImpl::Create(delegate, text);
|
||||
}
|
||||
|
||||
// static
|
||||
CefRefPtr<CefMenuButtonImpl> CefMenuButtonImpl::Create(
|
||||
CefRefPtr<CefMenuButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
const CefString& text) {
|
||||
CEF_REQUIRE_UIT_RETURN(nullptr);
|
||||
DCHECK(delegate);
|
||||
if (!delegate)
|
||||
@@ -30,9 +28,6 @@ CefRefPtr<CefMenuButtonImpl> CefMenuButtonImpl::Create(
|
||||
menu_button->Initialize();
|
||||
if (!text.empty())
|
||||
menu_button->SetText(text);
|
||||
if (with_frame) {
|
||||
menu_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON);
|
||||
}
|
||||
return menu_button;
|
||||
}
|
||||
|
||||
|
@@ -26,8 +26,7 @@ class CefMenuButtonImpl : public CefLabelButtonImpl<views::MenuButton,
|
||||
// Create a new CefMenuButton instance. |delegate| must not be nullptr.
|
||||
static CefRefPtr<CefMenuButtonImpl> Create(
|
||||
CefRefPtr<CefMenuButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame);
|
||||
const CefString& text);
|
||||
|
||||
// CefMenuButton methods:
|
||||
void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
|
||||
|
@@ -53,12 +53,12 @@ CEF_PANEL_IMPL_T class CefPanelImpl : public CEF_VIEW_IMPL_D {
|
||||
bool include_children) override {
|
||||
ParentClass::GetDebugInfo(info, include_children);
|
||||
if (include_children) {
|
||||
const size_t count = ParentClass::content_view()->child_count();
|
||||
const size_t count = ParentClass::content_view()->children().size();
|
||||
if (count > 0U) {
|
||||
std::unique_ptr<base::ListValue> children(new base::ListValue());
|
||||
|
||||
for (size_t i = 0U; i < count; ++i) {
|
||||
views::View* view = ParentClass::content_view()->child_at(i);
|
||||
views::View* view = ParentClass::content_view()->children()[i];
|
||||
CefViewAdapter* adapter = CefViewAdapter::GetFor(view);
|
||||
if (adapter) {
|
||||
std::unique_ptr<base::DictionaryValue> child_info(
|
||||
@@ -128,9 +128,11 @@ CEF_PANEL_IMPL_T void CEF_PANEL_IMPL_D::AddChildViewAt(CefRefPtr<CefView> view,
|
||||
DCHECK(view->IsValid());
|
||||
DCHECK(!view->IsAttached());
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LE(index, ParentClass::content_view()->child_count());
|
||||
DCHECK_LE(static_cast<unsigned int>(index),
|
||||
ParentClass::content_view()->children().size());
|
||||
if (!view.get() || !view->IsValid() || view->IsAttached() || index < 0 ||
|
||||
index > ParentClass::content_view()->child_count()) {
|
||||
(static_cast<unsigned int>(index) >
|
||||
ParentClass::content_view()->children().size())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -179,27 +181,29 @@ CEF_PANEL_IMPL_T void CEF_PANEL_IMPL_D::RemoveChildView(
|
||||
CEF_PANEL_IMPL_T void CEF_PANEL_IMPL_D::RemoveAllChildViews() {
|
||||
CEF_REQUIRE_VALID_RETURN_VOID();
|
||||
while (!ParentClass::content_view()->children().empty()) {
|
||||
CefRefPtr<CefView> view =
|
||||
view_util::GetFor(ParentClass::content_view()->child_at(0), false);
|
||||
CefRefPtr<CefView> view = view_util::GetFor(
|
||||
ParentClass::content_view()->children().front(), false);
|
||||
RemoveChildView(view);
|
||||
}
|
||||
}
|
||||
|
||||
CEF_PANEL_IMPL_T size_t CEF_PANEL_IMPL_D::GetChildViewCount() {
|
||||
CEF_REQUIRE_VALID_RETURN(0U);
|
||||
return ParentClass::content_view()->child_count();
|
||||
return ParentClass::content_view()->children().size();
|
||||
}
|
||||
|
||||
CEF_PANEL_IMPL_T CefRefPtr<CefView> CEF_PANEL_IMPL_D::GetChildViewAt(
|
||||
int index) {
|
||||
CEF_REQUIRE_VALID_RETURN(nullptr);
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, ParentClass::content_view()->child_count());
|
||||
if (index < 0 || index >= ParentClass::content_view()->child_count())
|
||||
DCHECK_LT(static_cast<unsigned int>(index),
|
||||
ParentClass::content_view()->children().size());
|
||||
if (index < 0 || (static_cast<unsigned int>(index) >=
|
||||
ParentClass::content_view()->children().size()))
|
||||
return nullptr;
|
||||
|
||||
CefRefPtr<CefView> view =
|
||||
view_util::GetFor(ParentClass::content_view()->child_at(index), false);
|
||||
view_util::GetFor(ParentClass::content_view()->children()[index], false);
|
||||
DCHECK(view);
|
||||
return view;
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ CefRect CefScrollViewImpl::GetVisibleContentRect() {
|
||||
bool CefScrollViewImpl::HasHorizontalScrollbar() {
|
||||
CEF_REQUIRE_VALID_RETURN(false);
|
||||
const views::ScrollBar* scrollbar = root_view()->horizontal_scroll_bar();
|
||||
return scrollbar && scrollbar->visible();
|
||||
return scrollbar && scrollbar->GetVisible();
|
||||
}
|
||||
|
||||
int CefScrollViewImpl::GetHorizontalScrollbarHeight() {
|
||||
@@ -55,7 +55,7 @@ int CefScrollViewImpl::GetHorizontalScrollbarHeight() {
|
||||
bool CefScrollViewImpl::HasVerticalScrollbar() {
|
||||
CEF_REQUIRE_VALID_RETURN(false);
|
||||
const views::ScrollBar* scrollbar = root_view()->vertical_scroll_bar();
|
||||
return scrollbar && scrollbar->visible();
|
||||
return scrollbar && scrollbar->GetVisible();
|
||||
}
|
||||
|
||||
int CefScrollViewImpl::GetVerticalScrollbarWidth() {
|
||||
|
@@ -344,7 +344,7 @@ CEF_VIEW_IMPL_T class CefViewImpl : public CefViewAdapter, public CefViewClass {
|
||||
void GetDebugInfo(base::DictionaryValue* info,
|
||||
bool include_children) override {
|
||||
info->SetString("type", GetDebugType());
|
||||
info->SetInteger("id", root_view()->id());
|
||||
info->SetInteger("id", root_view()->GetID());
|
||||
|
||||
// Use GetBounds() because some subclasses (like CefWindowImpl) override it.
|
||||
const CefRect& bounds = GetBounds();
|
||||
@@ -493,12 +493,12 @@ CEF_VIEW_IMPL_T CefRefPtr<CefWindow> CEF_VIEW_IMPL_D::GetWindow() {
|
||||
|
||||
CEF_VIEW_IMPL_T int CEF_VIEW_IMPL_D::GetID() {
|
||||
CEF_REQUIRE_VALID_RETURN(0);
|
||||
return root_view()->id();
|
||||
return root_view()->GetID();
|
||||
}
|
||||
|
||||
CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetID(int id) {
|
||||
CEF_REQUIRE_VALID_RETURN_VOID();
|
||||
root_view()->set_id(id);
|
||||
root_view()->SetID(id);
|
||||
}
|
||||
|
||||
CEF_VIEW_IMPL_T int CEF_VIEW_IMPL_D::GetGroupID() {
|
||||
@@ -611,7 +611,7 @@ CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetVisible(bool visible) {
|
||||
|
||||
CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsVisible() {
|
||||
CEF_REQUIRE_VALID_RETURN(false);
|
||||
return root_view()->visible();
|
||||
return root_view()->GetVisible();
|
||||
}
|
||||
|
||||
CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsDrawn() {
|
||||
@@ -626,7 +626,7 @@ CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetEnabled(bool enabled) {
|
||||
|
||||
CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsEnabled() {
|
||||
CEF_REQUIRE_VALID_RETURN(false);
|
||||
return root_view()->enabled();
|
||||
return root_view()->GetEnabled();
|
||||
}
|
||||
|
||||
CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetFocusable(bool focusable) {
|
||||
|
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "ui/base/test/ui_controls.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/views/controls/button/menu_button.h"
|
||||
#include "ui/views/controls/menu/menu_runner.h"
|
||||
|
||||
#if defined(USE_AURA)
|
||||
@@ -37,9 +38,8 @@ void InitializeUITesting() {
|
||||
if (!initialized) {
|
||||
ui_controls::EnableUIControls();
|
||||
|
||||
|
||||
#if defined(USE_AURA)
|
||||
#if defined(OS_LINUX) && defined(USE_X11)
|
||||
#if defined(OS_LINUX) && defined(USE_X11)
|
||||
ui_controls::InstallUIControlsAura(
|
||||
views::test::CreateUIControlsDesktopAura());
|
||||
#else
|
||||
@@ -437,7 +437,7 @@ void CefWindowImpl::ShowMenu(views::MenuButton* menu_button,
|
||||
base::Bind(&CefWindowImpl::MenuClosed, this)));
|
||||
|
||||
menu_runner_->RunMenuAt(
|
||||
widget_, menu_button,
|
||||
widget_, menu_button->button_controller(),
|
||||
gfx::Rect(gfx::Point(screen_point.x, screen_point.y), gfx::Size()),
|
||||
static_cast<views::MenuAnchorPosition>(anchor_position),
|
||||
ui::MENU_SOURCE_NONE);
|
||||
|
Reference in New Issue
Block a user