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/events/ozone/layout/keyboard_layout_engine_manager.h" | 7 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
8 #include "ui/events/ozone/layout/no/no_keyboard_layout_engine.h" | 8 #include "ui/events/ozone/layout/no/no_keyboard_layout_engine.h" |
9 #include "ui/ozone/common/native_display_delegate_ozone.h" | 9 #include "ui/ozone/common/native_display_delegate_ozone.h" |
10 #include "ui/ozone/platform/caca/caca_event_source.h" | 10 #include "ui/ozone/platform/caca/caca_event_source.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 scoped_ptr<PlatformWindow> CreatePlatformWindow( | 48 scoped_ptr<PlatformWindow> CreatePlatformWindow( |
49 PlatformWindowDelegate* delegate, | 49 PlatformWindowDelegate* delegate, |
50 const gfx::Rect& bounds) override { | 50 const gfx::Rect& bounds) override { |
51 scoped_ptr<CacaWindow> caca_window(new CacaWindow( | 51 scoped_ptr<CacaWindow> caca_window(new CacaWindow( |
52 delegate, window_manager_.get(), event_source_.get(), bounds)); | 52 delegate, window_manager_.get(), event_source_.get(), bounds)); |
53 if (!caca_window->Initialize()) | 53 if (!caca_window->Initialize()) |
54 return nullptr; | 54 return nullptr; |
55 return caca_window.Pass(); | 55 return caca_window.Pass(); |
56 } | 56 } |
57 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { | 57 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { |
58 return scoped_ptr<NativeDisplayDelegate>(new NativeDisplayDelegateOzone()); | 58 return make_scoped_ptr(new NativeDisplayDelegateOzone()); |
59 } | 59 } |
60 | 60 |
61 void InitializeUI() override { | 61 void InitializeUI() override { |
62 window_manager_.reset(new CacaWindowManager); | 62 window_manager_.reset(new CacaWindowManager); |
63 event_source_.reset(new CacaEventSource()); | 63 event_source_.reset(new CacaEventSource()); |
64 cursor_factory_ozone_.reset(new CursorFactoryOzone()); | 64 cursor_factory_ozone_.reset(new CursorFactoryOzone()); |
65 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); | 65 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); |
66 input_controller_ = CreateStubInputController(); | 66 input_controller_ = CreateStubInputController(); |
67 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( | 67 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( |
68 make_scoped_ptr(new NoKeyboardLayoutEngine())); | 68 make_scoped_ptr(new NoKeyboardLayoutEngine())); |
(...skipping 14 matching lines...) Expand all Loading... |
83 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca); | 83 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace | 86 } // namespace |
87 | 87 |
88 OzonePlatform* CreateOzonePlatformCaca() { | 88 OzonePlatform* CreateOzonePlatformCaca() { |
89 return new OzonePlatformCaca; | 89 return new OzonePlatformCaca; |
90 } | 90 } |
91 | 91 |
92 } // namespace ui | 92 } // namespace ui |
OLD | NEW |