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

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

Issue 2769123002: Remove InitializeForUI() from OzonePlatform (Closed)
Patch Set: Removed changes common to https://codereview.chromium.org/2765263002/ Created 3 years, 9 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 | « media/gpu/video_decode_accelerator_unittest.cc ('k') | ui/compositor/test/test_suite.cc » ('j') | 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/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
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
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
OLDNEW
« no previous file with comments | « media/gpu/video_decode_accelerator_unittest.cc ('k') | ui/compositor/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698