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

Unified Diff: ui/aura/env.cc

Issue 262883011: Makes PlatformEventSource creation in Env conditional (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/aura/env.h ('k') | ui/aura/test/aura_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/env.cc
diff --git a/ui/aura/env.cc b/ui/aura/env.cc
index f701695738958abcfa6dd6e4753e31cf068fc7be..bd074f91452da1d072b17bebc56a089e4140d65e 100644
--- a/ui/aura/env.cc
+++ b/ui/aura/env.cc
@@ -31,10 +31,10 @@ Env::~Env() {
}
//static
-void Env::CreateInstance() {
+void Env::CreateInstance(bool create_event_source) {
if (!instance_) {
instance_ = new Env;
- instance_->Init();
+ instance_->Init(create_event_source);
}
}
@@ -67,10 +67,10 @@ bool Env::IsMouseButtonDown() const {
////////////////////////////////////////////////////////////////////////////////
// Env, private:
-void Env::Init() {
+void Env::Init(bool create_event_source) {
ui::Compositor::Initialize();
- if (!ui::PlatformEventSource::GetInstance())
+ if (create_event_source && !ui::PlatformEventSource::GetInstance())
event_source_ = ui::PlatformEventSource::CreateDefault();
}
« no previous file with comments | « ui/aura/env.h ('k') | ui/aura/test/aura_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698