Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/threading/thread_local.h" | 10 #include "base/threading/thread_local.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 void Env::Init() { | 198 void Env::Init() { |
| 199 if (RunningInsideMus()) { | 199 if (RunningInsideMus()) { |
| 200 EnableMusOSExchangeDataProvider(); | 200 EnableMusOSExchangeDataProvider(); |
| 201 return; | 201 return; |
| 202 } | 202 } |
| 203 | 203 |
| 204 #if defined(USE_OZONE) | 204 #if defined(USE_OZONE) |
| 205 // The ozone platform can provide its own event source. So initialize the | 205 // The ozone platform can provide its own event source. So initialize the |
| 206 // platform before creating the default event source. If running inside mus | 206 // platform before creating the default event source. If running inside mus |
| 207 // let the mus process initialize ozone instead. | 207 // let the mus process initialize ozone instead. |
| 208 ui::OzonePlatform::InitializeForUI(); | 208 ui::OzonePlatform::InitParams params; |
| 209 params.single_process = false; | |
|
spang
2017/03/24 15:24:15
This doesn't really make a whole lot of sense; aur
Chandan
2017/03/27 11:06:40
Acknowledged.
| |
| 210 ui::OzonePlatform::InitializeForUI(params); | |
| 209 #endif | 211 #endif |
| 210 if (!ui::PlatformEventSource::GetInstance()) | 212 if (!ui::PlatformEventSource::GetInstance()) |
| 211 event_source_ = ui::PlatformEventSource::CreateDefault(); | 213 event_source_ = ui::PlatformEventSource::CreateDefault(); |
| 212 } | 214 } |
| 213 | 215 |
| 214 void Env::EnableMusOSExchangeDataProvider() { | 216 void Env::EnableMusOSExchangeDataProvider() { |
| 215 if (!is_os_exchange_data_provider_factory_) { | 217 if (!is_os_exchange_data_provider_factory_) { |
| 216 ui::OSExchangeDataProviderFactory::SetFactory(this); | 218 ui::OSExchangeDataProviderFactory::SetFactory(this); |
| 217 is_os_exchange_data_provider_factory_ = true; | 219 is_os_exchange_data_provider_factory_ = true; |
| 218 } | 220 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 ui::EventTargeter* Env::GetEventTargeter() { | 257 ui::EventTargeter* Env::GetEventTargeter() { |
| 256 NOTREACHED(); | 258 NOTREACHED(); |
| 257 return NULL; | 259 return NULL; |
| 258 } | 260 } |
| 259 | 261 |
| 260 std::unique_ptr<ui::OSExchangeData::Provider> Env::BuildProvider() { | 262 std::unique_ptr<ui::OSExchangeData::Provider> Env::BuildProvider() { |
| 261 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); | 263 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); |
| 262 } | 264 } |
| 263 | 265 |
| 264 } // namespace aura | 266 } // namespace aura |
| OLD | NEW |