OLD | NEW |
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 Loading... |
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 |
OLD | NEW |