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

Side by Side Diff: ash/wm/panels/panel_layout_manager_unittest.cc

Issue 1924703002: Rename gfx::Display/Screen to display::Display/Screen in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/panels/panel_window_resizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/panels/panel_layout_manager.h" 5 #include "ash/wm/panels/panel_layout_manager.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/screen_util.h" 8 #include "ash/screen_util.h"
9 #include "ash/shelf/shelf.h" 9 #include "ash/shelf/shelf.h"
10 #include "ash/shelf/shelf_button.h" 10 #include "ash/shelf/shelf_button.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 std::find(manager->panel_windows_.begin(), 88 std::find(manager->panel_windows_.begin(),
89 manager->panel_windows_.end(), wm_panel); 89 manager->panel_windows_.end(), wm_panel);
90 DCHECK(found != manager->panel_windows_.end()); 90 DCHECK(found != manager->panel_windows_.end());
91 DCHECK(found->callout_widget); 91 DCHECK(found->callout_widget);
92 return found->CalloutWidget(); 92 return found->CalloutWidget();
93 } 93 }
94 94
95 void PanelInScreen(aura::Window* panel) { 95 void PanelInScreen(aura::Window* panel) {
96 gfx::Rect panel_bounds = panel->GetBoundsInRootWindow(); 96 gfx::Rect panel_bounds = panel->GetBoundsInRootWindow();
97 gfx::Point root_point = gfx::Point(panel_bounds.x(), panel_bounds.y()); 97 gfx::Point root_point = gfx::Point(panel_bounds.x(), panel_bounds.y());
98 gfx::Display display = ScreenUtil::FindDisplayContainingPoint(root_point); 98 display::Display display =
99 ScreenUtil::FindDisplayContainingPoint(root_point);
99 100
100 gfx::Rect panel_bounds_in_screen = panel->GetBoundsInScreen(); 101 gfx::Rect panel_bounds_in_screen = panel->GetBoundsInScreen();
101 gfx::Point screen_bottom_right = gfx::Point( 102 gfx::Point screen_bottom_right = gfx::Point(
102 panel_bounds_in_screen.right(), 103 panel_bounds_in_screen.right(),
103 panel_bounds_in_screen.bottom()); 104 panel_bounds_in_screen.bottom());
104 gfx::Rect display_bounds = display.bounds(); 105 gfx::Rect display_bounds = display.bounds();
105 EXPECT_TRUE(screen_bottom_right.x() < display_bounds.width() && 106 EXPECT_TRUE(screen_bottom_right.x() < display_bounds.width() &&
106 screen_bottom_right.y() < display_bounds.height()); 107 screen_bottom_right.y() < display_bounds.height());
107 } 108 }
108 109
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 // Hit test outside the left edge with a left-aligned shelf. 813 // Hit test outside the left edge with a left-aligned shelf.
813 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5)); 814 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5));
814 target = targeter->FindTargetForEvent(root, &touch); 815 target = targeter->FindTargetForEvent(root, &touch);
815 EXPECT_NE(w.get(), target); 816 EXPECT_NE(w.get(), target);
816 } 817 }
817 818
818 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest, 819 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest,
819 testing::Bool()); 820 testing::Bool());
820 821
821 } // namespace ash 822 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector.cc ('k') | ash/wm/panels/panel_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698