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

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

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NativePixmapManager is singleton Created 5 years, 5 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 "base/file_descriptor_posix.h"
7 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" 8 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
8 #include "ui/events/ozone/layout/no/no_keyboard_layout_engine.h" 9 #include "ui/events/ozone/layout/no/no_keyboard_layout_engine.h"
9 #include "ui/ozone/common/native_display_delegate_ozone.h" 10 #include "ui/ozone/common/native_display_delegate_ozone.h"
10 #include "ui/ozone/common/stub_overlay_manager.h" 11 #include "ui/ozone/common/stub_overlay_manager.h"
11 #include "ui/ozone/platform/caca/caca_event_source.h" 12 #include "ui/ozone/platform/caca/caca_event_source.h"
12 #include "ui/ozone/platform/caca/caca_window.h" 13 #include "ui/ozone/platform/caca/caca_window.h"
13 #include "ui/ozone/platform/caca/caca_window_manager.h" 14 #include "ui/ozone/platform/caca/caca_window_manager.h"
14 #include "ui/ozone/public/cursor_factory_ozone.h" 15 #include "ui/ozone/public/cursor_factory_ozone.h"
15 #include "ui/ozone/public/gpu_platform_support.h" 16 #include "ui/ozone/public/gpu_platform_support.h"
16 #include "ui/ozone/public/gpu_platform_support_host.h" 17 #include "ui/ozone/public/gpu_platform_support_host.h"
17 #include "ui/ozone/public/input_controller.h" 18 #include "ui/ozone/public/input_controller.h"
19 #include "ui/ozone/public/native_pixmap_manager.h"
18 #include "ui/ozone/public/ozone_platform.h" 20 #include "ui/ozone/public/ozone_platform.h"
19 #include "ui/ozone/public/system_input_injector.h" 21 #include "ui/ozone/public/system_input_injector.h"
20 22
21 namespace ui { 23 namespace ui {
22 24
23 namespace { 25 namespace {
24 26
25 class OzonePlatformCaca : public OzonePlatform { 27 class OzonePlatformCaca : public OzonePlatform {
26 public: 28 public:
27 OzonePlatformCaca() {} 29 OzonePlatformCaca() {}
(...skipping 27 matching lines...) Expand all
55 scoped_ptr<CacaWindow> caca_window(new CacaWindow( 57 scoped_ptr<CacaWindow> caca_window(new CacaWindow(
56 delegate, window_manager_.get(), event_source_.get(), bounds)); 58 delegate, window_manager_.get(), event_source_.get(), bounds));
57 if (!caca_window->Initialize()) 59 if (!caca_window->Initialize())
58 return nullptr; 60 return nullptr;
59 return caca_window.Pass(); 61 return caca_window.Pass();
60 } 62 }
61 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override { 63 scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate() override {
62 return make_scoped_ptr(new NativeDisplayDelegateOzone()); 64 return make_scoped_ptr(new NativeDisplayDelegateOzone());
63 } 65 }
64 66
67 base::FileDescriptor GetVirtualDeviceFd() override {
68 return base::FileDescriptor();
69 }
70
65 void InitializeUI() override { 71 void InitializeUI() override {
66 window_manager_.reset(new CacaWindowManager); 72 window_manager_.reset(new CacaWindowManager);
67 overlay_manager_.reset(new StubOverlayManager()); 73 overlay_manager_.reset(new StubOverlayManager());
68 event_source_.reset(new CacaEventSource()); 74 event_source_.reset(new CacaEventSource());
69 cursor_factory_ozone_.reset(new CursorFactoryOzone()); 75 cursor_factory_ozone_.reset(new CursorFactoryOzone());
70 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost()); 76 gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
71 input_controller_ = CreateStubInputController(); 77 input_controller_ = CreateStubInputController();
72 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine( 78 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
73 make_scoped_ptr(new NoKeyboardLayoutEngine())); 79 make_scoped_ptr(new NoKeyboardLayoutEngine()));
74 } 80 }
(...skipping 13 matching lines...) Expand all
88 94
89 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca); 95 DISALLOW_COPY_AND_ASSIGN(OzonePlatformCaca);
90 }; 96 };
91 97
92 } // namespace 98 } // namespace
93 99
94 OzonePlatform* CreateOzonePlatformCaca() { 100 OzonePlatform* CreateOzonePlatformCaca() {
95 return new OzonePlatformCaca; 101 return new OzonePlatformCaca;
96 } 102 }
97 103
104 NativePixmapManager* CreateNativePixmapManagerCaca() {
105 return CreateStubNativePixmapManager();
106 }
107
98 } // namespace ui 108 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698