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

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: Rebased 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
« no previous file with comments | « ui/events/x/touch_factory_x11.cc ('k') | ui/views/controls/menu/menu_controller_unittest.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 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 11 matching lines...) Expand all
29 OzonePlatform::~OzonePlatform() { 30 OzonePlatform::~OzonePlatform() {
30 CHECK_EQ(instance_, this); 31 CHECK_EQ(instance_, this);
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;
40 DeviceDataManager::CreateInstance();
sadrul 2014/06/18 16:18:14 Do this after instance_->InitializeUI(), so that t
dnicoara 2014/06/18 17:28:02 Done.
39 g_platform_initialized_ui = true; 41 g_platform_initialized_ui = true;
40 instance_->InitializeUI(); 42 instance_->InitializeUI();
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;
(...skipping 18 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
« no previous file with comments | « ui/events/x/touch_factory_x11.cc ('k') | ui/views/controls/menu/menu_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698