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

Unified Diff: ui/views/mus/mus_client.cc

Issue 2798883003: [ozone,views-mus] Build CursorDataFactoryOzone. (Closed)
Patch Set: sadrul comments Created 3 years, 8 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 | « ui/views/mus/mus_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/mus_client.cc
diff --git a/ui/views/mus/mus_client.cc b/ui/views/mus/mus_client.cc
index 136424b68b22970746c031544a39e8a27b557ba9..b3083c3433e635d7207c8e531d82b924d0b788ee 100644
--- a/ui/views/mus/mus_client.cc
+++ b/ui/views/mus/mus_client.cc
@@ -33,6 +33,10 @@
#include "ui/wm/core/shadow_types.h"
#include "ui/wm/core/wm_state.h"
+#if defined(USE_OZONE)
+#include "ui/base/cursor/ozone/cursor_data_factory_ozone.h"
+#endif
+
// Widget::InitParams::Type must match that of ui::mojom::WindowType.
#define WINDOW_TYPES_MATCH(NAME) \
static_assert( \
@@ -67,6 +71,16 @@ MusClient::MusClient(service_manager::Connector* connector,
DCHECK(aura::Env::GetInstance());
instance_ = this;
+#if defined(USE_OZONE)
+ // If we're in a mus client, we aren't going to have all of ozone initialized
+ // even though we're in an ozone build. All the hard coded USE_OZONE ifdefs
+ // that handle cursor code expect that there will be a CursorFactoryOzone
+ // instance. Partially initialize the ozone cursor internals here, like we
+ // partially initialize other ozone subsystems in
+ // ChromeBrowserMainExtraPartsViews.
+ cursor_factory_ozone_ = base::MakeUnique<ui::CursorDataFactoryOzone>();
+#endif
+
if (!io_task_runner) {
io_thread_ = base::MakeUnique<base::Thread>("IOThread");
base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
« no previous file with comments | « ui/views/mus/mus_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698