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

Side by Side Diff: ui/aura/env.cc

Issue 1877533002: mash: Fix launching chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/env.h" 5 #include "ui/aura/env.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/thread_local.h" 9 #include "base/threading/thread_local.h"
10 #include "ui/aura/env_observer.h" 10 #include "ui/aura/env_observer.h"
11 #include "ui/aura/input_state_lookup.h" 11 #include "ui/aura/input_state_lookup.h"
12 #include "ui/events/devices/device_data_manager.h"
12 #include "ui/events/event_target_iterator.h" 13 #include "ui/events/event_target_iterator.h"
13 #include "ui/events/platform/platform_event_source.h" 14 #include "ui/events/platform/platform_event_source.h"
14 15
15 #if defined(USE_OZONE) 16 #if defined(USE_OZONE)
16 #include "ui/ozone/public/ozone_platform.h" 17 #include "ui/ozone/public/ozone_platform.h"
17 #endif 18 #endif
18 19
19 namespace aura { 20 namespace aura {
20 21
21 namespace { 22 namespace {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 lazy_tls_ptr.Pointer()->Set(NULL); 93 lazy_tls_ptr.Pointer()->Set(NULL);
93 } 94 }
94 95
95 void Env::Init(bool create_event_source) { 96 void Env::Init(bool create_event_source) {
96 if (!create_event_source) 97 if (!create_event_source)
97 return; 98 return;
98 #if defined(USE_OZONE) 99 #if defined(USE_OZONE)
99 // The ozone platform can provide its own event source. So initialize the 100 // The ozone platform can provide its own event source. So initialize the
100 // platform before creating the default event source. If running inside mus 101 // platform before creating the default event source. If running inside mus
101 // let the mus process initialize ozone instead. 102 // let the mus process initialize ozone instead.
102 if (!RunningInsideMus()) 103 if (!RunningInsideMus()) {
103 ui::OzonePlatform::InitializeForUI(); 104 ui::OzonePlatform::InitializeForUI();
105 } else {
106 ui::DeviceDataManager::CreateInstance();
107 }
104 #endif 108 #endif
105 if (!ui::PlatformEventSource::GetInstance()) 109 if (!ui::PlatformEventSource::GetInstance())
106 event_source_ = ui::PlatformEventSource::CreateDefault(); 110 event_source_ = ui::PlatformEventSource::CreateDefault();
107 } 111 }
108 112
109 void Env::NotifyWindowInitialized(Window* window) { 113 void Env::NotifyWindowInitialized(Window* window) {
110 FOR_EACH_OBSERVER(EnvObserver, observers_, OnWindowInitialized(window)); 114 FOR_EACH_OBSERVER(EnvObserver, observers_, OnWindowInitialized(window));
111 } 115 }
112 116
113 void Env::NotifyHostInitialized(WindowTreeHost* host) { 117 void Env::NotifyHostInitialized(WindowTreeHost* host) {
(...skipping 18 matching lines...) Expand all
132 scoped_ptr<ui::EventTargetIterator> Env::GetChildIterator() const { 136 scoped_ptr<ui::EventTargetIterator> Env::GetChildIterator() const {
133 return nullptr; 137 return nullptr;
134 } 138 }
135 139
136 ui::EventTargeter* Env::GetEventTargeter() { 140 ui::EventTargeter* Env::GetEventTargeter() {
137 NOTREACHED(); 141 NOTREACHED();
138 return NULL; 142 return NULL;
139 } 143 }
140 144
141 } // namespace aura 145 } // namespace aura
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698