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

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
index ce521923018b65d44d6f6950a69bafff8e962e01..d4c38879326c51996ef6eb0aad3ded1528faad2b 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
@@ -188,8 +188,10 @@ Browser* TabDragControllerTest::CreateAnotherWindowBrowserAndRelayout() {
ResetIDs(browser2->tab_strip_model(), 100);
// Resize the two windows so they're right next to each other.
- gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(
- browser()->window()->GetNativeWindow()).work_area();
+ gfx::Rect work_area =
+ gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(browser()->window()->GetNativeWindow())
+ .work_area();
gfx::Size half_size =
gfx::Size(work_area.width() / 3 - 10, work_area.height() / 2 - 10);
browser()->window()->SetBounds(gfx::Rect(work_area.origin(), half_size));
@@ -808,7 +810,7 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserTabDragControllerTest,
MAYBE_DetachFromFullsizeWindow) {
// Resize the browser window so that it is as big as the work area.
gfx::Rect work_area =
- gfx::Screen::GetNativeScreen()
+ gfx::Screen::GetScreen()
->GetDisplayNearestWindow(browser()->window()->GetNativeWindow())
.work_area();
browser()->window()->SetBounds(work_area);
@@ -1718,8 +1720,9 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest,
aura::Window::Windows roots = ash::Shell::GetAllRootWindows();
ASSERT_EQ(2u, roots.size());
aura::Window* second_root = roots[1];
- gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(
- second_root).work_area();
+ gfx::Rect work_area = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(second_root)
+ .work_area();
browser2->window()->SetBounds(work_area);
EXPECT_EQ(second_root,
browser2->window()->GetNativeWindow()->GetRootWindow());
@@ -1768,8 +1771,9 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest,
aura::Window::Windows roots = ash::Shell::GetAllRootWindows();
ASSERT_EQ(2u, roots.size());
aura::Window* second_root = roots[1];
- gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(
- second_root).work_area();
+ gfx::Rect work_area = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(second_root)
+ .work_area();
browser()->window()->SetBounds(work_area);
// position both browser windows side by side on the second screen.
@@ -1828,8 +1832,9 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest,
ASSERT_EQ(2u, roots.size());
aura::Window* first_root = roots[0];
aura::Window* second_root = roots[1];
- gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(
- second_root).work_area();
+ gfx::Rect work_area = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(second_root)
+ .work_area();
work_area.Inset(20, 20, 20, 60);
Browser::CreateParams params(browser()->profile(),
browser()->host_desktop_type());
@@ -1898,8 +1903,9 @@ IN_PROC_BROWSER_TEST_P(DetachToBrowserInSeparateDisplayTabDragControllerTest,
aura::Window::Windows roots = ash::Shell::GetAllRootWindows();
ASSERT_EQ(2u, roots.size());
aura::Window* second_root = roots[1];
- gfx::Rect work_area = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(
- second_root).work_area();
+ gfx::Rect work_area = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(second_root)
+ .work_area();
browser2->window()->SetBounds(work_area);
EXPECT_EQ(second_root,
browser2->window()->GetNativeWindow()->GetRootWindow());
@@ -2144,9 +2150,10 @@ IN_PROC_BROWSER_TEST_F(
// Move the second browser to the second display.
aura::Window::Windows roots = ash::Shell::GetAllRootWindows();
ASSERT_EQ(2u, roots.size());
- gfx::Point final_destination =
- gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(
- roots[1]).work_area().CenterPoint();
+ gfx::Point final_destination = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(roots[1])
+ .work_area()
+ .CenterPoint();
// Move to the first tab and drag it enough so that it detaches, but not
// enough to move to another display.
@@ -2183,15 +2190,16 @@ IN_PROC_BROWSER_TEST_F(
EXPECT_EQ("0 1", IDString(browser()->tab_strip_model()));
EXPECT_EQ(roots[0], browser()->window()->GetNativeWindow()->GetRootWindow());
- gfx::Rect work_area = gfx::Screen::GetNativeScreen()->
- GetDisplayNearestWindow(roots[1]).work_area();
+ gfx::Rect work_area =
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(roots[1]).work_area();
browser()->window()->SetBounds(work_area);
EXPECT_EQ(roots[1], browser()->window()->GetNativeWindow()->GetRootWindow());
// Move the second browser to the display.
- gfx::Point final_destination =
- gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(
- roots[0]).work_area().CenterPoint();
+ gfx::Point final_destination = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(roots[0])
+ .work_area()
+ .CenterPoint();
// Move to the first tab and drag it enough so that it detaches, but not
// enough to move to another display.
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698