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/ozone_platform.h" | 7 #include "ui/ozone/ozone_platform.h" |
8 #include "ui/ozone/platform/caca/caca_connection.h" | 8 #include "ui/ozone/platform/caca/caca_connection.h" |
9 | 9 |
| 10 #if defined(OS_CHROMEOS) |
| 11 #include "ui/ozone/common/chromeos/native_display_delegate_ozone.h" |
| 12 #endif |
| 13 |
10 namespace ui { | 14 namespace ui { |
11 | 15 |
12 OzonePlatformCaca::OzonePlatformCaca() | 16 OzonePlatformCaca::OzonePlatformCaca() |
13 : connection_(), | 17 : connection_(), |
14 surface_factory_ozone_(&connection_), | 18 surface_factory_ozone_(&connection_), |
15 event_factory_ozone_(&connection_) {} | 19 event_factory_ozone_(&connection_) {} |
16 | 20 |
17 OzonePlatformCaca::~OzonePlatformCaca() {} | 21 OzonePlatformCaca::~OzonePlatformCaca() {} |
18 | 22 |
19 gfx::SurfaceFactoryOzone* OzonePlatformCaca::GetSurfaceFactoryOzone() { | 23 gfx::SurfaceFactoryOzone* OzonePlatformCaca::GetSurfaceFactoryOzone() { |
20 return &surface_factory_ozone_; | 24 return &surface_factory_ozone_; |
21 } | 25 } |
22 | 26 |
23 ui::EventFactoryOzone* OzonePlatformCaca::GetEventFactoryOzone() { | 27 ui::EventFactoryOzone* OzonePlatformCaca::GetEventFactoryOzone() { |
24 return &event_factory_ozone_; | 28 return &event_factory_ozone_; |
25 } | 29 } |
26 | 30 |
27 ui::InputMethodContextFactoryOzone* | 31 ui::InputMethodContextFactoryOzone* |
28 OzonePlatformCaca::GetInputMethodContextFactoryOzone() { | 32 OzonePlatformCaca::GetInputMethodContextFactoryOzone() { |
29 return &input_method_context_factory_ozone_; | 33 return &input_method_context_factory_ozone_; |
30 } | 34 } |
31 | 35 |
32 ui::CursorFactoryOzone* OzonePlatformCaca::GetCursorFactoryOzone() { | 36 ui::CursorFactoryOzone* OzonePlatformCaca::GetCursorFactoryOzone() { |
33 return &cursor_factory_ozone_; | 37 return &cursor_factory_ozone_; |
34 } | 38 } |
35 | 39 |
| 40 #if defined(OS_CHROMEOS) |
| 41 scoped_ptr<ui::NativeDisplayDelegate> |
| 42 OzonePlatformCaca::CreateNativeDisplayDelegate() { |
| 43 return scoped_ptr<ui::NativeDisplayDelegate>( |
| 44 new NativeDisplayDelegateOzone()); |
| 45 } |
| 46 #endif |
| 47 |
36 OzonePlatform* CreateOzonePlatformCaca() { return new OzonePlatformCaca; } | 48 OzonePlatform* CreateOzonePlatformCaca() { return new OzonePlatformCaca; } |
37 | 49 |
38 } // namespace ui | 50 } // namespace ui |
OLD | NEW |