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

Unified Diff: ui/aura/env.cc

Issue 291473002: ozone: Initialize a subsystem only if necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r270817 Created 6 years, 7 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
Index: ui/aura/env.cc
diff --git a/ui/aura/env.cc b/ui/aura/env.cc
index c850f03ac2819adb1d1309cbd6ccf7098cb331c7..baa6618c6651d236c46994eb757adfb8259598f0 100644
--- a/ui/aura/env.cc
+++ b/ui/aura/env.cc
@@ -11,6 +11,10 @@
#include "ui/events/event_target_iterator.h"
#include "ui/events/platform/platform_event_source.h"
+#if defined(USE_OZONE)
+#include "ui/ozone/ozone_platform.h"
+#endif
+
namespace aura {
namespace {
@@ -74,6 +78,11 @@ Env::~Env() {
}
void Env::Init(bool create_event_source) {
+#if defined(USE_OZONE)
+ // The ozone platform can provide its own event source. So initialize the
+ // platform before creating the default event source.
+ ui::OzonePlatform::InitializeForUI();
+#endif
if (create_event_source && !ui::PlatformEventSource::GetInstance())
event_source_ = ui::PlatformEventSource::CreateDefault();
}
« no previous file with comments | « content/browser/compositor/software_output_device_ozone_unittest.cc ('k') | ui/aura/window_tree_host_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698