diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-12 19:51:17 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-12 19:51:17 +0000 |
commit | ffabb1ea75e662308da91e916a0ffc922525aa18 (patch) | |
tree | 788b1ac84169a936b02d10feda6c94efaee129ea /ash/display | |
parent | c856e976800426511cd1a0f74d38c1fa7c883018 (diff) | |
download | chromium_src-ffabb1ea75e662308da91e916a0ffc922525aa18.zip chromium_src-ffabb1ea75e662308da91e916a0ffc922525aa18.tar.gz chromium_src-ffabb1ea75e662308da91e916a0ffc922525aa18.tar.bz2 |
Makes gfx::Screen an instance, rather than a collection of static methods.
This is in support of supporting separate Screen implementations on Aura for desktop and metro on Windows.
Some callsites are not yet correct, and noted with a reference to the http://crbug.com/133312. As-is those sites will behave the same as before this patch, but may not be correct once desktop/metro can run simultaneously.
BUG=133312
Review URL: https://chromiumcodereview.appspot.com/11030017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/display')
-rw-r--r-- | ash/display/display_controller.cc | 4 | ||||
-rw-r--r-- | ash/display/display_controller_unittest.cc | 69 | ||||
-rw-r--r-- | ash/display/mouse_cursor_event_filter.cc | 13 | ||||
-rw-r--r-- | ash/display/mouse_cursor_event_filter_unittest.cc | 6 | ||||
-rw-r--r-- | ash/display/multi_display_manager.cc | 2 | ||||
-rw-r--r-- | ash/display/screen_position_controller.cc | 14 | ||||
-rw-r--r-- | ash/display/screen_position_controller_unittest.cc | 12 | ||||
-rw-r--r-- | ash/display/shared_display_edge_indicator.cc | 2 |
8 files changed, 67 insertions, 55 deletions
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc index 660841f..b023cd9 100644 --- a/ash/display/display_controller.cc +++ b/ash/display/display_controller.cc @@ -491,10 +491,10 @@ aura::RootWindow* DisplayController::AddRootWindowForDisplay( } void DisplayController::UpdateDisplayBoundsForLayout() { - if (gfx::Screen::GetNumDisplays() <= 1) + if (Shell::GetScreen()->GetNumDisplays() <= 1) return; - DCHECK_EQ(2, gfx::Screen::GetNumDisplays()); + DCHECK_EQ(2, Shell::GetScreen()->GetNumDisplays()); const gfx::Rect& primary_bounds = GetPrimaryDisplay().bounds(); gfx::Display* secondary_display = GetSecondaryDisplay(); diff --git a/ash/display/display_controller_unittest.cc b/ash/display/display_controller_unittest.cc index 3ccca26..28d7ad8 100644 --- a/ash/display/display_controller_unittest.cc +++ b/ash/display/display_controller_unittest.cc @@ -47,12 +47,12 @@ class TestObserver : public DisplayController::Observer { }; gfx::Display GetPrimaryDisplay() { - return gfx::Screen::GetDisplayNearestWindow( + return Shell::GetScreen()->GetDisplayNearestWindow( Shell::GetAllRootWindows()[0]); } gfx::Display GetSecondaryDisplay() { - return gfx::Screen::GetDisplayNearestWindow( + return Shell::GetScreen()->GetDisplayNearestWindow( Shell::GetAllRootWindows()[1]); } @@ -146,11 +146,11 @@ TEST_F(DisplayControllerTest, MAYBE_BoundsUpdated) { UpdateDisplay("400x400"); EXPECT_EQ(1, observer.CountAndReset()); EXPECT_EQ("0,0 400x400", GetPrimaryDisplay().bounds().ToString()); - EXPECT_EQ(1, gfx::Screen::GetNumDisplays()); + EXPECT_EQ(1, Shell::GetScreen()->GetNumDisplays()); UpdateDisplay("500x500,700x700"); EXPECT_EQ(2, observer.CountAndReset()); - ASSERT_EQ(2, gfx::Screen::GetNumDisplays()); + ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays()); EXPECT_EQ("0,0 500x500", GetPrimaryDisplay().bounds().ToString()); EXPECT_EQ("0,500 700x700", GetSecondaryDisplay().bounds().ToString()); } @@ -190,7 +190,7 @@ TEST_F(DisplayControllerTest, SwapPrimary) { Shell::GetInstance()->display_controller(); UpdateDisplay("200x200,300x300"); - gfx::Display primary_display = gfx::Screen::GetPrimaryDisplay(); + gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay(); gfx::Display secondary_display = ScreenAsh::GetSecondaryDisplay(); std::string secondary_name = aura::Env::GetInstance()-> @@ -209,18 +209,21 @@ TEST_F(DisplayControllerTest, SwapPrimary) { EXPECT_TRUE(primary_root->Contains(launcher_window)); EXPECT_FALSE(secondary_root->Contains(launcher_window)); EXPECT_EQ(primary_display.id(), - gfx::Screen::GetDisplayNearestPoint(gfx::Point(-100, -100)).id()); + Shell::GetScreen()->GetDisplayNearestPoint( + gfx::Point(-100, -100)).id()); EXPECT_EQ(primary_display.id(), - gfx::Screen::GetDisplayNearestWindow(NULL).id()); + Shell::GetScreen()->GetDisplayNearestWindow(NULL).id()); // Switch primary and secondary display_controller->SetPrimaryDisplay(secondary_display); - EXPECT_EQ(secondary_display.id(), gfx::Screen::GetPrimaryDisplay().id()); + EXPECT_EQ(secondary_display.id(), + Shell::GetScreen()->GetPrimaryDisplay().id()); EXPECT_EQ(primary_display.id(), ScreenAsh::GetSecondaryDisplay().id()); EXPECT_EQ(secondary_display.id(), - gfx::Screen::GetDisplayNearestPoint(gfx::Point(-100, -100)).id()); + Shell::GetScreen()->GetDisplayNearestPoint( + gfx::Point(-100, -100)).id()); EXPECT_EQ(secondary_display.id(), - gfx::Screen::GetDisplayNearestWindow(NULL).id()); + Shell::GetScreen()->GetDisplayNearestWindow(NULL).id()); EXPECT_EQ( primary_root, @@ -243,12 +246,13 @@ TEST_F(DisplayControllerTest, SwapPrimary) { // Deleting 2nd display should move the primary to original primary display. UpdateDisplay("200x200"); RunAllPendingInMessageLoop(); // RootWindow is deleted in a posted task. - EXPECT_EQ(1, gfx::Screen::GetNumDisplays()); - EXPECT_EQ(primary_display.id(), gfx::Screen::GetPrimaryDisplay().id()); + EXPECT_EQ(1, Shell::GetScreen()->GetNumDisplays()); + EXPECT_EQ(primary_display.id(), Shell::GetScreen()->GetPrimaryDisplay().id()); EXPECT_EQ(primary_display.id(), - gfx::Screen::GetDisplayNearestPoint(gfx::Point(-100, -100)).id()); + Shell::GetScreen()->GetDisplayNearestPoint( + gfx::Point(-100, -100)).id()); EXPECT_EQ(primary_display.id(), - gfx::Screen::GetDisplayNearestWindow(NULL).id()); + Shell::GetScreen()->GetDisplayNearestWindow(NULL).id()); EXPECT_TRUE(tracker.Contains(primary_root)); EXPECT_FALSE(tracker.Contains(secondary_root)); EXPECT_TRUE(primary_root->Contains(launcher_window)); @@ -259,7 +263,7 @@ TEST_F(DisplayControllerTest, SwapPrimaryById) { Shell::GetInstance()->display_controller(); UpdateDisplay("200x200,300x300"); - gfx::Display primary_display = gfx::Screen::GetPrimaryDisplay(); + gfx::Display primary_display = Shell::GetScreen()->GetPrimaryDisplay(); gfx::Display secondary_display = ScreenAsh::GetSecondaryDisplay(); std::string secondary_name = aura::Env::GetInstance()-> @@ -278,14 +282,16 @@ TEST_F(DisplayControllerTest, SwapPrimaryById) { EXPECT_FALSE(secondary_root->Contains(launcher_window)); EXPECT_NE(primary_root, secondary_root); EXPECT_EQ(primary_display.id(), - gfx::Screen::GetDisplayNearestPoint(gfx::Point(-100, -100)).id()); + Shell::GetScreen()->GetDisplayNearestPoint( + gfx::Point(-100, -100)).id()); EXPECT_EQ(primary_display.id(), - gfx::Screen::GetDisplayNearestWindow(NULL).id()); + Shell::GetScreen()->GetDisplayNearestWindow(NULL).id()); // Switch primary and secondary by display ID. TestObserver observer; display_controller->SetPrimaryDisplayId(secondary_display.id()); - EXPECT_EQ(secondary_display.id(), gfx::Screen::GetPrimaryDisplay().id()); + EXPECT_EQ(secondary_display.id(), + Shell::GetScreen()->GetPrimaryDisplay().id()); EXPECT_EQ(primary_display.id(), ScreenAsh::GetSecondaryDisplay().id()); EXPECT_LT(0, observer.CountAndReset()); @@ -314,12 +320,13 @@ TEST_F(DisplayControllerTest, SwapPrimaryById) { // Deleting 2nd display should move the primary to original primary display. UpdateDisplay("200x200"); RunAllPendingInMessageLoop(); // RootWindow is deleted in a posted task. - EXPECT_EQ(1, gfx::Screen::GetNumDisplays()); - EXPECT_EQ(primary_display.id(), gfx::Screen::GetPrimaryDisplay().id()); + EXPECT_EQ(1, Shell::GetScreen()->GetNumDisplays()); + EXPECT_EQ(primary_display.id(), Shell::GetScreen()->GetPrimaryDisplay().id()); EXPECT_EQ(primary_display.id(), - gfx::Screen::GetDisplayNearestPoint(gfx::Point(-100, -100)).id()); + Shell::GetScreen()->GetDisplayNearestPoint( + gfx::Point(-100, -100)).id()); EXPECT_EQ(primary_display.id(), - gfx::Screen::GetDisplayNearestWindow(NULL).id()); + Shell::GetScreen()->GetDisplayNearestWindow(NULL).id()); EXPECT_TRUE(tracker.Contains(primary_root)); EXPECT_FALSE(tracker.Contains(secondary_root)); EXPECT_TRUE(primary_root->Contains(launcher_window)); @@ -333,8 +340,9 @@ TEST_F(DisplayControllerTest, SwapPrimaryById) { aura::Env::GetInstance()->display_manager(); display_manager->OnNativeDisplaysChanged(displays); - EXPECT_EQ(2, gfx::Screen::GetNumDisplays()); - EXPECT_EQ(secondary_display.id(), gfx::Screen::GetPrimaryDisplay().id()); + EXPECT_EQ(2, Shell::GetScreen()->GetNumDisplays()); + EXPECT_EQ(secondary_display.id(), + Shell::GetScreen()->GetPrimaryDisplay().id()); EXPECT_EQ(primary_display.id(), ScreenAsh::GetSecondaryDisplay().id()); EXPECT_EQ( primary_root, @@ -354,8 +362,9 @@ TEST_F(DisplayControllerTest, SwapPrimaryById) { displays2.push_back(primary_display); displays2.push_back(third_display); display_manager->OnNativeDisplaysChanged(displays2); - EXPECT_EQ(2, gfx::Screen::GetNumDisplays()); - EXPECT_EQ(primary_display.id(), gfx::Screen::GetPrimaryDisplay().id()); + EXPECT_EQ(2, Shell::GetScreen()->GetNumDisplays()); + EXPECT_EQ(primary_display.id(), + Shell::GetScreen()->GetPrimaryDisplay().id()); EXPECT_EQ(third_display.id(), ScreenAsh::GetSecondaryDisplay().id()); EXPECT_EQ( primary_root, @@ -368,7 +377,7 @@ TEST_F(DisplayControllerTest, SwapPrimaryById) { TEST_F(DisplayControllerTest, MAYBE_UpdateDisplayWithHostOrigin) { UpdateDisplay("100x200,300x400"); - ASSERT_EQ(2, gfx::Screen::GetNumDisplays()); + ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays()); Shell::RootWindowList root_windows = Shell::GetInstance()->GetAllRootWindows(); ASSERT_EQ(2U, root_windows.size()); @@ -379,21 +388,21 @@ TEST_F(DisplayControllerTest, MAYBE_UpdateDisplayWithHostOrigin) { EXPECT_EQ("300x400", root_windows[1]->GetHostSize().ToString()); UpdateDisplay("100x200,200+300-300x400"); - ASSERT_EQ(2, gfx::Screen::GetNumDisplays()); + ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays()); EXPECT_EQ("0,0", root_windows[0]->GetHostOrigin().ToString()); EXPECT_EQ("100x200", root_windows[0]->GetHostSize().ToString()); EXPECT_EQ("200,300", root_windows[1]->GetHostOrigin().ToString()); EXPECT_EQ("300x400", root_windows[1]->GetHostSize().ToString()); UpdateDisplay("400+500-200x300,300x400"); - ASSERT_EQ(2, gfx::Screen::GetNumDisplays()); + ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays()); EXPECT_EQ("400,500", root_windows[0]->GetHostOrigin().ToString()); EXPECT_EQ("200x300", root_windows[0]->GetHostSize().ToString()); EXPECT_EQ("0,0", root_windows[1]->GetHostOrigin().ToString()); EXPECT_EQ("300x400", root_windows[1]->GetHostSize().ToString()); UpdateDisplay("100+200-100x200,300+500-200x300"); - ASSERT_EQ(2, gfx::Screen::GetNumDisplays()); + ASSERT_EQ(2, Shell::GetScreen()->GetNumDisplays()); EXPECT_EQ("100,200", root_windows[0]->GetHostOrigin().ToString()); EXPECT_EQ("100x200", root_windows[0]->GetHostSize().ToString()); EXPECT_EQ("300,500", root_windows[1]->GetHostOrigin().ToString()); diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/display/mouse_cursor_event_filter.cc index 4461868..f4e4f0e 100644 --- a/ash/display/mouse_cursor_event_filter.cc +++ b/ash/display/mouse_cursor_event_filter.cc @@ -48,7 +48,7 @@ MouseCursorEventFilter::~MouseCursorEventFilter() { void MouseCursorEventFilter::ShowSharedEdgeIndicator( const aura::RootWindow* from) { HideSharedEdgeIndicator(); - if (gfx::Screen::GetNumDisplays() <= 1 || from == NULL) { + if (Shell::GetScreen()->GetNumDisplays() <= 1 || from == NULL) { src_indicator_bounds_.SetRect(0, 0, 0, 0); dst_indicator_bounds_.SetRect(0, 0, 0, 0); drag_source_root_ = NULL; @@ -107,7 +107,8 @@ ui::EventResult MouseCursorEventFilter::PreHandleGestureEvent( bool MouseCursorEventFilter::WarpMouseCursorIfNecessary( aura::RootWindow* target_root, const gfx::Point& point_in_screen) { - if (gfx::Screen::GetNumDisplays() <= 1 || mouse_warp_mode_ == WARP_NONE) + if (Shell::GetScreen()->GetNumDisplays() <= 1 || + mouse_warp_mode_ == WARP_NONE) return false; const float scale = ui::GetDeviceScaleFactor(target_root->layer()); @@ -147,7 +148,7 @@ bool MouseCursorEventFilter::WarpMouseCursorIfNecessary( if (dst_root->bounds().Contains(point_in_dst_screen)) { DCHECK_NE(dst_root, root_at_point); dst_root->MoveCursorTo(point_in_dst_screen); - ash::Shell::GetInstance()->cursor_manager()->SetDeviceScaleFactor( + Shell::GetInstance()->cursor_manager()->SetDeviceScaleFactor( dst_root->AsRootWindowHostDelegate()->GetDeviceScaleFactor()); return true; } @@ -157,7 +158,8 @@ bool MouseCursorEventFilter::WarpMouseCursorIfNecessary( void MouseCursorEventFilter::UpdateHorizontalIndicatorWindowBounds() { bool from_primary = Shell::GetPrimaryRootWindow() == drag_source_root_; - const gfx::Rect& primary_bounds = gfx::Screen::GetPrimaryDisplay().bounds(); + const gfx::Rect& primary_bounds = + Shell::GetScreen()->GetPrimaryDisplay().bounds(); const gfx::Rect& secondary_bounds = ScreenAsh::GetSecondaryDisplay().bounds(); DisplayLayout::Position position = Shell::GetInstance()-> display_controller()->GetCurrentDisplayLayout().position; @@ -184,7 +186,8 @@ void MouseCursorEventFilter::UpdateHorizontalIndicatorWindowBounds() { void MouseCursorEventFilter::UpdateVerticalIndicatorWindowBounds() { bool in_primary = Shell::GetPrimaryRootWindow() == drag_source_root_; - const gfx::Rect& primary_bounds = gfx::Screen::GetPrimaryDisplay().bounds(); + const gfx::Rect& primary_bounds = + Shell::GetScreen()->GetPrimaryDisplay().bounds(); const gfx::Rect& secondary_bounds = ScreenAsh::GetSecondaryDisplay().bounds(); DisplayLayout::Position position = Shell::GetInstance()-> display_controller()->GetCurrentDisplayLayout().position; diff --git a/ash/display/mouse_cursor_event_filter_unittest.cc b/ash/display/mouse_cursor_event_filter_unittest.cc index 2c050ba..95433e3 100644 --- a/ash/display/mouse_cursor_event_filter_unittest.cc +++ b/ash/display/mouse_cursor_event_filter_unittest.cc @@ -17,12 +17,12 @@ namespace internal { namespace { gfx::Display GetPrimaryDisplay() { - return gfx::Screen::GetDisplayNearestWindow( + return Shell::GetScreen()->GetDisplayNearestWindow( Shell::GetAllRootWindows()[0]); } gfx::Display GetSecondaryDisplay() { - return gfx::Screen::GetDisplayNearestWindow( + return Shell::GetScreen()->GetDisplayNearestWindow( Shell::GetAllRootWindows()[1]); } @@ -52,7 +52,7 @@ TEST_F(MouseCursorEventFilterTest, WarpMouse) { // Touch the right edge of the primary root window. Pointer should warp. is_warped = event_filter->WarpMouseCursorIfNecessary(root_windows[0], - gfx::Point(499, 11)); + gfx::Point(499, 11)); EXPECT_TRUE(is_warped); EXPECT_EQ("501,11", // by 2px. aura::Env::GetInstance()->last_mouse_location().ToString()); diff --git a/ash/display/multi_display_manager.cc b/ash/display/multi_display_manager.cc index c754868..5cb7cfd 100644 --- a/ash/display/multi_display_manager.cc +++ b/ash/display/multi_display_manager.cc @@ -211,7 +211,7 @@ void MultiDisplayManager::OnNativeDisplaysChanged( std::vector<size_t> added_display_indices; gfx::Display current_primary; if (Shell::HasInstance()) - current_primary = gfx::Screen::GetPrimaryDisplay(); + current_primary = Shell::GetScreen()->GetPrimaryDisplay(); for (DisplayList::iterator curr_iter = displays_.begin(), new_iter = new_displays.begin(); diff --git a/ash/display/screen_position_controller.cc b/ash/display/screen_position_controller.cc index 3f2c392..791ecce 100644 --- a/ash/display/screen_position_controller.cc +++ b/ash/display/screen_position_controller.cc @@ -61,9 +61,8 @@ void ScreenPositionController::ConvertPointToScreen( gfx::Point* point) { const aura::RootWindow* root = window->GetRootWindow(); aura::Window::ConvertPointToTarget(window, root, point); - const gfx::Point display_origin = - gfx::Screen::GetDisplayNearestWindow( - const_cast<aura::RootWindow*>(root)).bounds().origin(); + const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow( + const_cast<aura::RootWindow*>(root)).bounds().origin(); point->Offset(display_origin.x(), display_origin.y()); } @@ -71,9 +70,8 @@ void ScreenPositionController::ConvertPointFromScreen( const aura::Window* window, gfx::Point* point) { const aura::RootWindow* root = window->GetRootWindow(); - const gfx::Point display_origin = - gfx::Screen::GetDisplayNearestWindow( - const_cast<aura::RootWindow*>(root)).bounds().origin(); + const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow( + const_cast<aura::RootWindow*>(root)).bounds().origin(); point->Offset(-display_origin.x(), -display_origin.y()); aura::Window::ConvertPointToTarget(root, window, point); } @@ -150,8 +148,8 @@ void ScreenPositionController::SetBounds(aura::Window* window, } gfx::Point origin(bounds.origin()); - const gfx::Point display_origin = - gfx::Screen::GetDisplayNearestWindow(window).bounds().origin(); + const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow( + window).bounds().origin(); origin.Offset(-display_origin.x(), -display_origin.y()); window->SetBounds(gfx::Rect(origin, bounds.size())); } diff --git a/ash/display/screen_position_controller_unittest.cc b/ash/display/screen_position_controller_unittest.cc index ed5e3ca..440ae63 100644 --- a/ash/display/screen_position_controller_unittest.cc +++ b/ash/display/screen_position_controller_unittest.cc @@ -89,8 +89,9 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertNativePointToScreen) { EXPECT_EQ("200x200", root_windows[1]->GetHostSize().ToString()); const gfx::Point window_pos(100, 100); - window_->SetBoundsInScreen(gfx::Rect(window_pos, gfx::Size(100, 100)), - gfx::Screen::GetDisplayNearestPoint(window_pos)); + window_->SetBoundsInScreen( + gfx::Rect(window_pos, gfx::Size(100, 100)), + Shell::GetScreen()->GetDisplayNearestPoint(window_pos)); SetSecondaryDisplayLayout(DisplayLayout::RIGHT); // The point is on the primary root window. EXPECT_EQ("150,150", ConvertNativePointToScreen(50, 50)); @@ -126,8 +127,9 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertNativePointToScreen) { SetSecondaryDisplayLayout(DisplayLayout::RIGHT); const gfx::Point window_pos2(300, 100); - window_->SetBoundsInScreen(gfx::Rect(window_pos2, gfx::Size(100, 100)), - gfx::Screen::GetDisplayNearestPoint(window_pos2)); + window_->SetBoundsInScreen( + gfx::Rect(window_pos2, gfx::Size(100, 100)), + Shell::GetScreen()->GetDisplayNearestPoint(window_pos2)); // The point is on the secondary display. EXPECT_EQ("350,150", ConvertNativePointToScreen(50, 50)); // The point is out of the all root windows. @@ -171,7 +173,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertNativePointToScreenHiDPI) { EXPECT_EQ("200x200", root_windows[1]->GetHostSize().ToString()); ash::DisplayController* display_controller = - ash::Shell::GetInstance()->display_controller(); + Shell::GetInstance()->display_controller(); // Put |window_| to the primary 2x display. window_->SetBoundsInScreen(gfx::Rect(20, 20, 50, 50), display_controller->GetPrimaryDisplay()); diff --git a/ash/display/shared_display_edge_indicator.cc b/ash/display/shared_display_edge_indicator.cc index f4f8aab..1abbbf5 100644 --- a/ash/display/shared_display_edge_indicator.cc +++ b/ash/display/shared_display_edge_indicator.cc @@ -56,7 +56,7 @@ views::Widget* CreateWidget(const gfx::Rect& bounds, widget->SetVisibilityChangedAnimationsEnabled(false); widget->GetNativeWindow()->SetName("SharedEdgeIndicator"); widget->SetContentsView(contents_view); - gfx::Display display = gfx::Screen::GetDisplayMatching(bounds); + gfx::Display display = Shell::GetScreen()->GetDisplayMatching(bounds); aura::Window* window = widget->GetNativeWindow(); aura::client::ScreenPositionClient* screen_position_client = aura::client::GetScreenPositionClient(window->GetRootWindow()); |