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

Side by Side Diff: ui/ozone/platform/dri/ozone_platform_dri.cc

Issue 742103002: Ozone keyboard layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lite-code
Patch Set: reeeeebase Created 6 years 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
« no previous file with comments | « ui/ozone/platform/dri/gbm.gypi ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/dri/ozone_platform_dri.h" 5 #include "ui/ozone/platform/dri/ozone_platform_dri.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h" 8 #include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
9 #include "ui/events/ozone/device/device_manager.h" 9 #include "ui/events/ozone/device/device_manager.h"
10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h" 10 #include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
11 #include "ui/events/ozone/evdev/event_factory_evdev.h" 11 #include "ui/events/ozone/evdev/event_factory_evdev.h"
12 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
13 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
12 #include "ui/ozone/platform/dri/display_manager.h" 14 #include "ui/ozone/platform/dri/display_manager.h"
13 #include "ui/ozone/platform/dri/dri_buffer.h" 15 #include "ui/ozone/platform/dri/dri_buffer.h"
14 #include "ui/ozone/platform/dri/dri_cursor.h" 16 #include "ui/ozone/platform/dri/dri_cursor.h"
15 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h" 17 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h"
16 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h" 18 #include "ui/ozone/platform/dri/dri_gpu_platform_support_host.h"
17 #include "ui/ozone/platform/dri/dri_surface_factory.h" 19 #include "ui/ozone/platform/dri/dri_surface_factory.h"
18 #include "ui/ozone/platform/dri/dri_window.h" 20 #include "ui/ozone/platform/dri/dri_window.h"
19 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h" 21 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h"
20 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h" 22 #include "ui/ozone/platform/dri/dri_window_delegate_manager.h"
21 #include "ui/ozone/platform/dri/dri_window_manager.h" 23 #include "ui/ozone/platform/dri/dri_window_manager.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 scoped_ptr<NativeDisplayDelegateDri> ndd( 92 scoped_ptr<NativeDisplayDelegateDri> ndd(
91 new NativeDisplayDelegateDri(dri_.get(), screen_manager_.get())); 93 new NativeDisplayDelegateDri(dri_.get(), screen_manager_.get()));
92 ndd->Initialize(); 94 ndd->Initialize();
93 gpu_platform_support_.reset( 95 gpu_platform_support_.reset(
94 new DriGpuPlatformSupport(dri_.get(), &window_delegate_manager_, 96 new DriGpuPlatformSupport(dri_.get(), &window_delegate_manager_,
95 screen_manager_.get(), ndd.Pass())); 97 screen_manager_.get(), ndd.Pass()));
96 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost()); 98 gpu_platform_support_host_.reset(new DriGpuPlatformSupportHost());
97 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone); 99 cursor_factory_ozone_.reset(new BitmapCursorFactoryOzone);
98 window_manager_.reset( 100 window_manager_.reset(
99 new DriWindowManager(gpu_platform_support_host_.get())); 101 new DriWindowManager(gpu_platform_support_host_.get()));
100 event_factory_ozone_.reset(new EventFactoryEvdev(window_manager_->cursor(), 102 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
101 device_manager_.get())); 103 make_scoped_ptr(new StubKeyboardLayoutEngine()));
104 event_factory_ozone_.reset(new EventFactoryEvdev(
105 window_manager_->cursor(), device_manager_.get(),
106 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()));
102 107
103 if (!ui_thread_gpu_.Initialize()) 108 if (!ui_thread_gpu_.Initialize())
104 LOG(FATAL) << "Failed to initialize dummy channel."; 109 LOG(FATAL) << "Failed to initialize dummy channel.";
105 } 110 }
106 111
107 void InitializeGPU() override {} 112 void InitializeGPU() override {}
108 113
109 private: 114 private:
110 scoped_ptr<DriWrapper> dri_; 115 scoped_ptr<DriWrapper> dri_;
111 scoped_ptr<DriBufferGenerator> buffer_generator_; 116 scoped_ptr<DriBufferGenerator> buffer_generator_;
(...skipping 12 matching lines...) Expand all
124 129
125 DriWindowDelegateManager window_delegate_manager_; 130 DriWindowDelegateManager window_delegate_manager_;
126 131
127 UiThreadGpu ui_thread_gpu_; 132 UiThreadGpu ui_thread_gpu_;
128 133
129 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri); 134 DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri);
130 }; 135 };
131 136
132 } // namespace 137 } // namespace
133 138
134 OzonePlatform* CreateOzonePlatformDri() { return new OzonePlatformDri; } 139 OzonePlatform* CreateOzonePlatformDri() {
140 return new OzonePlatformDri;
141 }
135 142
136 } // namespace ui 143 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/gbm.gypi ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698