Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: content/browser/browser_main_loop.cc

Issue 2932893002: BrowserMainLoop owns FrameSinkManagerHost (Closed)
Patch Set: Added a comment that works everywhere Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/compositor/gpu_process_transport_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index aa8fa9b89f30b8b5346cb10ad3302ffa60dbb203..f0c1bebe7e83f9e7b864b4530be949bda398d24c 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -53,6 +53,7 @@
#include "components/tracing/common/trace_to_console.h"
#include "components/tracing/common/tracing_switches.h"
#include "components/viz/display_compositor/host_shared_bitmap_manager.h"
+#include "components/viz/host/frame_sink_manager_host.h"
#include "content/browser/browser_thread_impl.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/dom_storage/dom_storage_area.h"
@@ -1224,6 +1225,10 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
BrowserCompositorMac::DisableRecyclingForShutdown();
#endif
+#if !defined(OS_ANDROID)
+ frame_sink_manager_host_.reset();
+#endif
+
#if defined(USE_AURA) || defined(OS_MACOSX)
{
TRACE_EVENT0("shutdown",
@@ -1456,6 +1461,13 @@ int BrowserMainLoop::BrowserThreadsStarted() {
#endif // defined(USE_AURA)
#endif // defined(OS_ANDROID)
+#if !defined(OS_ANDROID)
+ if (!service_manager::ServiceManagerIsRemote()) {
+ frame_sink_manager_host_ = base::MakeUnique<viz::FrameSinkManagerHost>();
+ frame_sink_manager_host_->ConnectToFrameSinkManager();
+ }
+#endif
+
// Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that
// unregistration happens on the IO thread (See
// BrowserProcessSubThread::IOThreadPreCleanUp).
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/compositor/gpu_process_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698