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

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

Issue 138003007: [Cleanup] Screen cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make sure screen_for_shutdown is reset everytime Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/panels/panel_layout_manager.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/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/screen_ash.h" 9 #include "ash/screen_util.h"
10 #include "ash/shelf/shelf.h" 10 #include "ash/shelf/shelf.h"
11 #include "ash/shelf/shelf_button.h" 11 #include "ash/shelf/shelf_button.h"
12 #include "ash/shelf/shelf_layout_manager.h" 12 #include "ash/shelf/shelf_layout_manager.h"
13 #include "ash/shelf/shelf_model.h" 13 #include "ash/shelf/shelf_model.h"
14 #include "ash/shelf/shelf_types.h" 14 #include "ash/shelf/shelf_types.h"
15 #include "ash/shelf/shelf_util.h" 15 #include "ash/shelf/shelf_util.h"
16 #include "ash/shelf/shelf_view.h" 16 #include "ash/shelf/shelf_view.h"
17 #include "ash/shelf/shelf_widget.h" 17 #include "ash/shelf/shelf_widget.h"
18 #include "ash/shell.h" 18 #include "ash/shell.h"
19 #include "ash/shell_window_ids.h" 19 #include "ash/shell_window_ids.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 manager->panel_windows_.begin(), manager->panel_windows_.end(), 88 manager->panel_windows_.begin(), manager->panel_windows_.end(),
89 panel); 89 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 reinterpret_cast<views::Widget*>(found->callout_widget); 92 return reinterpret_cast<views::Widget*>(found->callout_widget);
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 = ScreenAsh::FindDisplayContainingPoint(root_point); 98 gfx::Display display = ScreenUtil::FindDisplayContainingPoint(root_point);
99 99
100 gfx::Rect panel_bounds_in_screen = panel->GetBoundsInScreen(); 100 gfx::Rect panel_bounds_in_screen = panel->GetBoundsInScreen();
101 gfx::Point screen_bottom_right = gfx::Point( 101 gfx::Point screen_bottom_right = gfx::Point(
102 panel_bounds_in_screen.right(), 102 panel_bounds_in_screen.right(),
103 panel_bounds_in_screen.bottom()); 103 panel_bounds_in_screen.bottom());
104 gfx::Rect display_bounds = display.bounds(); 104 gfx::Rect display_bounds = display.bounds();
105 EXPECT_TRUE(screen_bottom_right.x() < display_bounds.width() && 105 EXPECT_TRUE(screen_bottom_right.x() < display_bounds.width() &&
106 screen_bottom_right.y() < display_bounds.height()); 106 screen_bottom_right.y() < display_bounds.height());
107 } 107 }
108 108
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 EXPECT_TRUE(w1->IsVisible()); 785 EXPECT_TRUE(w1->IsVisible());
786 EXPECT_FALSE(w2->IsVisible()); 786 EXPECT_FALSE(w2->IsVisible());
787 EXPECT_TRUE(w3->IsVisible()); 787 EXPECT_TRUE(w3->IsVisible());
788 } 788 }
789 789
790 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest, 790 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelLayoutManagerTextDirectionTest,
791 testing::Bool()); 791 testing::Bool());
792 792
793 } // namespace internal 793 } // namespace internal
794 } // namespace ash 794 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | ash/wm/panels/panel_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698