summaryrefslogtreecommitdiffstats
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
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
-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
-rw-r--r--chrome/browser/chromeos/power/output_observer.cc2
-rw-r--r--chrome/browser/ui/ash/ash_init.cc4
-rw-r--r--chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc4
-rw-r--r--chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc4
-rw-r--r--chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc42
-rw-r--r--chromeos/chromeos.gyp4
-rw-r--r--chromeos/monitor/DEPS (renamed from chromeos/display/DEPS)0
-rw-r--r--chromeos/monitor/output_configurator.cc (renamed from chromeos/display/output_configurator.cc)8
-rw-r--r--chromeos/monitor/output_configurator.h (renamed from chromeos/display/output_configurator.h)8
-rw-r--r--ui/aura/aura.gyp12
-rw-r--r--ui/aura/bench/bench_main.cc8
-rw-r--r--ui/aura/demo/demo_main.cc6
-rw-r--r--ui/aura/display_observer.h8
-rw-r--r--ui/aura/env.cc14
-rw-r--r--ui/aura/env.h14
-rw-r--r--ui/aura/monitor_change_observer_x11.cc (renamed from ui/aura/display_change_observer_x11.cc)24
-rw-r--r--ui/aura/monitor_change_observer_x11.h (renamed from ui/aura/display_change_observer_x11.h)20
-rw-r--r--ui/aura/monitor_manager.cc (renamed from ui/aura/display_manager.cc)32
-rw-r--r--ui/aura/monitor_manager.h (renamed from ui/aura/display_manager.h)46
-rw-r--r--ui/aura/root_window.cc14
-rw-r--r--ui/aura/single_monitor_manager.cc (renamed from ui/aura/single_display_manager.cc)32
-rw-r--r--ui/aura/single_monitor_manager.h (renamed from ui/aura/single_display_manager.h)24
-rw-r--r--ui/aura/test/aura_test_helper.cc8
-rw-r--r--ui/aura/window.cc2
-rw-r--r--ui/aura/window.h2
-rw-r--r--ui/views/widget/native_widget_aura_unittest.cc2
64 files changed, 552 insertions, 550 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);
diff --git a/chrome/browser/chromeos/power/output_observer.cc b/chrome/browser/chromeos/power/output_observer.cc
index 9b8c221..1896495 100644
--- a/chrome/browser/chromeos/power/output_observer.cc
+++ b/chrome/browser/chromeos/power/output_observer.cc
@@ -6,7 +6,7 @@
#include "ash/shell.h"
#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/display/output_configurator.h"
+#include "chromeos/monitor/output_configurator.h"
namespace chromeos {
diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc
index 97f6f16..5bf0b0a 100644
--- a/chrome/browser/ui/ash/ash_init.cc
+++ b/chrome/browser/ui/ash/ash_init.cc
@@ -21,7 +21,7 @@
#include "chrome/common/chrome_switches.h"
#include "ui/aura/aura_switches.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/compositor/compositor_setup.h"
@@ -54,7 +54,7 @@ void OpenAsh() {
#endif
if (use_fullscreen) {
- aura::DisplayManager::set_use_fullscreen_host_window(true);
+ aura::MonitorManager::set_use_fullscreen_host_window(true);
#if defined(OS_CHROMEOS)
aura::RootWindow::set_hide_host_cursor(true);
// Hide the mouse cursor completely at boot.
diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
index 3c9bea2..056271d 100644
--- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
@@ -12,7 +12,7 @@
#include "ui/aura/desktop/desktop_screen.h"
#include "ui/aura/desktop/desktop_stacking_client.h"
#include "ui/aura/env.h"
-#include "ui/aura/single_display_manager.h"
+#include "ui/aura/single_monitor_manager.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/native_widget_aura.h"
#if defined(OS_LINUX)
@@ -30,7 +30,7 @@ ChromeBrowserMainExtraPartsAura::~ChromeBrowserMainExtraPartsAura() {
void ChromeBrowserMainExtraPartsAura::PreProfileInit() {
#if !defined(USE_ASH)
gfx::Screen::SetInstance(aura::CreateDesktopScreen());
- aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager);
+ aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager);
stacking_client_.reset(new aura::DesktopStackingClient);
#endif // !USE_ASH
diff --git a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
index 61acf54..506a0ea 100644
--- a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
+++ b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
@@ -10,7 +10,7 @@
#include "ui/aura/desktop/desktop_stacking_client.h"
#include "ui/aura/desktop/desktop_screen.h"
#include "ui/aura/env.h"
-#include "ui/aura/single_display_manager.h"
+#include "ui/aura/single_monitor_manager.h"
#include "ui/gfx/screen.h"
ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() {
@@ -23,7 +23,7 @@ void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
if (browser::ShouldOpenAshOnStartup()) {
browser::OpenAsh();
} else {
- aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager);
+ aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager);
stacking_client_.reset(new aura::DesktopStackingClient);
gfx::Screen::SetInstance(aura::CreateDesktopScreen());
}
diff --git a/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
index d9bdd8c..835b742 100644
--- a/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
@@ -6,16 +6,16 @@
#include <string>
-#include "ash/display/display_controller.h"
+#include "ash/monitor/monitor_controller.h"
#include "ash/shell.h"
#include "base/logging.h"
#include "base/json/json_value_converter.h"
#include "base/values.h"
-#include "chromeos/display/output_configurator.h"
+#include "chromeos/monitor/output_configurator.h"
#include "content/public/browser/web_ui.h"
#include "grit/generated_resources.h"
#include "ui/aura/env.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/display.h"
#include "ui/gfx/rect.h"
@@ -23,14 +23,14 @@
namespace chromeos {
namespace options2 {
-using ash::internal::DisplayController;
+using ash::internal::MonitorController;
DisplayOptionsHandler::DisplayOptionsHandler() {
- aura::Env::GetInstance()->display_manager()->AddObserver(this);
+ aura::Env::GetInstance()->monitor_manager()->AddObserver(this);
}
DisplayOptionsHandler::~DisplayOptionsHandler() {
- aura::Env::GetInstance()->display_manager()->RemoveObserver(this);
+ aura::Env::GetInstance()->monitor_manager()->RemoveObserver(this);
}
void DisplayOptionsHandler::GetLocalizedValues(
@@ -80,13 +80,13 @@ void DisplayOptionsHandler::OnDisplayRemoved(const gfx::Display& old_display) {
}
void DisplayOptionsHandler::UpdateDisplaySectionVisibility() {
- aura::DisplayManager* display_manager =
- aura::Env::GetInstance()->display_manager();
+ aura::MonitorManager* monitor_manager =
+ aura::Env::GetInstance()->monitor_manager();
chromeos::State output_state =
ash::Shell::GetInstance()->output_configurator()->output_state();
base::FundamentalValue show_options(
- DisplayController::IsExtendedDesktopEnabled() &&
- display_manager->GetNumDisplays() > 1 &&
+ MonitorController::IsExtendedDesktopEnabled() &&
+ monitor_manager->GetNumDisplays() > 1 &&
output_state != chromeos::STATE_INVALID &&
output_state != chromeos::STATE_HEADLESS &&
output_state != chromeos::STATE_SINGLE);
@@ -95,16 +95,16 @@ void DisplayOptionsHandler::UpdateDisplaySectionVisibility() {
}
void DisplayOptionsHandler::SendDisplayInfo() {
- aura::DisplayManager* display_manager =
- aura::Env::GetInstance()->display_manager();
+ aura::MonitorManager* monitor_manager =
+ aura::Env::GetInstance()->monitor_manager();
chromeos::OutputConfigurator* output_configurator =
ash::Shell::GetInstance()->output_configurator();
base::FundamentalValue mirroring(
output_configurator->output_state() == chromeos::STATE_DUAL_MIRROR);
base::ListValue displays;
- for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) {
- const gfx::Display& display = display_manager->GetDisplayAt(i);
+ for (size_t i = 0; i < monitor_manager->GetNumDisplays(); ++i) {
+ const gfx::Display& display = monitor_manager->GetDisplayAt(i);
const gfx::Rect& bounds = display.bounds();
base::DictionaryValue* js_display = new base::DictionaryValue();
js_display->SetDouble("id", display.id());
@@ -115,10 +115,10 @@ void DisplayOptionsHandler::SendDisplayInfo() {
displays.Set(i, js_display);
}
- DisplayController* display_controller =
- ash::Shell::GetInstance()->display_controller();
+ MonitorController* monitor_controller =
+ ash::Shell::GetInstance()->monitor_controller();
base::FundamentalValue layout(static_cast<int>(
- display_controller->secondary_display_layout()));
+ monitor_controller->secondary_display_layout()));
web_ui()->CallJavascriptFunction(
"options.DisplayOptions.setDisplayInfo",
@@ -148,11 +148,11 @@ void DisplayOptionsHandler::HandleDisplayLayout(const base::ListValue* args) {
LOG(ERROR) << "Invalid parameter";
return;
}
- DCHECK_LE(DisplayController::TOP, layout);
- DCHECK_GE(DisplayController::LEFT, layout);
+ DCHECK_LE(MonitorController::TOP, layout);
+ DCHECK_GE(MonitorController::LEFT, layout);
- ash::Shell::GetInstance()->display_controller()->SetSecondaryDisplayLayout(
- static_cast<DisplayController::SecondaryDisplayLayout>(layout));
+ ash::Shell::GetInstance()->monitor_controller()->SetSecondaryDisplayLayout(
+ static_cast<MonitorController::SecondaryDisplayLayout>(layout));
SendDisplayInfo();
}
diff --git a/chromeos/chromeos.gyp b/chromeos/chromeos.gyp
index 9870c9e..dff9498 100644
--- a/chromeos/chromeos.gyp
+++ b/chromeos/chromeos.gyp
@@ -103,8 +103,8 @@
'dbus/sms_client.h',
'dbus/update_engine_client.cc',
'dbus/update_engine_client.h',
- 'display/output_configurator.cc',
- 'display/output_configurator.h',
+ 'monitor/output_configurator.cc',
+ 'monitor/output_configurator.h',
'network/network_sms_handler.cc',
'network/network_sms_handler.h',
],
diff --git a/chromeos/display/DEPS b/chromeos/monitor/DEPS
index d6abdda..d6abdda 100644
--- a/chromeos/display/DEPS
+++ b/chromeos/monitor/DEPS
diff --git a/chromeos/display/output_configurator.cc b/chromeos/monitor/output_configurator.cc
index 4543a52..8e47f07 100644
--- a/chromeos/display/output_configurator.cc
+++ b/chromeos/monitor/output_configurator.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 "chromeos/display/output_configurator.h"
+#include "chromeos/monitor/output_configurator.h"
#include <X11/Xlib.h>
#include <X11/extensions/dpms.h>
@@ -37,15 +37,15 @@ const float kPixelsToMmScale = kMmInInch / kDpi96;
// The DPI threshold to detech high density screen.
// Higher DPI than this will use device_scale_factor=2
-// Should be kept in sync with display_change_observer_x11.cc
+// Should be kept in sync with monitor_change_observer_x11.cc
const unsigned int kHighDensityDIPThreshold = 160;
// Prefixes for the built-in displays.
const char kInternal_LVDS[] = "LVDS";
const char kInternal_eDP[] = "eDP";
-// Gap between screens so cursor at bottom of active display doesn't partially
-// appear on top of inactive display. Higher numbers guard against larger
+// Gap between screens so cursor at bottom of active monitor doesn't partially
+// appear on top of inactive monitor. Higher numbers guard against larger
// cursors, but also waste more memory. We will double this gap for screens
// with a device_scale_factor of 2. While this gap will not guard against all
// possible cursors in X, it should handle the ones we actually use. See
diff --git a/chromeos/display/output_configurator.h b/chromeos/monitor/output_configurator.h
index 2b6d2d4..b98bcb4 100644
--- a/chromeos/display/output_configurator.h
+++ b/chromeos/monitor/output_configurator.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 CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
-#define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
+#ifndef CHROMEOS_MONITOR_OUTPUT_CONFIGURATOR_H_
+#define CHROMEOS_MONITOR_OUTPUT_CONFIGURATOR_H_
#pragma once
#include "base/basictypes.h"
@@ -42,7 +42,7 @@ struct CachedOutputDescription {
unsigned long mm_height;
};
-// Used to describe the state of a multi-display configuration.
+// Used to describe the state of a multi-monitor configuration.
enum State {
STATE_INVALID,
STATE_HEADLESS,
@@ -162,4 +162,4 @@ class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher {
} // namespace chromeos
-#endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
+#endif // CHROMEOS_MONITOR_OUTPUT_CONFIGURATOR_H_
diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp
index 8befbdd..ff85629 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -87,10 +87,10 @@
'focus_manager.h',
'layout_manager.cc',
'layout_manager.h',
- 'display_change_observer_x11.cc',
- 'display_change_observer_x11.h',
- 'display_manager.cc',
- 'display_manager.h',
+ 'monitor_change_observer_x11.cc',
+ 'monitor_change_observer_x11.h',
+ 'monitor_manager.cc',
+ 'monitor_manager.h',
'root_window_host.h',
'root_window_host_linux.cc',
'root_window_host_linux.h',
@@ -110,8 +110,8 @@
'shared/input_method_event_filter.h',
'shared/root_window_capture_client.cc',
'shared/root_window_capture_client.h',
- 'single_display_manager.cc',
- 'single_display_manager.h',
+ 'single_monitor_manager.cc',
+ 'single_monitor_manager.h',
'ui_controls_win.cc',
'ui_controls_x11.cc',
'window.cc',
diff --git a/ui/aura/bench/bench_main.cc b/ui/aura/bench/bench_main.cc
index be3465b..92a837e 100644
--- a/ui/aura/bench/bench_main.cc
+++ b/ui/aura/bench/bench_main.cc
@@ -14,7 +14,7 @@
#include "ui/aura/env.h"
#include "ui/aura/event.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/single_display_manager.h"
+#include "ui/aura/single_monitor_manager.h"
#include "ui/aura/window.h"
#include "ui/base/hit_test.h"
#include "ui/base/resource/resource_bundle.h"
@@ -282,11 +282,11 @@ int main(int argc, char** argv) {
MessageLoop message_loop(MessageLoop::TYPE_UI);
ui::CompositorTestSupport::Initialize();
- aura::SingleDisplayManager* manager = new aura::SingleDisplayManager;
+ aura::SingleMonitorManager* manager = new aura::SingleMonitorManager;
manager->set_use_fullscreen_host_window(true);
- aura::Env::GetInstance()->SetDisplayManager(manager);
+ aura::Env::GetInstance()->SetMonitorManager(manager);
scoped_ptr<aura::RootWindow> root_window(
- aura::DisplayManager::CreateRootWindowForPrimaryDisplay());
+ aura::MonitorManager::CreateRootWindowForPrimaryMonitor());
// add layers
ColoredLayer background(SK_ColorRED);
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc
index b1908e8..050acb0 100644
--- a/ui/aura/demo/demo_main.cc
+++ b/ui/aura/demo/demo_main.cc
@@ -12,7 +12,7 @@
#include "ui/aura/env.h"
#include "ui/aura/event.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/single_display_manager.h"
+#include "ui/aura/single_monitor_manager.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
#include "ui/base/hit_test.h"
@@ -120,9 +120,9 @@ int main(int argc, char** argv) {
// Create the message-loop here before creating the root window.
MessageLoop message_loop(MessageLoop::TYPE_UI);
ui::CompositorTestSupport::Initialize();
- aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager);
+ aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager);
scoped_ptr<aura::RootWindow> root_window(
- aura::DisplayManager::CreateRootWindowForPrimaryDisplay());
+ aura::MonitorManager::CreateRootWindowForPrimaryMonitor());
scoped_ptr<DemoStackingClient> stacking_client(new DemoStackingClient(
root_window.get()));
diff --git a/ui/aura/display_observer.h b/ui/aura/display_observer.h
index 0399ae6..282241d 100644
--- a/ui/aura/display_observer.h
+++ b/ui/aura/display_observer.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 UI_AURA_DISPLAY_OBSERVER_H_
-#define UI_AURA_DISPLAY_OBSERVER_H_
+#ifndef UI_AURA_MONITOR_OBSERVER_H_
+#define UI_AURA_MONITOR_OBSERVER_H_
#pragma once
#include "ui/aura/aura_export.h"
@@ -20,7 +20,7 @@ class AURA_EXPORT DisplayObserver {
// Called when the |display|'s bound has changed.
virtual void OnDisplayBoundsChanged(const gfx::Display& display) = 0;
- // Called when |new_display| has been added.
+ // Called when |new_monitor| has been added.
virtual void OnDisplayAdded(const gfx::Display& new_display) = 0;
// Called when |old_display| has been removed.
@@ -32,4 +32,4 @@ class AURA_EXPORT DisplayObserver {
} // namespace aura
-#endif // UI_AURA_DISPLAY_OBSERVER_H_
+#endif // UI_AURA_MONITOR_OBSERVER_H_
diff --git a/ui/aura/env.cc b/ui/aura/env.cc
index d65a318..18aac53 100644
--- a/ui/aura/env.cc
+++ b/ui/aura/env.cc
@@ -7,13 +7,13 @@
#include "ui/aura/cursor_manager.h"
#include "ui/aura/env_observer.h"
#include "ui/aura/event_filter.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window_host.h"
#include "ui/aura/window.h"
#include "ui/compositor/compositor.h"
#if defined(USE_X11)
-#include "ui/aura/display_change_observer_x11.h"
+#include "ui/aura/monitor_change_observer_x11.h"
#endif
namespace aura {
@@ -57,11 +57,11 @@ void Env::RemoveObserver(EnvObserver* observer) {
observers_.RemoveObserver(observer);
}
-void Env::SetDisplayManager(DisplayManager* display_manager) {
- display_manager_.reset(display_manager);
+void Env::SetMonitorManager(MonitorManager* monitor_manager) {
+ monitor_manager_.reset(monitor_manager);
#if defined(USE_X11)
- // Update the display manager with latest info.
- display_change_observer_->NotifyDisplayChange();
+ // Update the monitor manager with latest info.
+ monitor_change_observer_->NotifyDisplayChange();
#endif
}
@@ -83,7 +83,7 @@ void Env::Init() {
dispatcher_.reset(CreateDispatcher());
#endif
#if defined(USE_X11)
- display_change_observer_.reset(new internal::DisplayChangeObserverX11);
+ monitor_change_observer_.reset(new internal::MonitorChangeObserverX11);
#endif
ui::Compositor::Initialize(false);
}
diff --git a/ui/aura/env.h b/ui/aura/env.h
index bef9483..e8e787d8 100644
--- a/ui/aura/env.h
+++ b/ui/aura/env.h
@@ -17,11 +17,11 @@ namespace aura {
class CursorManager;
class EnvObserver;
class EventFilter;
-class DisplayManager;
+class MonitorManager;
class Window;
namespace internal {
-class DisplayChangeObserverX11;
+class MonitorChangeObserverX11;
}
#if !defined(OS_MACOSX)
@@ -56,10 +56,10 @@ class AURA_EXPORT Env {
stacking_client_ = stacking_client;
}
- // Gets/sets DisplayManager. The DisplayManager's ownership is
+ // Gets/sets MonitorManager. The MonitorManager's ownership is
// transfered.
- DisplayManager* display_manager() { return display_manager_.get(); }
- void SetDisplayManager(DisplayManager* display_manager);
+ MonitorManager* monitor_manager() { return monitor_manager_.get(); }
+ void SetMonitorManager(MonitorManager* monitor_manager);
// Env takes ownership of the EventFilter.
EventFilter* event_filter() { return event_filter_.get(); }
@@ -92,12 +92,12 @@ class AURA_EXPORT Env {
int mouse_button_flags_;
bool is_touch_down_;
client::StackingClient* stacking_client_;
- scoped_ptr<DisplayManager> display_manager_;
+ scoped_ptr<MonitorManager> monitor_manager_;
scoped_ptr<EventFilter> event_filter_;
CursorManager cursor_manager_;
#if defined(USE_X11)
- scoped_ptr<internal::DisplayChangeObserverX11> display_change_observer_;
+ scoped_ptr<internal::MonitorChangeObserverX11> monitor_change_observer_;
#endif
DISALLOW_COPY_AND_ASSIGN(Env);
diff --git a/ui/aura/display_change_observer_x11.cc b/ui/aura/monitor_change_observer_x11.cc
index 85b4aec..5afe527 100644
--- a/ui/aura/display_change_observer_x11.cc
+++ b/ui/aura/monitor_change_observer_x11.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 "ui/aura/display_change_observer_x11.h"
+#include "ui/aura/monitor_change_observer_x11.h"
#include <algorithm>
#include <map>
@@ -14,7 +14,7 @@
#include "base/message_pump_aurax11.h"
#include "ui/aura/dispatcher_linux.h"
#include "ui/aura/env.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/compositor/dip_util.h"
#include "ui/gfx/display.h"
@@ -30,7 +30,7 @@ namespace {
// please update the bug (crosbug.com/31628) first and make sure that the
// driver will use the same value.
// This value also has to be kept in sync with the value in
-// chromeos/display/output_configurator.cc. See crbug.com/130188
+// chromeos/monitor/output_configurator.cc. See crbug.com/130188
const unsigned int kHighDensityDIPThreshold = 160;
// 1 inch in mm.
@@ -51,7 +51,7 @@ bool CompareDisplayY(const gfx::Display& lhs, const gfx::Display& rhs) {
} // namespace
-DisplayChangeObserverX11::DisplayChangeObserverX11()
+MonitorChangeObserverX11::MonitorChangeObserverX11()
: xdisplay_(base::MessagePumpAuraX11::GetDefaultXDisplay()),
x_root_window_(DefaultRootWindow(xdisplay_)),
xrandr_event_base_(0) {
@@ -61,21 +61,21 @@ DisplayChangeObserverX11::DisplayChangeObserverX11()
AddDispatcherForRootWindow(this);
}
-DisplayChangeObserverX11::~DisplayChangeObserverX11() {
+MonitorChangeObserverX11::~MonitorChangeObserverX11() {
static_cast<DispatcherLinux*>(Env::GetInstance()->GetDispatcher())->
RemoveDispatcherForRootWindow(this);
}
-bool DisplayChangeObserverX11::Dispatch(const base::NativeEvent& event) {
+bool MonitorChangeObserverX11::Dispatch(const base::NativeEvent& event) {
if (event->type - xrandr_event_base_ == RRScreenChangeNotify) {
NotifyDisplayChange();
}
return true;
}
-void DisplayChangeObserverX11::NotifyDisplayChange() {
- if (!DisplayManager::use_fullscreen_host_window())
- return; // Use the default display that display manager determined.
+void MonitorChangeObserverX11::NotifyDisplayChange() {
+ if (!MonitorManager::use_fullscreen_host_window())
+ return; // Use the default monitor that monitor manager determined.
XRRScreenResources* screen_resources =
XRRGetScreenResources(xdisplay_, x_root_window_);
@@ -106,10 +106,10 @@ void DisplayChangeObserverX11::NotifyDisplayChange() {
}
XRRModeInfo* mode = FindMode(screen_resources, crtc_info->mode);
CHECK(mode);
- // Mirrored displays have the same y coordinates.
+ // Mirrored monitors have the same y coordinates.
if (y_coords.find(crtc_info->y) != y_coords.end())
continue;
- // TODO(oshima): Create unique ID for the display.
+ // TODO(oshima): Create unique ID for the monitor.
displays.push_back(gfx::Display(
0,
gfx::Rect(crtc_info->x, crtc_info->y, mode->width, mode->height)));
@@ -141,7 +141,7 @@ void DisplayChangeObserverX11::NotifyDisplayChange() {
iter != displays.end(); ++iter, ++id)
(*iter).set_id(id);
- Env::GetInstance()->display_manager()->OnNativeDisplaysChanged(displays);
+ Env::GetInstance()->monitor_manager()->OnNativeMonitorsChanged(displays);
}
} // namespace internal
diff --git a/ui/aura/display_change_observer_x11.h b/ui/aura/monitor_change_observer_x11.h
index caf3be7..4160860 100644
--- a/ui/aura/display_change_observer_x11.h
+++ b/ui/aura/monitor_change_observer_x11.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 UI_AURA_DISPLAY_CHANGE_OBSERVER_X11_H
-#define UI_AURA_DISPLAY_CHANGE_OBSERVER_X11_H
+#ifndef UI_AURA_MONITOR_CHANGE_OBSERVER_X11_H
+#define UI_AURA_MONITOR_CHANGE_OBSERVER_X11_H
#pragma once
#include <X11/Xlib.h>
@@ -17,18 +17,18 @@
namespace aura {
namespace internal {
-// An object that observes changes in display configuration and
-// update DisplayManagers.
-class DisplayChangeObserverX11 : public MessageLoop::Dispatcher {
+// An object that observes changes in monitor configuration and
+// update MonitorManagers.
+class MonitorChangeObserverX11 : public MessageLoop::Dispatcher {
public:
- DisplayChangeObserverX11();
- virtual ~DisplayChangeObserverX11();
+ MonitorChangeObserverX11();
+ virtual ~MonitorChangeObserverX11();
// Overridden from Dispatcher overrides:
virtual bool Dispatch(const base::NativeEvent& xev) OVERRIDE;
// Reads display configurations from the system and notifies
- // |display_manager_| about the change.
+ // |monitor_manager_| about the change.
void NotifyDisplayChange();
private:
@@ -38,10 +38,10 @@ class DisplayChangeObserverX11 : public MessageLoop::Dispatcher {
int xrandr_event_base_;
- DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserverX11);
+ DISALLOW_COPY_AND_ASSIGN(MonitorChangeObserverX11);
};
} // namespace internal
} // namespace aura
-#endif // UI_AURA_DISPLAY_CHANGE_OBSERVER_X11_H
+#endif // UI_AURA_MONITOR_CHANGE_OBSERVER_X11_H
diff --git a/ui/aura/display_manager.cc b/ui/aura/monitor_manager.cc
index af1e848..aba7bcc 100644
--- a/ui/aura/display_manager.cc
+++ b/ui/aura/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 "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include <stdio.h>
@@ -16,7 +16,7 @@
namespace aura {
namespace {
-// Default bounds for a display.
+// Default bounds for a monitor.
const int kDefaultHostWindowX = 200;
const int kDefaultHostWindowY = 200;
const int kDefaultHostWindowWidth = 1280;
@@ -24,11 +24,11 @@ const int kDefaultHostWindowHeight = 1024;
} // namespace
// static
-bool DisplayManager::use_fullscreen_host_window_ = false;
+bool MonitorManager::use_fullscreen_host_window_ = false;
// static
-gfx::Display DisplayManager::CreateDisplayFromSpec(const std::string& spec) {
- static int synthesized_display_id = 1000;
+gfx::Display MonitorManager::CreateMonitorFromSpec(const std::string& spec) {
+ static int synthesized_monitor_id = 1000;
gfx::Rect bounds(kDefaultHostWindowX, kDefaultHostWindowY,
kDefaultHostWindowWidth, kDefaultHostWindowHeight);
int x = 0, y = 0, width, height;
@@ -41,46 +41,46 @@ gfx::Display DisplayManager::CreateDisplayFromSpec(const std::string& spec) {
} else if (use_fullscreen_host_window_) {
bounds = gfx::Rect(aura::RootWindowHost::GetNativeScreenSize());
}
- gfx::Display display(synthesized_display_id++);
+ gfx::Display display(synthesized_monitor_id++);
display.SetScaleAndBounds(scale, bounds);
DVLOG(1) << "Display bounds=" << bounds.ToString() << ", scale=" << scale;
return display;
}
// static
-RootWindow* DisplayManager::CreateRootWindowForPrimaryDisplay() {
- DisplayManager* manager = aura::Env::GetInstance()->display_manager();
+RootWindow* MonitorManager::CreateRootWindowForPrimaryMonitor() {
+ MonitorManager* manager = aura::Env::GetInstance()->monitor_manager();
RootWindow* root =
- manager->CreateRootWindowForDisplay(manager->GetDisplayAt(0));
+ manager->CreateRootWindowForMonitor(manager->GetDisplayAt(0));
if (use_fullscreen_host_window_)
root->ConfineCursorToWindow();
return root;
}
-DisplayManager::DisplayManager() {
+MonitorManager::MonitorManager() {
}
-DisplayManager::~DisplayManager() {
+MonitorManager::~MonitorManager() {
}
-void DisplayManager::AddObserver(DisplayObserver* observer) {
+void MonitorManager::AddObserver(DisplayObserver* observer) {
observers_.AddObserver(observer);
}
-void DisplayManager::RemoveObserver(DisplayObserver* observer) {
+void MonitorManager::RemoveObserver(DisplayObserver* observer) {
observers_.RemoveObserver(observer);
}
-void DisplayManager::NotifyBoundsChanged(const gfx::Display& display) {
+void MonitorManager::NotifyBoundsChanged(const gfx::Display& display) {
FOR_EACH_OBSERVER(DisplayObserver, observers_,
OnDisplayBoundsChanged(display));
}
-void DisplayManager::NotifyDisplayAdded(const gfx::Display& display) {
+void MonitorManager::NotifyDisplayAdded(const gfx::Display& display) {
FOR_EACH_OBSERVER(DisplayObserver, observers_, OnDisplayAdded(display));
}
-void DisplayManager::NotifyDisplayRemoved(const gfx::Display& display) {
+void MonitorManager::NotifyDisplayRemoved(const gfx::Display& display) {
FOR_EACH_OBSERVER(DisplayObserver, observers_, OnDisplayRemoved(display));
}
diff --git a/ui/aura/display_manager.h b/ui/aura/monitor_manager.h
index 1d889c4..40e6bbf 100644
--- a/ui/aura/display_manager.h
+++ b/ui/aura/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 UI_AURA_DISPLAY_MANAGER_H_
-#define UI_AURA_DISPLAY_MANAGER_H_
+#ifndef UI_AURA_MONITOR_MANAGER_H_
+#define UI_AURA_MONITOR_MANAGER_H_
#pragma once
#include <string>
@@ -24,11 +24,11 @@ class DisplayObserver;
class RootWindow;
class Window;
-// DisplayManager creates, deletes and updates Display objects when
-// display configuration changes, and notifies DisplayObservers about
+// MonitorManager creates, deletes and updates Monitor objects when
+// monitor configuration changes, and notifies DisplayObservers about
// the change. This is owned by Env and its lifetime is longer than
// any windows.
-class AURA_EXPORT DisplayManager {
+class AURA_EXPORT MonitorManager {
public:
static void set_use_fullscreen_host_window(bool use_fullscreen) {
use_fullscreen_host_window_ = use_fullscreen;
@@ -37,34 +37,34 @@ class AURA_EXPORT DisplayManager {
return use_fullscreen_host_window_;
}
- // Creates a display from string spec. 100+200-1440x800 creates display
+ // Creates a monitor from string spec. 100+200-1440x800 creates monitor
// whose size is 1440x800 at the location (100, 200) in screen's coordinates.
// The location can be omitted and be just "1440x800", which creates
- // display at the origin of the screen. An empty string creates
- // the display with default size.
+ // monitor at the origin of the screen. An empty string creates
+ // the monitor with default size.
// The device scale factor can be specified by "*", like "1280x780*2",
// or will use the value of |gfx::Display::GetForcedDeviceScaleFactor()| if
// --force-device-scale-factor is specified.
- static gfx::Display CreateDisplayFromSpec(const std::string& spec);
+ static gfx::Display CreateMonitorFromSpec(const std::string& spec);
- // A utility function to create a root window for primary display.
- static RootWindow* CreateRootWindowForPrimaryDisplay();
+ // A utility function to create a root window for primary monitor.
+ static RootWindow* CreateRootWindowForPrimaryMonitor();
- DisplayManager();
- virtual ~DisplayManager();
+ MonitorManager();
+ virtual ~MonitorManager();
// Adds/removes DisplayObservers.
void AddObserver(DisplayObserver* observer);
void RemoveObserver(DisplayObserver* observer);
- // Called when display configuration has changed. The new display
- // configurations is passed as a vector of Display object, which
- // contains each display's new infomration.
- virtual void OnNativeDisplaysChanged(
+ // Called when monitor configuration has changed. The new monitor
+ // configurations is passed as a vector of Monitor object, which
+ // contains each monitor's new infomration.
+ virtual void OnNativeMonitorsChanged(
const std::vector<gfx::Display>& display) = 0;
- // Create a root window for given |display|.
- virtual RootWindow* CreateRootWindowForDisplay(
+ // Create a root window for given |monitor|.
+ virtual RootWindow* CreateRootWindowForMonitor(
const gfx::Display& display) = 0;
// Returns the display at |index|. The display at 0 is considered "primary".
@@ -76,7 +76,7 @@ class AURA_EXPORT DisplayManager {
virtual const gfx::Display& GetDisplayNearestWindow(
const Window* window) const = 0;
- // Returns the display object nearest given |pint|.
+ // Returns the monitor object nearest given |pint|.
virtual const gfx::Display& GetDisplayNearestPoint(
const gfx::Point& point) const = 0;
@@ -88,14 +88,14 @@ class AURA_EXPORT DisplayManager {
private:
// If set before the RootWindow is created, the host window will cover the
- // entire display. Note that this can still be overridden via the
+ // entire monitor. Note that this can still be overridden via the
// switches::kAuraHostWindowSize flag.
static bool use_fullscreen_host_window_;
ObserverList<DisplayObserver> observers_;
- DISALLOW_COPY_AND_ASSIGN(DisplayManager);
+ DISALLOW_COPY_AND_ASSIGN(MonitorManager);
};
} // namespace aura
-#endif // UI_AURA_DISPLAY_MANAGER_H_
+#endif // UI_AURA_MONITOR_MANAGER_H_
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 85a1247..6728fa4 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -19,7 +19,7 @@
#include "ui/aura/event.h"
#include "ui/aura/event_filter.h"
#include "ui/aura/focus_manager.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window_host.h"
#include "ui/aura/root_window_observer.h"
#include "ui/aura/window.h"
@@ -64,9 +64,9 @@ void GetEventFiltersToNotify(Window* target, EventFilters* filters) {
filters->push_back(Env::GetInstance()->event_filter());
}
-float GetDeviceScaleFactorFromDisplay(const aura::Window* window) {
- DisplayManager* display_manager = Env::GetInstance()->display_manager();
- return display_manager->GetDisplayNearestWindow(window).device_scale_factor();
+float GetDeviceScaleFactorFromMonitor(const aura::Window* window) {
+ MonitorManager* monitor_manager = Env::GetInstance()->monitor_manager();
+ return monitor_manager->GetDisplayNearestWindow(window).device_scale_factor();
}
Window* ConsumerToWindow(ui::GestureConsumer* consumer) {
@@ -154,7 +154,7 @@ RootWindow* RootWindow::GetForAcceleratedWidget(
}
void RootWindow::Init() {
- compositor()->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(this),
+ compositor()->SetScaleAndSize(GetDeviceScaleFactorFromMonitor(this),
host_->GetBounds().size());
Window::Init(ui::LAYER_NOT_DRAWN);
last_mouse_location_ =
@@ -390,8 +390,8 @@ bool RootWindow::DispatchGestureEvent(GestureEvent* event) {
void RootWindow::OnHostResized(const gfx::Size& size_in_pixel) {
DispatchHeldMouseMove();
// The compositor should have the same size as the native root window host.
- // Get the latest scale from display because it might have been changed.
- compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(this),
+ // Get the latest scale from monitor because it might have been changed.
+ compositor_->SetScaleAndSize(GetDeviceScaleFactorFromMonitor(this),
size_in_pixel);
gfx::Size old(bounds().size());
// The layer, and all the observers should be notified of the
diff --git a/ui/aura/single_display_manager.cc b/ui/aura/single_monitor_manager.cc
index 3ffc80b..e099341 100644
--- a/ui/aura/single_display_manager.cc
+++ b/ui/aura/single_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 "ui/aura/single_display_manager.h"
+#include "ui/aura/single_monitor_manager.h"
#include <string>
@@ -18,24 +18,24 @@ namespace aura {
using std::string;
namespace {
-// Default bounds for the primary display.
+// Default bounds for the primary monitor.
const int kDefaultHostWindowX = 200;
const int kDefaultHostWindowY = 200;
const int kDefaultHostWindowWidth = 1280;
const int kDefaultHostWindowHeight = 1024;
} // namespace
-SingleDisplayManager::SingleDisplayManager()
+SingleMonitorManager::SingleMonitorManager()
: root_window_(NULL) {
Init();
}
-SingleDisplayManager::~SingleDisplayManager() {
- // All displays must have been deleted when display manager is deleted.
+SingleMonitorManager::~SingleMonitorManager() {
+ // All monitors must have been deleted when monitor manager is deleted.
CHECK(!root_window_);
}
-void SingleDisplayManager::OnNativeDisplaysChanged(
+void SingleMonitorManager::OnNativeMonitorsChanged(
const std::vector<gfx::Display>& displays) {
DCHECK(displays.size() > 0);
if (use_fullscreen_host_window()) {
@@ -44,7 +44,7 @@ void SingleDisplayManager::OnNativeDisplaysChanged(
}
}
-RootWindow* SingleDisplayManager::CreateRootWindowForDisplay(
+RootWindow* SingleMonitorManager::CreateRootWindowForMonitor(
const gfx::Display& display) {
DCHECK(!root_window_);
DCHECK_EQ(display_.id(), display.id());
@@ -54,25 +54,25 @@ RootWindow* SingleDisplayManager::CreateRootWindowForDisplay(
return root_window_;
}
-const gfx::Display& SingleDisplayManager::GetDisplayAt(size_t index) {
+const gfx::Display& SingleMonitorManager::GetDisplayAt(size_t index) {
return display_;
}
-size_t SingleDisplayManager::GetNumDisplays() const {
+size_t SingleMonitorManager::GetNumDisplays() const {
return 1;
}
-const gfx::Display& SingleDisplayManager::GetDisplayNearestWindow(
+const gfx::Display& SingleMonitorManager::GetDisplayNearestWindow(
const Window* window) const {
return display_;
}
-const gfx::Display& SingleDisplayManager::GetDisplayNearestPoint(
+const gfx::Display& SingleMonitorManager::GetDisplayNearestPoint(
const gfx::Point& point) const {
return display_;
}
-void SingleDisplayManager::OnWindowBoundsChanged(
+void SingleMonitorManager::OnWindowBoundsChanged(
Window* window, const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) {
if (!use_fullscreen_host_window()) {
Update(new_bounds.size());
@@ -80,18 +80,18 @@ void SingleDisplayManager::OnWindowBoundsChanged(
}
}
-void SingleDisplayManager::OnWindowDestroying(Window* window) {
+void SingleMonitorManager::OnWindowDestroying(Window* window) {
if (root_window_ == window)
root_window_ = NULL;
}
-void SingleDisplayManager::Init() {
+void SingleMonitorManager::Init() {
const string size_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kAuraHostWindowSize);
- display_ = CreateDisplayFromSpec(size_str);
+ display_ = CreateMonitorFromSpec(size_str);
}
-void SingleDisplayManager::Update(const gfx::Size size) {
+void SingleMonitorManager::Update(const gfx::Size size) {
display_.SetSize(size);
}
diff --git a/ui/aura/single_display_manager.h b/ui/aura/single_monitor_manager.h
index d7b8265..46ef34c 100644
--- a/ui/aura/single_display_manager.h
+++ b/ui/aura/single_monitor_manager.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_AURA_SINGLE_DISPLAY_MANAGER_H_
-#define UI_AURA_SINGLE_DISPLAY_MANAGER_H_
+#ifndef UI_AURA_SINGLE_MONITOR_MANAGER_H_
+#define UI_AURA_SINGLE_MONITOR_MANAGER_H_
#pragma once
#include "base/compiler_specific.h"
#include "ui/aura/aura_export.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/aura/window_observer.h"
#include "ui/gfx/display.h"
@@ -18,17 +18,17 @@ class Rect;
namespace aura {
-// A display manager assuming there is one display.
-class AURA_EXPORT SingleDisplayManager : public DisplayManager,
+// A monitor manager assuming there is one monitor.
+class AURA_EXPORT SingleMonitorManager : public MonitorManager,
public WindowObserver {
public:
- SingleDisplayManager();
- virtual ~SingleDisplayManager();
+ SingleMonitorManager();
+ virtual ~SingleMonitorManager();
- // DisplayManager overrides:
- virtual void OnNativeDisplaysChanged(
+ // MonitorManager overrides:
+ virtual void OnNativeMonitorsChanged(
const std::vector<gfx::Display>& display) OVERRIDE;
- virtual RootWindow* CreateRootWindowForDisplay(
+ virtual RootWindow* CreateRootWindowForMonitor(
const gfx::Display& display) OVERRIDE;
virtual const gfx::Display& GetDisplayAt(size_t index) OVERRIDE;
@@ -52,9 +52,9 @@ class AURA_EXPORT SingleDisplayManager : public DisplayManager,
RootWindow* root_window_;
gfx::Display display_;
- DISALLOW_COPY_AND_ASSIGN(SingleDisplayManager);
+ DISALLOW_COPY_AND_ASSIGN(SingleMonitorManager);
};
} // namespace aura
-#endif // UI_AURA_SINGLE_DISPLAY_MANAGER_H_
+#endif // UI_AURA_SINGLE_MONITOR_MANAGER_H_
diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc
index 1dabfd4..c8549ba 100644
--- a/ui/aura/test/aura_test_helper.cc
+++ b/ui/aura/test/aura_test_helper.cc
@@ -8,10 +8,10 @@
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/focus_manager.h"
-#include "ui/aura/display_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h"
#include "ui/aura/shared/root_window_capture_client.h"
-#include "ui/aura/single_display_manager.h"
+#include "ui/aura/single_monitor_manager.h"
#include "ui/aura/test/test_activation_client.h"
#include "ui/aura/test/test_screen.h"
#include "ui/aura/test/test_stacking_client.h"
@@ -43,8 +43,8 @@ AuraTestHelper::~AuraTestHelper() {
void AuraTestHelper::SetUp() {
setup_called_ = true;
- Env::GetInstance()->SetDisplayManager(new SingleDisplayManager);
- root_window_.reset(aura::DisplayManager::CreateRootWindowForPrimaryDisplay());
+ Env::GetInstance()->SetMonitorManager(new SingleMonitorManager);
+ root_window_.reset(aura::MonitorManager::CreateRootWindowForPrimaryMonitor());
gfx::Screen::SetInstance(new aura::TestScreen(root_window_.get()));
ui_controls::InstallUIControlsAura(CreateUIControlsAura(root_window_.get()));
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 40a70ef..d775c62 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -237,7 +237,7 @@ bool Window::IsVisible() const {
gfx::Rect Window::GetBoundsInRootWindow() const {
// TODO(beng): There may be a better way to handle this, and the existing code
- // is likely wrong anyway in a multi-display world, but this will
+ // is likely wrong anyway in a multi-monitor world, but this will
// do for now.
if (!GetRootWindow())
return bounds();
diff --git a/ui/aura/window.h b/ui/aura/window.h
index 2c76082..cebedf8 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -135,7 +135,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
// Returns the window's bounds in screen coordinates. In ash, this is
// effectively screen bounds.
//
- // TODO(oshima): Fix this to return screen's coordinate for multi-display
+ // TODO(oshima): Fix this to return screen's coordinate for multi-monitor
// support.
gfx::Rect GetBoundsInRootWindow() const;
diff --git a/ui/views/widget/native_widget_aura_unittest.cc b/ui/views/widget/native_widget_aura_unittest.cc
index cef5a85..87672ad 100644
--- a/ui/views/widget/native_widget_aura_unittest.cc
+++ b/ui/views/widget/native_widget_aura_unittest.cc
@@ -13,7 +13,9 @@
#include "ui/aura/env.h"
#include "ui/aura/event.h"
#include "ui/aura/layout_manager.h"
+#include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h"
+#include "ui/aura/single_monitor_manager.h"
#include "ui/aura/test/aura_test_helper.h"
#include "ui/aura/window.h"
#include "ui/gfx/screen.h"