| 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 ui::OzonePlatform::InitializeForUI(params); |
| 209 #endif | 210 #endif |
| 210 if (!ui::PlatformEventSource::GetInstance()) | 211 if (!ui::PlatformEventSource::GetInstance()) |
| 211 event_source_ = ui::PlatformEventSource::CreateDefault(); | 212 event_source_ = ui::PlatformEventSource::CreateDefault(); |
| 212 } | 213 } |
| 213 | 214 |
| 214 void Env::EnableMusOSExchangeDataProvider() { | 215 void Env::EnableMusOSExchangeDataProvider() { |
| 215 if (!is_os_exchange_data_provider_factory_) { | 216 if (!is_os_exchange_data_provider_factory_) { |
| 216 ui::OSExchangeDataProviderFactory::SetFactory(this); | 217 ui::OSExchangeDataProviderFactory::SetFactory(this); |
| 217 is_os_exchange_data_provider_factory_ = true; | 218 is_os_exchange_data_provider_factory_ = true; |
| 218 } | 219 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 ui::EventTargeter* Env::GetEventTargeter() { | 256 ui::EventTargeter* Env::GetEventTargeter() { |
| 256 NOTREACHED(); | 257 NOTREACHED(); |
| 257 return NULL; | 258 return NULL; |
| 258 } | 259 } |
| 259 | 260 |
| 260 std::unique_ptr<ui::OSExchangeData::Provider> Env::BuildProvider() { | 261 std::unique_ptr<ui::OSExchangeData::Provider> Env::BuildProvider() { |
| 261 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); | 262 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); |
| 262 } | 263 } |
| 263 | 264 |
| 264 } // namespace aura | 265 } // namespace aura |
| OLD | NEW |