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

Side by Side Diff: ui/aura/demo/demo_main.cc

Issue 1922783002: Move gfx::Display/Screen to display::Display/Screen in aura/events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <memory> 5 #include <memory>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/i18n/icu_util.h" 9 #include "base/i18n/icu_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Create the message-loop here before creating the root window. 145 // Create the message-loop here before creating the root window.
146 base::MessageLoopForUI message_loop; 146 base::MessageLoopForUI message_loop;
147 147
148 base::PowerMonitor power_monitor( 148 base::PowerMonitor power_monitor(
149 base::WrapUnique(new base::PowerMonitorDeviceSource)); 149 base::WrapUnique(new base::PowerMonitorDeviceSource));
150 150
151 std::unique_ptr<aura::Env> env = aura::Env::CreateInstance(); 151 std::unique_ptr<aura::Env> env = aura::Env::CreateInstance();
152 env->set_context_factory(context_factory.get()); 152 env->set_context_factory(context_factory.get());
153 std::unique_ptr<aura::TestScreen> test_screen( 153 std::unique_ptr<aura::TestScreen> test_screen(
154 aura::TestScreen::Create(gfx::Size())); 154 aura::TestScreen::Create(gfx::Size()));
155 gfx::Screen::SetScreenInstance(test_screen.get()); 155 display::Screen::SetScreenInstance(test_screen.get());
156 std::unique_ptr<aura::WindowTreeHost> host( 156 std::unique_ptr<aura::WindowTreeHost> host(
157 test_screen->CreateHostForPrimaryDisplay()); 157 test_screen->CreateHostForPrimaryDisplay());
158 std::unique_ptr<DemoWindowTreeClient> window_tree_client( 158 std::unique_ptr<DemoWindowTreeClient> window_tree_client(
159 new DemoWindowTreeClient(host->window())); 159 new DemoWindowTreeClient(host->window()));
160 aura::test::TestFocusClient focus_client; 160 aura::test::TestFocusClient focus_client;
161 aura::client::SetFocusClient(host->window(), &focus_client); 161 aura::client::SetFocusClient(host->window(), &focus_client);
162 162
163 // Create a hierarchy of test windows. 163 // Create a hierarchy of test windows.
164 gfx::Rect window1_bounds(100, 100, 400, 400); 164 gfx::Rect window1_bounds(100, 100, 400, 400);
165 DemoWindowDelegate window_delegate1(SK_ColorBLUE); 165 DemoWindowDelegate window_delegate1(SK_ColorBLUE);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 int main(int argc, char** argv) { 199 int main(int argc, char** argv) {
200 base::CommandLine::Init(argc, argv); 200 base::CommandLine::Init(argc, argv);
201 201
202 // The exit manager is in charge of calling the dtors of singleton objects. 202 // The exit manager is in charge of calling the dtors of singleton objects.
203 base::AtExitManager exit_manager; 203 base::AtExitManager exit_manager;
204 204
205 base::i18n::InitializeICU(); 205 base::i18n::InitializeICU();
206 206
207 return DemoMain(); 207 return DemoMain();
208 } 208 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698