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

Side by Side Diff: ui/ozone/platform/caca/ozone_platform_caca.cc

Issue 508303002: Move touchscreen device caching to DeviceDataManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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
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 "ui/ozone/platform/caca/ozone_platform_caca.h" 5 #include "ui/ozone/platform/caca/ozone_platform_caca.h"
6 6
7 #include "ui/ozone/platform/caca/caca_event_source.h" 7 #include "ui/ozone/platform/caca/caca_event_source.h"
8 #include "ui/ozone/platform/caca/caca_window.h" 8 #include "ui/ozone/platform/caca/caca_window.h"
9 #include "ui/ozone/platform/caca/caca_window_manager.h" 9 #include "ui/ozone/platform/caca/caca_window_manager.h"
10 #include "ui/ozone/public/cursor_factory_ozone.h" 10 #include "ui/ozone/public/cursor_factory_ozone.h"
11 #include "ui/ozone/public/ozone_platform.h" 11 #include "ui/ozone/public/ozone_platform.h"
12 12
13 #if defined(OS_CHROMEOS) 13 #if defined(OS_CHROMEOS)
14 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" 14 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h"
15 #include "ui/ozone/common/chromeos/touchscreen_device_manager_ozone.h"
16 #endif 15 #endif
17 16
18 namespace ui { 17 namespace ui {
19 18
20 namespace { 19 namespace {
21 20
22 class OzonePlatformCaca : public OzonePlatform { 21 class OzonePlatformCaca : public OzonePlatform {
23 public: 22 public:
24 OzonePlatformCaca() {} 23 OzonePlatformCaca() {}
25 virtual ~OzonePlatformCaca() {} 24 virtual ~OzonePlatformCaca() {}
(...skipping 19 matching lines...) Expand all
45 if (!caca_window->Initialize()) 44 if (!caca_window->Initialize())
46 return scoped_ptr<PlatformWindow>(); 45 return scoped_ptr<PlatformWindow>();
47 return caca_window.PassAs<PlatformWindow>(); 46 return caca_window.PassAs<PlatformWindow>();
48 } 47 }
49 48
50 #if defined(OS_CHROMEOS) 49 #if defined(OS_CHROMEOS)
51 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() 50 virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
52 OVERRIDE { 51 OVERRIDE {
53 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone()); 52 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone());
54 } 53 }
55 virtual scoped_ptr<TouchscreenDeviceManager>
56 CreateTouchscreenDeviceManager() OVERRIDE {
57 return scoped_ptr<TouchscreenDeviceManager>(
58 new TouchscreenDeviceManagerOzone());
59 }
60 #endif 54 #endif
61 55
62 virtual void InitializeUI() OVERRIDE { 56 virtual void InitializeUI() OVERRIDE {
63 window_manager_.reset(new CacaWindowManager); 57 window_manager_.reset(new CacaWindowManager);
64 event_source_.reset(new CacaEventSource()); 58 event_source_.reset(new CacaEventSource());
65 cursor_factory_ozone_.reset(new CursorFactoryOzone()); 59 cursor_factory_ozone_.reset(new CursorFactoryOzone());
66 } 60 }
67 61
68 virtual void InitializeGPU() OVERRIDE {} 62 virtual void InitializeGPU() OVERRIDE {}
69 63
70 private: 64 private:
71 scoped_ptr<CacaWindowManager> window_manager_; 65 scoped_ptr<CacaWindowManager> window_manager_;
72 scoped_ptr<CacaEventSource> event_source_; 66 scoped_ptr<CacaEventSource> event_source_;
73 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; 67 scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_;
74 68
75 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca); 69 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca);
76 }; 70 };
77 71
78 } // namespace 72 } // namespace
79 73
80 OzonePlatform* CreateOzonePlatformCaca() { return new OzonePlatformCaca; } 74 OzonePlatform* CreateOzonePlatformCaca() { return new OzonePlatformCaca; }
81 75
82 } // namespace ui 76 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698