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

Side by Side Diff: ui/ozone/public/ozone_platform.cc

Issue 2769123002: Remove InitializeForUI() from OzonePlatform (Closed)
Patch Set: Removed changes common to https://codereview.chromium.org/2765263002/ Created 3 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 | « ui/ozone/public/ozone_platform.h ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "ui/events/devices/device_data_manager.h" 8 #include "ui/events/devices/device_data_manager.h"
9 #include "ui/ozone/platform_object.h" 9 #include "ui/ozone/platform_object.h"
10 #include "ui/ozone/platform_selection.h" 10 #include "ui/ozone/platform_selection.h"
(...skipping 15 matching lines...) Expand all
26 g_platform_initialized_ui = false; 26 g_platform_initialized_ui = false;
27 g_platform_initialized_gpu = false; 27 g_platform_initialized_gpu = false;
28 } 28 }
29 29
30 OzonePlatform::~OzonePlatform() { 30 OzonePlatform::~OzonePlatform() {
31 DCHECK_EQ(instance_, this); 31 DCHECK_EQ(instance_, this);
32 instance_ = NULL; 32 instance_ = NULL;
33 } 33 }
34 34
35 // static 35 // static
36 void OzonePlatform::InitializeForUI() {
37 const InitParams params;
38 OzonePlatform::InitializeForUI(params);
39 }
40
41 // static
42 void OzonePlatform::InitializeForUI(const InitParams& args) { 36 void OzonePlatform::InitializeForUI(const InitParams& args) {
43 EnsureInstance(); 37 EnsureInstance();
44 if (g_platform_initialized_ui) 38 if (g_platform_initialized_ui)
45 return; 39 return;
46 g_platform_initialized_ui = true; 40 g_platform_initialized_ui = true;
47 instance_->InitializeUI(args); 41 instance_->InitializeUI(args);
48 // This is deliberately created after initializing so that the platform can 42 // This is deliberately created after initializing so that the platform can
49 // create its own version of DDM. 43 // create its own version of DDM.
50 DeviceDataManager::CreateInstance(); 44 DeviceDataManager::CreateInstance();
51 } 45 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 93 }
100 94
101 base::MessageLoop::Type OzonePlatform::GetMessageLoopTypeForGpu() { 95 base::MessageLoop::Type OzonePlatform::GetMessageLoopTypeForGpu() {
102 return base::MessageLoop::TYPE_DEFAULT; 96 return base::MessageLoop::TYPE_DEFAULT;
103 } 97 }
104 98
105 void OzonePlatform::AddInterfaces( 99 void OzonePlatform::AddInterfaces(
106 service_manager::InterfaceRegistry* registry) {} 100 service_manager::InterfaceRegistry* registry) {}
107 101
108 } // namespace ui 102 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/public/ozone_platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698