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

Side by Side Diff: ash/test/ash_test_base.cc

Issue 10540123: Rename gfx::Screen::GetMonitorXXXX to gfx::Screen::GetDisplayXXX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « ash/system/tray/tray_bubble_view.cc ('k') | ash/tooltips/tooltip_controller.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 (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 "ash/test/ash_test_base.h" 5 #include "ash/test/ash_test_base.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 RunAllPendingInMessageLoop(); 67 RunAllPendingInMessageLoop();
68 68
69 // Tear down the shell. 69 // Tear down the shell.
70 Shell::DeleteInstance(); 70 Shell::DeleteInstance();
71 aura::Env::DeleteInstance(); 71 aura::Env::DeleteInstance();
72 ui::TextInputTestSupport::Shutdown(); 72 ui::TextInputTestSupport::Shutdown();
73 } 73 }
74 74
75 void AshTestBase::ChangeMonitorConfig(float scale, 75 void AshTestBase::ChangeMonitorConfig(float scale,
76 const gfx::Rect& bounds_in_pixel) { 76 const gfx::Rect& bounds_in_pixel) {
77 gfx::Display display = gfx::Display(gfx::Screen::GetPrimaryMonitor().id()); 77 gfx::Display display = gfx::Display(gfx::Screen::GetPrimaryDisplay().id());
78 display.SetScaleAndBounds(scale, bounds_in_pixel); 78 display.SetScaleAndBounds(scale, bounds_in_pixel);
79 std::vector<gfx::Display> displays; 79 std::vector<gfx::Display> displays;
80 displays.push_back(display); 80 displays.push_back(display);
81 aura::Env::GetInstance()->monitor_manager()->OnNativeMonitorsChanged( 81 aura::Env::GetInstance()->monitor_manager()->OnNativeMonitorsChanged(
82 displays); 82 displays);
83 } 83 }
84 84
85 void AshTestBase::UpdateMonitor(const std::string& display_specs) { 85 void AshTestBase::UpdateMonitor(const std::string& display_specs) {
86 std::vector<gfx::Display> displays = CreateDisplaysFromString(display_specs); 86 std::vector<gfx::Display> displays = CreateDisplaysFromString(display_specs);
87 aura::Env::GetInstance()->monitor_manager()-> 87 aura::Env::GetInstance()->monitor_manager()->
88 OnNativeMonitorsChanged(displays); 88 OnNativeMonitorsChanged(displays);
89 } 89 }
90 90
91 void AshTestBase::RunAllPendingInMessageLoop() { 91 void AshTestBase::RunAllPendingInMessageLoop() {
92 #if !defined(OS_MACOSX) 92 #if !defined(OS_MACOSX)
93 message_loop_.RunAllPendingWithDispatcher( 93 message_loop_.RunAllPendingWithDispatcher(
94 aura::Env::GetInstance()->GetDispatcher()); 94 aura::Env::GetInstance()->GetDispatcher());
95 #endif 95 #endif
96 } 96 }
97 97
98 } // namespace test 98 } // namespace test
99 } // namespace ash 99 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_bubble_view.cc ('k') | ash/tooltips/tooltip_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698