Commit d4ed7f22 authored by Gustavo Noronha's avatar Gustavo Noronha

Several fixes for more recent ozone-wayland-dev (4a51306)

parent 3d8e4497
......@@ -795,7 +795,7 @@ typedef struct _cef_browser_host_t {
// is STATE_DISABLED then accessibility will be completely disabled.
//
// For windowed browsers accessibility will be enabled in Complete mode (which
// corresponds to kAccessibilityModeComplete in Chromium). In this mode all
// corresponds to ui::kAXModeComplete in Chromium). In this mode all
// platform accessibility objects will be created and managed by Chromium's
// internal implementation. The client needs only to detect the screen reader
// and call this function appropriately. For example, on macOS the client can
......@@ -804,7 +804,7 @@ typedef struct _cef_browser_host_t {
// with OBJID_CLIENT to detect accessibility readers.
//
// For windowless browsers accessibility will be enabled in TreeOnly mode
// (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In
// (which corresponds to ui::kAXModeWebContentsOnly in Chromium). In
// this mode renderer accessibility is enabled, the full tree is computed, and
// events are passed to CefAccessibiltyHandler, but platform accessibility
// objects are not created. The client may implement platform accessibility
......
......@@ -162,14 +162,14 @@ typedef struct _cef_request_t {
// cef_urlrequest_t.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t(CEF_CALLBACK* get_first_party_for_cookies)(
cef_string_userfree_t(CEF_CALLBACK* get_site_for_cookies)(
struct _cef_request_t* self);
///
// Get the URL to the first party for cookies used in combination with
// cef_urlrequest_t.
///
void(CEF_CALLBACK* set_first_party_for_cookies)(struct _cef_request_t* self,
void(CEF_CALLBACK* set_site_for_cookies)(struct _cef_request_t* self,
const cef_string_t* url);
///
......
......@@ -815,7 +815,7 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
// completely disabled.
//
// For windowed browsers accessibility will be enabled in Complete mode (which
// corresponds to kAccessibilityModeComplete in Chromium). In this mode all
// corresponds to ui::kAXModeComplete in Chromium). In this mode all
// platform accessibility objects will be created and managed by Chromium's
// internal implementation. The client needs only to detect the screen reader
// and call this method appropriately. For example, on macOS the client can
......@@ -824,7 +824,7 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
// with OBJID_CLIENT to detect accessibility readers.
//
// For windowless browsers accessibility will be enabled in TreeOnly mode
// (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In
// (which corresponds to ui::kAXModeWebContentsOnly in Chromium). In
// this mode renderer accessibility is enabled, the full tree is computed, and
// events are passed to CefAccessibiltyHandler, but platform accessibility
// objects are not created. The client may implement platform accessibility
......
......@@ -168,14 +168,14 @@ class CefRequest : public virtual CefBaseRefCounted {
// CefURLRequest.
///
/*--cef()--*/
virtual CefString GetFirstPartyForCookies() = 0;
virtual CefString GetSiteForCookies() = 0;
///
// Get the URL to the first party for cookies used in combination with
// CefURLRequest.
///
/*--cef()--*/
virtual void SetFirstPartyForCookies(const CefString& url) = 0;
virtual void SetSiteForCookies(const CefString& url) = 0;
///
// Get the resource type for this request. Only available in the browser
......
......@@ -935,14 +935,14 @@ void CefBrowserHostImpl::SetAccessibilityState(
if (!web_contents_impl)
return;
content::AccessibilityMode accMode;
ui::AXMode accMode;
// In windowless mode set accessibility to TreeOnly mode. Else native
// accessibility APIs, specific to each platform, are also created.
if (accessibility_state == STATE_ENABLED) {
if (IsWindowless())
accMode = content::kAccessibilityModeWebContentsOnly;
accMode = ui::kAXModeWebContentsOnly;
else
accMode = content::kAccessibilityModeComplete;
accMode = ui::kAXModeComplete;
}
web_contents_impl->SetAccessibilityMode(accMode);
}
......@@ -1531,7 +1531,7 @@ void CefBrowserHostImpl::Navigate(const CefNavigateParams& params) {
CefRequestImpl::BlinkReferrerPolicyToNetReferrerPolicy(
params.referrer.policy);
request.frame_id = params.frame_id;
request.first_party_for_cookies = params.first_party_for_cookies;
request.site_for_cookies = params.site_for_cookies;
request.headers = params.headers;
request.load_flags = params.load_flags;
request.upload_data = params.upload_data;
......@@ -2619,8 +2619,7 @@ void CefBrowserHostImpl::DidFailLoad(
content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
int error_code,
const base::string16& error_description,
bool was_ignored_by_handler) {
const base::string16& error_description) {
// The navigation failed after commit. OnLoadStart was called so we also call
// OnLoadEnd.
const bool is_main_frame = !render_frame_host->GetParent();
......
......@@ -463,8 +463,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
void DidFailLoad(content::RenderFrameHost* render_frame_host,
const GURL& validated_url,
int error_code,
const base::string16& error_description,
bool was_ignored_by_handler) override;
const base::string16& error_description) override;
void FrameDeleted(content::RenderFrameHost* render_frame_host) override;
void TitleWasSet(content::NavigationEntry* entry, bool explicit_set) override;
void PluginCrashed(const base::FilePath& plugin_path,
......
......@@ -145,7 +145,7 @@ class CefBrowserURLRequest::Context
}
inline bool CalledOnValidThread() {
return task_runner_->RunsTasksOnCurrentThread();
return task_runner_->RunsTasksInCurrentSequence();
}
bool Start() {
......
......@@ -84,6 +84,10 @@ void ChromeBrowserProcessStub::ResourceDispatcherHostCreated() {
NOTREACHED();
};
void ChromeBrowserProcessStub::FlushLocalStateAndReply(base::OnceClosure reply) {
NOTREACHED();
}
void ChromeBrowserProcessStub::EndSession() {
NOTREACHED();
};
......@@ -113,6 +117,12 @@ IOThread* ChromeBrowserProcessStub::io_thread() {
return NULL;
}
SystemNetworkContextManager*
ChromeBrowserProcessStub::system_network_context_manager() {
NOTREACHED();
return NULL;
}
WatchDogThread* ChromeBrowserProcessStub::watchdog_thread() {
NOTREACHED();
return NULL;
......@@ -321,11 +331,6 @@ ChromeBrowserProcessStub::media_file_system_registry() {
return NULL;
}
bool ChromeBrowserProcessStub::created_local_state() const {
NOTREACHED();
return false;
}
#if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* ChromeBrowserProcessStub::webrtc_log_uploader() {
NOTREACHED();
......
......@@ -41,6 +41,7 @@ class ChromeBrowserProcessStub : public BrowserProcess,
// BrowserProcess implementation.
void ResourceDispatcherHostCreated() override;
void FlushLocalStateAndReply(base::OnceClosure reply) override;
void EndSession() override;
metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager()
override;
......@@ -48,6 +49,7 @@ class ChromeBrowserProcessStub : public BrowserProcess,
rappor::RapporServiceImpl* rappor_service() override;
ukm::UkmRecorder* ukm_recorder() override;
IOThread* io_thread() override;
SystemNetworkContextManager* system_network_context_manager() override;
WatchDogThread* watchdog_thread() override;
ProfileManager* profile_manager() override;
PrefService* local_state() override;
......@@ -98,7 +100,6 @@ class ChromeBrowserProcessStub : public BrowserProcess,
component_updater::SupervisedUserWhitelistInstaller*
supervised_user_whitelist_installer() override;
MediaFileSystemRegistry* media_file_system_registry() override;
bool created_local_state() const override;
#if BUILDFLAG(ENABLE_WEBRTC)
WebRtcLogUploader* webrtc_log_uploader() override;
#endif
......
......@@ -689,7 +689,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
arraysize(kSwitchNames));
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
if (!browser_cmd->HasSwitch(switches::kNoSandbox)) {
// Pass the Widevine CDM path to the Zygote process. See comments in
// CefWidevineLoader::AddPepperPlugins.
......@@ -946,7 +946,7 @@ CefContentBrowserClient::CreateThrottlesForNavigation(
void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,
int child_process_id,
content::FileDescriptorInfo* mappings) {
content::PosixFileDescriptorInfo* mappings) {
int crash_signal_fd = GetCrashSignalFD(command_line);
if (crash_signal_fd >= 0) {
mappings->Share(kCrashDumpSignal, crash_signal_fd);
......
......@@ -107,7 +107,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
void GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,
int child_process_id,
content::FileDescriptorInfo* mappings) override;
content::PosixFileDescriptorInfo* mappings) override;
#endif
#if defined(OS_WIN)
......
......@@ -22,6 +22,7 @@
#include "base/debug/debugger.h"
#include "base/files/file_util.h"
#include "base/synchronization/waitable_event.h"
#include "base/run_loop.h"
#include "components/network_session_configurator/common/network_switches.h"
#include "content/app/content_service_manager_main_delegate.h"
#include "content/public/browser/notification_service.h"
......@@ -303,7 +304,7 @@ void CefQuitMessageLoop() {
return;
}
CefBrowserMessageLoop::current()->QuitWhenIdle();
base::RunLoop().QuitWhenIdle();
}
void CefSetOSModalLoop(bool osModalLoop) {
......@@ -499,7 +500,7 @@ void CefContext::OnContextInitialized() {
static_cast<ChromeBrowserProcessStub*>(g_browser_process)
->OnContextInitialized();
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
CefWidevineLoader::GetInstance()->OnContextInitialized();
#endif
......
......@@ -348,7 +348,7 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend(
return;
}
DictionaryPrefUpdate update(GetPrefs(), prefs::kDevToolsPreferences);
update.Get()->SetStringWithoutPathExpansion(name, value);
update.Get()->SetKey(name, base::Value(value));
} else if (method == "removePreference") {
std::string name;
if (!params->GetString(0, &name))
......
......@@ -107,7 +107,7 @@ void CefDevToolsManagerDelegate::StartHttpHandler(
return;
content::DevToolsAgentHost::StartRemoteDebuggingServer(
std::move(socket_factory), std::string(), browser_context->GetPath(),
base::FilePath(), std::string(), CefContentClient::Get()->GetUserAgent());
base::FilePath());
}
// static
......
......@@ -29,7 +29,7 @@
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function_registry.h"
#include "extensions/browser/extension_host_delegate.h"
#include "extensions/browser/mojo/service_registration.h"
#include "extensions/browser/mojo/interface_registration.h"
#include "extensions/browser/url_request_util.h"
#include "extensions/common/constants.h"
......@@ -187,10 +187,11 @@ void CefExtensionsBrowserClient::RegisterExtensionFunctions(
api::cef::ChromeFunctionRegistry::RegisterAll(registry);
}
void CefExtensionsBrowserClient::RegisterMojoServices(
void CefExtensionsBrowserClient::RegisterExtensionInterfaces(
service_manager::BinderRegistryWithArgs<content::RenderFrameHost*>* registry,
content::RenderFrameHost* render_frame_host,
const Extension* extension) const {
RegisterServicesForFrame(render_frame_host, extension);
RegisterInterfacesForExtension(registry, render_frame_host, extension);
}
std::unique_ptr<RuntimeAPIDelegate>
......@@ -250,6 +251,10 @@ bool CefExtensionsBrowserClient::IsLockScreenContext(
return false;
}
std::string CefExtensionsBrowserClient::GetApplicationLocale() {
return g_browser_process->GetApplicationLocale();
}
void CefExtensionsBrowserClient::SetAPIClientForTest(
ExtensionsAPIClient* api_client) {
api_client_.reset(api_client);
......
......@@ -63,8 +63,10 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
ExtensionSystemProvider* GetExtensionSystemFactory() override;
void RegisterExtensionFunctions(
ExtensionFunctionRegistry* registry) const override;
void RegisterMojoServices(content::RenderFrameHost* render_frame_host,
const Extension* extension) const override;
void RegisterExtensionInterfaces(
service_manager::BinderRegistryWithArgs<content::RenderFrameHost*>* registry,
content::RenderFrameHost* render_frame_host,
const Extension* extension) const override;
std::unique_ptr<RuntimeAPIDelegate> CreateRuntimeAPIDelegate(
content::BrowserContext* context) const override;
const ComponentExtensionResourceManager*
......@@ -81,6 +83,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
content::WebContents* web_contents) override;
KioskDelegate* GetKioskDelegate() override;
bool IsLockScreenContext(content::BrowserContext* context) override;
std::string GetApplicationLocale() override;
// Sets the API client.
void SetAPIClientForTest(ExtensionsAPIClient* api_client);
......
......@@ -320,7 +320,7 @@ bool CefImageImpl::AddBitmap(float scale_factor, const SkBitmap& bitmap) {
gfx::ImageSkiaRep skia_rep(bitmap, scale_factor);
if (image_.IsEmpty()) {
gfx::Image image((gfx::ImageSkia(skia_rep)));
image_.SwapRepresentations(&image);
image_ = std::move(image);
} else {
image_.AsImageSkia().AddRepresentation(skia_rep);
}
......
......@@ -38,9 +38,9 @@ struct CefNavigateParams {
// Usually the URL of the document in the top-level window, which may be
// checked by the third-party cookie blocking policy. Leaving it empty may
// lead to undesired cookie blocking. Third-party cookie blocking can be
// bypassed by setting first_party_for_cookies = url, but this should ideally
// bypassed by setting site_for_cookies = url, but this should ideally
// only be done if there really is no way to determine the correct value.
GURL first_party_for_cookies;
GURL site_for_cookies;
// Additional HTTP request headers.
std::string headers;
......
......@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "net/base/network_delegate_impl.h"
#include "net/filter/source_stream.h"
template <class T>
class PrefMember;
......
......@@ -356,8 +356,7 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() {
std::unique_ptr<net::HttpCache::DefaultBackend> main_backend(
new net::HttpCache::DefaultBackend(
cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE,
net::CACHE_BACKEND_DEFAULT, http_cache_path, 0,
BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE)));
net::CACHE_BACKEND_DEFAULT, http_cache_path, 0));
net::HttpNetworkSession::Context network_session_context;
network_session_context.host_resolver =
......
......@@ -18,9 +18,9 @@
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
#include "cc/base/switches.h"
#include "cc/output/copy_output_request.h"
#include "cc/scheduler/delay_based_time_source.h"
#include "components/viz/common/frame_sinks/delay_based_time_source.h"
#include "components/viz/common/gl_helper.h"
#include "components/viz/common/quads/copy_output_request.h"
#include "content/browser/bad_message.h"
#include "content/browser/compositor/image_transport_factory.h"
#include "content/browser/frame_host/render_widget_host_view_guest.h"
......@@ -130,8 +130,8 @@ class CefCopyFrameGenerator {
// The below code is similar in functionality to
// DelegatedFrameHost::CopyFromCompositingSurface but we reuse the same
// SkBitmap in the GPU codepath and avoid scaling where possible.
std::unique_ptr<cc::CopyOutputRequest> request =
cc::CopyOutputRequest::CreateRequest(base::Bind(
std::unique_ptr<viz::CopyOutputRequest> request =
viz::CopyOutputRequest::CreateRequest(base::Bind(
&CefCopyFrameGenerator::CopyFromCompositingSurfaceHasResult,
weak_ptr_factory_.GetWeakPtr(), damage_rect));
......@@ -141,7 +141,7 @@ class CefCopyFrameGenerator {
void CopyFromCompositingSurfaceHasResult(
const gfx::Rect& damage_rect,
std::unique_ptr<cc::CopyOutputResult> result) {
std::unique_ptr<viz::CopyOutputResult> result) {
if (result->IsEmpty() || result->size().IsEmpty() ||
!view_->render_widget_host()) {
OnCopyFrameCaptureFailure(damage_rect);
......@@ -159,7 +159,7 @@ class CefCopyFrameGenerator {
void PrepareTextureCopyOutputResult(
const gfx::Rect& damage_rect,
std::unique_ptr<cc::CopyOutputResult> result) {
std::unique_ptr<viz::CopyOutputResult> result) {
DCHECK(result->HasTexture());
base::ScopedClosureRunner scoped_callback_runner(
base::Bind(&CefCopyFrameGenerator::OnCopyFrameCaptureFailure,
......@@ -188,7 +188,7 @@ class CefCopyFrameGenerator {
uint8_t* pixels = static_cast<uint8_t*>(bitmap_->getPixels());
viz::TextureMailbox texture_mailbox;
std::unique_ptr<cc::SingleReleaseCallback> release_callback;
std::unique_ptr<viz::SingleReleaseCallback> release_callback;
result->TakeTexture(&texture_mailbox, &release_callback);
DCHECK(texture_mailbox.IsTexture());
if (!texture_mailbox.IsTexture())
......@@ -208,7 +208,7 @@ class CefCopyFrameGenerator {
static void CopyFromCompositingSurfaceFinishedProxy(
base::WeakPtr<CefCopyFrameGenerator> generator,
std::unique_ptr<cc::SingleReleaseCallback> release_callback,
std::unique_ptr<viz::SingleReleaseCallback> release_callback,
const gfx::Rect& damage_rect,
std::unique_ptr<SkBitmap> bitmap,
bool result) {
......@@ -247,7 +247,7 @@ class CefCopyFrameGenerator {
void PrepareBitmapCopyOutputResult(
const gfx::Rect& damage_rect,
std::unique_ptr<cc::CopyOutputResult> result) {
std::unique_ptr<viz::CopyOutputResult> result) {
DCHECK(result->HasBitmap());
std::unique_ptr<SkBitmap> source = result->TakeBitmap();
DCHECK(source);
......@@ -308,11 +308,11 @@ class CefCopyFrameGenerator {
// Used to control the VSync rate in subprocesses when BeginFrame scheduling is
// enabled.
class CefBeginFrameTimer : public cc::DelayBasedTimeSourceClient {
class CefBeginFrameTimer : public viz::DelayBasedTimeSourceClient {
public:
CefBeginFrameTimer(int frame_rate_threshold_ms, const base::Closure& callback)
: callback_(callback) {
time_source_.reset(new cc::DelayBasedTimeSource(
time_source_.reset(new viz::DelayBasedTimeSource(
content::BrowserThread::GetTaskRunnerForThread(CEF_UIT).get()));
time_source_->SetTimebaseAndInterval(
base::TimeTicks(),
......@@ -335,7 +335,7 @@ class CefBeginFrameTimer : public cc::DelayBasedTimeSourceClient {
void OnTimerTick() override { callback_.Run(); }
const base::Closure callback_;
std::unique_ptr<cc::DelayBasedTimeSource> time_source_;
std::unique_ptr<viz::DelayBasedTimeSource> time_source_;
DISALLOW_COPY_AND_ASSIGN(CefBeginFrameTimer);
};
......@@ -399,7 +399,8 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
new ui::Compositor(context_factory_private->AllocateFrameSinkId(),
content::GetContextFactory(), context_factory_private,
base::ThreadTaskRunnerHandle::Get(),
false /* enable_surface_synchronization */));
false /* enable_surface_synchronization */,
false /* enable_pixel_canvas */));
compositor_->SetAcceleratedWidget(compositor_widget_);
compositor_->SetDelegate(this);
compositor_->SetRootLayer(root_layer_.get());
......@@ -572,7 +573,7 @@ bool CefRenderWidgetHostViewOSR::LockMouse() {
void CefRenderWidgetHostViewOSR::UnlockMouse() {}
void CefRenderWidgetHostViewOSR::DidCreateNewRendererCompositorFrameSink(
cc::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) {
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink) {
renderer_compositor_frame_sink_ = renderer_compositor_frame_sink;
if (GetDelegatedFrameHost()) {
GetDelegatedFrameHost()->DidCreateNewRendererCompositorFrameSink(
......@@ -868,10 +869,10 @@ void CefRenderWidgetHostViewOSR::ImeSetComposition(
if (!render_widget_host_)
return;
std::vector<ui::CompositionUnderline> web_underlines;
std::vector<ui::ImeTextSpan> web_underlines;
web_underlines.reserve(underlines.size());
for (const CefCompositionUnderline& line : underlines) {
web_underlines.push_back(ui::CompositionUnderline(
web_underlines.push_back(ui::ImeTextSpan(ui::ImeTextSpan::Type::kComposition,
line.range.from, line.range.to, line.color, line.thick ? true : false,
line.background_color));
}
......@@ -894,7 +895,7 @@ void CefRenderWidgetHostViewOSR::ImeCommitText(
gfx::Range range(replacement_range.from, replacement_range.to);
render_widget_host_->ImeCommitText(text,
std::vector<ui::CompositionUnderline>(),
std::vector<ui::ImeTextSpan>(),
range, relative_cursor_pos);
// Stop Monitoring for composition updates after we are done.
......@@ -1492,10 +1493,10 @@ void CefRenderWidgetHostViewOSR::SendBeginFrame(base::TimeTicks frame_time,
base::TimeTicks deadline = display_time - estimated_browser_composite_time;
const cc::BeginFrameArgs& begin_frame_args = cc::BeginFrameArgs::Create(
const viz::BeginFrameArgs& begin_frame_args = viz::BeginFrameArgs::Create(
BEGINFRAME_FROM_HERE, begin_frame_source_.source_id(),
begin_frame_number_, frame_time, deadline, vsync_period,
cc::BeginFrameArgs::NORMAL);
viz::BeginFrameArgs::NORMAL);
DCHECK(begin_frame_args.IsValid());
begin_frame_number_++;
......
......@@ -15,7 +15,7 @@
#include "base/memory/weak_ptr.h"
#include "build/build_config.h"
#include "cc/scheduler/begin_frame_source.h"
#include "components/viz/common/frame_sinks/begin_frame_source.h"
#include "content/browser/renderer_host/compositor_resize_lock.h"
#include "content/browser/renderer_host/delegated_frame_host.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
......@@ -129,7 +129,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
// RenderWidgetHostViewBase implementation.
void DidCreateNewRendererCompositorFrameSink(
cc::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink)
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink)
override;
void SubmitCompositorFrame(const viz::LocalSurfaceId& local_surface_id,
cc::CompositorFrame frame) override;
......@@ -343,8 +343,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
std::unique_ptr<CefBeginFrameTimer> begin_frame_timer_;
// Provides |source_id| for BeginFrameArgs that we create.
cc::StubBeginFrameSource begin_frame_source_;
uint64_t begin_frame_number_ = cc::BeginFrameArgs::kStartingFrameNumber;
viz::StubBeginFrameSource begin_frame_source_;
uint64_t begin_frame_number_ = viz::BeginFrameArgs::kStartingFrameNumber;
// Used for direct rendering from the compositor when GPU compositing is
// disabled. This object is owned by the compositor.
......@@ -377,7 +377,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
gfx::Vector2dF last_scroll_offset_;
bool is_scroll_offset_changed_pending_;
cc::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink_ =
viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink_ =
nullptr;
base::WeakPtrFactory<CefRenderWidgetHostViewOSR> weak_ptr_factory_;
......
......@@ -8,9 +8,9 @@
#include "libcef/browser/permissions/permission_context.h"
#include "base/callback_forward.h"
#include "base/id_map.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/containers/id_map.h"
#include "components/content_settings/core/browser/content_settings_observer.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/keyed_service/core/keyed_service.h"
......@@ -65,10 +65,10 @@ class CefPermissionManager : public KeyedService,
private:
class PendingRequest;
using PendingRequestsMap = IDMap<std::unique_ptr<PendingRequest>>;
using PendingRequestsMap = base::IDMap<std::unique_ptr<PendingRequest>>;
struct Subscription;
using SubscriptionsMap = IDMap<std::unique_ptr<Subscription>>;
using SubscriptionsMap = base::IDMap<std::unique_ptr<Subscription>>;
// Called when a permission was decided for a given PendingRequest. The
// PendingRequest is identified by its |request_id| and the permission is
......
......@@ -94,18 +94,18 @@ bool ShouldUseJavaScriptSettingForPlugin(const WebPluginInfo& plugin) {
return true;
#endif
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
// Treat CDM invocations like JavaScript.
if (plugin.name == base::ASCIIToUTF16(kWidevineCdmDisplayName)) {
DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS);
return true;
}
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
return false;
}
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
enum PluginAvailabilityStatusForUMA {
PLUGIN_NOT_REGISTERED,
......@@ -126,7 +126,7 @@ static void SendPluginAvailabilityUMA(const std::string& mime_type,
#endif // defined(WIDEVINE_CDM_AVAILABLE)
}
#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
void ReportMetrics(const std::string& mime_type,
const GURL& url,
......@@ -221,7 +221,7 @@ bool CefPluginInfoMessageFilter::OnMessageReceived(
IPC_BEGIN_MESSAGE_MAP(CefPluginInfoMessageFilter, message)
IPC_MESSAGE_HANDLER_DELAY_REPLY(CefViewHostMsg_GetPluginInfo,
OnGetPluginInfo)
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
IPC_MESSAGE_HANDLER(CefViewHostMsg_IsInternalPluginAvailableForMimeType,
OnIsInternalPluginAvailableForMimeType)
#endif
......@@ -287,7 +287,7 @@ void CefPluginInfoMessageFilter::PluginsLoaded(
}
}
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
void CefPluginInfoMessageFilter::OnIsInternalPluginAvailableForMimeType(
const std::string& mime_type,
......@@ -323,7 +323,7 @@ void CefPluginInfoMessageFilter::OnIsInternalPluginAvailableForMimeType(
mime_type, is_plugin_disabled ? PLUGIN_DISABLED : PLUGIN_NOT_REGISTERED);
}
#endif // BUILDFLAG(ENABLE_PEPPER_CDMS)
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
void CefPluginInfoMessageFilter::Context::DecidePluginStatus(
const GetPluginInfo_Params& params,
......
......@@ -20,6 +20,7 @@
#include "components/prefs/pref_member.h"
#include "content/public/browser/browser_message_filter.h"
#include "extensions/features/features.h"
#include "media/media_features.h"
#include "ppapi/features/features.h"
class CefBrowserContext;
......@@ -111,7 +112,7 @@ class CefPluginInfoMessageFilter : public content::BrowserMessageFilter {
IPC::Message* reply_msg,
const std::vector<content::WebPluginInfo>& plugins);
#if BUILDFLAG(ENABLE_PEPPER_CDMS)
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
// Returns whether any internal plugin supporting |mime_type| is registered
// and enabled. Does not determine whether the plugin can actually be
// instantiated (e.g. whether it has all its dependencies).
......
......@@ -71,6 +71,7 @@ class CefPrefStore : public PersistentPrefStore {
void SetBlockAsyncRead(bool block_async_read);
void ClearMutableValues() override;
void OnStoreDeletionFromDisk() override {};
// Getter and Setter methods for setting and getting the state of the
// |TestingPrefStore|.
......
......@@ -149,7 +149,7 @@ void SavePdfFile(scoped_refptr<base::RefCountedBytes> data,
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK_GT(data->size(), 0U);
PdfMetafileSkia metafile(PDF_SKIA_DOCUMENT_TYPE);
PdfMetafileSkia metafile(SkiaDocumentType::PDF);
metafile.InitFromData(static_cast<const void*>(data->front()), data->size());
base::File file(path,
......