| Index: ash/wm/workspace/workspace_layout_manager_unittest.cc
|
| diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc
|
| index b923e9a3f1810b58426904db48947dd766ac9afc..b1337b8c854e117300b1c1c96ebc252e1a05f77a 100644
|
| --- a/ash/wm/workspace/workspace_layout_manager_unittest.cc
|
| +++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc
|
| @@ -31,8 +31,8 @@
|
| #include "ui/aura/window_event_dispatcher.h"
|
| #include "ui/base/ui_base_types.h"
|
| #include "ui/display/manager/display_layout.h"
|
| +#include "ui/display/screen.h"
|
| #include "ui/gfx/geometry/insets.h"
|
| -#include "ui/gfx/screen.h"
|
| #include "ui/views/widget/widget.h"
|
| #include "ui/views/widget/widget_delegate.h"
|
| #include "ui/wm/core/window_util.h"
|
| @@ -388,7 +388,7 @@ TEST_F(WorkspaceLayoutManagerTest, MaximizeWithEmptySize) {
|
| default_container->AddChild(window.get());
|
| window->Show();
|
| gfx::Rect work_area(
|
| - gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area());
|
| + display::Screen::GetScreen()->GetPrimaryDisplay().work_area());
|
| EXPECT_EQ(work_area.ToString(), window->GetBoundsInScreen().ToString());
|
| }
|
|
|
| @@ -463,7 +463,7 @@ TEST_F(WorkspaceLayoutManagerTest, WindowShouldBeOnScreenWhenAdded) {
|
| TEST_F(WorkspaceLayoutManagerTest, SizeToWorkArea) {
|
| // Normal window bounds shouldn't be changed.
|
| gfx::Size work_area(
|
| - gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area().size());
|
| + display::Screen::GetScreen()->GetPrimaryDisplay().work_area().size());
|
| const gfx::Rect window_bounds(
|
| 100, 101, work_area.width() + 1, work_area.height() + 2);
|
| std::unique_ptr<aura::Window> window(
|
| @@ -638,7 +638,7 @@ TEST_F(WorkspaceLayoutManagerSoloTest, Fullscreen) {
|
| std::unique_ptr<aura::Window> window(CreateTestWindow(bounds));
|
| window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
|
| // Fullscreen window fills the whole display.
|
| - EXPECT_EQ(gfx::Screen::GetScreen()
|
| + EXPECT_EQ(display::Screen::GetScreen()
|
| ->GetDisplayNearestWindow(window.get())
|
| .bounds()
|
| .ToString(),
|
| @@ -681,14 +681,14 @@ TEST_F(WorkspaceLayoutManagerSoloTest, FullscreenRootWindowResize) {
|
| std::unique_ptr<aura::Window> window(CreateTestWindow(bounds));
|
| // Fullscreen window fills the whole display.
|
| window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_FULLSCREEN);
|
| - EXPECT_EQ(gfx::Screen::GetScreen()
|
| + EXPECT_EQ(display::Screen::GetScreen()
|
| ->GetDisplayNearestWindow(window.get())
|
| .bounds()
|
| .ToString(),
|
| window->bounds().ToString());
|
| // Enlarge the root window. We should still match the display size.
|
| UpdateDisplay("800x600");
|
| - EXPECT_EQ(gfx::Screen::GetScreen()
|
| + EXPECT_EQ(display::Screen::GetScreen()
|
| ->GetDisplayNearestWindow(window.get())
|
| .bounds()
|
| .ToString(),
|
| @@ -700,7 +700,7 @@ TEST_F(WorkspaceLayoutManagerSoloTest, FullscreenRootWindowResize) {
|
| TEST_F(WorkspaceLayoutManagerSoloTest, RootWindowResizeShrinksWindows) {
|
| std::unique_ptr<aura::Window> window(
|
| CreateTestWindow(gfx::Rect(10, 20, 500, 400)));
|
| - gfx::Rect work_area = gfx::Screen::GetScreen()
|
| + gfx::Rect work_area = display::Screen::GetScreen()
|
| ->GetDisplayNearestWindow(window.get())
|
| .work_area();
|
| // Invariant: Window is smaller than work area.
|
| @@ -709,7 +709,7 @@ TEST_F(WorkspaceLayoutManagerSoloTest, RootWindowResizeShrinksWindows) {
|
|
|
| // Make the root window narrower than our window.
|
| UpdateDisplay("300x400");
|
| - work_area = gfx::Screen::GetScreen()
|
| + work_area = display::Screen::GetScreen()
|
| ->GetDisplayNearestWindow(window.get())
|
| .work_area();
|
| EXPECT_LE(window->bounds().width(), work_area.width());
|
| @@ -717,7 +717,7 @@ TEST_F(WorkspaceLayoutManagerSoloTest, RootWindowResizeShrinksWindows) {
|
|
|
| // Make the root window shorter than our window.
|
| UpdateDisplay("300x200");
|
| - work_area = gfx::Screen::GetScreen()
|
| + work_area = display::Screen::GetScreen()
|
| ->GetDisplayNearestWindow(window.get())
|
| .work_area();
|
| EXPECT_LE(window->bounds().width(), work_area.width());
|
| @@ -1037,7 +1037,7 @@ class WorkspaceLayoutManagerKeyboardTest : public test::AshTestBase {
|
| void ShowKeyboard() {
|
| layout_manager_->OnKeyboardBoundsChanging(keyboard_bounds_);
|
| restore_work_area_insets_ =
|
| - gfx::Screen::GetScreen()->GetPrimaryDisplay().GetWorkAreaInsets();
|
| + display::Screen::GetScreen()->GetPrimaryDisplay().GetWorkAreaInsets();
|
| Shell::GetInstance()->SetDisplayWorkAreaInsets(
|
| Shell::GetPrimaryRootWindow(),
|
| gfx::Insets(0, 0, keyboard_bounds_.height(), 0));
|
| @@ -1066,7 +1066,7 @@ class WorkspaceLayoutManagerKeyboardTest : public test::AshTestBase {
|
| // is resized to fit the remaining workspace area.
|
| TEST_F(WorkspaceLayoutManagerKeyboardTest, ChildWindowFocused) {
|
| gfx::Rect work_area(
|
| - gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area());
|
| + display::Screen::GetScreen()->GetPrimaryDisplay().work_area());
|
| gfx::Rect keyboard_bounds(work_area.x(),
|
| work_area.y() + work_area.height() / 2,
|
| work_area.width(),
|
| @@ -1085,7 +1085,7 @@ TEST_F(WorkspaceLayoutManagerKeyboardTest, ChildWindowFocused) {
|
| wm::ActivateWindow(window.get());
|
|
|
| int available_height =
|
| - gfx::Screen::GetScreen()->GetPrimaryDisplay().bounds().height() -
|
| + display::Screen::GetScreen()->GetPrimaryDisplay().bounds().height() -
|
| keyboard_bounds.height();
|
|
|
| gfx::Rect initial_window_bounds(50, 50, 100, 500);
|
| @@ -1102,7 +1102,7 @@ TEST_F(WorkspaceLayoutManagerKeyboardTest, ChildWindowFocused) {
|
|
|
| TEST_F(WorkspaceLayoutManagerKeyboardTest, AdjustWindowForA11yKeyboard) {
|
| gfx::Rect work_area(
|
| - gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area());
|
| + display::Screen::GetScreen()->GetPrimaryDisplay().work_area());
|
| gfx::Rect keyboard_bounds(work_area.x(),
|
| work_area.y() + work_area.height() / 2,
|
| work_area.width(),
|
| @@ -1115,7 +1115,7 @@ TEST_F(WorkspaceLayoutManagerKeyboardTest, AdjustWindowForA11yKeyboard) {
|
| CreateTestWindowInShellWithDelegate(&delegate, -1, work_area));
|
|
|
| int available_height =
|
| - gfx::Screen::GetScreen()->GetPrimaryDisplay().bounds().height() -
|
| + display::Screen::GetScreen()->GetPrimaryDisplay().bounds().height() -
|
| keyboard_bounds.height();
|
|
|
| wm::ActivateWindow(window.get());
|
|
|