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

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

Issue 10675011: Rename the remaining usage of Monitor to Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/bench/bench_main.cc ('k') | ui/aura/display_change_observer_x11.h » ('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 (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 "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/i18n/icu_util.h" 7 #include "base/i18n/icu_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "third_party/skia/include/core/SkXfermode.h" 10 #include "third_party/skia/include/core/SkXfermode.h"
11 #include "ui/aura/client/stacking_client.h" 11 #include "ui/aura/client/stacking_client.h"
12 #include "ui/aura/env.h" 12 #include "ui/aura/env.h"
13 #include "ui/aura/event.h" 13 #include "ui/aura/event.h"
14 #include "ui/aura/root_window.h" 14 #include "ui/aura/root_window.h"
15 #include "ui/aura/single_monitor_manager.h" 15 #include "ui/aura/single_display_manager.h"
16 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
17 #include "ui/aura/window_delegate.h" 17 #include "ui/aura/window_delegate.h"
18 #include "ui/base/hit_test.h" 18 #include "ui/base/hit_test.h"
19 #include "ui/base/resource/resource_bundle.h" 19 #include "ui/base/resource/resource_bundle.h"
20 #include "ui/base/ui_base_paths.h" 20 #include "ui/base/ui_base_paths.h"
21 #include "ui/compositor/test/compositor_test_support.h" 21 #include "ui/compositor/test/compositor_test_support.h"
22 #include "ui/gfx/canvas.h" 22 #include "ui/gfx/canvas.h"
23 #include "ui/gfx/rect.h" 23 #include "ui/gfx/rect.h"
24 24
25 #if defined(USE_X11) 25 #if defined(USE_X11)
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // The exit manager is in charge of calling the dtors of singleton objects. 113 // The exit manager is in charge of calling the dtors of singleton objects.
114 base::AtExitManager exit_manager; 114 base::AtExitManager exit_manager;
115 115
116 ui::RegisterPathProvider(); 116 ui::RegisterPathProvider();
117 icu_util::Initialize(); 117 icu_util::Initialize();
118 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); 118 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
119 119
120 // Create the message-loop here before creating the root window. 120 // Create the message-loop here before creating the root window.
121 MessageLoop message_loop(MessageLoop::TYPE_UI); 121 MessageLoop message_loop(MessageLoop::TYPE_UI);
122 ui::CompositorTestSupport::Initialize(); 122 ui::CompositorTestSupport::Initialize();
123 aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); 123 aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager);
124 scoped_ptr<aura::RootWindow> root_window( 124 scoped_ptr<aura::RootWindow> root_window(
125 aura::MonitorManager::CreateRootWindowForPrimaryMonitor()); 125 aura::DisplayManager::CreateRootWindowForPrimaryDisplay());
126 scoped_ptr<DemoStackingClient> stacking_client(new DemoStackingClient( 126 scoped_ptr<DemoStackingClient> stacking_client(new DemoStackingClient(
127 root_window.get())); 127 root_window.get()));
128 128
129 // Create a hierarchy of test windows. 129 // Create a hierarchy of test windows.
130 DemoWindowDelegate window_delegate1(SK_ColorBLUE); 130 DemoWindowDelegate window_delegate1(SK_ColorBLUE);
131 aura::Window window1(&window_delegate1); 131 aura::Window window1(&window_delegate1);
132 window1.set_id(1); 132 window1.set_id(1);
133 window1.Init(ui::LAYER_TEXTURED); 133 window1.Init(ui::LAYER_TEXTURED);
134 window1.SetBounds(gfx::Rect(100, 100, 400, 400)); 134 window1.SetBounds(gfx::Rect(100, 100, 400, 400));
135 window1.Show(); 135 window1.Show();
(...skipping 15 matching lines...) Expand all
151 window3.Show(); 151 window3.Show();
152 window3.SetParent(&window2); 152 window3.SetParent(&window2);
153 153
154 root_window->ShowRootWindow(); 154 root_window->ShowRootWindow();
155 MessageLoopForUI::current()->Run(); 155 MessageLoopForUI::current()->Run();
156 156
157 ui::CompositorTestSupport::Terminate(); 157 ui::CompositorTestSupport::Terminate();
158 158
159 return 0; 159 return 0;
160 } 160 }
OLDNEW
« no previous file with comments | « ui/aura/bench/bench_main.cc ('k') | ui/aura/display_change_observer_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698