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

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

Issue 289283015: Extract touchscreen device management into a generic manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/debug/trace_event.h" 6 #include "base/debug/trace_event.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/events/device_data_manager.h"
8 #include "ui/ozone/ozone_platform.h" 9 #include "ui/ozone/ozone_platform.h"
9 #include "ui/ozone/ozone_switches.h" 10 #include "ui/ozone/ozone_switches.h"
10 #include "ui/ozone/platform_object.h" 11 #include "ui/ozone/platform_object.h"
11 #include "ui/ozone/platform_selection.h" 12 #include "ui/ozone/platform_selection.h"
12 13
13 namespace ui { 14 namespace ui {
14 15
15 namespace { 16 namespace {
16 17
17 bool g_platform_initialized_ui = false; 18 bool g_platform_initialized_ui = false;
(...skipping 13 matching lines...) Expand all
31 instance_ = NULL; 32 instance_ = NULL;
32 } 33 }
33 34
34 // static 35 // static
35 void OzonePlatform::InitializeForUI() { 36 void OzonePlatform::InitializeForUI() {
36 CreateInstance(); 37 CreateInstance();
37 if (g_platform_initialized_ui) 38 if (g_platform_initialized_ui)
38 return; 39 return;
39 g_platform_initialized_ui = true; 40 g_platform_initialized_ui = true;
40 instance_->InitializeUI(); 41 instance_->InitializeUI();
42 DeviceDataManager::CreateInstance();
sadrul 2014/06/20 13:37:52 Add a comment here that this is deliberately being
dnicoara 2014/06/20 14:48:00 Done.
41 } 43 }
42 44
43 // static 45 // static
44 void OzonePlatform::InitializeForGPU() { 46 void OzonePlatform::InitializeForGPU() {
45 CreateInstance(); 47 CreateInstance();
46 if (g_platform_initialized_gpu) 48 if (g_platform_initialized_gpu)
47 return; 49 return;
48 g_platform_initialized_gpu = true; 50 g_platform_initialized_gpu = true;
49 instance_->InitializeGPU(); 51 instance_->InitializeGPU();
50 } 52 }
(...skipping 16 matching lines...) Expand all
67 69
68 // TODO(spang): Currently need to leak this object. 70 // TODO(spang): Currently need to leak this object.
69 CHECK_EQ(instance_, platform.release()); 71 CHECK_EQ(instance_, platform.release());
70 } 72 }
71 } 73 }
72 74
73 // static 75 // static
74 OzonePlatform* OzonePlatform::instance_; 76 OzonePlatform* OzonePlatform::instance_;
75 77
76 } // namespace ui 78 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698