summaryrefslogtreecommitdiffstats
path: root/ash/shelf
diff options
context:
space:
mode:
authoroshima <oshima@chromium.org>2015-07-27 18:18:52 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-28 01:19:26 +0000
commite28189248660c42b8e0cb9ad973638d7260b47b7 (patch)
tree90109ef81a619744a85b920d246f6d290c5c7a22 /ash/shelf
parent4bf2ca554347fc20e1649e5ff4cf700d9fbd713a (diff)
downloadchromium_src-e28189248660c42b8e0cb9ad973638d7260b47b7.zip
chromium_src-e28189248660c42b8e0cb9ad973638d7260b47b7.tar.gz
chromium_src-e28189248660c42b8e0cb9ad973638d7260b47b7.tar.bz2
Rename DisplayController to WindowTreeHostManager
This class manages WTH <-> display mapping, and WTHManager is more appropriate than DisplayController. BUG=None Review URL: https://codereview.chromium.org/1262483003 Cr-Commit-Position: refs/heads/master@{#340624}
Diffstat (limited to 'ash/shelf')
-rw-r--r--ash/shelf/shelf_layout_manager_unittest.cc20
-rw-r--r--ash/shelf/shelf_window_watcher.cc7
2 files changed, 17 insertions, 10 deletions
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index b737e80..d447b06 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -7,8 +7,8 @@
#include "ash/accelerators/accelerator_controller.h"
#include "ash/accelerators/accelerator_table.h"
#include "ash/ash_switches.h"
-#include "ash/display/display_controller.h"
#include "ash/display/display_manager.h"
+#include "ash/display/window_tree_host_manager.h"
#include "ash/focus_cycler.h"
#include "ash/root_window_controller.h"
#include "ash/session/session_state_delegate.h"
@@ -1221,8 +1221,10 @@ TEST_F(ShelfLayoutManagerTest, DimmingBehaviorDualDisplay) {
UpdateDisplay("0+0-200x200,+200+0-100x100");
EXPECT_EQ(2U, shell->display_manager()->GetNumDisplays());
- DisplayController* display_controller = shell->display_controller();
- aura::Window::Windows root_windows = display_controller->GetAllRootWindows();
+ WindowTreeHostManager* window_tree_host_manager =
+ shell->window_tree_host_manager();
+ aura::Window::Windows root_windows =
+ window_tree_host_manager->GetAllRootWindows();
EXPECT_EQ(root_windows.size(), 2U);
std::vector<ShelfWidget*> shelf_widgets;
@@ -1449,8 +1451,10 @@ TEST_F(ShelfLayoutManagerTest, DualDisplayOpenAppListWithShelfAutoHideState) {
UpdateDisplay("0+0-200x200,+200+0-100x100");
EXPECT_EQ(2U, display_manager->GetNumDisplays());
- DisplayController* display_controller = shell->display_controller();
- aura::Window::Windows root_windows = display_controller->GetAllRootWindows();
+ WindowTreeHostManager* window_tree_host_manager =
+ shell->window_tree_host_manager();
+ aura::Window::Windows root_windows =
+ window_tree_host_manager->GetAllRootWindows();
EXPECT_EQ(root_windows.size(), 2U);
// Get the shelves in both displays and set them to be 'AutoHide'.
@@ -1582,8 +1586,10 @@ TEST_F(ShelfLayoutManagerTest, ShelfWithSystemModalWindowDualDisplay) {
UpdateDisplay("200x200,100x100");
EXPECT_EQ(2U, display_manager->GetNumDisplays());
- DisplayController* display_controller = shell->display_controller();
- aura::Window::Windows root_windows = display_controller->GetAllRootWindows();
+ WindowTreeHostManager* window_tree_host_manager =
+ shell->window_tree_host_manager();
+ aura::Window::Windows root_windows =
+ window_tree_host_manager->GetAllRootWindows();
EXPECT_EQ(2U, root_windows.size());
// Get the shelves in both displays and set them to be 'AutoHide'.
diff --git a/ash/shelf/shelf_window_watcher.cc b/ash/shelf/shelf_window_watcher.cc
index 546d212..4bdb024 100644
--- a/ash/shelf/shelf_window_watcher.cc
+++ b/ash/shelf/shelf_window_watcher.cc
@@ -4,7 +4,7 @@
#include "ash/shelf/shelf_window_watcher.h"
-#include "ash/display/display_controller.h"
+#include "ash/display/window_tree_host_manager.h"
#include "ash/shelf/shelf_constants.h"
#include "ash/shelf/shelf_item_delegate_manager.h"
#include "ash/shelf/shelf_model.h"
@@ -268,8 +268,9 @@ void ShelfWindowWatcher::OnWindowPropertyChanged(aura::Window* window,
void ShelfWindowWatcher::OnDisplayAdded(const gfx::Display& new_display) {
// Add a new RootWindow and its ActivationClient to observed list.
- aura::Window* root_window = Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(new_display.id());
+ aura::Window* root_window = Shell::GetInstance()
+ ->window_tree_host_manager()
+ ->GetRootWindowForDisplayId(new_display.id());
// When the primary root window's display get removed, the existing root
// window is taken over by the new display and the observer is already set.