summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 21:51:44 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 21:51:44 +0000
commite72fa4d643005f438978d8a9c21272f3acd64061 (patch)
treefabd135523ba0954c3c6b861dd21c5e165512580 /ash
parentf33386d952654acfad4f62029ece49f0e7ecb200 (diff)
downloadchromium_src-e72fa4d643005f438978d8a9c21272f3acd64061.zip
chromium_src-e72fa4d643005f438978d8a9c21272f3acd64061.tar.gz
chromium_src-e72fa4d643005f438978d8a9c21272f3acd64061.tar.bz2
Revert r 144499 "Rename the remaining usage of Monitor to Display"
Temporarily reverting rename change to investigate 133784 TBR=oshima@chromium.org BUG=123160 TEST=none Review URL: https://chromiumcodereview.appspot.com/10689014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144573 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/accelerators/accelerator_controller.cc18
-rw-r--r--ash/accelerators/accelerator_table.cc6
-rw-r--r--ash/accelerators/accelerator_table.h6
-rw-r--r--ash/ash.gyp18
-rw-r--r--ash/dip_unittest.cc6
-rw-r--r--ash/extended_desktop_unittest.cc50
-rw-r--r--ash/monitor/monitor_controller.cc (renamed from ash/display/display_controller.cc)74
-rw-r--r--ash/monitor/monitor_controller.h (renamed from ash/display/display_controller.h)22
-rw-r--r--ash/monitor/mouse_cursor_event_filter.cc (renamed from ash/display/mouse_cursor_event_filter.cc)12
-rw-r--r--ash/monitor/mouse_cursor_event_filter.h (renamed from ash/display/mouse_cursor_event_filter.h)12
-rw-r--r--ash/monitor/multi_monitor_manager.cc (renamed from ash/display/multi_display_manager.cc)102
-rw-r--r--ash/monitor/multi_monitor_manager.h (renamed from ash/display/multi_display_manager.h)42
-rw-r--r--ash/monitor/multi_monitor_manager_unittest.cc (renamed from ash/display/multi_display_manager_unittest.cc)114
-rw-r--r--ash/monitor/secondary_monitor_view.cc (renamed from ash/display/secondary_display_view.cc)18
-rw-r--r--ash/monitor/secondary_monitor_view.h (renamed from ash/display/secondary_display_view.h)10
-rw-r--r--ash/root_window_controller_unittest.cc22
-rw-r--r--ash/screen_ash.cc14
-rw-r--r--ash/shell.cc62
-rw-r--r--ash/shell.h16
-rw-r--r--ash/shell_observer.h2
-rw-r--r--ash/test/ash_test_base.cc14
-rw-r--r--ash/test/ash_test_base.h8
-rw-r--r--ash/tooltips/tooltip_controller.cc14
-rw-r--r--ash/wm/base_layout_manager.cc12
-rw-r--r--ash/wm/base_layout_manager.h2
-rw-r--r--ash/wm/base_layout_manager_unittest.cc10
-rw-r--r--ash/wm/frame_painter.cc4
-rw-r--r--ash/wm/screen_dimmer.h2
-rw-r--r--ash/wm/shelf_layout_manager.cc6
-rw-r--r--ash/wm/shelf_layout_manager_unittest.cc24
-rw-r--r--ash/wm/stacking_controller.cc4
-rw-r--r--ash/wm/toplevel_window_event_filter_unittest.cc2
-rw-r--r--ash/wm/window_resizer.cc4
-rw-r--r--ash/wm/window_util.h2
-rw-r--r--ash/wm/workspace/snap_sizer.cc2
-rw-r--r--ash/wm/workspace/workspace_manager.cc2
-rw-r--r--ash/wm/workspace/workspace_window_resizer.cc6
-rw-r--r--ash/wm/workspace/workspace_window_resizer_unittest.cc14
38 files changed, 379 insertions, 379 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 29380da..287bcec 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -16,8 +16,8 @@
#include "ash/launcher/launcher_delegate.h"
#include "ash/launcher/launcher_model.h"
#include "ash/magnifier/magnification_controller.h"
-#include "ash/display/display_controller.h"
-#include "ash/display/multi_display_manager.h"
+#include "ash/monitor/monitor_controller.h"
+#include "ash/monitor/multi_monitor_manager.h"
#include "ash/root_window_controller.h"
#include "ash/screenshot_delegate.h"
#include "ash/shell.h"
@@ -44,7 +44,7 @@
#include "ui/oak/oak.h"
#if defined(OS_CHROMEOS)
-#include "chromeos/display/output_configurator.h"
+#include "chromeos/monitor/output_configurator.h"
#endif // defined(OS_CHROMEOS)
namespace ash {
@@ -585,17 +585,17 @@ bool AcceleratorController::PerformAction(int action,
return HandleToggleDesktopBackgroundMode();
case TOGGLE_ROOT_WINDOW_FULL_SCREEN:
return HandleToggleRootWindowFullScreen();
- case DISPLAY_ADD_REMOVE:
+ case MONITOR_ADD_REMOVE:
if (DebugShortcutsEnabled())
- internal::MultiDisplayManager::AddRemoveDisplay();
+ internal::MultiMonitorManager::AddRemoveMonitor();
return true;
- case DISPLAY_CYCLE:
+ case MONITOR_CYCLE:
if (DebugShortcutsEnabled())
- internal::MultiDisplayManager::CycleDisplay();
+ internal::MultiMonitorManager::CycleMonitor();
return true;
- case DISPLAY_TOGGLE_SCALE:
+ case MONITOR_TOGGLE_SCALE:
if (DebugShortcutsEnabled())
- internal::MultiDisplayManager::ToggleDisplayScale();
+ internal::MultiMonitorManager::ToggleMonitorScale();
return true;
case MAGNIFY_SCREEN_ZOOM_IN:
return HandleMagnifyScreen(1);
diff --git a/ash/accelerators/accelerator_table.cc b/ash/accelerators/accelerator_table.cc
index ba89019..3c40f73 100644
--- a/ash/accelerators/accelerator_table.cc
+++ b/ash/accelerators/accelerator_table.cc
@@ -123,10 +123,10 @@ const AcceleratorData kAcceleratorData[] = {
// For testing on systems where Alt-Tab is already mapped.
{ true, ui::VKEY_W, ui::EF_ALT_DOWN, CYCLE_FORWARD_MRU },
{ true, ui::VKEY_W, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, CYCLE_BACKWARD_MRU },
- { true, ui::VKEY_F4, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, DISPLAY_CYCLE },
- { true, ui::VKEY_F4, ui::EF_SHIFT_DOWN, DISPLAY_ADD_REMOVE },
+ { true, ui::VKEY_F4, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, MONITOR_CYCLE },
+ { true, ui::VKEY_F4, ui::EF_SHIFT_DOWN, MONITOR_ADD_REMOVE },
{ true, ui::VKEY_HOME, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
- DISPLAY_TOGGLE_SCALE },
+ MONITOR_TOGGLE_SCALE },
#if !defined(NDEBUG)
{ true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
PRINT_LAYER_HIERARCHY },
diff --git a/ash/accelerators/accelerator_table.h b/ash/accelerators/accelerator_table.h
index 788de46..23961b5 100644
--- a/ash/accelerators/accelerator_table.h
+++ b/ash/accelerators/accelerator_table.h
@@ -67,9 +67,9 @@ enum AcceleratorAction {
OPEN_FILE_MANAGER_DIALOG,
OPEN_FILE_MANAGER_TAB,
#endif
- DISPLAY_ADD_REMOVE,
- DISPLAY_CYCLE,
- DISPLAY_TOGGLE_SCALE,
+ MONITOR_ADD_REMOVE,
+ MONITOR_CYCLE,
+ MONITOR_TOGGLE_SCALE,
ROTATE_SCREEN,
TOGGLE_DESKTOP_BACKGROUND_MODE,
TOGGLE_ROOT_WINDOW_FULL_SCREEN,
diff --git a/ash/ash.gyp b/ash/ash.gyp
index 65537af..857581d 100644
--- a/ash/ash.gyp
+++ b/ash/ash.gyp
@@ -97,14 +97,14 @@
'launcher/tabbed_launcher_button.h',
'magnifier/magnification_controller.cc',
'magnifier/magnification_controller.h',
- 'display/display_controller.cc',
- 'display/display_controller.h',
- 'display/mouse_cursor_event_filter.cc',
- 'display/mouse_cursor_event_filter.h',
- 'display/multi_display_manager.cc',
- 'display/multi_display_manager.h',
- 'display/secondary_display_view.cc',
- 'display/secondary_display_view.h',
+ 'monitor/monitor_controller.cc',
+ 'monitor/monitor_controller.h',
+ 'monitor/mouse_cursor_event_filter.cc',
+ 'monitor/mouse_cursor_event_filter.h',
+ 'monitor/multi_monitor_manager.cc',
+ 'monitor/multi_monitor_manager.h',
+ 'monitor/secondary_monitor_view.cc',
+ 'monitor/secondary_monitor_view.h',
'root_window_controller.cc',
'root_window_controller.h',
'screen_ash.cc',
@@ -379,7 +379,6 @@
'accelerators/accelerator_table_unittest.cc',
'accelerators/nested_dispatcher_controller_unittest.cc',
'dip_unittest.cc',
- 'display/multi_display_manager_unittest.cc',
'drag_drop/drag_drop_controller_unittest.cc',
'extended_desktop_unittest.cc',
'focus_cycler_unittest.cc',
@@ -388,6 +387,7 @@
'launcher/launcher_navigator_unittest.cc',
'launcher/launcher_unittest.cc',
'launcher/launcher_view_unittest.cc',
+ 'monitor/multi_monitor_manager_unittest.cc',
'root_window_controller_unittest.cc',
'screensaver/screensaver_view_unittest.cc',
'shell_unittest.cc',
diff --git a/ash/dip_unittest.cc b/ash/dip_unittest.cc
index b710e4c..a6ebe14 100644
--- a/ash/dip_unittest.cc
+++ b/ash/dip_unittest.cc
@@ -28,7 +28,7 @@ namespace ash {
typedef ash::test::AshTestBase DIPTest;
#if defined(OS_WIN)
-// Windows/Aura doesn't have DIP support in display yet.
+// Windows/Aura doesn't have DIP support in monitor yet.
#define MAYBE_WorkArea DISABLED_WorkArea
#else
#define MAYBE_WorkArea WorkArea
@@ -36,7 +36,7 @@ typedef ash::test::AshTestBase DIPTest;
// Test if the WM sets correct work area under different density.
TEST_F(DIPTest, MAYBE_WorkArea) {
- ChangeDisplayConfig(1.0f, gfx::Rect(0, 0, 1000, 900));
+ ChangeMonitorConfig(1.0f, gfx::Rect(0, 0, 1000, 900));
aura::RootWindow* root = Shell::GetPrimaryRootWindow();
const gfx::Display display = gfx::Screen::GetDisplayNearestWindow(root);
@@ -46,7 +46,7 @@ TEST_F(DIPTest, MAYBE_WorkArea) {
EXPECT_EQ("0,0 1000x852", work_area.ToString());
EXPECT_EQ("0,0,48,0", display.bounds().InsetsFrom(work_area).ToString());
- ChangeDisplayConfig(2.0f, gfx::Rect(0, 0, 2000, 1800));
+ ChangeMonitorConfig(2.0f, gfx::Rect(0, 0, 2000, 1800));
const gfx::Display display_2x = gfx::Screen::GetDisplayNearestWindow(root);
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index 9a70acc..8469eb5 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/display/display_controller.h"
-#include "ash/display/multi_display_manager.h"
+#include "ash/monitor/monitor_controller.h"
+#include "ash/monitor/multi_monitor_manager.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/window_cycle_controller.h"
@@ -58,19 +58,19 @@ class ExtendedDesktopTest : public test::AshTestBase {
virtual ~ExtendedDesktopTest() {}
virtual void SetUp() OVERRIDE {
- internal::DisplayController::SetExtendedDesktopEnabled(true);
+ internal::MonitorController::SetExtendedDesktopEnabled(true);
AshTestBase::SetUp();
}
virtual void TearDown() OVERRIDE {
AshTestBase::TearDown();
- internal::DisplayController::SetExtendedDesktopEnabled(false);
+ internal::MonitorController::SetExtendedDesktopEnabled(false);
}
protected:
- internal::MultiDisplayManager* display_manager() {
- return static_cast<internal::MultiDisplayManager*>(
- aura::Env::GetInstance()->display_manager());
+ internal::MultiMonitorManager* monitor_manager() {
+ return static_cast<internal::MultiMonitorManager*>(
+ aura::Env::GetInstance()->monitor_manager());
}
private:
@@ -80,7 +80,7 @@ class ExtendedDesktopTest : public test::AshTestBase {
// Test conditions that root windows in extended desktop mode
// must satisfy.
TEST_F(ExtendedDesktopTest, Basic) {
- UpdateDisplay("0+0-1000x600,1001+0-600x400");
+ UpdateMonitor("0+0-1000x600,1001+0-600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
// All root windows must have the root window controller.
@@ -99,7 +99,7 @@ TEST_F(ExtendedDesktopTest, Basic) {
}
TEST_F(ExtendedDesktopTest, Activation) {
- UpdateDisplay("0+0-1000x600,1001+0-600x400");
+ UpdateMonitor("0+0-1000x600,1001+0-600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
// Move the active root window to the secondary.
@@ -134,7 +134,7 @@ TEST_F(ExtendedDesktopTest, Activation) {
}
TEST_F(ExtendedDesktopTest, SystemModal) {
- UpdateDisplay("0+0-1000x600,1001+0-600x400");
+ UpdateMonitor("0+0-1000x600,1001+0-600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
Shell::GetInstance()->set_active_root_window(root_windows[0]);
@@ -153,7 +153,7 @@ TEST_F(ExtendedDesktopTest, SystemModal) {
EXPECT_EQ(root_windows[1], modal_widget->GetNativeView()->GetRootWindow());
EXPECT_EQ(root_windows[1], Shell::GetActiveRootWindow());
- // Clicking a widget on widget_on_1st display should not change activation.
+ // Clicking a widget on widget_on_1st monitor should not change activation.
aura::test::EventGenerator generator_1st(root_windows[0]);
generator_1st.MoveMouseToCenterOf(widget_on_1st->GetNativeView());
generator_1st.ClickLeftButton();
@@ -169,7 +169,7 @@ TEST_F(ExtendedDesktopTest, SystemModal) {
}
TEST_F(ExtendedDesktopTest, TestCursor) {
- UpdateDisplay("0+0-1000x600,1001+0-600x400");
+ UpdateMonitor("0+0-1000x600,1001+0-600x400");
Shell::GetInstance()->ShowCursor(false);
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
EXPECT_FALSE(root_windows[0]->cursor_shown());
@@ -186,8 +186,8 @@ TEST_F(ExtendedDesktopTest, TestCursor) {
}
TEST_F(ExtendedDesktopTest, CycleWindows) {
- internal::DisplayController::SetVirtualScreenCoordinatesEnabled(true);
- UpdateDisplay("0+0-700x500,0+0-500x500");
+ internal::MonitorController::SetVirtualScreenCoordinatesEnabled(true);
+ UpdateMonitor("0+0-700x500,0+0-500x500");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
// Emulate virtual screen coordinate system.
root_windows[0]->SetBounds(gfx::Rect(0, 0, 700, 500));
@@ -235,12 +235,12 @@ TEST_F(ExtendedDesktopTest, CycleWindows) {
EXPECT_TRUE(wm::IsActiveWindow(d2_w1->GetNativeView()));
controller->HandleCycleWindow(WindowCycleController::BACKWARD, true);
EXPECT_TRUE(wm::IsActiveWindow(d2_w2->GetNativeView()));
- internal::DisplayController::SetVirtualScreenCoordinatesEnabled(false);
+ internal::MonitorController::SetVirtualScreenCoordinatesEnabled(false);
}
TEST_F(ExtendedDesktopTest, GetRootWindowAt) {
- internal::DisplayController::SetVirtualScreenCoordinatesEnabled(true);
- UpdateDisplay("0+0-700x500,0+0-500x500");
+ internal::MonitorController::SetVirtualScreenCoordinatesEnabled(true);
+ UpdateMonitor("0+0-700x500,0+0-500x500");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
// Emulate virtual screen coordinate system.
root_windows[0]->SetBounds(gfx::Rect(500, 0, 700, 500));
@@ -257,12 +257,12 @@ TEST_F(ExtendedDesktopTest, GetRootWindowAt) {
// Out of range point should return the primary root window
EXPECT_EQ(root_windows[0], Shell::GetRootWindowAt(gfx::Point(-100, 0)));
EXPECT_EQ(root_windows[0], Shell::GetRootWindowAt(gfx::Point(1201, 100)));
- internal::DisplayController::SetVirtualScreenCoordinatesEnabled(false);
+ internal::MonitorController::SetVirtualScreenCoordinatesEnabled(false);
}
TEST_F(ExtendedDesktopTest, GetRootWindowMatching) {
- internal::DisplayController::SetVirtualScreenCoordinatesEnabled(true);
- UpdateDisplay("0+0-700x500,0+0-500x500");
+ internal::MonitorController::SetVirtualScreenCoordinatesEnabled(true);
+ UpdateMonitor("0+0-700x500,0+0-500x500");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
// Emulate virtual screen coordinate system.
root_windows[0]->SetBounds(gfx::Rect(500, 0, 700, 500));
@@ -297,11 +297,11 @@ TEST_F(ExtendedDesktopTest, GetRootWindowMatching) {
Shell::GetRootWindowMatching(gfx::Rect(-100, -300, 50, 50)));
EXPECT_EQ(root_windows[0],
Shell::GetRootWindowMatching(gfx::Rect(0, 2000, 50, 50)));
- internal::DisplayController::SetVirtualScreenCoordinatesEnabled(false);
+ internal::MonitorController::SetVirtualScreenCoordinatesEnabled(false);
}
TEST_F(ExtendedDesktopTest, Capture) {
- UpdateDisplay("0+0-1000x600,1001+0-600x400");
+ UpdateMonitor("0+0-1000x600,1001+0-600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
aura::test::EventCountDelegate r1_d1;
@@ -353,13 +353,13 @@ namespace internal {
// Test if the Window::ConvertPointToWindow works across root windows.
// TODO(oshima): Move multiple display suport and this test to aura.
TEST_F(ExtendedDesktopTest, ConvertPoint) {
- UpdateDisplay("0+0-1000x600,1001+0-600x400");
+ UpdateMonitor("0+0-1000x600,1001+0-600x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
gfx::Display& display_1 =
- display_manager()->FindDisplayForRootWindow(root_windows[0]);
+ monitor_manager()->FindDisplayForRootWindow(root_windows[0]);
EXPECT_EQ("0,0", display_1.bounds().origin().ToString());
gfx::Display& display_2 =
- display_manager()->FindDisplayForRootWindow(root_windows[1]);
+ monitor_manager()->FindDisplayForRootWindow(root_windows[1]);
Shell::GetInstance()->set_active_root_window(root_windows[0]);
aura::Window* d1 =
CreateTestWidget(gfx::Rect(10, 10, 100, 100))->GetNativeView();
diff --git a/ash/display/display_controller.cc b/ash/monitor/monitor_controller.cc
index 895532a..b8e1e04 100644
--- a/ash/display/display_controller.cc
+++ b/ash/monitor/monitor_controller.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/display/display_controller.h"
+#include "ash/monitor/monitor_controller.h"
#include "ash/ash_switches.h"
-#include "ash/display/multi_display_manager.h"
+#include "ash/monitor/multi_monitor_manager.h"
#include "ash/root_window_controller.h"
#include "ash/shell.h"
#include "ash/wm/window_util.h"
@@ -26,13 +26,13 @@ bool extended_desktop_enabled = false;
bool virtual_screen_coordinates_enabled = false;
}
-DisplayController::DisplayController()
+MonitorController::MonitorController()
: secondary_display_layout_(RIGHT) {
- aura::Env::GetInstance()->display_manager()->AddObserver(this);
+ aura::Env::GetInstance()->monitor_manager()->AddObserver(this);
}
-DisplayController::~DisplayController() {
- aura::Env::GetInstance()->display_manager()->RemoveObserver(this);
+MonitorController::~MonitorController() {
+ aura::Env::GetInstance()->monitor_manager()->RemoveObserver(this);
// Delete all root window controllers, which deletes root window
// from the last so that the primary root window gets deleted last.
for (std::map<int, aura::RootWindow*>::const_reverse_iterator it =
@@ -48,31 +48,31 @@ DisplayController::~DisplayController() {
}
}
-void DisplayController::InitPrimaryDisplay() {
- aura::DisplayManager* display_manager =
- aura::Env::GetInstance()->display_manager();
- const gfx::Display& display = display_manager->GetDisplayAt(0);
+void MonitorController::InitPrimaryDisplay() {
+ aura::MonitorManager* monitor_manager =
+ aura::Env::GetInstance()->monitor_manager();
+ const gfx::Display& display = monitor_manager->GetDisplayAt(0);
DCHECK_EQ(0, display.id());
aura::RootWindow* root = AddRootWindowForDisplay(display);
root->SetHostBounds(display.bounds_in_pixel());
}
-void DisplayController::InitSecondaryDisplays() {
- aura::DisplayManager* display_manager =
- aura::Env::GetInstance()->display_manager();
- for (size_t i = 1; i < display_manager->GetNumDisplays(); ++i) {
- const gfx::Display& display = display_manager->GetDisplayAt(i);
+void MonitorController::InitSecondaryDisplays() {
+ aura::MonitorManager* monitor_manager =
+ aura::Env::GetInstance()->monitor_manager();
+ for (size_t i = 1; i < monitor_manager->GetNumDisplays(); ++i) {
+ const gfx::Display& display = monitor_manager->GetDisplayAt(i);
aura::RootWindow* root = AddRootWindowForDisplay(display);
- Shell::GetInstance()->InitRootWindowForSecondaryDisplay(root);
+ Shell::GetInstance()->InitRootWindowForSecondaryMonitor(root);
}
}
-aura::RootWindow* DisplayController::GetPrimaryRootWindow() {
+aura::RootWindow* MonitorController::GetPrimaryRootWindow() {
DCHECK(!root_windows_.empty());
return root_windows_[0];
}
-void DisplayController::CloseChildWindows() {
+void MonitorController::CloseChildWindows() {
for (std::map<int, aura::RootWindow*>::const_iterator it =
root_windows_.begin(); it != root_windows_.end(); ++it) {
aura::RootWindow* root_window = it->second;
@@ -89,7 +89,7 @@ void DisplayController::CloseChildWindows() {
}
}
-std::vector<aura::RootWindow*> DisplayController::GetAllRootWindows() {
+std::vector<aura::RootWindow*> MonitorController::GetAllRootWindows() {
std::vector<aura::RootWindow*> windows;
for (std::map<int, aura::RootWindow*>::const_iterator it =
root_windows_.begin(); it != root_windows_.end(); ++it) {
@@ -101,7 +101,7 @@ std::vector<aura::RootWindow*> DisplayController::GetAllRootWindows() {
}
std::vector<internal::RootWindowController*>
-DisplayController::GetAllRootWindowControllers() {
+MonitorController::GetAllRootWindowControllers() {
std::vector<internal::RootWindowController*> controllers;
for (std::map<int, aura::RootWindow*>::const_iterator it =
root_windows_.begin(); it != root_windows_.end(); ++it) {
@@ -113,12 +113,12 @@ DisplayController::GetAllRootWindowControllers() {
return controllers;
}
-void DisplayController::SetSecondaryDisplayLayout(
+void MonitorController::SetSecondaryDisplayLayout(
SecondaryDisplayLayout layout) {
secondary_display_layout_ = layout;
}
-bool DisplayController::WarpMouseCursorIfNecessary(
+bool MonitorController::WarpMouseCursorIfNecessary(
aura::Window* current_root,
const gfx::Point& location_in_root) {
if (root_windows_.size() < 2)
@@ -189,11 +189,11 @@ bool DisplayController::WarpMouseCursorIfNecessary(
return false;
}
-void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) {
+void MonitorController::OnDisplayBoundsChanged(const gfx::Display& display) {
root_windows_[display.id()]->SetHostBounds(display.bounds_in_pixel());
}
-void DisplayController::OnDisplayAdded(const gfx::Display& display) {
+void MonitorController::OnDisplayAdded(const gfx::Display& display) {
if (root_windows_.empty()) {
DCHECK_EQ(0, display.id());
root_windows_[display.id()] = Shell::GetPrimaryRootWindow();
@@ -201,15 +201,15 @@ void DisplayController::OnDisplayAdded(const gfx::Display& display) {
return;
}
aura::RootWindow* root = AddRootWindowForDisplay(display);
- Shell::GetInstance()->InitRootWindowForSecondaryDisplay(root);
+ Shell::GetInstance()->InitRootWindowForSecondaryMonitor(root);
}
-void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
+void MonitorController::OnDisplayRemoved(const gfx::Display& display) {
aura::RootWindow* root = root_windows_[display.id()];
DCHECK(root);
- // Primary display should never be removed by DisplayManager.
+ // Primary monitor should never be removed by MonitorManager.
DCHECK(root != Shell::GetPrimaryRootWindow());
- // Display for root window will be deleted when the Primary RootWindow
+ // Monitor for root window will be deleted when the Primary RootWindow
// is deleted by the Shell.
if (root != Shell::GetPrimaryRootWindow()) {
root_windows_.erase(display.id());
@@ -225,40 +225,40 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) {
}
// static
-bool DisplayController::IsExtendedDesktopEnabled(){
+bool MonitorController::IsExtendedDesktopEnabled(){
return extended_desktop_enabled ||
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAshExtendedDesktop);
}
// static
-void DisplayController::SetExtendedDesktopEnabled(bool enabled) {
+void MonitorController::SetExtendedDesktopEnabled(bool enabled) {
extended_desktop_enabled = enabled;
}
// static
-bool DisplayController::IsVirtualScreenCoordinatesEnabled() {
+bool MonitorController::IsVirtualScreenCoordinatesEnabled() {
return virtual_screen_coordinates_enabled ||
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAshVirtualScreenCoordinates);
}
// static
-void DisplayController::SetVirtualScreenCoordinatesEnabled(bool enabled) {
+void MonitorController::SetVirtualScreenCoordinatesEnabled(bool enabled) {
virtual_screen_coordinates_enabled = enabled;
}
-aura::RootWindow* DisplayController::AddRootWindowForDisplay(
+aura::RootWindow* MonitorController::AddRootWindowForDisplay(
const gfx::Display& display) {
- aura::RootWindow* root = aura::Env::GetInstance()->display_manager()->
- CreateRootWindowForDisplay(display);
+ aura::RootWindow* root = aura::Env::GetInstance()->monitor_manager()->
+ CreateRootWindowForMonitor(display);
root_windows_[display.id()] = root;
// Confine the cursor within the window if
// 1) Extended desktop is enabled or
- // 2) the display is primary display and the host window
+ // 2) the display is primary monitor and the host window
// is set to be fullscreen (this is old behavior).
if (IsExtendedDesktopEnabled() ||
- (aura::DisplayManager::use_fullscreen_host_window() &&
+ (aura::MonitorManager::use_fullscreen_host_window() &&
display.id() == 0)) {
root->ConfineCursorToWindow();
}
diff --git a/ash/display/display_controller.h b/ash/monitor/monitor_controller.h
index 1b66d01..72afa42 100644
--- a/ash/display/display_controller.h
+++ b/ash/monitor/monitor_controller.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_
-#define ASH_DISPLAY_DISPLAY_CONTROLLER_H_
+#ifndef ASH_MONITOR_MONITOR_CONTROLLER_H_
+#define ASH_MONITOR_MONITOR_CONTROLLER_H_
#pragma once
#include <map>
@@ -13,7 +13,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/aura/display_observer.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
namespace aura {
class Display;
@@ -24,12 +24,12 @@ namespace ash {
namespace internal {
class RootWindowController;
-// DisplayController owns and maintains RootWindows for each attached
+// MonitorController owns and maintains RootWindows for each attached
// display, keeping them in sync with display configuration changes.
-// TODO(oshima): Rename DisplayXXX to DisplayXXX.
-class ASH_EXPORT DisplayController : public aura::DisplayObserver {
+// TODO(oshima): Rename MonitorXXX to DisplayXXX.
+class ASH_EXPORT MonitorController : public aura::DisplayObserver {
public:
- // Layout options where the secondary display should be positioned.
+ // Layout options where the secondary monitor should be positioned.
enum SecondaryDisplayLayout {
TOP,
RIGHT,
@@ -37,8 +37,8 @@ class ASH_EXPORT DisplayController : public aura::DisplayObserver {
LEFT
};
- DisplayController();
- virtual ~DisplayController();
+ MonitorController();
+ virtual ~MonitorController();
// Initializes primary display.
void InitPrimaryDisplay();
@@ -100,10 +100,10 @@ class ASH_EXPORT DisplayController : public aura::DisplayObserver {
SecondaryDisplayLayout secondary_display_layout_;
- DISALLOW_COPY_AND_ASSIGN(DisplayController);
+ DISALLOW_COPY_AND_ASSIGN(MonitorController);
};
} // namespace internal
} // namespace ash
-#endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_
+#endif // ASH_MONITOR_MONITOR_CONTROLLER_H_
diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/monitor/mouse_cursor_event_filter.cc
index 0ab6f1c..0c451d1 100644
--- a/ash/display/mouse_cursor_event_filter.cc
+++ b/ash/monitor/mouse_cursor_event_filter.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/display/mouse_cursor_event_filter.h"
+#include "ash/monitor/mouse_cursor_event_filter.h"
-#include "ash/display/display_controller.h"
+#include "ash/monitor/monitor_controller.h"
#include "ui/aura/event.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
@@ -13,9 +13,9 @@ namespace ash {
namespace internal {
MouseCursorEventFilter::MouseCursorEventFilter(
- DisplayController* display_controller)
- : display_controller_(display_controller) {
- DCHECK(display_controller_);
+ MonitorController* monitor_controller)
+ : monitor_controller_(monitor_controller) {
+ DCHECK(monitor_controller_);
}
MouseCursorEventFilter::~MouseCursorEventFilter() {
@@ -33,7 +33,7 @@ bool MouseCursorEventFilter::PreHandleMouseEvent(aura::Window* target,
aura::RootWindow* current_root = target->GetRootWindow();
gfx::Point location_in_root(event->location());
aura::Window::ConvertPointToWindow(target, current_root, &location_in_root);
- return display_controller_->WarpMouseCursorIfNecessary(
+ return monitor_controller_->WarpMouseCursorIfNecessary(
current_root, location_in_root);
}
diff --git a/ash/display/mouse_cursor_event_filter.h b/ash/monitor/mouse_cursor_event_filter.h
index a89a6b7..682547a 100644
--- a/ash/display/mouse_cursor_event_filter.h
+++ b/ash/monitor/mouse_cursor_event_filter.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_DISPLAY_MOUSE_CURSOR_EVENT_FILTER_H
-#define ASH_DISPLAY_MOUSE_CURSOR_EVENT_FILTER_H
+#ifndef ASH_MONITOR_MOUSE_CURSOR_EVENT_FILTER_H
+#define ASH_MONITOR_MOUSE_CURSOR_EVENT_FILTER_H
#pragma once
#include "ash/ash_export.h"
@@ -12,13 +12,13 @@
namespace ash {
namespace internal {
-class DisplayController;
+class MonitorController;
// An event filter that controls mouse location in extended desktop
// environment.
class ASH_EXPORT MouseCursorEventFilter : public aura::EventFilter {
public:
- MouseCursorEventFilter(DisplayController* display_controller);
+ MouseCursorEventFilter(MonitorController* monitor_controller);
virtual ~MouseCursorEventFilter();
// Overridden from aura::EventFilter:
@@ -33,7 +33,7 @@ class ASH_EXPORT MouseCursorEventFilter : public aura::EventFilter {
aura::GestureEvent* event) OVERRIDE;
private:
- DisplayController* display_controller_;
+ MonitorController* monitor_controller_;
DISALLOW_COPY_AND_ASSIGN(MouseCursorEventFilter);
};
@@ -41,4 +41,4 @@ class ASH_EXPORT MouseCursorEventFilter : public aura::EventFilter {
} // namespace internal
} // namespace ash
-#endif // ASH_DISPLAY_MOUSE_CURSOR_EVENT_FILTER_H
+#endif // ASH_MONITOR_MOUSE_CURSOR_EVENT_FILTER_H
diff --git a/ash/display/multi_display_manager.cc b/ash/monitor/multi_monitor_manager.cc
index 54b3d74..70bf90d 100644
--- a/ash/display/multi_display_manager.cc
+++ b/ash/monitor/multi_monitor_manager.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/display/multi_display_manager.h"
+#include "ash/monitor/multi_monitor_manager.h"
#include <string>
#include <vector>
@@ -36,46 +36,46 @@ using aura::Window;
using std::string;
using std::vector;
-DEFINE_WINDOW_PROPERTY_KEY(int, kDisplayIdKey, -1);
+DEFINE_WINDOW_PROPERTY_KEY(int, kMonitorIdKey, -1);
-MultiDisplayManager::MultiDisplayManager() {
+MultiMonitorManager::MultiMonitorManager() {
Init();
}
-MultiDisplayManager::~MultiDisplayManager() {
+MultiMonitorManager::~MultiMonitorManager() {
}
// static
-void MultiDisplayManager::AddRemoveDisplay() {
- MultiDisplayManager* manager = static_cast<MultiDisplayManager*>(
- aura::Env::GetInstance()->display_manager());
- manager->AddRemoveDisplayImpl();
+void MultiMonitorManager::AddRemoveMonitor() {
+ MultiMonitorManager* manager = static_cast<MultiMonitorManager*>(
+ aura::Env::GetInstance()->monitor_manager());
+ manager->AddRemoveMonitorImpl();
}
-void MultiDisplayManager::CycleDisplay() {
- MultiDisplayManager* manager = static_cast<MultiDisplayManager*>(
- aura::Env::GetInstance()->display_manager());
- manager->CycleDisplayImpl();
+void MultiMonitorManager::CycleMonitor() {
+ MultiMonitorManager* manager = static_cast<MultiMonitorManager*>(
+ aura::Env::GetInstance()->monitor_manager());
+ manager->CycleMonitorImpl();
}
- void MultiDisplayManager::ToggleDisplayScale() {
- MultiDisplayManager* manager = static_cast<MultiDisplayManager*>(
- aura::Env::GetInstance()->display_manager());
- manager->ScaleDisplayImpl();
+ void MultiMonitorManager::ToggleMonitorScale() {
+ MultiMonitorManager* manager = static_cast<MultiMonitorManager*>(
+ aura::Env::GetInstance()->monitor_manager());
+ manager->ScaleMonitorImpl();
}
-void MultiDisplayManager::OnNativeDisplaysChanged(
+void MultiMonitorManager::OnNativeMonitorsChanged(
const std::vector<gfx::Display>& new_displays) {
size_t min = std::min(displays_.size(), new_displays.size());
- // For m19, we only care about 1st display as primary, and
- // don't differentiate the rest of displays as all secondary
- // displays have the same content. ID for primary display stays the same
- // because we never remove it, we don't update IDs for other displays
+ // For m19, we only care about 1st monitor as primary, and
+ // don't differentiate the rest of monitors as all secondary
+ // monitors have the same content. ID for primary monitor stays the same
+ // because we never remove it, we don't update IDs for other monitors
// , for now, because they're the same.
// TODO(oshima): Fix this so that we can differentiate outputs
- // and keep a content on one display stays on the same display
- // when a display is added or removed.
+ // and keep a content on one monitor stays on the same monitor
+ // when a monitor is added or removed.
for (size_t i = 0; i < min; ++i) {
gfx::Display& current_display = displays_[i];
const gfx::Display& new_display = new_displays[i];
@@ -89,7 +89,7 @@ void MultiDisplayManager::OnNativeDisplaysChanged(
}
if (displays_.size() < new_displays.size()) {
- // New displays added
+ // New monitors added
for (size_t i = min; i < new_displays.size(); ++i) {
const gfx::Display& new_display = new_displays[i];
displays_.push_back(gfx::Display(new_display.id()));
@@ -102,8 +102,8 @@ void MultiDisplayManager::OnNativeDisplaysChanged(
NotifyDisplayAdded(display);
}
} else {
- // Displays are removed. We keep the display for the primary
- // display (at index 0) because it needs the display information
+ // Monitors are removed. We keep the monitor for the primary
+ // monitor (at index 0) because it needs the monitor information
// even if it doesn't exit.
while (displays_.size() > new_displays.size() && displays_.size() > 1) {
Displays::reverse_iterator iter = displays_.rbegin();
@@ -113,45 +113,45 @@ void MultiDisplayManager::OnNativeDisplaysChanged(
}
}
-RootWindow* MultiDisplayManager::CreateRootWindowForDisplay(
+RootWindow* MultiMonitorManager::CreateRootWindowForMonitor(
const gfx::Display& display) {
RootWindow* root_window = new RootWindow(display.bounds_in_pixel());
// No need to remove RootWindowObserver because
- // the DisplayManager object outlives RootWindow objects.
+ // the MonitorManager object outlives RootWindow objects.
root_window->AddRootWindowObserver(this);
- root_window->SetProperty(kDisplayIdKey, display.id());
+ root_window->SetProperty(kMonitorIdKey, display.id());
root_window->Init();
return root_window;
}
-const gfx::Display& MultiDisplayManager::GetDisplayAt(size_t index) {
+const gfx::Display& MultiMonitorManager::GetDisplayAt(size_t index) {
return index < displays_.size() ? displays_[index] : GetInvalidDisplay();
}
-size_t MultiDisplayManager::GetNumDisplays() const {
+size_t MultiMonitorManager::GetNumDisplays() const {
return displays_.size();
}
-const gfx::Display& MultiDisplayManager::GetDisplayNearestWindow(
+const gfx::Display& MultiMonitorManager::GetDisplayNearestWindow(
const Window* window) const {
if (!window) {
- MultiDisplayManager* manager = const_cast<MultiDisplayManager*>(this);
+ MultiMonitorManager* manager = const_cast<MultiMonitorManager*>(this);
return manager->GetDisplayAt(0);
}
const RootWindow* root = window->GetRootWindow();
- MultiDisplayManager* manager = const_cast<MultiDisplayManager*>(this);
+ MultiMonitorManager* manager = const_cast<MultiMonitorManager*>(this);
return root ? manager->FindDisplayForRootWindow(root) : GetInvalidDisplay();
}
-const gfx::Display& MultiDisplayManager::GetDisplayNearestPoint(
+const gfx::Display& MultiMonitorManager::GetDisplayNearestPoint(
const gfx::Point& point) const {
// TODO(oshima): For m19, mouse is constrained within
// the primary window.
- MultiDisplayManager* manager = const_cast<MultiDisplayManager*>(this);
+ MultiMonitorManager* manager = const_cast<MultiMonitorManager*>(this);
return manager->GetDisplayAt(0);
}
-void MultiDisplayManager::OnRootWindowResized(const aura::RootWindow* root,
+void MultiMonitorManager::OnRootWindowResized(const aura::RootWindow* root,
const gfx::Size& old_size) {
if (!use_fullscreen_host_window()) {
gfx::Display& display = FindDisplayForRootWindow(root);
@@ -160,7 +160,7 @@ void MultiDisplayManager::OnRootWindowResized(const aura::RootWindow* root,
}
}
-bool MultiDisplayManager::UpdateWorkAreaOfDisplayNearestWindow(
+bool MultiMonitorManager::UpdateWorkAreaOfMonitorNearestWindow(
const aura::Window* window,
const gfx::Insets& insets) {
const RootWindow* root = window->GetRootWindow();
@@ -170,23 +170,23 @@ bool MultiDisplayManager::UpdateWorkAreaOfDisplayNearestWindow(
return old_work_area != display.work_area();
}
-void MultiDisplayManager::Init() {
- // TODO(oshima): Move this logic to DisplayChangeObserver.
+void MultiMonitorManager::Init() {
+ // TODO(oshima): Move this logic to MonitorChangeObserver.
const string size_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kAuraHostWindowSize);
vector<string> parts;
base::SplitString(size_str, ',', &parts);
for (vector<string>::const_iterator iter = parts.begin();
iter != parts.end(); ++iter) {
- displays_.push_back(CreateDisplayFromSpec(*iter));
+ displays_.push_back(CreateMonitorFromSpec(*iter));
}
if (displays_.empty())
- displays_.push_back(CreateDisplayFromSpec("" /* default */));
+ displays_.push_back(CreateMonitorFromSpec("" /* default */));
// Force the 1st display to be the primary display (id == 0).
displays_[0].set_id(0);
}
-void MultiDisplayManager::AddRemoveDisplayImpl() {
+void MultiMonitorManager::AddRemoveMonitorImpl() {
std::vector<gfx::Display> new_displays;
if (displays_.size() > 1) {
// Remove if there is more than one display.
@@ -196,13 +196,13 @@ void MultiDisplayManager::AddRemoveDisplayImpl() {
} else {
// Add if there is only one display.
new_displays.push_back(displays_[0]);
- new_displays.push_back(CreateDisplayFromSpec("50+50-1280x768"));
+ new_displays.push_back(CreateMonitorFromSpec("50+50-1280x768"));
}
if (new_displays.size())
- OnNativeDisplaysChanged(new_displays);
+ OnNativeMonitorsChanged(new_displays);
}
-void MultiDisplayManager::CycleDisplayImpl() {
+void MultiMonitorManager::CycleMonitorImpl() {
if (displays_.size() > 1) {
std::vector<gfx::Display> new_displays;
for (Displays::const_iterator iter = displays_.begin() + 1;
@@ -211,11 +211,11 @@ void MultiDisplayManager::CycleDisplayImpl() {
new_displays.push_back(display);
}
new_displays.push_back(displays_.front());
- OnNativeDisplaysChanged(new_displays);
+ OnNativeMonitorsChanged(new_displays);
}
}
-void MultiDisplayManager::ScaleDisplayImpl() {
+void MultiMonitorManager::ScaleMonitorImpl() {
if (displays_.size() > 0) {
std::vector<gfx::Display> new_displays;
for (Displays::const_iterator iter = displays_.begin();
@@ -227,13 +227,13 @@ void MultiDisplayManager::ScaleDisplayImpl() {
display.size().Scale(factor)));
new_displays.push_back(display);
}
- OnNativeDisplaysChanged(new_displays);
+ OnNativeMonitorsChanged(new_displays);
}
}
-gfx::Display& MultiDisplayManager::FindDisplayForRootWindow(
+gfx::Display& MultiMonitorManager::FindDisplayForRootWindow(
const aura::RootWindow* root_window) {
- int id = root_window->GetProperty(kDisplayIdKey);
+ int id = root_window->GetProperty(kMonitorIdKey);
for (Displays::iterator iter = displays_.begin();
iter != displays_.end(); ++iter) {
if ((*iter).id() == id)
diff --git a/ash/display/multi_display_manager.h b/ash/monitor/multi_monitor_manager.h
index 3aae410..3849dfe 100644
--- a/ash/display/multi_display_manager.h
+++ b/ash/monitor/multi_monitor_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_
-#define ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_
+#ifndef ASH_MONITOR_MULTI_MONITOR_MANAGER_H_
+#define ASH_MONITOR_MULTI_MONITOR_MANAGER_H_
#pragma once
#include <vector>
@@ -11,7 +11,7 @@
#include "ash/ash_export.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window_observer.h"
#include "ui/aura/window.h"
@@ -23,31 +23,31 @@ class Display;
namespace ash {
namespace internal {
-// MultiDisplayManager maintains the current display configurations,
+// MultiMonitorManager maintains the current monitor configurations,
// and notifies observers when configuration changes.
// This is exported for unittest.
//
// TODO(oshima): gfx::Screen needs to return translated coordinates
// if the root window is translated. crbug.com/119268.
-class ASH_EXPORT MultiDisplayManager : public aura::DisplayManager,
+class ASH_EXPORT MultiMonitorManager : public aura::MonitorManager,
public aura::RootWindowObserver {
public:
- MultiDisplayManager();
- virtual ~MultiDisplayManager();
+ MultiMonitorManager();
+ virtual ~MultiMonitorManager();
- // Used to emulate display change when run in a desktop environment instead
+ // Used to emulate monitor change when run in a desktop environment instead
// of on a device.
- static void AddRemoveDisplay();
- static void CycleDisplay();
- static void ToggleDisplayScale();
+ static void AddRemoveMonitor();
+ static void CycleMonitor();
+ static void ToggleMonitorScale();
- bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window,
+ bool UpdateWorkAreaOfMonitorNearestWindow(const aura::Window* window,
const gfx::Insets& insets);
- // DisplayManager overrides:
- virtual void OnNativeDisplaysChanged(
+ // MonitorManager overrides:
+ virtual void OnNativeMonitorsChanged(
const std::vector<gfx::Display>& displays) OVERRIDE;
- virtual aura::RootWindow* CreateRootWindowForDisplay(
+ virtual aura::RootWindow* CreateRootWindowForMonitor(
const gfx::Display& display) OVERRIDE;
virtual const gfx::Display& GetDisplayAt(size_t index) OVERRIDE;
@@ -66,19 +66,19 @@ class ASH_EXPORT MultiDisplayManager : public aura::DisplayManager,
typedef std::vector<gfx::Display> Displays;
void Init();
- void AddRemoveDisplayImpl();
- void CycleDisplayImpl();
- void ScaleDisplayImpl();
+ void AddRemoveMonitorImpl();
+ void CycleMonitorImpl();
+ void ScaleMonitorImpl();
gfx::Display& FindDisplayForRootWindow(const aura::RootWindow* root);
Displays displays_;
- DISALLOW_COPY_AND_ASSIGN(MultiDisplayManager);
+ DISALLOW_COPY_AND_ASSIGN(MultiMonitorManager);
};
-extern const aura::WindowProperty<int>* const kDisplayIdKey;
+extern const aura::WindowProperty<int>* const kMonitorIdKey;
} // namespace internal
} // namespace ash
-#endif // ASH_DISPLAY_MULTI_DISPLAY_MANAGER_H_
+#endif // ASH_MONITOR_MULTI_MONITOR_MANAGER_H_
diff --git a/ash/display/multi_display_manager_unittest.cc b/ash/monitor/multi_monitor_manager_unittest.cc
index b1adc53..94a28cd 100644
--- a/ash/display/multi_display_manager_unittest.cc
+++ b/ash/monitor/multi_monitor_manager_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/display/multi_display_manager.h"
+#include "ash/monitor/multi_monitor_manager.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
@@ -20,29 +20,29 @@ namespace test {
using std::vector;
using std::string;
-class MultiDisplayManagerTest : public test::AshTestBase,
+class MultiMonitorManagerTest : public test::AshTestBase,
public aura::DisplayObserver,
public aura::WindowObserver {
public:
- MultiDisplayManagerTest()
+ MultiMonitorManagerTest()
: removed_count_(0U),
root_window_destroyed_(false) {
}
- virtual ~MultiDisplayManagerTest() {}
+ virtual ~MultiMonitorManagerTest() {}
virtual void SetUp() OVERRIDE {
AshTestBase::SetUp();
- display_manager()->AddObserver(this);
+ monitor_manager()->AddObserver(this);
Shell::GetPrimaryRootWindow()->AddObserver(this);
}
virtual void TearDown() OVERRIDE {
Shell::GetPrimaryRootWindow()->RemoveObserver(this);
- display_manager()->RemoveObserver(this);
+ monitor_manager()->RemoveObserver(this);
AshTestBase::TearDown();
}
- aura::DisplayManager* display_manager() {
- return aura::Env::GetInstance()->display_manager();
+ aura::MonitorManager* monitor_manager() {
+ return aura::Env::GetInstance()->monitor_manager();
}
const vector<gfx::Display>& changed() const { return changed_; }
const vector<gfx::Display>& added() const { return added_; }
@@ -86,101 +86,101 @@ class MultiDisplayManagerTest : public test::AshTestBase,
size_t removed_count_;
bool root_window_destroyed_;
- DISALLOW_COPY_AND_ASSIGN(MultiDisplayManagerTest);
+ DISALLOW_COPY_AND_ASSIGN(MultiMonitorManagerTest);
};
-TEST_F(MultiDisplayManagerTest, NativeDisplayTest) {
- aura::DisplayManager::set_use_fullscreen_host_window(true);
+TEST_F(MultiMonitorManagerTest, NativeMonitorTest) {
+ aura::MonitorManager::set_use_fullscreen_host_window(true);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
// Update primary and add seconary.
- UpdateDisplay("0+0-500x500,0+501-400x400");
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
+ UpdateMonitor("0+0-500x500,0+501-400x400");
+ EXPECT_EQ(2U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("1 1 0", GetCountSummary());
- EXPECT_EQ(display_manager()->GetDisplayAt(0).id(), changed()[0].id());
- EXPECT_EQ(display_manager()->GetDisplayAt(1).id(), added()[0].id());
+ EXPECT_EQ(monitor_manager()->GetDisplayAt(0).id(), changed()[0].id());
+ EXPECT_EQ(monitor_manager()->GetDisplayAt(1).id(), added()[0].id());
EXPECT_EQ("0,0 500x500", changed()[0].bounds().ToString());
EXPECT_EQ("0,0 400x400", added()[0].bounds().ToString());
EXPECT_EQ("0,501 400x400", added()[0].bounds_in_pixel().ToString());
reset();
// Delete secondary.
- UpdateDisplay("0+0-500x500");
+ UpdateMonitor("0+0-500x500");
EXPECT_EQ("0 0 1", GetCountSummary());
reset();
// Change primary.
- UpdateDisplay("0+0-1000x600");
+ UpdateMonitor("0+0-1000x600");
EXPECT_EQ("1 0 0", GetCountSummary());
- EXPECT_EQ(display_manager()->GetDisplayAt(0).id(), changed()[0].id());
+ EXPECT_EQ(monitor_manager()->GetDisplayAt(0).id(), changed()[0].id());
EXPECT_EQ("0,0 1000x600", changed()[0].bounds().ToString());
reset();
// Add secondary.
- UpdateDisplay("0+0-1000x600,1001+0-600x400");
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
+ UpdateMonitor("0+0-1000x600,1001+0-600x400");
+ EXPECT_EQ(2U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("0 1 0", GetCountSummary());
- EXPECT_EQ(display_manager()->GetDisplayAt(1).id(), added()[0].id());
+ EXPECT_EQ(monitor_manager()->GetDisplayAt(1).id(), added()[0].id());
EXPECT_EQ("0,0 600x400", added()[0].bounds().ToString());
EXPECT_EQ("1001,0 600x400", added()[0].bounds_in_pixel().ToString());
reset();
// Secondary removed, primary changed.
- UpdateDisplay("0+0-800x300");
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+ UpdateMonitor("0+0-800x300");
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("1 0 1", GetCountSummary());
- EXPECT_EQ(display_manager()->GetDisplayAt(0).id(), changed()[0].id());
+ EXPECT_EQ(monitor_manager()->GetDisplayAt(0).id(), changed()[0].id());
EXPECT_EQ("0,0 800x300", changed()[0].bounds().ToString());
reset();
// # of display can go to zero when screen is off.
const vector<gfx::Display> empty;
- display_manager()->OnNativeDisplaysChanged(empty);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+ monitor_manager()->OnNativeMonitorsChanged(empty);
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("0 0 0", GetCountSummary());
EXPECT_FALSE(root_window_destroyed());
- // Display configuration stays the same
+ // Monitor configuration stays the same
EXPECT_EQ("0,0 800x300",
- display_manager()->GetDisplayAt(0).bounds().ToString());
+ monitor_manager()->GetDisplayAt(0).bounds().ToString());
reset();
- // Connect to display again
- UpdateDisplay("100+100-500x400");
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+ // Connect to monitor again
+ UpdateMonitor("100+100-500x400");
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("1 0 0", GetCountSummary());
EXPECT_FALSE(root_window_destroyed());
EXPECT_EQ("0,0 500x400", changed()[0].bounds().ToString());
EXPECT_EQ("100,100 500x400", changed()[0].bounds_in_pixel().ToString());
reset();
- // Go back to zero and wake up with multiple displays.
- display_manager()->OnNativeDisplaysChanged(empty);
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+ // Go back to zero and wake up with multiple monitors.
+ monitor_manager()->OnNativeMonitorsChanged(empty);
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_FALSE(root_window_destroyed());
reset();
// Add secondary.
- UpdateDisplay("0+0-1000x600,1000+0-600x400");
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
+ UpdateMonitor("0+0-1000x600,1000+0-600x400");
+ EXPECT_EQ(2U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("0,0 1000x600",
- display_manager()->GetDisplayAt(0).bounds().ToString());
+ monitor_manager()->GetDisplayAt(0).bounds().ToString());
EXPECT_EQ("0,0 600x400",
- display_manager()->GetDisplayAt(1).bounds().ToString());
+ monitor_manager()->GetDisplayAt(1).bounds().ToString());
EXPECT_EQ("1000,0 600x400",
- display_manager()->GetDisplayAt(1).bounds_in_pixel().ToString());
+ monitor_manager()->GetDisplayAt(1).bounds_in_pixel().ToString());
reset();
- aura::DisplayManager::set_use_fullscreen_host_window(false);
+ aura::MonitorManager::set_use_fullscreen_host_window(false);
}
// Test in emulation mode (use_fullscreen_host_window=false)
-TEST_F(MultiDisplayManagerTest, EmulatorTest) {
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+TEST_F(MultiMonitorManagerTest, EmulatorTest) {
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
- internal::MultiDisplayManager::AddRemoveDisplay();
+ internal::MultiMonitorManager::AddRemoveMonitor();
// Update primary and add seconary.
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
+ EXPECT_EQ(2U, monitor_manager()->GetNumDisplays());
#if defined(OS_WIN)
// TODO(oshima): Windows receives resize event for some reason.
EXPECT_EQ("1 1 0", GetCountSummary());
@@ -189,22 +189,22 @@ TEST_F(MultiDisplayManagerTest, EmulatorTest) {
#endif
reset();
- internal::MultiDisplayManager::CycleDisplay();
- EXPECT_EQ(2U, display_manager()->GetNumDisplays());
+ internal::MultiMonitorManager::CycleMonitor();
+ EXPECT_EQ(2U, monitor_manager()->GetNumDisplays());
// Observer gets called twice in this mode because
- // it gets notified both from |OnNativeDisplayChagned|
+ // it gets notified both from |OnNativeMonitorChagned|
// and from |RootWindowObserver|, which is the consequence of
// |SetHostSize()|.
EXPECT_EQ("4 0 0", GetCountSummary());
reset();
- internal::MultiDisplayManager::AddRemoveDisplay();
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+ internal::MultiMonitorManager::AddRemoveMonitor();
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("0 0 1", GetCountSummary());
reset();
- internal::MultiDisplayManager::CycleDisplay();
- EXPECT_EQ(1U, display_manager()->GetNumDisplays());
+ internal::MultiMonitorManager::CycleMonitor();
+ EXPECT_EQ(1U, monitor_manager()->GetNumDisplays());
EXPECT_EQ("0 0 0", GetCountSummary());
reset();
}
@@ -216,19 +216,19 @@ TEST_F(MultiDisplayManagerTest, EmulatorTest) {
#define MAYBE_TestDeviceScaleOnlyChange DISABLED_TestDeviceScaleOnlyChange
#endif
-TEST_F(MultiDisplayManagerTest, MAYBE_TestDeviceScaleOnlyChange) {
- aura::DisplayManager::set_use_fullscreen_host_window(true);
- UpdateDisplay("0+0-1000x600");
+TEST_F(MultiMonitorManagerTest, MAYBE_TestDeviceScaleOnlyChange) {
+ aura::MonitorManager::set_use_fullscreen_host_window(true);
+ UpdateMonitor("0+0-1000x600");
EXPECT_EQ(1,
Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor());
EXPECT_EQ("1000x600",
Shell::GetPrimaryRootWindow()->bounds().size().ToString());
- UpdateDisplay("0+0-1000x600*2");
+ UpdateMonitor("0+0-1000x600*2");
EXPECT_EQ(2,
Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor());
EXPECT_EQ("500x300",
Shell::GetPrimaryRootWindow()->bounds().size().ToString());
- aura::DisplayManager::set_use_fullscreen_host_window(false);
+ aura::MonitorManager::set_use_fullscreen_host_window(false);
}
} // namespace test
diff --git a/ash/display/secondary_display_view.cc b/ash/monitor/secondary_monitor_view.cc
index ea8963e..ad9b250 100644
--- a/ash/display/secondary_display_view.cc
+++ b/ash/monitor/secondary_monitor_view.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/display/secondary_display_view.h"
+#include "ash/monitor/secondary_monitor_view.h"
#include "grit/ash_strings.h"
#include "grit/ui_resources.h"
@@ -24,13 +24,13 @@ namespace {
const SkColor kBackgroundColor = SkColorSetRGB(0x33, 0x33, 0x33);
const SkColor kTextColor = SkColorSetRGB(127, 127, 127);
-// A view to be displayed on secondary display.
-class SecondaryDisplayView : public views::WidgetDelegateView {
+// A view to be displayed on secondary monitor.
+class SecondaryMonitorView : public views::WidgetDelegateView {
public:
- SecondaryDisplayView() {
+ SecondaryMonitorView() {
Init();
}
- virtual ~SecondaryDisplayView() {
+ virtual ~SecondaryMonitorView() {
}
void Init() {
@@ -89,22 +89,22 @@ class SecondaryDisplayView : public views::WidgetDelegateView {
views::Label* shortcut_text_;
views::ImageView* shortcut_image_;
- DISALLOW_COPY_AND_ASSIGN(SecondaryDisplayView);
+ DISALLOW_COPY_AND_ASSIGN(SecondaryMonitorView);
};
} // namespace
-views::Widget* CreateSecondaryDisplayWidget(aura::Window* parent) {
+views::Widget* CreateSecondaryMonitorWidget(aura::Window* parent) {
views::Widget* desktop_widget = new views::Widget;
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- SecondaryDisplayView* view = new SecondaryDisplayView();
+ SecondaryMonitorView* view = new SecondaryMonitorView();
params.delegate = view;
params.parent = parent;
desktop_widget->Init(params);
desktop_widget->SetContentsView(view);
desktop_widget->Show();
- desktop_widget->GetNativeView()->SetName("SecondaryDisplay");
+ desktop_widget->GetNativeView()->SetName("SecondaryMonitor");
return desktop_widget;
}
diff --git a/ash/display/secondary_display_view.h b/ash/monitor/secondary_monitor_view.h
index 60db1e0..cca03d2 100644
--- a/ash/display/secondary_display_view.h
+++ b/ash/monitor/secondary_monitor_view.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_DISPLAY_SECONDARY_DISPLAY_VIEW_H_
-#define ASH_DISPLAY_SECONDARY_DISPLAY_VIEW_H_
+#ifndef ASH_MONITOR_SECONDARY_MONITOR_VIEW_H_
+#define ASH_MONITOR_SECONDARY_MONITOR_VIEW_H_
#pragma once
namespace aura {
@@ -17,9 +17,9 @@ class Widget;
namespace ash {
// Creates the widget that hosts the static message displayed on the
-// secondary display.
-views::Widget* CreateSecondaryDisplayWidget(aura::Window* parent);
+// secondary monitor.
+views::Widget* CreateSecondaryMonitorWidget(aura::Window* parent);
} // namespace ash
-#endif // ASH_DISPLAY_SECONDARY_DISPLAY_VIEW_H_
+#endif // ASH_MONITOR_SECONDARY_MONITOR_VIEW_H_
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index 8fd4acc..050f760 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/display/display_controller.h"
-#include "ash/display/multi_display_manager.h"
+#include "ash/monitor/monitor_controller.h"
+#include "ash/monitor/multi_monitor_manager.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/test/ash_test_base.h"
@@ -67,15 +67,15 @@ class RootWindowControllerTest : public test::AshTestBase {
virtual ~RootWindowControllerTest() {}
virtual void SetUp() OVERRIDE {
- internal::DisplayController::SetExtendedDesktopEnabled(true);
- internal::DisplayController::SetVirtualScreenCoordinatesEnabled(true);
+ internal::MonitorController::SetExtendedDesktopEnabled(true);
+ internal::MonitorController::SetVirtualScreenCoordinatesEnabled(true);
AshTestBase::SetUp();
}
virtual void TearDown() OVERRIDE {
AshTestBase::TearDown();
- internal::DisplayController::SetExtendedDesktopEnabled(false);
- internal::DisplayController::SetVirtualScreenCoordinatesEnabled(false);
+ internal::MonitorController::SetExtendedDesktopEnabled(false);
+ internal::MonitorController::SetVirtualScreenCoordinatesEnabled(false);
}
private:
@@ -83,7 +83,7 @@ class RootWindowControllerTest : public test::AshTestBase {
};
TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
- UpdateDisplay("0+0-600x600,600+0-500x500");
+ UpdateMonitor("0+0-600x600,600+0-500x500");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
// Emulate virtual screen coordinate system.
root_windows[0]->SetBounds(gfx::Rect(0, 0, 600, 600));
@@ -114,12 +114,12 @@ TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
EXPECT_EQ("500x500", fullscreen->GetWindowScreenBounds().size().ToString());
#endif
- UpdateDisplay("0+0-600x600");
+ UpdateMonitor("0+0-600x600");
EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow());
EXPECT_EQ("100x100", normal->GetWindowScreenBounds().size().ToString());
- // Maximized area on primary display has 2px (given as
+ // Maximized area on primary monitor has 2px (given as
// kAutoHideSize in shelf_layout_manager.cc) inset at the bottom.
EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow());
EXPECT_EQ("600x598", maximized->GetWindowScreenBounds().size().ToString());
@@ -133,7 +133,7 @@ TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
}
TEST_F(RootWindowControllerTest, MoveWindows_Modal) {
- UpdateDisplay("0+0-500x500,500+0-500x500");
+ UpdateMonitor("0+0-500x500,500+0-500x500");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
// Emulate virtual screen coordinate system.
@@ -154,7 +154,7 @@ TEST_F(RootWindowControllerTest, MoveWindows_Modal) {
generator_1st.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
- UpdateDisplay("0+0-500x500");
+ UpdateMonitor("0+0-500x500");
EXPECT_EQ(root_windows[0], modal->GetNativeView()->GetRootWindow());
EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
generator_1st.ClickLeftButton();
diff --git a/ash/screen_ash.cc b/ash/screen_ash.cc
index c98996a..e444ebf 100644
--- a/ash/screen_ash.cc
+++ b/ash/screen_ash.cc
@@ -8,7 +8,7 @@
#include "ash/wm/shelf_layout_manager.h"
#include "base/logging.h"
#include "ui/aura/env.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
@@ -16,8 +16,8 @@
namespace ash {
namespace {
-aura::DisplayManager* GetDisplayManager() {
- return aura::Env::GetInstance()->display_manager();
+aura::MonitorManager* GetMonitorManager() {
+ return aura::Env::GetInstance()->monitor_manager();
}
} // namespace
@@ -55,19 +55,19 @@ gfx::NativeWindow ScreenAsh::GetWindowAtCursorScreenPoint() {
}
int ScreenAsh::GetNumDisplays() {
- return GetDisplayManager()->GetNumDisplays();
+ return GetMonitorManager()->GetNumDisplays();
}
gfx::Display ScreenAsh::GetDisplayNearestWindow(gfx::NativeView window) const {
- return GetDisplayManager()->GetDisplayNearestWindow(window);
+ return GetMonitorManager()->GetDisplayNearestWindow(window);
}
gfx::Display ScreenAsh::GetDisplayNearestPoint(const gfx::Point& point) const {
- return GetDisplayManager()->GetDisplayNearestPoint(point);
+ return GetMonitorManager()->GetDisplayNearestPoint(point);
}
gfx::Display ScreenAsh::GetPrimaryDisplay() const {
- return GetDisplayManager()->GetDisplayAt(0);
+ return GetMonitorManager()->GetDisplayAt(0);
}
} // namespace ash
diff --git a/ash/shell.cc b/ash/shell.cc
index 35eee4b..d84b700 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -17,10 +17,10 @@
#include "ash/high_contrast/high_contrast_controller.h"
#include "ash/launcher/launcher.h"
#include "ash/magnifier/magnification_controller.h"
-#include "ash/display/display_controller.h"
-#include "ash/display/mouse_cursor_event_filter.h"
-#include "ash/display/multi_display_manager.h"
-#include "ash/display/secondary_display_view.h"
+#include "ash/monitor/monitor_controller.h"
+#include "ash/monitor/mouse_cursor_event_filter.h"
+#include "ash/monitor/multi_monitor_manager.h"
+#include "ash/monitor/secondary_monitor_view.h"
#include "ash/root_window_controller.h"
#include "ash/screen_ash.h"
#include "ash/shell_context_menu.h"
@@ -73,7 +73,7 @@
#include "ui/aura/env.h"
#include "ui/aura/focus_manager.h"
#include "ui/aura/layout_manager.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h"
#include "ui/aura/shared/compound_event_filter.h"
#include "ui/aura/shared/input_method_event_filter.h"
@@ -97,7 +97,7 @@
#endif
#if defined(OS_CHROMEOS)
-#include "chromeos/display/output_configurator.h"
+#include "chromeos/monitor/output_configurator.h"
#include "ui/aura/dispatcher_linux.h"
#endif // defined(OS_CHROMEOS)
@@ -223,7 +223,7 @@ Shell::~Shell() {
app_list_controller_.reset();
// Destroy all child windows including widgets.
- display_controller_->CloseChildWindows();
+ monitor_controller_->CloseChildWindows();
// These need a valid Shell instance to clean up properly, so explicitly
// delete them before invalidating the instance.
@@ -241,7 +241,7 @@ Shell::~Shell() {
visibility_controller_.reset();
// This also deletes all RootWindows.
- display_controller_.reset();
+ monitor_controller_.reset();
// Launcher widget has a InputMethodBridge that references to
// input_method_filter_'s input_method_. So explicitly release launcher_
@@ -268,8 +268,8 @@ Shell::~Shell() {
// static
Shell* Shell::CreateInstance(ShellDelegate* delegate) {
CHECK(!instance_);
- aura::Env::GetInstance()->SetDisplayManager(
- new internal::MultiDisplayManager());
+ aura::Env::GetInstance()->SetMonitorManager(
+ new internal::MultiMonitorManager());
instance_ = new Shell(delegate);
instance_->Init();
return instance_;
@@ -299,13 +299,13 @@ internal::RootWindowController* Shell::GetPrimaryRootWindowController() {
// static
Shell::RootWindowControllerList Shell::GetAllRootWindowControllers() {
- return Shell::GetInstance()->display_controller()->
+ return Shell::GetInstance()->monitor_controller()->
GetAllRootWindowControllers();
}
// static
aura::RootWindow* Shell::GetPrimaryRootWindow() {
- return GetInstance()->display_controller()->GetPrimaryRootWindow();
+ return GetInstance()->monitor_controller()->GetPrimaryRootWindow();
}
// static
@@ -315,7 +315,7 @@ aura::RootWindow* Shell::GetActiveRootWindow() {
// static
aura::RootWindow* Shell::GetRootWindowAt(const gfx::Point& point) {
- if (!internal::DisplayController::IsVirtualScreenCoordinatesEnabled())
+ if (!internal::MonitorController::IsVirtualScreenCoordinatesEnabled())
return GetPrimaryRootWindow();
RootWindowList root_windows = GetAllRootWindows();
for (RootWindowList::const_iterator iter = root_windows.begin();
@@ -331,7 +331,7 @@ aura::RootWindow* Shell::GetRootWindowAt(const gfx::Point& point) {
// static
aura::RootWindow* Shell::GetRootWindowMatching(const gfx::Rect& rect) {
- if (!internal::DisplayController::IsVirtualScreenCoordinatesEnabled())
+ if (!internal::MonitorController::IsVirtualScreenCoordinatesEnabled())
return GetPrimaryRootWindow();
if (rect.IsEmpty())
return GetRootWindowAt(rect.origin());
@@ -354,7 +354,7 @@ aura::RootWindow* Shell::GetRootWindowMatching(const gfx::Rect& rect) {
// static
Shell::RootWindowList Shell::GetAllRootWindows() {
- return Shell::GetInstance()->display_controller()->
+ return Shell::GetInstance()->monitor_controller()->
GetAllRootWindows();
}
@@ -390,9 +390,9 @@ void Shell::Init() {
activation_controller_.reset(
new internal::ActivationController(focus_manager_.get()));
- display_controller_.reset(new internal::DisplayController);
- display_controller_->InitPrimaryDisplay();
- aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow();
+ monitor_controller_.reset(new internal::MonitorController);
+ monitor_controller_->InitPrimaryDisplay();
+ aura::RootWindow* root_window = monitor_controller_->GetPrimaryRootWindow();
active_root_window_ = root_window;
#if !defined(OS_MACOSX)
@@ -457,9 +457,9 @@ void Shell::Init() {
magnification_controller_.reset(
internal::MagnificationController::CreateInstance());
- if (internal::DisplayController::IsExtendedDesktopEnabled()) {
+ if (internal::MonitorController::IsExtendedDesktopEnabled()) {
mouse_cursor_filter_.reset(
- new internal::MouseCursorEventFilter(display_controller_.get()));
+ new internal::MouseCursorEventFilter(monitor_controller_.get()));
AddEnvEventFilter(mouse_cursor_filter_.get());
}
@@ -511,7 +511,7 @@ void Shell::Init() {
power_button_controller_.reset(new PowerButtonController);
AddShellObserver(power_button_controller_.get());
- display_controller_->InitSecondaryDisplays();
+ monitor_controller_->InitSecondaryDisplays();
if (initially_hide_cursor_)
aura::Env::GetInstance()->cursor_manager()->ShowCursor(false);
@@ -580,15 +580,15 @@ void Shell::RotateFocus(Direction direction) {
internal::FocusCycler::BACKWARD);
}
-void Shell::SetDisplayWorkAreaInsets(Window* contains,
+void Shell::SetMonitorWorkAreaInsets(Window* contains,
const gfx::Insets& insets) {
- internal::MultiDisplayManager* display_manager =
- static_cast<internal::MultiDisplayManager*>(
- aura::Env::GetInstance()->display_manager());
- if (!display_manager->UpdateWorkAreaOfDisplayNearestWindow(contains, insets))
+ internal::MultiMonitorManager* monitor_manager =
+ static_cast<internal::MultiMonitorManager*>(
+ aura::Env::GetInstance()->monitor_manager());
+ if (!monitor_manager->UpdateWorkAreaOfMonitorNearestWindow(contains, insets))
return;
FOR_EACH_OBSERVER(ShellObserver, observers_,
- OnDisplayWorkAreaInsetsChanged());
+ OnMonitorWorkAreaInsetsChanged());
}
void Shell::OnLoginStateChanged(user::LoginStatus status) {
@@ -671,9 +671,9 @@ int Shell::GetGridSize() const {
workspace_manager()->grid_size();
}
-void Shell::InitRootWindowForSecondaryDisplay(aura::RootWindow* root) {
+void Shell::InitRootWindowForSecondaryMonitor(aura::RootWindow* root) {
root->set_focus_manager(focus_manager_.get());
- if (internal::DisplayController::IsExtendedDesktopEnabled()) {
+ if (internal::MonitorController::IsExtendedDesktopEnabled()) {
internal::RootWindowController* controller =
new internal::RootWindowController(root);
controller->CreateContainers();
@@ -687,11 +687,11 @@ void Shell::InitRootWindowForSecondaryDisplay(aura::RootWindow* root) {
root->SetFocusWhenShown(false);
root->SetLayoutManager(new internal::RootWindowLayoutManager(root));
aura::Window* container = new aura::Window(NULL);
- container->SetName("SecondaryDisplayContainer");
+ container->SetName("SecondaryMonitorContainer");
container->Init(ui::LAYER_NOT_DRAWN);
root->AddChild(container);
container->SetLayoutManager(new internal::BaseLayoutManager(root));
- CreateSecondaryDisplayWidget(container);
+ CreateSecondaryMonitorWidget(container);
container->Show();
root->layout_manager()->OnWindowResized();
root->ShowRootWindow();
diff --git a/ash/shell.h b/ash/shell.h
index be0a59c..1a0391d 100644
--- a/ash/shell.h
+++ b/ash/shell.h
@@ -83,7 +83,7 @@ class DragDropController;
class FocusCycler;
class KeyRewriterEventFilter;
class MagnificationController;
-class DisplayController;
+class MonitorController;
class MouseCursorEventFilter;
class PanelLayoutManager;
class PartialScreenshotEventFilter;
@@ -219,11 +219,11 @@ class ASH_EXPORT Shell : aura::CursorDelegate {
// Rotates focus through containers that can receive focus.
void RotateFocus(Direction direction);
- // Sets the work area insets of the display that contains |window|,
+ // Sets the work area insets of the monitor that contains |window|,
// this notifies observers too.
// TODO(sky): this no longer really replicates what happens and is unreliable.
// Remove this.
- void SetDisplayWorkAreaInsets(aura::Window* window,
+ void SetMonitorWorkAreaInsets(aura::Window* window,
const gfx::Insets& insets);
// Called when the user logs in.
@@ -279,8 +279,8 @@ class ASH_EXPORT Shell : aura::CursorDelegate {
internal::FocusCycler* focus_cycler() {
return focus_cycler_.get();
}
- internal::DisplayController* display_controller() {
- return display_controller_.get();
+ internal::MonitorController* monitor_controller() {
+ return monitor_controller_.get();
}
ShellDelegate* delegate() { return delegate_.get(); }
@@ -346,8 +346,8 @@ class ASH_EXPORT Shell : aura::CursorDelegate {
browser_context_ = browser_context;
}
- // Initializes the root window to be used for a secondary display.
- void InitRootWindowForSecondaryDisplay(aura::RootWindow* root);
+ // Initializes the root window to be used for a secondary monitor.
+ void InitRootWindowForSecondaryMonitor(aura::RootWindow* root);
#if defined(OS_CHROMEOS)
chromeos::OutputConfigurator* output_configurator() {
@@ -429,7 +429,7 @@ class ASH_EXPORT Shell : aura::CursorDelegate {
scoped_ptr<VideoDetector> video_detector_;
scoped_ptr<WindowCycleController> window_cycle_controller_;
scoped_ptr<internal::FocusCycler> focus_cycler_;
- scoped_ptr<internal::DisplayController> display_controller_;
+ scoped_ptr<internal::MonitorController> monitor_controller_;
scoped_ptr<HighContrastController> high_contrast_controller_;
scoped_ptr<internal::MagnificationController> magnification_controller_;
scoped_ptr<aura::FocusManager> focus_manager_;
diff --git a/ash/shell_observer.h b/ash/shell_observer.h
index 3230bb3..4b73efb 100644
--- a/ash/shell_observer.h
+++ b/ash/shell_observer.h
@@ -14,7 +14,7 @@ namespace ash {
class ASH_EXPORT ShellObserver {
public:
// Invoked after the screen's work area insets changes.
- virtual void OnDisplayWorkAreaInsetsChanged() {}
+ virtual void OnMonitorWorkAreaInsetsChanged() {}
// Invoked when the user logs in.
virtual void OnLoginStateChanged(user::LoginStatus status) {}
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index 45996b2..5b92cd8 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -12,7 +12,7 @@
#include "base/string_split.h"
#include "content/public/test/web_contents_tester.h"
#include "ui/aura/env.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h"
#include "ui/base/ime/text_input_test_support.h"
#include "ui/compositor/layer_animator.h"
@@ -30,7 +30,7 @@ std::vector<gfx::Display> CreateDisplaysFromString(
base::SplitString(specs, ',', &parts);
for (std::vector<std::string>::const_iterator iter = parts.begin();
iter != parts.end(); ++iter) {
- displays.push_back(aura::DisplayManager::CreateDisplayFromSpec(*iter));
+ displays.push_back(aura::MonitorManager::CreateMonitorFromSpec(*iter));
}
return displays;
}
@@ -72,20 +72,20 @@ void AshTestBase::TearDown() {
ui::TextInputTestSupport::Shutdown();
}
-void AshTestBase::ChangeDisplayConfig(float scale,
+void AshTestBase::ChangeMonitorConfig(float scale,
const gfx::Rect& bounds_in_pixel) {
gfx::Display display = gfx::Display(gfx::Screen::GetPrimaryDisplay().id());
display.SetScaleAndBounds(scale, bounds_in_pixel);
std::vector<gfx::Display> displays;
displays.push_back(display);
- aura::Env::GetInstance()->display_manager()->OnNativeDisplaysChanged(
+ aura::Env::GetInstance()->monitor_manager()->OnNativeMonitorsChanged(
displays);
}
-void AshTestBase::UpdateDisplay(const std::string& display_specs) {
+void AshTestBase::UpdateMonitor(const std::string& display_specs) {
std::vector<gfx::Display> displays = CreateDisplaysFromString(display_specs);
- aura::Env::GetInstance()->display_manager()->
- OnNativeDisplaysChanged(displays);
+ aura::Env::GetInstance()->monitor_manager()->
+ OnNativeMonitorsChanged(displays);
}
void AshTestBase::RunAllPendingInMessageLoop() {
diff --git a/ash/test/ash_test_base.h b/ash/test/ash_test_base.h
index e26d2c3..559b370 100644
--- a/ash/test/ash_test_base.h
+++ b/ash/test/ash_test_base.h
@@ -36,16 +36,16 @@ class AshTestBase : public testing::Test {
virtual void SetUp() OVERRIDE;
virtual void TearDown() OVERRIDE;
- // Change the primary display's configuration to use |bounds|
+ // Change the primary monitor's configuration to use |bounds|
// and |scale|.
- void ChangeDisplayConfig(float scale, const gfx::Rect& bounds);
+ void ChangeMonitorConfig(float scale, const gfx::Rect& bounds);
// Update the display configuration as given in |display_specs|. The
// format of |display_spec| is a list of comma separated spec for
// each displays. Please refer to the comment in
- // | aura::DisplayManager::CreateDisplayFromSpec| for the format of
+ // | aura::MonitorManager::CreateMonitorFromSpec| for the format of
// the display spec.
- void UpdateDisplay(const std::string& display_specs);
+ void UpdateMonitor(const std::string& display_specs);
protected:
void RunAllPendingInMessageLoop();
diff --git a/ash/tooltips/tooltip_controller.cc b/ash/tooltips/tooltip_controller.cc
index 4798cd33..64ca6f0 100644
--- a/ash/tooltips/tooltip_controller.cc
+++ b/ash/tooltips/tooltip_controller.cc
@@ -66,9 +66,9 @@ gfx::Font GetDefaultFont() {
int GetMaxWidth(int x, int y) {
// TODO(varunjain): implementation duplicated in tooltip_manager_aura. Figure
// out a way to merge.
- gfx::Rect display_bounds =
+ gfx::Rect monitor_bounds =
gfx::Screen::GetDisplayNearestPoint(gfx::Point(x, y)).bounds();
- return (display_bounds.width() + 1) / 2;
+ return (monitor_bounds.width() + 1) / 2;
}
// Creates a widget of type TYPE_TOOLTIP
@@ -155,22 +155,22 @@ class TooltipController::Tooltip {
tooltip_height);
tooltip_rect.Offset(kCursorOffsetX, kCursorOffsetY);
- gfx::Rect display_bounds =
+ gfx::Rect monitor_bounds =
gfx::Screen::GetDisplayNearestPoint(tooltip_rect.origin()).bounds();
// If tooltip is out of bounds on the x axis, we simply shift it
// horizontally by the offset.
- if (tooltip_rect.right() > display_bounds.right()) {
- int h_offset = tooltip_rect.right() - display_bounds.right();
+ if (tooltip_rect.right() > monitor_bounds.right()) {
+ int h_offset = tooltip_rect.right() - monitor_bounds.right();
tooltip_rect.Offset(-h_offset, 0);
}
// If tooltip is out of bounds on the y axis, we flip it to appear above the
// mouse cursor instead of below.
- if (tooltip_rect.bottom() > display_bounds.bottom())
+ if (tooltip_rect.bottom() > monitor_bounds.bottom())
tooltip_rect.set_y(mouse_pos.y() - tooltip_height);
- widget_->SetBounds(tooltip_rect.AdjustToFit(display_bounds));
+ widget_->SetBounds(tooltip_rect.AdjustToFit(monitor_bounds));
}
};
diff --git a/ash/wm/base_layout_manager.cc b/ash/wm/base_layout_manager.cc
index 29d39a0d..4e39fff 100644
--- a/ash/wm/base_layout_manager.cc
+++ b/ash/wm/base_layout_manager.cc
@@ -120,7 +120,7 @@ void BaseLayoutManager::OnRootWindowResized(const aura::RootWindow* root,
/////////////////////////////////////////////////////////////////////////////
// BaseLayoutManager, ash::ShellObserver overrides:
-void BaseLayoutManager::OnDisplayWorkAreaInsetsChanged() {
+void BaseLayoutManager::OnMonitorWorkAreaInsetsChanged() {
AdjustWindowSizesForScreenChange();
}
@@ -222,8 +222,8 @@ void BaseLayoutManager::MaybeAnimateToBounds(aura::Window* window,
}
void BaseLayoutManager::AdjustWindowSizesForScreenChange() {
- // If a user plugs an external display into a laptop running Aura the
- // display size will change. Maximized windows need to resize to match.
+ // If a user plugs an external monitor into a laptop running Aura the
+ // monitor size will change. Maximized windows need to resize to match.
// We also do this when developers running Aura on a desktop manually resize
// the host window.
// We also need to do this when the work area insets changes.
@@ -238,10 +238,10 @@ void BaseLayoutManager::AdjustWindowSizesForScreenChange() {
window, gfx::Screen::GetDisplayNearestWindow(window).bounds());
} else {
// The work area may be smaller than the full screen.
- gfx::Rect display_rect =
+ gfx::Rect monitor_rect =
gfx::Screen::GetDisplayNearestWindow(window).work_area();
- // Put as much of the window as possible within the display area.
- window->SetBounds(window->bounds().AdjustToFit(display_rect));
+ // Put as much of the window as possible within the monitor area.
+ window->SetBounds(window->bounds().AdjustToFit(monitor_rect));
}
}
}
diff --git a/ash/wm/base_layout_manager.h b/ash/wm/base_layout_manager.h
index 8ba5f5c..becf24a 100644
--- a/ash/wm/base_layout_manager.h
+++ b/ash/wm/base_layout_manager.h
@@ -57,7 +57,7 @@ class ASH_EXPORT BaseLayoutManager : public aura::LayoutManager,
const gfx::Size& old_size) OVERRIDE;
// ash::ShellObserver overrides:
- virtual void OnDisplayWorkAreaInsetsChanged() OVERRIDE;
+ virtual void OnMonitorWorkAreaInsetsChanged() OVERRIDE;
// WindowObserver overrides:
virtual void OnWindowPropertyChanged(aura::Window* window,
diff --git a/ash/wm/base_layout_manager_unittest.cc b/ash/wm/base_layout_manager_unittest.cc
index 2de08af..626aa66 100644
--- a/ash/wm/base_layout_manager_unittest.cc
+++ b/ash/wm/base_layout_manager_unittest.cc
@@ -29,7 +29,7 @@ class BaseLayoutManagerTest : public test::AshTestBase {
virtual void SetUp() OVERRIDE {
test::AshTestBase::SetUp();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
+ Shell::GetInstance()->SetMonitorWorkAreaInsets(
Shell::GetPrimaryRootWindow(),
gfx::Insets(1, 2, 3, 4));
Shell::GetPrimaryRootWindow()->SetHostSize(gfx::Size(800, 600));
@@ -53,7 +53,7 @@ TEST_F(BaseLayoutManagerTest, Maximize) {
gfx::Rect bounds(100, 100, 200, 200);
scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- // Maximized window fills the work area, not the whole display.
+ // Maximized window fills the work area, not the whole monitor.
EXPECT_EQ(ScreenAsh::GetMaximizedWindowBounds(window.get()).ToString(),
window->bounds().ToString());
window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
@@ -93,7 +93,7 @@ TEST_F(BaseLayoutManagerTest, Fullscreen) {
gfx::Rect bounds(100, 100, 200, 200);
scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
- // Fullscreen window fills the whole display.
+ // Fullscreen window fills the whole monitor.
EXPECT_EQ(
gfx::Screen::GetDisplayNearestWindow(window.get()).bounds().ToString(),
window->bounds().ToString());
@@ -105,12 +105,12 @@ TEST_F(BaseLayoutManagerTest, Fullscreen) {
TEST_F(BaseLayoutManagerTest, FullscreenRootWindowResize) {
gfx::Rect bounds(100, 100, 200, 200);
scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
- // Fullscreen window fills the whole display.
+ // Fullscreen window fills the whole monitor.
window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
EXPECT_EQ(
gfx::Screen::GetDisplayNearestWindow(window.get()).bounds().ToString(),
window->bounds().ToString());
- // Enlarge the root window. We should still match the display size.
+ // Enlarge the root window. We should still match the monitor size.
Shell::GetPrimaryRootWindow()->SetHostSize(gfx::Size(800, 600));
EXPECT_EQ(
gfx::Screen::GetDisplayNearestWindow(window.get()).bounds().ToString(),
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc
index 98e0007..617b22ea 100644
--- a/ash/wm/frame_painter.cc
+++ b/ash/wm/frame_painter.cc
@@ -376,8 +376,8 @@ void FramePainter::PaintHeader(views::NonClientFrameView* view,
// We don't need the extra lightness in the edges when we're at the top edge
// of the screen.
- // TODO(oshima): This will not work under multi-display, need to add method
- // like GetWindowBoundsInDisplay().
+ // TODO(oshima): This will not work under multi-monitor, need to add method
+ // like GetWindowBoundsInMonitor().
if (frame_->GetWindowScreenBounds().y() == 0)
return;
diff --git a/ash/wm/screen_dimmer.h b/ash/wm/screen_dimmer.h
index 46bed1f..daa60ea0 100644
--- a/ash/wm/screen_dimmer.h
+++ b/ash/wm/screen_dimmer.h
@@ -24,7 +24,7 @@ namespace ash {
namespace internal {
// ScreenDimmer displays a partially-opaque layer above everything
-// else in the root window to darken the display. It shouldn't be used
+// else in the root window to darken the monitor. It shouldn't be used
// for long-term brightness adjustments due to performance
// considerations -- it's only intended for cases where we want to
// briefly dim the screen (e.g. to indicate to the user that we're
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index 156fad1..3c3246f 100644
--- a/ash/wm/shelf_layout_manager.cc
+++ b/ash/wm/shelf_layout_manager.cc
@@ -206,7 +206,7 @@ bool ShelfLayoutManager::SetAlignment(ShelfAlignment alignment) {
}
gfx::Rect ShelfLayoutManager::GetIdealBounds() {
- // TODO: this is wrong. Figure out what display shelf is on and everything
+ // TODO: this is wrong. Figure out what monitor shelf is on and everything
// should be based on it.
gfx::Rect bounds(
gfx::Screen::GetDisplayNearestWindow(status_->GetNativeView()).bounds());
@@ -239,7 +239,7 @@ void ShelfLayoutManager::LayoutShelf() {
}
GetLayer(status_)->SetOpacity(target_bounds.opacity);
status_->SetBounds(target_bounds.status_bounds);
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
+ Shell::GetInstance()->SetMonitorWorkAreaInsets(
Shell::GetPrimaryRootWindow(),
target_bounds.work_area_insets);
UpdateHitTestBounds();
@@ -384,7 +384,7 @@ void ShelfLayoutManager::SetState(VisibilityState visibility_state) {
status_animation_setter.SetTweenType(ui::Tween::EASE_OUT);
GetLayer(status_)->SetBounds(target_bounds.status_bounds);
GetLayer(status_)->SetOpacity(target_bounds.opacity);
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
+ Shell::GetInstance()->SetMonitorWorkAreaInsets(
Shell::GetPrimaryRootWindow(),
target_bounds.work_area_insets);
UpdateHitTestBounds();
diff --git a/ash/wm/shelf_layout_manager_unittest.cc b/ash/wm/shelf_layout_manager_unittest.cc
index 898cc2a..ff61d3f 100644
--- a/ash/wm/shelf_layout_manager_unittest.cc
+++ b/ash/wm/shelf_layout_manager_unittest.cc
@@ -14,7 +14,7 @@
#include "ash/test/ash_test_base.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h"
#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
@@ -92,8 +92,8 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) {
gfx::Rect launcher_bounds(shelf->launcher_widget()->GetWindowScreenBounds());
int shelf_height = shelf->GetIdealBounds().height();
- const aura::DisplayManager* manager =
- aura::Env::GetInstance()->display_manager();
+ const aura::MonitorManager* manager =
+ aura::Env::GetInstance()->monitor_manager();
const gfx::Display& display =
manager->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
ASSERT_NE(-1, display.id());
@@ -144,8 +144,8 @@ TEST_F(ShelfLayoutManagerTest, LayoutShelfWhileAnimating) {
shelf->LayoutShelf();
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
- const aura::DisplayManager* manager =
- aura::Env::GetInstance()->display_manager();
+ const aura::MonitorManager* manager =
+ aura::Env::GetInstance()->monitor_manager();
const gfx::Display& display =
manager->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
@@ -326,25 +326,25 @@ TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) {
widget->Init(params);
widget->Show();
aura::Window* window = widget->GetNativeWindow();
- gfx::Rect display_bounds(
+ gfx::Rect monitor_bounds(
gfx::Screen::GetDisplayNearestWindow(window).bounds());
- EXPECT_EQ(display_bounds.bottom() - ShelfLayoutManager::kAutoHideSize,
+ EXPECT_EQ(monitor_bounds.bottom() - ShelfLayoutManager::kAutoHideSize,
shelf->GetMaximizedWindowBounds(window).bottom());
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(display_bounds.bottom() - ShelfLayoutManager::kAutoHideSize,
+ EXPECT_EQ(monitor_bounds.bottom() - ShelfLayoutManager::kAutoHideSize,
shelf->GetMaximizedWindowBounds(window).bottom());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT);
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
- EXPECT_EQ(display_bounds.bottom() - ShelfLayoutManager::kAutoHideSize,
+ EXPECT_EQ(monitor_bounds.bottom() - ShelfLayoutManager::kAutoHideSize,
shelf->GetMaximizedWindowBounds(window).bottom());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
- EXPECT_GT(display_bounds.bottom() - ShelfLayoutManager::kAutoHideSize,
+ EXPECT_GT(monitor_bounds.bottom() - ShelfLayoutManager::kAutoHideSize,
shelf->GetMaximizedWindowBounds(window).bottom());
widget->Maximize();
@@ -498,8 +498,8 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
shelf->SetAlignment(SHELF_ALIGNMENT_LEFT);
gfx::Rect launcher_bounds(shelf->launcher_widget()->GetWindowScreenBounds());
- const aura::DisplayManager* manager =
- aura::Env::GetInstance()->display_manager();
+ const aura::MonitorManager* manager =
+ aura::Env::GetInstance()->monitor_manager();
gfx::Display display =
manager->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
ASSERT_NE(-1, display.id());
diff --git a/ash/wm/stacking_controller.cc b/ash/wm/stacking_controller.cc
index 6d44525..368c9b5 100644
--- a/ash/wm/stacking_controller.cc
+++ b/ash/wm/stacking_controller.cc
@@ -4,7 +4,7 @@
#include "ash/wm/stacking_controller.h"
-#include "ash/display/display_controller.h"
+#include "ash/monitor/monitor_controller.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/always_on_top_controller.h"
@@ -23,7 +23,7 @@ namespace {
// that matches the window's bound will be used. Otherwise, it'll
// return the active root window.
aura::RootWindow* FindContainerRoot(const gfx::Rect& bounds) {
- if (!DisplayController::IsVirtualScreenCoordinatesEnabled() ||
+ if (!MonitorController::IsVirtualScreenCoordinatesEnabled() ||
(bounds.origin().x() == 0 && bounds.origin().y() == 0
&& bounds.IsEmpty())) {
return Shell::GetActiveRootWindow();
diff --git a/ash/wm/toplevel_window_event_filter_unittest.cc b/ash/wm/toplevel_window_event_filter_unittest.cc
index ca9aeeb..fc8984b 100644
--- a/ash/wm/toplevel_window_event_filter_unittest.cc
+++ b/ash/wm/toplevel_window_event_filter_unittest.cc
@@ -402,7 +402,7 @@ TEST_F(ToplevelWindowEventFilterTest, DontDragToNegativeY) {
EXPECT_EQ(100, target->bounds().height());
}
-// Verifies we don't let windows go bigger than the display width.
+// Verifies we don't let windows go bigger than the monitor width.
TEST_F(ToplevelWindowEventFilterTest, DontGotWiderThanScreen) {
scoped_ptr<aura::Window> target(CreateWindow(HTRIGHT));
gfx::Rect work_area =
diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc
index df28ec7..7e62d23 100644
--- a/ash/wm/window_resizer.cc
+++ b/ash/wm/window_resizer.cc
@@ -292,7 +292,7 @@ int WindowResizer::GetWidthForDrag(const Details& details,
*delta_x = -x_multiplier * (details.initial_bounds.width() - min_width);
}
- // And don't let the window go bigger than the display.
+ // And don't let the window go bigger than the monitor.
int max_width =
gfx::Screen::GetDisplayNearestWindow(details.window).bounds().width();
if (width > max_width) {
@@ -326,7 +326,7 @@ int WindowResizer::GetHeightForDrag(const Details& details,
*delta_y = -y_multiplier * (details.initial_bounds.height() - min_height);
}
- // And don't let the window go bigger than the display.
+ // And don't let the window go bigger than the monitor.
int max_height =
gfx::Screen::GetDisplayNearestWindow(details.window).bounds().height();
if (height > max_height) {
diff --git a/ash/wm/window_util.h b/ash/wm/window_util.h
index 2f611b8..e0bd718 100644
--- a/ash/wm/window_util.h
+++ b/ash/wm/window_util.h
@@ -56,7 +56,7 @@ ASH_EXPORT void MinimizeWindow(aura::Window* window);
// Restores |window|, which must not be NULL.
ASH_EXPORT void RestoreWindow(aura::Window* window);
-// Moves the window to the center of the display.
+// Moves the window to the center of the monitor.
ASH_EXPORT void CenterWindow(aura::Window* window);
} // namespace wm
diff --git a/ash/wm/workspace/snap_sizer.cc b/ash/wm/workspace/snap_sizer.cc
index c303f1d..092ba697 100644
--- a/ash/wm/workspace/snap_sizer.cc
+++ b/ash/wm/workspace/snap_sizer.cc
@@ -129,7 +129,7 @@ gfx::Rect SnapSizer::GetTargetBoundsForPercent(int percent_index) const {
}
bool SnapSizer::AlongEdge(int x) const {
- // TODO: need to support multi-display.
+ // TODO: need to support multi-monitor.
gfx::Rect area(gfx::Screen::GetDisplayNearestWindow(window_).bounds());
return (x <= area.x()) || (x >= area.right() - 1);
}
diff --git a/ash/wm/workspace/workspace_manager.cc b/ash/wm/workspace/workspace_manager.cc
index 016244a..1eccfe6 100644
--- a/ash/wm/workspace/workspace_manager.cc
+++ b/ash/wm/workspace/workspace_manager.cc
@@ -141,7 +141,7 @@ WorkspaceManager::WindowState WorkspaceManager::GetWindowState() {
if (!shelf_ || !active_workspace_)
return WINDOW_STATE_DEFAULT;
- // TODO: this code needs to be made multi-display aware.
+ // TODO: this code needs to be made multi-monitor aware.
gfx::Rect shelf_bounds(shelf_->GetIdealBounds());
const aura::Window::Windows& windows(contents_view_->children());
bool window_overlaps_launcher = false;
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index 26d957c..9b52030 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -286,7 +286,7 @@ void WorkspaceWindowResizer::AdjustBoundsForMainWindow(
if (bounds->y() > max_y)
bounds->set_y(max_y);
- // Don't allow dragging above the top of the display.
+ // Don't allow dragging above the top of the monitor.
if (bounds->y() <= work_area.y())
bounds->set_y(work_area.y());
@@ -419,8 +419,8 @@ void WorkspaceWindowResizer::RestackWindows() {
WorkspaceWindowResizer::SnapType WorkspaceWindowResizer::GetSnapType(
const gfx::Point& location) const {
- // TODO: this likely only wants total display area, not the area of a single
- // display.
+ // TODO: this likely only wants total monitor area, not the area of a single
+ // monitor.
gfx::Rect area(
gfx::Screen::GetDisplayNearestWindow(details_.window).bounds());
if (location.x() <= area.x())
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index eed78ae..d3654c0 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -55,7 +55,7 @@ class WorkspaceWindowResizerTest : public test::AshTestBase {
gfx::Rect root_bounds(root->bounds());
EXPECT_EQ(kRootHeight, root_bounds.height());
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
+ Shell::GetInstance()->SetMonitorWorkAreaInsets(root, gfx::Insets());
window_.reset(new aura::Window(&delegate_));
window_->Init(ui::LAYER_NOT_DRAWN);
window_->SetParent(root);
@@ -347,13 +347,13 @@ TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_2) {
// Assertions around attached window resize dragging from the bottom with 3
// windows.
// TODO(oshima): Host window doesn't get a resize event after
-// SetHostSize on Windows trybot, which gives wrong work/display area.
+// SetHostSize on Windows trybot, which gives wrong work/monitor area.
TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3) {
aura::RootWindow* root = Shell::GetPrimaryRootWindow();
root->SetHostSize(gfx::Size(600, 800));
LOG(ERROR) << "=== Calling OnHostResized, 600x800";
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
+ Shell::GetInstance()->SetMonitorWorkAreaInsets(root, gfx::Insets());
window_->SetBounds(gfx::Rect( 300, 100, 300, 200));
window2_->SetBounds(gfx::Rect(300, 300, 200, 150));
@@ -496,7 +496,7 @@ TEST_F(WorkspaceWindowResizerTest, RestackAttached) {
// Makes sure we don't allow dragging below the work area.
TEST_F(WorkspaceWindowResizerTest, DontDragOffBottom) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
+ Shell::GetInstance()->SetMonitorWorkAreaInsets(
Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 10, 0));
window_->SetBounds(gfx::Rect(100, 200, 300, 400));
@@ -513,7 +513,7 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffBottom) {
// Makes sure we don't allow dragging off the top of the work area.
TEST_F(WorkspaceWindowResizerTest, DontDragOffTop) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
+ Shell::GetInstance()->SetMonitorWorkAreaInsets(
Shell::GetPrimaryRootWindow(), gfx::Insets(10, 0, 0, 0));
window_->SetBounds(gfx::Rect(100, 200, 300, 400));
@@ -526,7 +526,7 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffTop) {
}
TEST_F(WorkspaceWindowResizerTest, ResizeBottomOutsideWorkArea) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
+ Shell::GetInstance()->SetMonitorWorkAreaInsets(
Shell::GetPrimaryRootWindow(), gfx::Insets(0, 0, 50, 0));
window_->SetBounds(gfx::Rect(100, 200, 300, 380));
@@ -595,7 +595,7 @@ TEST_F(WorkspaceWindowResizerTest, SnapToEdge) {
// the work area.
TEST_F(WorkspaceWindowResizerTest, TallWindow) {
aura::RootWindow* root = Shell::GetPrimaryRootWindow();
- Shell::GetInstance()->SetDisplayWorkAreaInsets(
+ Shell::GetInstance()->SetMonitorWorkAreaInsets(
root, gfx::Insets(0, 0, 50, 0));
window_->SetBounds(gfx::Rect(0, 0, 320, 560));
SetGridSize(16);