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

Side by Side Diff: ui/ozone/demo/ozone_demo.cc

Issue 848953002: [Ozone-Demo] Initialize a default keyboard layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-surfaceless-demo
Patch Set: Created 5 years, 11 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
« no previous file with comments | « ui/ozone/demo/BUILD.gn ('k') | ui/ozone/demo/ozone_demos.gyp » ('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 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
11 #include "ui/events/keycodes/dom3/dom_code.h" 11 #include "ui/events/keycodes/dom3/dom_code.h"
12 #include "ui/events/ozone/layout/keyboard_layout_engine.h"
13 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
12 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/size.h" 15 #include "ui/gfx/geometry/size.h"
14 #include "ui/gl/gl_surface.h" 16 #include "ui/gl/gl_surface.h"
15 #include "ui/ozone/demo/gl_renderer.h" 17 #include "ui/ozone/demo/gl_renderer.h"
16 #include "ui/ozone/demo/software_renderer.h" 18 #include "ui/ozone/demo/software_renderer.h"
17 #include "ui/ozone/demo/surfaceless_gl_renderer.h" 19 #include "ui/ozone/demo/surfaceless_gl_renderer.h"
18 #include "ui/ozone/public/ozone_platform.h" 20 #include "ui/ozone/public/ozone_platform.h"
19 #include "ui/ozone/public/ozone_switches.h" 21 #include "ui/ozone/public/ozone_switches.h"
20 #include "ui/ozone/public/ui_thread_gpu.h" 22 #include "ui/ozone/public/ui_thread_gpu.h"
21 #include "ui/platform_window/platform_window.h" 23 #include "ui/platform_window/platform_window.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 131
130 int main(int argc, char** argv) { 132 int main(int argc, char** argv) {
131 base::CommandLine::Init(argc, argv); 133 base::CommandLine::Init(argc, argv);
132 base::AtExitManager exit_manager; 134 base::AtExitManager exit_manager;
133 135
134 // Build UI thread message loop. This is used by platform 136 // Build UI thread message loop. This is used by platform
135 // implementations for event polling & running background tasks. 137 // implementations for event polling & running background tasks.
136 base::MessageLoopForUI message_loop; 138 base::MessageLoopForUI message_loop;
137 139
138 ui::OzonePlatform::InitializeForUI(); 140 ui::OzonePlatform::InitializeForUI();
141 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()
142 ->SetCurrentLayoutByName("us");
alexst (slow to review) 2015/01/13 21:41:31 Is "us" a know string or is it just something that
dnicoara 2015/01/13 21:46:04 "us" is a known layout. The issue is there is no d
139 143
140 base::RunLoop run_loop; 144 base::RunLoop run_loop;
141 145
142 scoped_ptr<DemoWindow> window(new DemoWindow); 146 scoped_ptr<DemoWindow> window(new DemoWindow);
143 window->Start(run_loop.QuitClosure()); 147 window->Start(run_loop.QuitClosure());
144 148
145 run_loop.Run(); 149 run_loop.Run();
146 150
147 return 0; 151 return 0;
148 } 152 }
OLDNEW
« no previous file with comments | « ui/ozone/demo/BUILD.gn ('k') | ui/ozone/demo/ozone_demos.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698