summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/drag_drop/drag_drop_controller.cc2
-rw-r--r--ash/drag_drop/drag_drop_controller_unittest.cc4
-rw-r--r--ash/drag_drop/drag_image_view.cc2
-rw-r--r--ash/drag_drop/drag_image_view.h7
-rw-r--r--ash/launcher/launcher_unittest.cc3
-rw-r--r--ash/launcher/launcher_view_unittest.cc3
-rw-r--r--ash/root_window_controller_unittest.cc36
-rw-r--r--ash/screen_ash.cc13
-rw-r--r--ash/screen_ash.h8
-rw-r--r--ash/screen_ash_unittest.cc16
-rw-r--r--ash/shell_unittest.cc4
-rw-r--r--ash/system/tray/system_tray.cc2
-rw-r--r--ash/system/tray/system_tray_bubble.cc4
-rw-r--r--ash/system/tray/system_tray_unittest.cc14
-rw-r--r--ash/system/tray/tray_bubble_view.cc2
-rw-r--r--ash/system/web_notification/web_notification_tray.cc2
-rw-r--r--ash/tooltips/tooltip_controller.cc2
-rw-r--r--ash/wm/app_list_controller.cc2
-rw-r--r--ash/wm/base_layout_manager.cc16
-rw-r--r--ash/wm/base_layout_manager_unittest.cc13
-rw-r--r--ash/wm/custom_frame_view_ash_unittest.cc24
-rw-r--r--ash/wm/frame_painter.cc2
-rw-r--r--ash/wm/panel_layout_manager.cc6
-rw-r--r--ash/wm/panel_layout_manager_unittest.cc12
-rw-r--r--ash/wm/shelf_layout_manager.cc12
-rw-r--r--ash/wm/shelf_layout_manager_unittest.cc30
-rw-r--r--ash/wm/system_gesture_event_filter.cc4
-rw-r--r--ash/wm/toplevel_window_event_filter_unittest.cc6
-rw-r--r--ash/wm/video_detector.cc2
-rw-r--r--ash/wm/window_resizer.cc2
-rw-r--r--ash/wm/workspace/frame_maximize_button.cc7
-rw-r--r--ash/wm/workspace/maximized_workspace.cc4
-rw-r--r--ash/wm/workspace/multi_window_resize_controller.cc4
-rw-r--r--ash/wm/workspace/multi_window_resize_controller_unittest.cc6
-rw-r--r--ash/wm/workspace/phantom_window_controller.cc4
-rw-r--r--ash/wm/workspace/snap_sizer.cc4
-rw-r--r--ash/wm/workspace/workspace_manager_unittest.cc12
-rw-r--r--ash/wm/workspace/workspace_window_resizer.cc6
-rw-r--r--ash/wm/workspace/workspace_window_resizer_unittest.cc2
-rw-r--r--chrome/browser/chromeos/input_method/candidate_window.cc6
-rw-r--r--chrome/browser/chromeos/login/screen_locker_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/options/network_config_view.cc2
-rw-r--r--chrome/browser/chromeos/status/data_promo_notification.cc2
-rw-r--r--chrome/browser/ui/omnibox/omnibox_view_browsertest.cc4
-rw-r--r--chrome/browser/ui/panels/panel_view.cc6
-rw-r--r--chrome/browser/ui/views/about_chrome_view.cc2
-rw-r--r--chrome/browser/ui/views/app_menu_button_win.cc2
-rw-r--r--chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc2
-rw-r--r--chrome/browser/ui/views/ash/panel_view_aura.cc2
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc4
-rw-r--r--chrome/browser/ui/views/dropdown_bar_view.cc2
-rw-r--r--chrome/browser/ui/views/extensions/shell_window_views.cc2
-rw-r--r--chrome/browser/ui/views/find_bar_host.cc4
-rw-r--r--chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc2
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc2
-rw-r--r--chrome/browser/ui/views/hung_renderer_view.cc4
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view_views.cc4
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc2
-rw-r--r--chrome/browser/ui/views/status_bubble_views.cc6
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_view.cc2
-rw-r--r--chrome/browser/ui/views/tabs/tab_drag_controller.cc2
-rw-r--r--chrome/browser/ui/views/web_dialog_view_browsertest.cc10
-rw-r--r--chrome/browser/ui/window_sizer/window_sizer_ash.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_impl.cc4
-rw-r--r--content/browser/renderer_host/render_widget_host_view_android.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_android.h2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.cc6
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.h2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_gtk.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_gtk.h2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.h2
-rw-r--r--content/browser/renderer_host/render_widget_host_view_mac.mm4
-rw-r--r--content/browser/renderer_host/test_render_view_host.cc2
-rw-r--r--content/browser/renderer_host/test_render_view_host.h2
-rw-r--r--content/browser/web_contents/web_contents_view_aura.cc4
-rw-r--r--content/port/browser/render_widget_host_view_port.h2
-rw-r--r--ui/aura/window.cc8
-rw-r--r--ui/aura/window.h6
-rw-r--r--ui/aura/window_unittest.cc10
-rw-r--r--ui/oak/oak_aura_window_display.cc2
-rw-r--r--ui/views/bubble/bubble_delegate.cc4
-rw-r--r--ui/views/controls/button/menu_button.cc2
-rw-r--r--ui/views/controls/scrollbar/base_scroll_bar.cc2
-rw-r--r--ui/views/examples/widget_example.cc4
-rw-r--r--ui/views/touchui/touch_selection_controller_impl.cc6
-rw-r--r--ui/views/view.cc8
-rw-r--r--ui/views/view.h2
-rw-r--r--ui/views/widget/native_widget_aura.cc14
-rw-r--r--ui/views/widget/native_widget_aura.h6
-rw-r--r--ui/views/widget/native_widget_aura_unittest.cc2
-rw-r--r--ui/views/widget/native_widget_private.h6
-rw-r--r--ui/views/widget/native_widget_win.cc6
-rw-r--r--ui/views/widget/native_widget_win.h6
-rw-r--r--ui/views/widget/widget.cc14
-rw-r--r--ui/views/widget/widget.h6
-rw-r--r--ui/views/widget/widget_unittest.cc8
96 files changed, 275 insertions, 265 deletions
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 5fdfa0e..34028ae 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -73,7 +73,7 @@ int DragDropController::StartDragAndDrop(const ui::OSExchangeData& data,
drag_image_.reset(new DragImageView);
drag_image_->SetImage(provider.drag_image());
drag_image_offset_ = provider.drag_image_offset();
- drag_image_->SetScreenBounds(gfx::Rect(
+ drag_image_->SetBoundsInScreen(gfx::Rect(
root_location.Subtract(drag_image_offset_),
drag_image_->GetPreferredSize()));
drag_image_->SetWidgetVisible(true);
diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc
index 31c1b97..c4a7d9d 100644
--- a/ash/drag_drop/drag_drop_controller_unittest.cc
+++ b/ash/drag_drop/drag_drop_controller_unittest.cc
@@ -395,8 +395,8 @@ TEST_F(DragDropControllerTest, DragDropInMultipleViewsMultipleWidgetsTest) {
scoped_ptr<views::Widget> widget2(CreateNewWidget());
DragTestView* drag_view2 = new DragTestView;
AddViewToWidgetAndResize(widget2.get(), drag_view2);
- gfx::Rect widget1_bounds = widget1->GetClientAreaScreenBounds();
- gfx::Rect widget2_bounds = widget2->GetClientAreaScreenBounds();
+ gfx::Rect widget1_bounds = widget1->GetClientAreaBoundsInScreen();
+ gfx::Rect widget2_bounds = widget2->GetClientAreaBoundsInScreen();
widget2->SetBounds(gfx::Rect(widget1_bounds.width(), 0,
widget2_bounds.width(), widget2_bounds.height()));
diff --git a/ash/drag_drop/drag_image_view.cc b/ash/drag_drop/drag_image_view.cc
index cdde40a..7a138f3 100644
--- a/ash/drag_drop/drag_image_view.cc
+++ b/ash/drag_drop/drag_image_view.cc
@@ -41,7 +41,7 @@ DragImageView::~DragImageView() {
widget_->Hide();
}
-void DragImageView::SetScreenBounds(const gfx::Rect& bounds) {
+void DragImageView::SetBoundsInScreen(const gfx::Rect& bounds) {
widget_->SetBounds(bounds);
}
diff --git a/ash/drag_drop/drag_image_view.h b/ash/drag_drop/drag_image_view.h
index 0471c5e..63f718c 100644
--- a/ash/drag_drop/drag_image_view.h
+++ b/ash/drag_drop/drag_image_view.h
@@ -19,8 +19,11 @@ class DragImageView : public views::ImageView {
DragImageView();
virtual ~DragImageView();
- // Sets the bounds of the native widget.
- void SetScreenBounds(const gfx::Rect& bounds);
+ // Sets the bounds of the native widget in screen
+ // coordinates.
+ // TODO(oshima): Looks like this is root window's
+ // coordinate. Change this to screen's coordinate.
+ void SetBoundsInScreen(const gfx::Rect& bounds);
// Sets the position of the native widget.
void SetScreenPosition(const gfx::Point& position);
diff --git a/ash/launcher/launcher_unittest.cc b/ash/launcher/launcher_unittest.cc
index 2a0c1eb..15d237c 100644
--- a/ash/launcher/launcher_unittest.cc
+++ b/ash/launcher/launcher_unittest.cc
@@ -25,7 +25,8 @@ TEST_F(LauncherTest, SetStatusSize) {
Launcher* launcher = Shell::GetInstance()->launcher();
LauncherView* launcher_view = launcher->GetLauncherViewForTest();
- gfx::Size launcher_size = launcher->widget()->GetWindowScreenBounds().size();
+ gfx::Size launcher_size =
+ launcher->widget()->GetWindowBoundsInScreen().size();
int total_width = launcher_size.width();
ASSERT_GT(total_width, 0);
launcher->SetStatusSize(gfx::Size(total_width / 2, launcher_size.height()));
diff --git a/ash/launcher/launcher_view_unittest.cc b/ash/launcher/launcher_view_unittest.cc
index d58bb2d..020f0d1 100644
--- a/ash/launcher/launcher_view_unittest.cc
+++ b/ash/launcher/launcher_view_unittest.cc
@@ -122,7 +122,8 @@ TEST_F(LauncherViewIconObserverTest, AddRemove) {
TEST_F(LauncherViewIconObserverTest, BoundsChanged) {
Launcher* launcher = Shell::GetInstance()->launcher();
- gfx::Size launcher_size = launcher->widget()->GetWindowScreenBounds().size();
+ gfx::Size launcher_size =
+ launcher->widget()->GetWindowBoundsInScreen().size();
int total_width = launcher_size.width() / 2;
ASSERT_GT(total_width, 0);
launcher->SetStatusSize(gfx::Size(total_width, launcher_size.height()));
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index 7524b29..d31e30b 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -88,25 +88,25 @@ TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
views::Widget* normal = CreateTestWidget(gfx::Rect(650, 10, 100, 100));
EXPECT_EQ(root_windows[1], normal->GetNativeView()->GetRootWindow());
- EXPECT_EQ("650,10 100x100", normal->GetWindowScreenBounds().ToString());
+ EXPECT_EQ("650,10 100x100", normal->GetWindowBoundsInScreen().ToString());
EXPECT_EQ("50,10 100x100",
- normal->GetNativeView()->GetRootWindowBounds().ToString());
+ normal->GetNativeView()->GetBoundsInRootWindow().ToString());
views::Widget* maximized = CreateTestWidget(gfx::Rect(700, 10, 100, 100));
maximized->Maximize();
EXPECT_EQ(root_windows[1], maximized->GetNativeView()->GetRootWindow());
#if !defined(OS_WIN)
// TODO(oshima): Window reports smaller screen size. Investigate why.
- EXPECT_EQ("600,0 500x500", maximized->GetWindowScreenBounds().ToString());
+ EXPECT_EQ("600,0 500x500", maximized->GetWindowBoundsInScreen().ToString());
EXPECT_EQ("0,0 500x500",
- maximized->GetNativeView()->GetRootWindowBounds().ToString());
+ maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
#endif
views::Widget* minimized = CreateTestWidget(gfx::Rect(800, 10, 100, 100));
minimized->Minimize();
EXPECT_EQ(root_windows[1], minimized->GetNativeView()->GetRootWindow());
EXPECT_EQ("800,10 100x100",
- minimized->GetWindowScreenBounds().ToString());
+ minimized->GetWindowBoundsInScreen().ToString());
views::Widget* fullscreen = CreateTestWidget(gfx::Rect(900, 10, 100, 100));
fullscreen->SetFullscreen(true);
@@ -114,48 +114,48 @@ TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
#if !defined(OS_WIN)
// TODO(oshima): Window reports smaller screen size. Investigate why.
EXPECT_EQ("600,0 500x500",
- fullscreen->GetWindowScreenBounds().ToString());
+ fullscreen->GetWindowBoundsInScreen().ToString());
EXPECT_EQ("0,0 500x500",
- fullscreen->GetNativeView()->GetRootWindowBounds().ToString());
+ fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString());
#endif
UpdateDisplay("0+0-600x600");
EXPECT_EQ(root_windows[0], normal->GetNativeView()->GetRootWindow());
- EXPECT_EQ("50,10 100x100", normal->GetWindowScreenBounds().ToString());
+ EXPECT_EQ("50,10 100x100", normal->GetWindowBoundsInScreen().ToString());
EXPECT_EQ("50,10 100x100",
- normal->GetNativeView()->GetRootWindowBounds().ToString());
+ normal->GetNativeView()->GetBoundsInRootWindow().ToString());
// Maximized area on primary display has 2px (given as
// kAutoHideSize in shelf_layout_manager.cc) inset at the bottom.
EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow());
EXPECT_EQ("0,0 600x598",
- maximized->GetWindowScreenBounds().ToString());
+ maximized->GetWindowBoundsInScreen().ToString());
EXPECT_EQ("0,0 600x598",
- maximized->GetNativeView()->GetRootWindowBounds().ToString());
+ maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
EXPECT_EQ(root_windows[0], minimized->GetNativeView()->GetRootWindow());
EXPECT_EQ("200,10 100x100",
- minimized->GetWindowScreenBounds().ToString());
+ minimized->GetWindowBoundsInScreen().ToString());
EXPECT_EQ(root_windows[0], fullscreen->GetNativeView()->GetRootWindow());
EXPECT_TRUE(fullscreen->IsFullscreen());
EXPECT_EQ("0,0 600x600",
- fullscreen->GetWindowScreenBounds().ToString());
+ fullscreen->GetWindowBoundsInScreen().ToString());
EXPECT_EQ("0,0 600x600",
- fullscreen->GetNativeView()->GetRootWindowBounds().ToString());
+ fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString());
// Test if the restore bounds are correctly updated.
wm::RestoreWindow(maximized->GetNativeView());
- EXPECT_EQ("100,10 100x100", maximized->GetWindowScreenBounds().ToString());
+ EXPECT_EQ("100,10 100x100", maximized->GetWindowBoundsInScreen().ToString());
EXPECT_EQ("100,10 100x100",
- maximized->GetNativeView()->GetRootWindowBounds().ToString());
+ maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
fullscreen->SetFullscreen(false);
EXPECT_EQ("300,10 100x100",
- fullscreen->GetWindowScreenBounds().ToString());
+ fullscreen->GetWindowBoundsInScreen().ToString());
EXPECT_EQ("300,10 100x100",
- fullscreen->GetNativeView()->GetRootWindowBounds().ToString());
+ fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString());
}
TEST_F(RootWindowControllerTest, MoveWindows_Modal) {
diff --git a/ash/screen_ash.cc b/ash/screen_ash.cc
index a7adb30..6c39ced 100644
--- a/ash/screen_ash.cc
+++ b/ash/screen_ash.cc
@@ -29,30 +29,31 @@ ScreenAsh::~ScreenAsh() {
}
// static
-gfx::Rect ScreenAsh::GetMaximizedWindowParentBounds(aura::Window* window) {
+gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) {
if (window->GetRootWindow() == Shell::GetPrimaryRootWindow())
return Shell::GetInstance()->shelf()->GetMaximizedWindowBounds(window);
else
- return GetDisplayParentBounds(window);
+ return GetDisplayBoundsInParent(window);
}
// static
-gfx::Rect ScreenAsh::GetUnmaximizedWorkAreaParentBounds(aura::Window* window) {
+gfx::Rect ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(
+ aura::Window* window) {
if (window->GetRootWindow() == Shell::GetPrimaryRootWindow())
return Shell::GetInstance()->shelf()->GetUnmaximizedWorkAreaBounds(window);
else
- return GetDisplayWorkAreaParentBounds(window);
+ return GetDisplayWorkAreaBoundsInParent(window);
}
// static
-gfx::Rect ScreenAsh::GetDisplayParentBounds(aura::Window* window) {
+gfx::Rect ScreenAsh::GetDisplayBoundsInParent(aura::Window* window) {
return ConvertRectFromScreen(
window->parent(),
gfx::Screen::GetDisplayNearestWindow(window).bounds());
}
// static
-gfx::Rect ScreenAsh::GetDisplayWorkAreaParentBounds(aura::Window* window) {
+gfx::Rect ScreenAsh::GetDisplayWorkAreaBoundsInParent(aura::Window* window) {
return ConvertRectFromScreen(
window->parent(),
gfx::Screen::GetDisplayNearestWindow(window).work_area());
diff --git a/ash/screen_ash.h b/ash/screen_ash.h
index 94fb54b..d150d4b 100644
--- a/ash/screen_ash.h
+++ b/ash/screen_ash.h
@@ -22,17 +22,17 @@ class ASH_EXPORT ScreenAsh : public gfx::ScreenImpl {
// Returns the bounds for maximized windows in parent coordinates.
// Maximized windows trigger auto-hiding the shelf.
- static gfx::Rect GetMaximizedWindowParentBounds(aura::Window* window);
+ static gfx::Rect GetMaximizedWindowBoundsInParent(aura::Window* window);
// Returns work area when a maximized window is not present in
// parent coordinates.
- static gfx::Rect GetUnmaximizedWorkAreaParentBounds(aura::Window* window);
+ static gfx::Rect GetUnmaximizedWorkAreaBoundsInParent(aura::Window* window);
// Returns the display bounds in parent coordinates.
- static gfx::Rect GetDisplayParentBounds(aura::Window* window);
+ static gfx::Rect GetDisplayBoundsInParent(aura::Window* window);
// Returns the display's work area bounds in parent coordinates.
- static gfx::Rect GetDisplayWorkAreaParentBounds(aura::Window* window);
+ static gfx::Rect GetDisplayWorkAreaBoundsInParent(aura::Window* window);
// Converts |rect| from |window|'s coordinates to the virtual screen
// coordinates.
diff --git a/ash/screen_ash_unittest.cc b/ash/screen_ash_unittest.cc
index 96727c8..5197e38 100644
--- a/ash/screen_ash_unittest.cc
+++ b/ash/screen_ash_unittest.cc
@@ -50,34 +50,34 @@ TEST_F(ScreenAshTest, Bounds) {
// Maximized bounds
EXPECT_EQ("0,0 600x598",
- ScreenAsh::GetMaximizedWindowParentBounds(
+ ScreenAsh::GetMaximizedWindowBoundsInParent(
primary->GetNativeView()).ToString());
EXPECT_EQ("0,0 500x500",
- ScreenAsh::GetMaximizedWindowParentBounds(
+ ScreenAsh::GetMaximizedWindowBoundsInParent(
secondary->GetNativeView()).ToString());
// Unmaximized work area bounds
EXPECT_EQ("0,0 600x552",
- ScreenAsh::GetUnmaximizedWorkAreaParentBounds(
+ ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(
primary->GetNativeView()).ToString());
EXPECT_EQ("0,0 500x500",
- ScreenAsh::GetUnmaximizedWorkAreaParentBounds(
+ ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(
secondary->GetNativeView()).ToString());
// Display bounds
EXPECT_EQ("0,0 600x600",
- ScreenAsh::GetDisplayParentBounds(
+ ScreenAsh::GetDisplayBoundsInParent(
primary->GetNativeView()).ToString());
EXPECT_EQ("0,0 500x500",
- ScreenAsh::GetDisplayParentBounds(
+ ScreenAsh::GetDisplayBoundsInParent(
secondary->GetNativeView()).ToString());
// Work area bounds
EXPECT_EQ("0,0 600x552",
- ScreenAsh::GetDisplayWorkAreaParentBounds(
+ ScreenAsh::GetDisplayWorkAreaBoundsInParent(
primary->GetNativeView()).ToString());
EXPECT_EQ("0,0 500x500",
- ScreenAsh::GetDisplayWorkAreaParentBounds(
+ ScreenAsh::GetDisplayWorkAreaBoundsInParent(
secondary->GetNativeView()).ToString());
}
#endif
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index 247a122..3bf6cf3 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -267,9 +267,9 @@ TEST_F(ShellTest, MAYBE_ManagedWindowModeBasics) {
views::Widget* launcher_widget = shell->launcher()->widget();
EXPECT_TRUE(launcher_widget->IsVisible());
// Launcher is at bottom-left of screen.
- EXPECT_EQ(0, launcher_widget->GetWindowScreenBounds().x());
+ EXPECT_EQ(0, launcher_widget->GetWindowBoundsInScreen().x());
EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHostSize().height(),
- launcher_widget->GetWindowScreenBounds().bottom());
+ launcher_widget->GetWindowBoundsInScreen().bottom());
// We have a desktop background but not a bare layer.
EXPECT_TRUE(test_api.root_window_layout()->background_widget());
EXPECT_FALSE(test_api.root_window_layout()->background_layer());
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 736e6e6..3fd3dbd 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -350,7 +350,7 @@ void SystemTray::RemoveBubble(SystemTrayBubble* bubble) {
// No need to show the launcher if the mouse isn't over the status area
// anymore.
aura::RootWindow* root = GetWidget()->GetNativeView()->GetRootWindow();
- should_show_launcher_ = GetWidget()->GetWindowScreenBounds().Contains(
+ should_show_launcher_ = GetWidget()->GetWindowBoundsInScreen().Contains(
root->last_mouse_location());
if (!should_show_launcher_)
Shell::GetInstance()->shelf()->UpdateAutoHideState();
diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc
index 4e383f6..c45f608 100644
--- a/ash/system/tray/system_tray_bubble.cc
+++ b/ash/system/tray/system_tray_bubble.cc
@@ -351,7 +351,7 @@ gfx::Rect SystemTrayBubble::GetAnchorRect() const {
gfx::Rect rect;
views::Widget* widget = bubble_view()->anchor_widget();
if (widget->IsVisible()) {
- rect = widget->GetWindowScreenBounds();
+ rect = widget->GetWindowBoundsInScreen();
if (anchor_type_ == ANCHOR_TYPE_TRAY) {
if (tray_->shelf_alignment() == SHELF_ALIGNMENT_BOTTOM) {
rect.Inset(
@@ -373,7 +373,7 @@ gfx::Rect SystemTrayBubble::GetAnchorRect() const {
// the anchor can include arrow on left or right, which should
// be deducted out from the anchor rect.
views::View* anchor_view = bubble_view()->anchor_view();
- rect = anchor_view->GetScreenBounds();
+ rect = anchor_view->GetBoundsInScreen();
gfx::Insets insets = anchor_view->GetInsets();
rect.Inset(insets);
}
diff --git a/ash/system/tray/system_tray_unittest.cc b/ash/system/tray/system_tray_unittest.cc
index 1c50a43..6577a78 100644
--- a/ash/system/tray/system_tray_unittest.cc
+++ b/ash/system/tray/system_tray_unittest.cc
@@ -138,12 +138,12 @@ TEST_F(SystemTrayTest, TrayWidgetAutoResizes) {
SystemTray* tray = GetSystemTray();
ASSERT_TRUE(tray->GetWidget());
- gfx::Size widget_size = tray->GetWidget()->GetWindowScreenBounds().size();
+ gfx::Size widget_size = tray->GetWidget()->GetWindowBoundsInScreen().size();
TestItem* test_item = new TestItem;
tray->AddTrayItem(test_item);
- gfx::Size new_size = tray->GetWidget()->GetWindowScreenBounds().size();
+ gfx::Size new_size = tray->GetWidget()->GetWindowBoundsInScreen().size();
// Adding the new item should change the size of the tray.
EXPECT_NE(widget_size.ToString(), new_size.ToString());
@@ -152,11 +152,11 @@ TEST_F(SystemTrayTest, TrayWidgetAutoResizes) {
// tray.
test_item->tray_view()->SetVisible(false);
EXPECT_EQ(widget_size.ToString(),
- tray->GetWidget()->GetWindowScreenBounds().size().ToString());
+ tray->GetWidget()->GetWindowBoundsInScreen().size().ToString());
test_item->tray_view()->SetVisible(true);
EXPECT_EQ(new_size.ToString(),
- tray->GetWidget()->GetWindowScreenBounds().size().ToString());
+ tray->GetWidget()->GetWindowBoundsInScreen().size().ToString());
}
TEST_F(SystemTrayTest, SystemTrayNotifications) {
@@ -209,7 +209,7 @@ TEST_F(SystemTrayTest, BubbleCreationTypesTest) {
RunAllPendingInMessageLoop();
views::Widget* widget = test_item->default_view()->GetWidget();
- gfx::Rect bubble_bounds = widget->GetWindowScreenBounds();
+ gfx::Rect bubble_bounds = widget->GetWindowBoundsInScreen();
tray->ShowDetailedView(test_item, 0, true, BUBBLE_USE_EXISTING);
RunAllPendingInMessageLoop();
@@ -217,14 +217,14 @@ TEST_F(SystemTrayTest, BubbleCreationTypesTest) {
EXPECT_FALSE(test_item->default_view());
EXPECT_EQ(bubble_bounds.ToString(), test_item->detailed_view()->GetWidget()->
- GetWindowScreenBounds().ToString());
+ GetWindowBoundsInScreen().ToString());
EXPECT_EQ(widget, test_item->detailed_view()->GetWidget());
tray->ShowDefaultView(BUBBLE_USE_EXISTING);
RunAllPendingInMessageLoop();
EXPECT_EQ(bubble_bounds.ToString(), test_item->default_view()->GetWidget()->
- GetWindowScreenBounds().ToString());
+ GetWindowBoundsInScreen().ToString());
EXPECT_EQ(widget, test_item->default_view()->GetWidget());
}
diff --git a/ash/system/tray/tray_bubble_view.cc b/ash/system/tray/tray_bubble_view.cc
index 4b0fb1a..1b934d4 100644
--- a/ash/system/tray/tray_bubble_view.cc
+++ b/ash/system/tray/tray_bubble_view.cc
@@ -376,7 +376,7 @@ void TrayBubbleView::Host::ProcessLocatedEvent(
const aura::LocatedEvent& event) {
if (!widget_)
return;
- gfx::Rect bounds = widget_->GetNativeWindow()->GetRootWindowBounds();
+ gfx::Rect bounds = widget_->GetNativeWindow()->GetBoundsInRootWindow();
if (bounds.Contains(event.root_location()))
return;
if (tray_view_) {
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc
index 8455de7..ac0afdc 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -634,7 +634,7 @@ class WebNotificationTray::Bubble : public internal::TrayBubbleView::Host,
}
virtual gfx::Rect GetAnchorRect() const OVERRIDE {
- gfx::Rect anchor_rect = tray_->tray_container()->GetScreenBounds();
+ gfx::Rect anchor_rect = tray_->tray_container()->GetBoundsInScreen();
return anchor_rect;
}
diff --git a/ash/tooltips/tooltip_controller.cc b/ash/tooltips/tooltip_controller.cc
index 5db968e..a37c03d 100644
--- a/ash/tooltips/tooltip_controller.cc
+++ b/ash/tooltips/tooltip_controller.cc
@@ -409,7 +409,7 @@ void TooltipController::UpdateIfRequired() {
string16 tooltip_text(tooltip_text_);
gfx::Point widget_loc = curr_mouse_loc_;
widget_loc = widget_loc.Add(
- tooltip_window_->GetScreenBounds().origin());
+ tooltip_window_->GetBoundsInScreen().origin());
tooltip_->SetText(tooltip_text, widget_loc);
tooltip_->Show();
}
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
index 53290de..1fa0ac5 100644
--- a/ash/wm/app_list_controller.cc
+++ b/ash/wm/app_list_controller.cc
@@ -202,7 +202,7 @@ void AppListController::ScheduleAnimation() {
void AppListController::ProcessLocatedEvent(const aura::LocatedEvent& event) {
if (view_ && is_visible_) {
views::Widget* widget = view_->GetWidget();
- if (!widget->GetNativeView()->GetRootWindowBounds().Contains(
+ if (!widget->GetNativeView()->GetBoundsInRootWindow().Contains(
event.root_location())) {
SetVisible(false);
}
diff --git a/ash/wm/base_layout_manager.cc b/ash/wm/base_layout_manager.cc
index bb08389..33f984b 100644
--- a/ash/wm/base_layout_manager.cc
+++ b/ash/wm/base_layout_manager.cc
@@ -34,7 +34,7 @@ gfx::Rect BoundsWithScreenEdgeVisible(aura::Window* window,
// window would be when maximized, inset it.
int grid_size = ash::Shell::GetInstance()->GetGridSize();
gfx::Rect max_bounds =
- ash::ScreenAsh::GetMaximizedWindowParentBounds(window);
+ ash::ScreenAsh::GetMaximizedWindowBoundsInParent(window);
max_bounds.Inset(grid_size, grid_size);
if (restore_bounds.Contains(max_bounds))
return max_bounds;
@@ -104,9 +104,9 @@ void BaseLayoutManager::SetChildBounds(aura::Window* child,
gfx::Rect child_bounds(requested_bounds);
// Some windows rely on this to set their initial bounds.
if (wm::IsWindowMaximized(child))
- child_bounds = ScreenAsh::GetMaximizedWindowParentBounds(child);
+ child_bounds = ScreenAsh::GetMaximizedWindowBoundsInParent(child);
else if (wm::IsWindowFullscreen(child))
- child_bounds = ScreenAsh::GetDisplayParentBounds(child);
+ child_bounds = ScreenAsh::GetDisplayBoundsInParent(child);
SetChildBoundsDirect(child, child_bounds);
}
@@ -194,7 +194,7 @@ void BaseLayoutManager::UpdateBoundsFromShowState(aura::Window* window,
SetRestoreBoundsIfNotSet(window);
MaybeAnimateToBounds(window,
animate,
- ScreenAsh::GetMaximizedWindowParentBounds(window));
+ ScreenAsh::GetMaximizedWindowBoundsInParent(window));
break;
case ui::SHOW_STATE_FULLSCREEN:
@@ -202,7 +202,7 @@ void BaseLayoutManager::UpdateBoundsFromShowState(aura::Window* window,
// Don't animate the full-screen window transition.
// TODO(jamescook): Use animation here. Be sure the lock screen works.
SetChildBoundsDirect(
- window, ScreenAsh::GetDisplayParentBounds(window));
+ window, ScreenAsh::GetDisplayBoundsInParent(window));
break;
default:
@@ -237,14 +237,14 @@ void BaseLayoutManager::AdjustWindowSizesForScreenChange() {
aura::Window* window = *it;
if (wm::IsWindowMaximized(window)) {
SetChildBoundsDirect(
- window, ScreenAsh::GetMaximizedWindowParentBounds(window));
+ window, ScreenAsh::GetMaximizedWindowBoundsInParent(window));
} else if (wm::IsWindowFullscreen(window)) {
SetChildBoundsDirect(
- window, ScreenAsh::GetDisplayParentBounds(window));
+ window, ScreenAsh::GetDisplayBoundsInParent(window));
} else {
// The work area may be smaller than the full screen.
gfx::Rect display_rect =
- ScreenAsh::GetDisplayWorkAreaParentBounds(window);
+ ScreenAsh::GetDisplayWorkAreaBoundsInParent(window);
// Put as much of the window as possible within the display area.
window->SetBounds(window->bounds().AdjustToFit(display_rect));
}
diff --git a/ash/wm/base_layout_manager_unittest.cc b/ash/wm/base_layout_manager_unittest.cc
index 5d48392..47f1306 100644
--- a/ash/wm/base_layout_manager_unittest.cc
+++ b/ash/wm/base_layout_manager_unittest.cc
@@ -55,7 +55,7 @@ TEST_F(BaseLayoutManagerTest, Maximize) {
window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
// Maximized window fills the work area, not the whole display.
EXPECT_EQ(
- ScreenAsh::GetMaximizedWindowParentBounds(window.get()).ToString(),
+ ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString(),
window->bounds().ToString());
window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
EXPECT_EQ(bounds.ToString(), window->bounds().ToString());
@@ -79,15 +79,16 @@ TEST_F(BaseLayoutManagerTest, MaximizeRootWindowResize) {
scoped_ptr<aura::Window> window(CreateTestWindow(bounds));
window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
gfx::Rect initial_work_area_bounds =
- ScreenAsh::GetMaximizedWindowParentBounds(window.get());
+ ScreenAsh::GetMaximizedWindowBoundsInParent(window.get());
EXPECT_EQ(initial_work_area_bounds.ToString(), window->bounds().ToString());
// Enlarge the root window. We should still match the work area size.
Shell::GetPrimaryRootWindow()->SetHostSize(gfx::Size(900, 700));
EXPECT_EQ(
- ScreenAsh::GetMaximizedWindowParentBounds(window.get()).ToString(),
+ ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString(),
window->bounds().ToString());
- EXPECT_NE(initial_work_area_bounds.ToString(),
- ScreenAsh::GetMaximizedWindowParentBounds(window.get()).ToString());
+ EXPECT_NE(
+ initial_work_area_bounds.ToString(),
+ ScreenAsh::GetMaximizedWindowBoundsInParent(window.get()).ToString());
}
// Tests normal->fullscreen->normal.
@@ -169,7 +170,7 @@ TEST_F(BaseLayoutManagerTest, BoundsWithScreenEdgeVisible) {
// It should have the default maximized window bounds, inset by the grid size.
int grid_size = ash::Shell::GetInstance()->GetGridSize();
gfx::Rect max_bounds =
- ash::ScreenAsh::GetMaximizedWindowParentBounds(window.get());
+ ash::ScreenAsh::GetMaximizedWindowBoundsInParent(window.get());
max_bounds.Inset(grid_size, grid_size);
EXPECT_EQ(max_bounds.ToString(), window->bounds().ToString());
}
diff --git a/ash/wm/custom_frame_view_ash_unittest.cc b/ash/wm/custom_frame_view_ash_unittest.cc
index f29c3fe..ebdc946 100644
--- a/ash/wm/custom_frame_view_ash_unittest.cc
+++ b/ash/wm/custom_frame_view_ash_unittest.cc
@@ -112,7 +112,7 @@ TEST_F(CustomFrameViewAshTest, ResizeButtonToggleMaximize) {
CustomFrameViewAsh* frame = custom_frame_view_ash(widget);
CustomFrameViewAsh::TestApi test(frame);
views::View* view = test.maximize_button();
- gfx::Point center = view->GetScreenBounds().CenterPoint();
+ gfx::Point center = view->GetBoundsInScreen().CenterPoint();
aura::test::EventGenerator generator(window->GetRootWindow(), center);
@@ -122,22 +122,22 @@ TEST_F(CustomFrameViewAshTest, ResizeButtonToggleMaximize) {
RunAllPendingInMessageLoop();
EXPECT_TRUE(ash::wm::IsWindowMaximized(window));
- center = view->GetScreenBounds().CenterPoint();
+ center = view->GetBoundsInScreen().CenterPoint();
generator.MoveMouseTo(center);
generator.ClickLeftButton();
RunAllPendingInMessageLoop();
EXPECT_FALSE(ash::wm::IsWindowMaximized(window));
- generator.GestureTapAt(view->GetScreenBounds().CenterPoint());
+ generator.GestureTapAt(view->GetBoundsInScreen().CenterPoint());
EXPECT_TRUE(ash::wm::IsWindowMaximized(window));
- generator.GestureTapAt(view->GetScreenBounds().CenterPoint());
+ generator.GestureTapAt(view->GetBoundsInScreen().CenterPoint());
EXPECT_FALSE(ash::wm::IsWindowMaximized(window));
- generator.GestureTapDownAndUp(view->GetScreenBounds().CenterPoint());
+ generator.GestureTapDownAndUp(view->GetBoundsInScreen().CenterPoint());
EXPECT_TRUE(ash::wm::IsWindowMaximized(window));
- generator.GestureTapDownAndUp(view->GetScreenBounds().CenterPoint());
+ generator.GestureTapDownAndUp(view->GetBoundsInScreen().CenterPoint());
EXPECT_FALSE(ash::wm::IsWindowMaximized(window));
widget->Close();
@@ -150,7 +150,7 @@ TEST_F(CustomFrameViewAshTest, ResizeButtonDrag) {
CustomFrameViewAsh* frame = custom_frame_view_ash(widget);
CustomFrameViewAsh::TestApi test(frame);
views::View* view = test.maximize_button();
- gfx::Point center = view->GetScreenBounds().CenterPoint();
+ gfx::Point center = view->GetBoundsInScreen().CenterPoint();
const int kGridSize = ash::Shell::GetInstance()->GetGridSize();
aura::test::EventGenerator generator(window->GetRootWindow(), center);
@@ -173,7 +173,7 @@ TEST_F(CustomFrameViewAshTest, ResizeButtonDrag) {
// Snap left.
{
- center = view->GetScreenBounds().CenterPoint();
+ center = view->GetBoundsInScreen().CenterPoint();
generator.MoveMouseTo(center);
generator.PressLeftButton();
generator.MoveMouseBy(-10, 0);
@@ -189,7 +189,7 @@ TEST_F(CustomFrameViewAshTest, ResizeButtonDrag) {
// Minimize.
{
- center = view->GetScreenBounds().CenterPoint();
+ center = view->GetBoundsInScreen().CenterPoint();
generator.MoveMouseTo(center);
generator.PressLeftButton();
generator.MoveMouseBy(0, 10);
@@ -205,7 +205,7 @@ TEST_F(CustomFrameViewAshTest, ResizeButtonDrag) {
// Snap right.
{
- center = view->GetScreenBounds().CenterPoint();
+ center = view->GetBoundsInScreen().CenterPoint();
gfx::Point end = center;
end.Offset(40, 0);
generator.GestureScrollSequence(center, end,
@@ -222,7 +222,7 @@ TEST_F(CustomFrameViewAshTest, ResizeButtonDrag) {
// Snap left.
{
- center = view->GetScreenBounds().CenterPoint();
+ center = view->GetBoundsInScreen().CenterPoint();
gfx::Point end = center;
end.Offset(-40, 0);
generator.GestureScrollSequence(center, end,
@@ -239,7 +239,7 @@ TEST_F(CustomFrameViewAshTest, ResizeButtonDrag) {
// Minimize.
{
- center = view->GetScreenBounds().CenterPoint();
+ center = view->GetBoundsInScreen().CenterPoint();
gfx::Point end = center;
end.Offset(0, 40);
generator.GestureScrollSequence(center, end,
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc
index 7565a3e..4224408 100644
--- a/ash/wm/frame_painter.cc
+++ b/ash/wm/frame_painter.cc
@@ -369,7 +369,7 @@ void FramePainter::PaintHeader(views::NonClientFrameView* view,
// of the screen.
// TODO(oshima): This will not work under multi-display, need to add method
// like GetWindowBoundsInDisplay().
- if (frame_->GetWindowScreenBounds().y() == 0)
+ if (frame_->GetWindowBoundsInScreen().y() == 0)
return;
// Draw the top corners and edge.
diff --git a/ash/wm/panel_layout_manager.cc b/ash/wm/panel_layout_manager.cc
index 84dfdc6..52599f3 100644
--- a/ash/wm/panel_layout_manager.cc
+++ b/ash/wm/panel_layout_manager.cc
@@ -250,7 +250,7 @@ void PanelLayoutManager::Relayout() {
return;
AutoReset<bool> auto_reset_in_layout(&in_layout_, true);
- int launcher_top = launcher_->widget()->GetWindowScreenBounds().y();
+ int launcher_top = launcher_->widget()->GetWindowBoundsInScreen().y();
aura::Window* active_panel = NULL;
for (PanelList::iterator iter = panel_windows_.begin();
iter != panel_windows_.end(); ++iter) {
@@ -353,8 +353,8 @@ void PanelLayoutManager::UpdateCallout(aura::Window* active_panel) {
void PanelLayoutManager::ShowCalloutHelper(aura::Window* active_panel) {
DCHECK(active_panel);
- gfx::Rect bounds = active_panel->GetRootWindowBounds();
- gfx::Rect callout_bounds = callout_widget_->GetWindowScreenBounds();
+ gfx::Rect bounds = active_panel->GetBoundsInRootWindow();
+ gfx::Rect callout_bounds = callout_widget_->GetWindowBoundsInScreen();
callout_bounds.set_x(
bounds.x() + (bounds.width() - callout_bounds.width()) / 2);
callout_bounds.set_y(bounds.bottom());
diff --git a/ash/wm/panel_layout_manager_unittest.cc b/ash/wm/panel_layout_manager_unittest.cc
index 7835575..1e1c7a0 100644
--- a/ash/wm/panel_layout_manager_unittest.cc
+++ b/ash/wm/panel_layout_manager_unittest.cc
@@ -80,7 +80,7 @@ class PanelLayoutManagerTest : public ash::test::AshTestBase {
gfx::Rect icon_bounds = launcher->GetScreenBoundsOfItemIconForWindow(panel);
ASSERT_FALSE(icon_bounds.IsEmpty());
- gfx::Rect window_bounds = panel->GetRootWindowBounds();
+ gfx::Rect window_bounds = panel->GetBoundsInRootWindow();
// 1-pixel tolerance--since we center panels over their icons, panels with
// odd pixel widths won't be perfectly lined up with even pixel width
@@ -88,7 +88,7 @@ class PanelLayoutManagerTest : public ash::test::AshTestBase {
EXPECT_NEAR(icon_bounds.CenterPoint().x(),
window_bounds.CenterPoint().x(),
1);
- EXPECT_EQ(launcher->widget()->GetWindowScreenBounds().y(),
+ EXPECT_EQ(launcher->widget()->GetWindowBoundsInScreen().y(),
window_bounds.bottom());
}
@@ -98,10 +98,10 @@ class PanelLayoutManagerTest : public ash::test::AshTestBase {
views::Widget* widget = NULL;
GetCalloutWidget(&widget);
EXPECT_TRUE(widget->IsVisible());
- EXPECT_EQ(panel->GetRootWindowBounds().bottom(),
- widget->GetWindowScreenBounds().y());
- EXPECT_NEAR(panel->GetRootWindowBounds().CenterPoint().x(),
- widget->GetWindowScreenBounds().CenterPoint().x(),
+ EXPECT_EQ(panel->GetBoundsInRootWindow().bottom(),
+ widget->GetWindowBoundsInScreen().y());
+ EXPECT_NEAR(panel->GetBoundsInRootWindow().CenterPoint().x(),
+ widget->GetWindowBoundsInScreen().CenterPoint().x(),
1);
}
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index 79be3d7..156ea79 100644
--- a/ash/wm/shelf_layout_manager.cc
+++ b/ash/wm/shelf_layout_manager.cc
@@ -184,7 +184,7 @@ bool ShelfLayoutManager::SetAlignment(ShelfAlignment alignment) {
gfx::Rect ShelfLayoutManager::GetIdealBounds() {
// TODO(oshima): this is wrong. Figure out what display shelf is on
// and everything should be based on it.
- gfx::Rect bounds(ScreenAsh::GetDisplayParentBounds(
+ gfx::Rect bounds(ScreenAsh::GetDisplayBoundsInParent(
status_->GetNativeView()));
int width = 0, height = 0;
GetShelfSize(&width, &height);
@@ -325,7 +325,7 @@ void ShelfLayoutManager::OnWindowActivated(aura::Window* active,
gfx::Rect ShelfLayoutManager::GetMaximizedWindowBounds(
aura::Window* window) {
- gfx::Rect bounds(ScreenAsh::GetDisplayParentBounds(window));
+ gfx::Rect bounds(ScreenAsh::GetDisplayBoundsInParent(window));
if (auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT ||
auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS) {
AdjustBoundsBasedOnAlignment(kAutoHideSize, &bounds);
@@ -337,7 +337,7 @@ gfx::Rect ShelfLayoutManager::GetMaximizedWindowBounds(
gfx::Rect ShelfLayoutManager::GetUnmaximizedWorkAreaBounds(
aura::Window* window) {
- gfx::Rect bounds(ScreenAsh::GetDisplayParentBounds(window));
+ gfx::Rect bounds(ScreenAsh::GetDisplayBoundsInParent(window));
int size;
if (auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS) {
size = kAutoHideSize;
@@ -417,7 +417,7 @@ void ShelfLayoutManager::StopAnimating() {
void ShelfLayoutManager::GetShelfSize(int* width, int* height) {
*width = *height = 0;
- gfx::Rect status_bounds(status_->GetWindowScreenBounds());
+ gfx::Rect status_bounds(status_->GetWindowBoundsInScreen());
gfx::Size launcher_size = launcher_ ?
launcher_widget()->GetContentsView()->GetPreferredSize() : gfx::Size();
if (alignment_ == SHELF_ALIGNMENT_BOTTOM)
@@ -446,7 +446,7 @@ void ShelfLayoutManager::CalculateTargetBounds(
TargetBounds* target_bounds) {
const gfx::Rect& available_bounds(
status_->GetNativeView()->GetRootWindow()->bounds());
- gfx::Rect status_bounds(status_->GetWindowScreenBounds());
+ gfx::Rect status_bounds(status_->GetWindowBoundsInScreen());
gfx::Size launcher_size = launcher_ ?
launcher_widget()->GetContentsView()->GetPreferredSize() : gfx::Size();
int shelf_size = 0;
@@ -554,7 +554,7 @@ ShelfLayoutManager::AutoHideState ShelfLayoutManager::CalculateAutoHideState(
aura::RootWindow* root = launcher_widget()->GetNativeView()->GetRootWindow();
bool mouse_over_launcher =
- launcher_widget()->GetWindowScreenBounds().Contains(
+ launcher_widget()->GetWindowBoundsInScreen().Contains(
root->last_mouse_location());
return mouse_over_launcher ? AUTO_HIDE_SHOWN : AUTO_HIDE_HIDDEN;
}
diff --git a/ash/wm/shelf_layout_manager_unittest.cc b/ash/wm/shelf_layout_manager_unittest.cc
index 31b7e69..8717628 100644
--- a/ash/wm/shelf_layout_manager_unittest.cc
+++ b/ash/wm/shelf_layout_manager_unittest.cc
@@ -88,8 +88,9 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) {
shelf->LayoutShelf();
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
- gfx::Rect status_bounds(shelf->status()->GetWindowScreenBounds());
- gfx::Rect launcher_bounds(shelf->launcher_widget()->GetWindowScreenBounds());
+ gfx::Rect status_bounds(shelf->status()->GetWindowBoundsInScreen());
+ gfx::Rect launcher_bounds(
+ shelf->launcher_widget()->GetWindowBoundsInScreen());
int shelf_height = shelf->GetIdealBounds().height();
const aura::DisplayManager* manager =
@@ -170,7 +171,7 @@ TEST_F(ShelfLayoutManagerTest, LauncherInitiallySized) {
ASSERT_TRUE(shelf_layout_manager);
ASSERT_TRUE(shelf_layout_manager->status());
int status_width =
- shelf_layout_manager->status()->GetWindowScreenBounds().width();
+ shelf_layout_manager->status()->GetWindowBoundsInScreen().width();
// Test only makes sense if the status is > 0, which is better be.
EXPECT_GT(status_width, 0);
EXPECT_EQ(status_width, launcher->status_size().width());
@@ -219,7 +220,7 @@ TEST_F(ShelfLayoutManagerTest, AutoHide) {
// launcher should go off the screen.
shelf->LayoutShelf();
EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
- shelf->launcher_widget()->GetWindowScreenBounds().y());
+ shelf->launcher_widget()->GetWindowBoundsInScreen().y());
EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
gfx::Screen::GetDisplayNearestWindow(root).work_area().bottom());
@@ -231,7 +232,7 @@ TEST_F(ShelfLayoutManagerTest, AutoHide) {
EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE_SHOWN, shelf->auto_hide_state());
shelf->LayoutShelf();
EXPECT_EQ(root->bounds().bottom() - shelf->GetIdealBounds().height(),
- shelf->launcher_widget()->GetWindowScreenBounds().y());
+ shelf->launcher_widget()->GetWindowBoundsInScreen().y());
EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
gfx::Screen::GetDisplayNearestWindow(root).work_area().bottom());
@@ -241,7 +242,7 @@ TEST_F(ShelfLayoutManagerTest, AutoHide) {
EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
shelf->LayoutShelf();
EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
- shelf->launcher_widget()->GetWindowScreenBounds().y());
+ shelf->launcher_widget()->GetWindowBoundsInScreen().y());
// Drag mouse to bottom of screen.
generator.PressLeftButton();
@@ -283,7 +284,7 @@ TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) {
// launcher should go off the screen.
shelf->LayoutShelf();
EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
- shelf->launcher_widget()->GetWindowScreenBounds().y());
+ shelf->launcher_widget()->GetWindowBoundsInScreen().y());
aura::Window* lock_container = Shell::GetContainer(
Shell::GetPrimaryRootWindow(),
@@ -350,17 +351,17 @@ TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) {
widget->Maximize();
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
EXPECT_EQ(gfx::Screen::GetDisplayNearestWindow(window).work_area().bottom(),
- widget->GetWorkAreaScreenBounds().bottom());
+ widget->GetWorkAreaBoundsInScreen().bottom());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
EXPECT_EQ(gfx::Screen::GetDisplayNearestWindow(window).work_area().bottom(),
- widget->GetWorkAreaScreenBounds().bottom());
+ widget->GetWorkAreaBoundsInScreen().bottom());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
EXPECT_EQ(gfx::Screen::GetDisplayNearestWindow(window).work_area().bottom(),
- widget->GetWorkAreaScreenBounds().bottom());
+ widget->GetWorkAreaBoundsInScreen().bottom());
}
// Verifies the shelf is visible when status/launcher is focused.
@@ -497,7 +498,8 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
shelf->SetAlignment(SHELF_ALIGNMENT_LEFT);
- gfx::Rect launcher_bounds(shelf->launcher_widget()->GetWindowScreenBounds());
+ gfx::Rect launcher_bounds(
+ shelf->launcher_widget()->GetWindowBoundsInScreen());
const aura::DisplayManager* manager =
aura::Env::GetInstance()->display_manager();
gfx::Display display =
@@ -510,7 +512,7 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
shelf->launcher_widget()->GetContentsView()->GetPreferredSize().width());
EXPECT_EQ(SHELF_ALIGNMENT_LEFT,
Shell::GetInstance()->system_tray()->shelf_alignment());
- gfx::Rect status_bounds(shelf->status()->GetWindowScreenBounds());
+ gfx::Rect status_bounds(shelf->status()->GetWindowBoundsInScreen());
EXPECT_GE(status_bounds.width(),
shelf->status()->GetContentsView()->GetPreferredSize().width());
EXPECT_EQ(shelf->GetIdealBounds().width(),
@@ -523,7 +525,7 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
EXPECT_EQ(display.bounds().height(), launcher_bounds.height());
shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
- launcher_bounds = shelf->launcher_widget()->GetWindowScreenBounds();
+ launcher_bounds = shelf->launcher_widget()->GetWindowBoundsInScreen();
display = manager->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
ASSERT_NE(-1, display.id());
EXPECT_EQ(shelf->GetIdealBounds().width(),
@@ -533,7 +535,7 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
shelf->launcher_widget()->GetContentsView()->GetPreferredSize().width());
EXPECT_EQ(SHELF_ALIGNMENT_RIGHT,
Shell::GetInstance()->system_tray()->shelf_alignment());
- status_bounds = gfx::Rect(shelf->status()->GetWindowScreenBounds());
+ status_bounds = gfx::Rect(shelf->status()->GetWindowBoundsInScreen());
EXPECT_GE(status_bounds.width(),
shelf->status()->GetContentsView()->GetPreferredSize().width());
EXPECT_EQ(shelf->GetIdealBounds().width(),
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc
index 8358d77..14941cf 100644
--- a/ash/wm/system_gesture_event_filter.cc
+++ b/ash/wm/system_gesture_event_filter.cc
@@ -449,7 +449,7 @@ class SystemPinchHandler {
phantom_state_ = PHANTOM_WINDOW_MAXIMIZED;
return ScreenAsh::ConvertRectToScreen(
target_->parent(),
- ScreenAsh::GetMaximizedWindowParentBounds(target_));
+ ScreenAsh::GetMaximizedWindowBoundsInParent(target_));
}
if (pinch_factor_ < kPinchThresholdForMinimize) {
@@ -465,7 +465,7 @@ class SystemPinchHandler {
Launcher* launcher = Shell::GetInstance()->launcher();
gfx::Rect rect = launcher->GetScreenBoundsOfItemIconForWindow(target_);
if (rect.IsEmpty())
- rect = launcher->widget()->GetWindowScreenBounds();
+ rect = launcher->widget()->GetWindowBoundsInScreen();
else
rect.Inset(-8, -8);
phantom_state_ = PHANTOM_WINDOW_MINIMIZED;
diff --git a/ash/wm/toplevel_window_event_filter_unittest.cc b/ash/wm/toplevel_window_event_filter_unittest.cc
index 7683b3a..ca9aeeb 100644
--- a/ash/wm/toplevel_window_event_filter_unittest.cc
+++ b/ash/wm/toplevel_window_event_filter_unittest.cc
@@ -477,7 +477,7 @@ TEST_F(ToplevelWindowEventFilterTest, GestureDrag) {
old_bounds = target->bounds();
// Snap left.
- end = location = target->GetRootWindowBounds().CenterPoint();
+ end = location = target->GetBoundsInRootWindow().CenterPoint();
end.Offset(-100, 0);
generator.GestureScrollSequence(location, end,
base::TimeDelta::FromMilliseconds(5),
@@ -493,7 +493,7 @@ TEST_F(ToplevelWindowEventFilterTest, GestureDrag) {
old_bounds = target->bounds();
// Maximize.
- end = location = target->GetRootWindowBounds().CenterPoint();
+ end = location = target->GetBoundsInRootWindow().CenterPoint();
end.Offset(0, -100);
generator.GestureScrollSequence(location, end,
base::TimeDelta::FromMilliseconds(5),
@@ -506,7 +506,7 @@ TEST_F(ToplevelWindowEventFilterTest, GestureDrag) {
target->SetBounds(old_bounds);
// Minimize.
- end = location = target->GetRootWindowBounds().CenterPoint();
+ end = location = target->GetBoundsInRootWindow().CenterPoint();
end.Offset(0, 100);
generator.GestureScrollSequence(location, end,
base::TimeDelta::FromMilliseconds(5),
diff --git a/ash/wm/video_detector.cc b/ash/wm/video_detector.cc
index 52a3ded..5b32a53 100644
--- a/ash/wm/video_detector.cc
+++ b/ash/wm/video_detector.cc
@@ -100,7 +100,7 @@ void VideoDetector::MaybeNotifyObservers(aura::Window* window,
return;
gfx::Rect root_bounds = window->GetRootWindow()->bounds();
- if (!window->GetRootWindowBounds().Intersects(root_bounds))
+ if (!window->GetBoundsInRootWindow().Intersects(root_bounds))
return;
FOR_EACH_OBSERVER(VideoDetectorObserver, observers_, OnVideoDetected());
diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc
index 7cea2e1..9875106 100644
--- a/ash/wm/window_resizer.cc
+++ b/ash/wm/window_resizer.cc
@@ -204,7 +204,7 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
details.window_component == HTBOTTOMRIGHT ||
details.window_component == HTBOTTOMLEFT) {
gfx::Rect work_area =
- ScreenAsh::GetDisplayWorkAreaParentBounds(details.window);
+ ScreenAsh::GetDisplayWorkAreaBoundsInParent(details.window);
if (new_bounds.bottom() > work_area.bottom())
new_bounds.Inset(0, 0, 0,
new_bounds.bottom() - work_area.bottom());
diff --git a/ash/wm/workspace/frame_maximize_button.cc b/ash/wm/workspace/frame_maximize_button.cc
index 770195f..386a2ac 100644
--- a/ash/wm/workspace/frame_maximize_button.cc
+++ b/ash/wm/workspace/frame_maximize_button.cc
@@ -363,7 +363,7 @@ gfx::Rect FrameMaximizeButton::ScreenBoundsForType(SnapType type) const {
case SNAP_MAXIMIZE:
return ScreenAsh::ConvertRectToScreen(
window->parent(),
- ScreenAsh::GetMaximizedWindowParentBounds(window));
+ ScreenAsh::GetMaximizedWindowBoundsInParent(window));
case SNAP_MINIMIZE: {
Launcher* launcher = Shell::GetInstance()->launcher();
gfx::Rect item_rect(launcher->GetScreenBoundsOfItemIconForWindow(window));
@@ -373,11 +373,12 @@ gfx::Rect FrameMaximizeButton::ScreenBoundsForType(SnapType type) const {
item_rect.Inset(-8, -8);
return item_rect;
}
- return launcher->widget()->GetWindowScreenBounds();
+ return launcher->widget()->GetWindowBoundsInScreen();
}
case SNAP_RESTORE: {
const gfx::Rect* restore = GetRestoreBoundsInScreen(window);
- return restore ? *restore : frame_->GetWidget()->GetWindowScreenBounds();
+ return restore ?
+ *restore : frame_->GetWidget()->GetWindowBoundsInScreen();
}
case SNAP_NONE:
NOTREACHED();
diff --git a/ash/wm/workspace/maximized_workspace.cc b/ash/wm/workspace/maximized_workspace.cc
index 6182b09..d741e8e 100644
--- a/ash/wm/workspace/maximized_workspace.cc
+++ b/ash/wm/workspace/maximized_workspace.cc
@@ -41,10 +41,10 @@ void MaximizedWorkspace::OnWindowRemoved(aura::Window* window) {
void MaximizedWorkspace::ResetWindowBounds(aura::Window* window) {
if (wm::IsWindowFullscreen(window)) {
SetWindowBounds(window,
- ScreenAsh::GetDisplayParentBounds(window));
+ ScreenAsh::GetDisplayBoundsInParent(window));
} else {
SetWindowBounds(window,
- ScreenAsh::GetMaximizedWindowParentBounds(window));
+ ScreenAsh::GetMaximizedWindowBoundsInParent(window));
}
}
diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc
index 61d140d..a94da55 100644
--- a/ash/wm/workspace/multi_window_resize_controller.cc
+++ b/ash/wm/workspace/multi_window_resize_controller.cc
@@ -427,7 +427,7 @@ void MultiWindowResizeController::CompleteResize(int event_flags) {
// Mouse may still be over resizer, if not hide.
gfx::Point screen_loc = gfx::Screen::GetCursorScreenPoint();
- if (!resize_widget_->GetWindowScreenBounds().Contains(screen_loc))
+ if (!resize_widget_->GetWindowBoundsInScreen().Contains(screen_loc))
Hide();
}
@@ -466,7 +466,7 @@ bool MultiWindowResizeController::IsOverWindows(
if (window_resizer_.get())
return true; // Ignore hides while actively resizing.
- if (resize_widget_->GetWindowScreenBounds().Contains(screen_location))
+ if (resize_widget_->GetWindowBoundsInScreen().Contains(screen_location))
return true;
int hit1, hit2;
diff --git a/ash/wm/workspace/multi_window_resize_controller_unittest.cc b/ash/wm/workspace/multi_window_resize_controller_unittest.cc
index 4dbf4f2..12dc0c92 100644
--- a/ash/wm/workspace/multi_window_resize_controller_unittest.cc
+++ b/ash/wm/workspace/multi_window_resize_controller_unittest.cc
@@ -150,7 +150,7 @@ TEST_F(MultiWindowResizeControllerTest, DeleteWindow) {
// Move the mouse over the resize widget.
ASSERT_TRUE(resize_widget());
- gfx::Rect bounds(resize_widget()->GetWindowScreenBounds());
+ gfx::Rect bounds(resize_widget()->GetWindowBoundsInScreen());
generator.MoveMouseTo(bounds.x() + 1, bounds.y() + 1);
EXPECT_FALSE(HasPendingShow());
EXPECT_TRUE(IsShowing());
@@ -193,7 +193,7 @@ TEST_F(MultiWindowResizeControllerTest, Drag) {
// Move the mouse over the resize widget.
ASSERT_TRUE(resize_widget());
- gfx::Rect bounds(resize_widget()->GetWindowScreenBounds());
+ gfx::Rect bounds(resize_widget()->GetWindowBoundsInScreen());
generator.MoveMouseTo(bounds.x() + 1, bounds.y() + 1);
EXPECT_FALSE(HasPendingShow());
EXPECT_TRUE(IsShowing());
@@ -240,7 +240,7 @@ TEST_F(MultiWindowResizeControllerTest, Three) {
EXPECT_FALSE(HasPendingHide());
// w3 should be picked up when resize is started.
- gfx::Rect bounds(resize_widget()->GetWindowScreenBounds());
+ gfx::Rect bounds(resize_widget()->GetWindowBoundsInScreen());
generator.MoveMouseTo(bounds.x() + 1, bounds.y() + 1);
generator.PressLeftButton();
generator.MoveMouseTo(bounds.x() + 11, bounds.y() + 10);
diff --git a/ash/wm/workspace/phantom_window_controller.cc b/ash/wm/workspace/phantom_window_controller.cc
index 45d6140..99861fd 100644
--- a/ash/wm/workspace/phantom_window_controller.cc
+++ b/ash/wm/workspace/phantom_window_controller.cc
@@ -86,10 +86,10 @@ void PhantomWindowController::Show(const gfx::Rect& bounds) {
if (!phantom_widget_.get()) {
// Show the phantom at the bounds of the window. We'll animate to the target
// bounds.
- start_bounds_ = window_->GetScreenBounds();
+ start_bounds_ = window_->GetBoundsInScreen();
CreatePhantomWidget(start_bounds_);
} else {
- start_bounds_ = phantom_widget_->GetWindowScreenBounds();
+ start_bounds_ = phantom_widget_->GetWindowBoundsInScreen();
}
animation_.reset(new ui::SlideAnimation(this));
animation_->Show();
diff --git a/ash/wm/workspace/snap_sizer.cc b/ash/wm/workspace/snap_sizer.cc
index 997b719..ca0ccb65 100644
--- a/ash/wm/workspace/snap_sizer.cc
+++ b/ash/wm/workspace/snap_sizer.cc
@@ -110,7 +110,7 @@ gfx::Rect SnapSizer::GetTargetBounds() const {
}
gfx::Rect SnapSizer::GetTargetBoundsForPercent(int percent_index) const {
- gfx::Rect work_area(ScreenAsh::GetUnmaximizedWorkAreaParentBounds(window_));
+ gfx::Rect work_area(ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(window_));
int y = WindowResizer::AlignToGridRoundUp(work_area.y(), grid_size_);
// We don't align to the bottom of the grid as the launcher may not
// necessarily align to the grid (happens when auto-hidden).
@@ -129,7 +129,7 @@ gfx::Rect SnapSizer::GetTargetBoundsForPercent(int percent_index) const {
}
bool SnapSizer::AlongEdge(int x) const {
- gfx::Rect area(ScreenAsh::GetDisplayParentBounds(window_));
+ gfx::Rect area(ScreenAsh::GetDisplayBoundsInParent(window_));
return (x <= area.x()) || (x >= area.right() - 1);
}
diff --git a/ash/wm/workspace/workspace_manager_unittest.cc b/ash/wm/workspace/workspace_manager_unittest.cc
index 6b182ca..c01128c 100644
--- a/ash/wm/workspace/workspace_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_manager_unittest.cc
@@ -143,9 +143,9 @@ TEST_F(WorkspaceManagerTest, SingleMaximizeWindow) {
EXPECT_EQ(Workspace::TYPE_MAXIMIZED, workspaces()[1]->type());
ASSERT_EQ(1u, workspaces()[1]->windows().size());
EXPECT_EQ(w1.get(), workspaces()[1]->windows()[0]);
- EXPECT_EQ(ScreenAsh::GetMaximizedWindowParentBounds(w1.get()).width(),
+ EXPECT_EQ(ScreenAsh::GetMaximizedWindowBoundsInParent(w1.get()).width(),
w1->bounds().width());
- EXPECT_EQ(ScreenAsh::GetMaximizedWindowParentBounds(w1.get()).height(),
+ EXPECT_EQ(ScreenAsh::GetMaximizedWindowBoundsInParent(w1.get()).height(),
w1->bounds().height());
// Restore the window.
@@ -204,7 +204,7 @@ TEST_F(WorkspaceManagerTest, AddMaximizedWindowWhenEmpty) {
ASSERT_TRUE(w1->layer() != NULL);
EXPECT_TRUE(w1->layer()->visible());
gfx::Rect work_area(
- ScreenAsh::GetMaximizedWindowParentBounds(w1.get()));
+ ScreenAsh::GetMaximizedWindowBoundsInParent(w1.get()));
EXPECT_EQ(work_area.width(), w1->bounds().width());
EXPECT_EQ(work_area.height(), w1->bounds().height());
@@ -242,7 +242,7 @@ TEST_F(WorkspaceManagerTest, MaximizeWithNormalWindow) {
ASSERT_TRUE(w2->layer() != NULL);
EXPECT_TRUE(w2->layer()->visible());
- gfx::Rect work_area(ScreenAsh::GetMaximizedWindowParentBounds(w1.get()));
+ gfx::Rect work_area(ScreenAsh::GetMaximizedWindowBoundsInParent(w1.get()));
EXPECT_EQ(work_area.width(), w2->bounds().width());
EXPECT_EQ(work_area.height(), w2->bounds().height());
@@ -512,7 +512,7 @@ TEST_F(WorkspaceManagerTest, ShelfStateUpdated) {
w1->Show();
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
- EXPECT_EQ(ScreenAsh::GetMaximizedWindowParentBounds(w2.get()).ToString(),
+ EXPECT_EQ(ScreenAsh::GetMaximizedWindowBoundsInParent(w2.get()).ToString(),
w2->bounds().ToString());
// Switch to w2.
@@ -520,7 +520,7 @@ TEST_F(WorkspaceManagerTest, ShelfStateUpdated) {
EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
EXPECT_EQ("0,1 101x102", w1->bounds().ToString());
- EXPECT_EQ(ScreenAsh::GetMaximizedWindowParentBounds(w2.get()).ToString(),
+ EXPECT_EQ(ScreenAsh::GetMaximizedWindowBoundsInParent(w2.get()).ToString(),
w2->bounds().ToString());
}
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index 455afdd..0c998cb 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -281,7 +281,7 @@ void WorkspaceWindowResizer::AdjustBoundsForMainWindow(
gfx::Rect* bounds, int grid_size) const {
// Always keep kMinOnscreenHeight on the bottom.
gfx::Rect work_area(
- ScreenAsh::GetDisplayWorkAreaParentBounds(details_.window));
+ ScreenAsh::GetDisplayWorkAreaBoundsInParent(details_.window));
int max_y = AlignToGridRoundUp(work_area.bottom() - kMinOnscreenHeight,
grid_size);
if (bounds->y() > max_y)
@@ -335,7 +335,7 @@ void WorkspaceWindowResizer::SnapToWorkAreaEdges(
bool WorkspaceWindowResizer::TouchesBottomOfScreen() const {
gfx::Rect work_area(
- ScreenAsh::GetDisplayWorkAreaParentBounds(details_.window));
+ ScreenAsh::GetDisplayWorkAreaBoundsInParent(details_.window));
return (attached_windows_.empty() &&
details_.window->bounds().bottom() == work_area.bottom()) ||
(!attached_windows_.empty() &&
@@ -423,7 +423,7 @@ WorkspaceWindowResizer::SnapType WorkspaceWindowResizer::GetSnapType(
const gfx::Point& location) const {
// TODO: this likely only wants total display area, not the area of a single
// display.
- gfx::Rect area(ScreenAsh::GetDisplayParentBounds(details_.window));
+ gfx::Rect area(ScreenAsh::GetDisplayBoundsInParent(details_.window));
if (location.x() <= area.x())
return SNAP_LEFT_EDGE;
if (location.x() >= area.right() - 1)
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index 930ba49..1a237fd 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -431,7 +431,7 @@ TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3_Compress) {
// Assertions around dragging to the left/right edge of the screen.
TEST_F(WorkspaceWindowResizerTest, Edge) {
int bottom =
- ScreenAsh::GetUnmaximizedWorkAreaParentBounds(window_.get()).bottom();
+ ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(window_.get()).bottom();
window_->SetBounds(gfx::Rect(20, 30, 50, 60));
{
SetGridSize(0);
diff --git a/chrome/browser/chromeos/input_method/candidate_window.cc b/chrome/browser/chromeos/input_method/candidate_window.cc
index 6e453ce..6dce7ec 100644
--- a/chrome/browser/chromeos/input_method/candidate_window.cc
+++ b/chrome/browser/chromeos/input_method/candidate_window.cc
@@ -1216,7 +1216,7 @@ void CandidateWindowView::ResizeAndMoveParentFrame() {
const int height = cursor_location_.height();
const int horizontal_offset = GetHorizontalOffset();
- gfx::Rect old_bounds = parent_frame_->GetClientAreaScreenBounds();
+ gfx::Rect old_bounds = parent_frame_->GetClientAreaBoundsInScreen();
gfx::Rect screen_bounds = gfx::Screen::GetDisplayNearestWindow(
parent_frame_->GetNativeView()).work_area();
// The size.
@@ -1511,7 +1511,7 @@ void InfolistWindowView::UpdateCandidates(
void InfolistWindowView::ResizeAndMoveParentFrame() {
int x, y;
- gfx::Rect old_bounds = parent_frame_->GetClientAreaScreenBounds();
+ gfx::Rect old_bounds = parent_frame_->GetClientAreaBoundsInScreen();
gfx::Rect screen_bounds = gfx::Screen::GetDisplayNearestWindow(
parent_frame_->GetNativeView()).work_area();
// The size.
@@ -1522,7 +1522,7 @@ void InfolistWindowView::ResizeAndMoveParentFrame() {
gfx::Rect candidatewindow_bounds;
if (candidate_window_frame_ != NULL) {
candidatewindow_bounds =
- candidate_window_frame_->GetClientAreaScreenBounds();
+ candidate_window_frame_->GetClientAreaBoundsInScreen();
}
if (screen_bounds.height() == 0 || screen_bounds.width() == 0) {
diff --git a/chrome/browser/chromeos/login/screen_locker_browsertest.cc b/chrome/browser/chromeos/login/screen_locker_browsertest.cc
index 8803638..b10bc4f 100644
--- a/chrome/browser/chromeos/login/screen_locker_browsertest.cc
+++ b/chrome/browser/chromeos/login/screen_locker_browsertest.cc
@@ -148,7 +148,7 @@ IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestBasic) {
// Test to make sure that the widget is actually appearing and is of
// reasonable size, preventing a regression of
// http://code.google.com/p/chromium-os/issues/detail?id=5987
- gfx::Rect lock_bounds = tester->GetChildWidget()->GetWindowScreenBounds();
+ gfx::Rect lock_bounds = tester->GetChildWidget()->GetWindowBoundsInScreen();
EXPECT_GT(lock_bounds.width(), 10);
EXPECT_GT(lock_bounds.height(), 10);
diff --git a/chrome/browser/chromeos/options/network_config_view.cc b/chrome/browser/chromeos/options/network_config_view.cc
index 48bea5c..e519af1 100644
--- a/chrome/browser/chromeos/options/network_config_view.cc
+++ b/chrome/browser/chromeos/options/network_config_view.cc
@@ -213,7 +213,7 @@ void NetworkConfigView::ShowAdvancedView() {
IDS_JOIN_WIFI_NETWORK_DIALOG_ADVANCED_WIDTH_CHARS,
IDS_JOIN_WIFI_NETWORK_DIALOG_ADVANCED_MINIMUM_HEIGHT_LINES);
// Get the new bounds with desired size at the same center point.
- gfx::Rect bounds = GetWidget()->GetWindowScreenBounds();
+ gfx::Rect bounds = GetWidget()->GetWindowBoundsInScreen();
int horiz_padding = bounds.width() - size.width();
int vert_padding = bounds.height() - size.height();
bounds.Inset(horiz_padding / 2, vert_padding / 2,
diff --git a/chrome/browser/chromeos/status/data_promo_notification.cc b/chrome/browser/chromeos/status/data_promo_notification.cc
index 8be6d77..a4dfed1 100644
--- a/chrome/browser/chromeos/status/data_promo_notification.cc
+++ b/chrome/browser/chromeos/status/data_promo_notification.cc
@@ -160,7 +160,7 @@ void DataPromoNotification::ShowOptionalMobileDataPromoNotification(
return;
}
- gfx::Rect button_bounds = host->GetScreenBounds();
+ gfx::Rect button_bounds = host->GetBoundsInScreen();
// StatusArea button Y position is usually -1, fix it so that
// Contains() method for screen bounds works correctly.
button_bounds.set_y(button_bounds.y() + 1);
diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
index 98a44b0..8783a29 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -1281,7 +1281,7 @@ class OmniboxViewTest : public InProcessBrowserTest,
// Move the mouse to the center of the browser window and left-click.
void ClickBrowserWindowCenter() {
ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(
- GetBrowserView()->GetScreenBounds().CenterPoint()));
+ GetBrowserView()->GetBoundsInScreen().CenterPoint()));
ASSERT_TRUE(ui_test_utils::SendMouseEventsSync(
ui_controls::LEFT, ui_controls::DOWN));
ASSERT_TRUE(ui_test_utils::SendMouseEventsSync(
@@ -1294,7 +1294,7 @@ class OmniboxViewTest : public InProcessBrowserTest,
void ClickFocusViewOrigin(ui_controls::MouseButton button,
const gfx::Point& press_offset,
const gfx::Point& release_offset) {
- gfx::Point focus_view_origin = GetFocusView()->GetScreenBounds().origin();
+ gfx::Point focus_view_origin = GetFocusView()->GetBoundsInScreen().origin();
gfx::Point press_point = focus_view_origin;
press_point.Offset(press_offset.x(), press_offset.y());
ASSERT_TRUE(ui_test_utils::SendMouseMoveSync(press_point));
diff --git a/chrome/browser/ui/panels/panel_view.cc b/chrome/browser/ui/panels/panel_view.cc
index d9e9160..3eea974 100644
--- a/chrome/browser/ui/panels/panel_view.cc
+++ b/chrome/browser/ui/panels/panel_view.cc
@@ -191,7 +191,7 @@ void PanelView::SetBoundsInternal(const gfx::Rect& new_bounds, bool animate) {
return;
}
- animation_start_bounds_ = window_->GetWindowScreenBounds();
+ animation_start_bounds_ = window_->GetWindowBoundsInScreen();
bounds_animator_.reset(new PanelBoundsAnimation(
this, panel_.get(), animation_start_bounds_, new_bounds));
@@ -460,7 +460,7 @@ void PanelView::OnWindowEndUserBoundsChange() {
panel_->OnPanelEndUserResizing();
// No need to proceed with post-resizing update when there is no size change.
- gfx::Rect new_bounds = window_->GetWindowScreenBounds();
+ gfx::Rect new_bounds = window_->GetWindowBoundsInScreen();
if (bounds_ == new_bounds)
return;
bounds_ = new_bounds;
@@ -642,7 +642,7 @@ bool PanelView::IsAnimatingBounds() const {
}
bool PanelView::IsWithinResizingArea(const gfx::Point& mouse_location) const {
- gfx::Rect bounds = window_->GetWindowScreenBounds();
+ gfx::Rect bounds = window_->GetWindowBoundsInScreen();
DCHECK(bounds.Contains(mouse_location));
return mouse_location.x() < bounds.x() + kResizeInsideBoundsSize ||
mouse_location.x() >= bounds.right() - kResizeInsideBoundsSize ||
diff --git a/chrome/browser/ui/views/about_chrome_view.cc b/chrome/browser/ui/views/about_chrome_view.cc
index 4bd8065..55249ec5 100644
--- a/chrome/browser/ui/views/about_chrome_view.cc
+++ b/chrome/browser/ui/views/about_chrome_view.cc
@@ -783,7 +783,7 @@ int AboutChromeView::EnlargeWindowSizeIfNeeded() {
// This will enlarge the window each time the function is called, which is
// fine since we only receive status once from Google Update.
- gfx::Rect window_rect = GetWidget()->GetWindowScreenBounds();
+ gfx::Rect window_rect = GetWidget()->GetWindowBoundsInScreen();
int height = error_label_->GetHeightForWidth(
dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) +
views::kRelatedControlVerticalSpacing;
diff --git a/chrome/browser/ui/views/app_menu_button_win.cc b/chrome/browser/ui/views/app_menu_button_win.cc
index cd5c5f5..7dc043f5 100644
--- a/chrome/browser/ui/views/app_menu_button_win.cc
+++ b/chrome/browser/ui/views/app_menu_button_win.cc
@@ -15,7 +15,7 @@ bool AppMenuButtonWin::OnKeyPressed(const views::KeyEvent& event) {
if (event.key_code() == ui::VKEY_SPACE) {
// Typical windows behavior is to show the system menu on space.
views::Widget* widget = GetWidget();
- gfx::Rect bounds = widget->GetClientAreaScreenBounds();
+ gfx::Rect bounds = widget->GetClientAreaBoundsInScreen();
ui::ShowSystemMenu(widget->GetNativeView(), bounds.x(), bounds.y() + 10);
return false;
}
diff --git a/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc
index 6f95957..a159f2c 100644
--- a/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc
@@ -438,7 +438,7 @@ int BrowserNonClientFrameViewAsh::NonClientTopBorderHeight(
bool BrowserNonClientFrameViewAsh::UseShortHeader() const {
// Window at top of screen -> short header
- if (frame()->GetWindowScreenBounds().y() == 0)
+ if (frame()->GetWindowBoundsInScreen().y() == 0)
return true;
// Restored browser -> tall header
// Maximized browser -> short header
diff --git a/chrome/browser/ui/views/ash/panel_view_aura.cc b/chrome/browser/ui/views/ash/panel_view_aura.cc
index 65915d1..41d4eec 100644
--- a/chrome/browser/ui/views/ash/panel_view_aura.cc
+++ b/chrome/browser/ui/views/ash/panel_view_aura.cc
@@ -398,7 +398,7 @@ gfx::Rect PanelViewAura::GetRestoredBounds() const {
}
gfx::Rect PanelViewAura::GetBounds() const {
- return GetWidget()->GetWindowScreenBounds();
+ return GetWidget()->GetWindowBoundsInScreen();
}
void PanelViewAura::Show() {
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
index b66dc06..86aa082 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -1553,8 +1553,8 @@ class BookmarkBarViewTest17 : public BookmarkBarViewEventTestBase {
// The context menu and child_menu can be overlapped, calculate the
// non-intersected Rect of the child menu and click on its center to make
// sure the click is always on the child menu.
- gfx::Rect context_rect = context_menu->GetSubmenu()->GetScreenBounds();
- gfx::Rect child_menu_rect = child_menu->GetScreenBounds();
+ gfx::Rect context_rect = context_menu->GetSubmenu()->GetBoundsInScreen();
+ gfx::Rect child_menu_rect = child_menu->GetBoundsInScreen();
gfx::Rect clickable_rect = child_menu_rect.Subtract(context_rect);
ASSERT_FALSE(clickable_rect.IsEmpty());
observer_.set_task(CreateEventTask(this, &BookmarkBarViewTest17::Step4));
diff --git a/chrome/browser/ui/views/dropdown_bar_view.cc b/chrome/browser/ui/views/dropdown_bar_view.cc
index 9e73d88..b811c21 100644
--- a/chrome/browser/ui/views/dropdown_bar_view.cc
+++ b/chrome/browser/ui/views/dropdown_bar_view.cc
@@ -56,7 +56,7 @@ DropdownBackground::DropdownBackground(BrowserView* browser_view,
void DropdownBackground::Paint(gfx::Canvas* canvas, views::View* view) const {
// Find the offset from which to tile the toolbar background image.
// First, get the origin with respect to the screen.
- gfx::Point origin = view->GetWidget()->GetWindowScreenBounds().origin();
+ gfx::Point origin = view->GetWidget()->GetWindowBoundsInScreen().origin();
// Now convert from screen to parent coordinates.
view->ConvertPointToView(NULL, browser_view_, &origin);
// Finally, calculate the background image tiling offset.
diff --git a/chrome/browser/ui/views/extensions/shell_window_views.cc b/chrome/browser/ui/views/extensions/shell_window_views.cc
index be8693f..a0c44a1 100644
--- a/chrome/browser/ui/views/extensions/shell_window_views.cc
+++ b/chrome/browser/ui/views/extensions/shell_window_views.cc
@@ -398,7 +398,7 @@ gfx::Rect ShellWindowViews::GetRestoredBounds() const {
}
gfx::Rect ShellWindowViews::GetBounds() const {
- return window_->GetWindowScreenBounds();
+ return window_->GetWindowBoundsInScreen();
}
void ShellWindowViews::Show() {
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index 70923b5..ec069ce 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -220,7 +220,7 @@ bool FindBarHost::GetFindBarWindowInfo(gfx::Point* position,
return false;
}
- gfx::Rect window_rect = host()->GetWindowScreenBounds();
+ gfx::Rect window_rect = host()->GetWindowBoundsInScreen();
if (position)
*position = window_rect.origin();
if (fully_visible)
@@ -331,7 +331,7 @@ void FindBarHost::UnregisterAccelerators() {
// private:
void FindBarHost::GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect) {
- gfx::Rect frame_rect = host()->GetTopLevelWidget()->GetWindowScreenBounds();
+ gfx::Rect frame_rect = host()->GetTopLevelWidget()->GetWindowBoundsInScreen();
content::WebContentsView* tab_view =
find_bar_controller_->tab_contents()->web_contents()->GetView();
gfx::Rect webcontents_rect = tab_view->GetViewBounds();
diff --git a/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc b/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc
index f15c5d1..4911142 100644
--- a/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc
+++ b/chrome/browser/ui/views/frame/app_non_client_frame_view_aura.cc
@@ -165,7 +165,7 @@ class AppNonClientFrameViewAura::Host : public views::MouseWatcherHost {
virtual bool Contains(
const gfx::Point& screen_point,
views::MouseWatcherHost::MouseEventType type) OVERRIDE {
- gfx::Rect top_margin = owner_->GetScreenBounds();
+ gfx::Rect top_margin = owner_->GetBoundsInScreen();
top_margin.set_height(kTopMargin);
gfx::Rect control_bounds = owner_->GetControlBounds();
control_bounds.Inset(kShadowStart, 0, 0, kShadowStart);
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 65f642d..2d386bf 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -715,7 +715,7 @@ gfx::Rect BrowserView::GetRestoredBounds() const {
}
gfx::Rect BrowserView::GetBounds() const {
- return frame_->GetWindowScreenBounds();
+ return frame_->GetWindowBoundsInScreen();
}
bool BrowserView::IsMaximized() const {
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index a71619a..9cf0215 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -548,14 +548,14 @@ void HungRendererDialogView::CreateKillButtonView() {
gfx::Rect HungRendererDialogView::GetDisplayBounds(
WebContents* contents) {
#if defined(USE_AURA)
- gfx::Rect contents_bounds(contents->GetNativeView()->GetRootWindowBounds());
+ gfx::Rect contents_bounds(contents->GetNativeView()->GetBoundsInRootWindow());
#elif defined(OS_WIN)
HWND contents_hwnd = contents->GetNativeView();
RECT contents_bounds_rect;
GetWindowRect(contents_hwnd, &contents_bounds_rect);
gfx::Rect contents_bounds(contents_bounds_rect);
#endif
- gfx::Rect window_bounds = GetWidget()->GetWindowScreenBounds();
+ gfx::Rect window_bounds = GetWidget()->GetWindowBoundsInScreen();
int window_x = contents_bounds.x() +
(contents_bounds.width() - window_bounds.width()) / 2;
diff --git a/chrome/browser/ui/views/notifications/balloon_view_views.cc b/chrome/browser/ui/views/notifications/balloon_view_views.cc
index f19c357..310b70f 100644
--- a/chrome/browser/ui/views/notifications/balloon_view_views.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view_views.cc
@@ -233,7 +233,7 @@ void BalloonViewImpl::RepositionToBalloon() {
anim_frame_end_ = gfx::Rect(
balloon_->GetPosition().x(), balloon_->GetPosition().y(),
GetTotalWidth(), GetTotalHeight());
- anim_frame_start_ = frame_container_->GetClientAreaScreenBounds();
+ anim_frame_start_ = frame_container_->GetClientAreaBoundsInScreen();
animation_.reset(new ui::SlideAnimation(this));
animation_->Show();
}
@@ -500,7 +500,7 @@ gfx::Rect BalloonViewImpl::GetContentsRectangle() const {
gfx::Size content_size = balloon_->content_size();
gfx::Point offset = GetContentsOffset();
- gfx::Rect frame_rect = frame_container_->GetWindowScreenBounds();
+ gfx::Rect frame_rect = frame_container_->GetWindowBoundsInScreen();
return gfx::Rect(frame_rect.x() + offset.x(),
frame_rect.y() + GetShelfHeight() + offset.y(),
content_size.width(),
diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
index 4023f45..69be08c 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
@@ -240,7 +240,7 @@ void OmniboxPopupContentsView::UpdatePopupAppearance() {
} else {
// Animate the popup shrinking, but don't animate growing larger since that
// would make the popup feel less responsive.
- start_bounds_ = GetWidget()->GetWindowScreenBounds();
+ start_bounds_ = GetWidget()->GetWindowBoundsInScreen();
if (target_bounds_.height() < start_bounds_.height())
size_animation_.Show();
else
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index 85167cf..30bc95f 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -347,7 +347,7 @@ void StatusBubbleViews::StatusView::OnPaint(gfx::Canvas* canvas) {
theme_service_->GetColor(ThemeService::COLOR_TOOLBAR);
paint.setColor(toolbar_color);
- gfx::Rect popup_bounds = popup_->GetWindowScreenBounds();
+ gfx::Rect popup_bounds = popup_->GetWindowBoundsInScreen();
// Figure out how to round the bubble's four corners.
SkScalar rad[8];
@@ -655,7 +655,7 @@ void StatusBubbleViews::SetURL(const GURL& url, const std::string& languages) {
}
// Set Elided Text corresponding to the GURL object.
- gfx::Rect popup_bounds = popup_->GetWindowScreenBounds();
+ gfx::Rect popup_bounds = popup_->GetWindowBoundsInScreen();
int text_width = static_cast<int>(popup_bounds.width() -
(kShadowThickness * 2) - kTextPositionX - kTextHorizPadding - 1);
url_text_ = ui::ElideUrl(url, view_->Label::font(), text_width, languages);
@@ -811,7 +811,7 @@ bool StatusBubbleViews::IsFrameVisible() {
void StatusBubbleViews::ExpandBubble() {
// Elide URL to maximum possible size, then check actual length (it may
// still be too long to fit) before expanding bubble.
- gfx::Rect popup_bounds = popup_->GetWindowScreenBounds();
+ gfx::Rect popup_bounds = popup_->GetWindowBoundsInScreen();
int max_status_bubble_width = GetMaxStatusBubbleWidth();
url_text_ = ui::ElideUrl(url_, view_->Label::font(),
max_status_bubble_width, languages_);
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_view.cc b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
index 45b90dc..49e1431 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_view.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
@@ -86,7 +86,7 @@ void DraggedTabView::MoveTo(const gfx::Point& screen_point) {
SetWindowPos(container_->GetNativeView(), HWND_TOP, x, y, 0, 0,
SWP_NOSIZE | SWP_NOACTIVATE | show_flags);
#else
- gfx::Rect bounds = container_->GetWindowScreenBounds();
+ gfx::Rect bounds = container_->GetWindowBoundsInScreen();
container_->SetBounds(gfx::Rect(x, y, bounds.width(), bounds.height()));
if (!container_->IsVisible())
container_->Show();
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index fcb08ce..8e14a66 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -1883,7 +1883,7 @@ Browser* TabDragController::CreateBrowserForDrag(
Browser* browser = Browser::Create(drag_data_[0].contents->profile());
gfx::Point center(0, source->height() / 2);
views::View::ConvertPointToWidget(source, &center);
- gfx::Rect new_bounds(source->GetWidget()->GetWindowScreenBounds());
+ gfx::Rect new_bounds(source->GetWidget()->GetWindowBoundsInScreen());
new_bounds.set_y(screen_point.y() - center.y());
switch (GetDetachPosition(screen_point)) {
case DETACH_BEFORE:
diff --git a/chrome/browser/ui/views/web_dialog_view_browsertest.cc b/chrome/browser/ui/views/web_dialog_view_browsertest.cc
index 11e3d42..3882ea148 100644
--- a/chrome/browser/ui/views/web_dialog_view_browsertest.cc
+++ b/chrome/browser/ui/views/web_dialog_view_browsertest.cc
@@ -109,7 +109,7 @@ IN_PROC_BROWSER_TEST_F(WebDialogBrowserTest, MAYBE_SizeWindow) {
// TestWebDialogView should quit current message loop on size change.
view->set_should_quit_on_size_change(true);
- gfx::Rect bounds = view->GetWidget()->GetClientAreaScreenBounds();
+ gfx::Rect bounds = view->GetWidget()->GetClientAreaBoundsInScreen();
gfx::Rect set_bounds = bounds;
gfx::Rect actual_bounds, rwhv_bounds;
@@ -120,7 +120,7 @@ IN_PROC_BROWSER_TEST_F(WebDialogBrowserTest, MAYBE_SizeWindow) {
view->MoveContents(web_contents, set_bounds);
ui_test_utils::RunMessageLoop(); // TestWebDialogView will quit.
- actual_bounds = view->GetWidget()->GetClientAreaScreenBounds();
+ actual_bounds = view->GetWidget()->GetClientAreaBoundsInScreen();
EXPECT_EQ(set_bounds, actual_bounds);
rwhv_bounds =
@@ -136,7 +136,7 @@ IN_PROC_BROWSER_TEST_F(WebDialogBrowserTest, MAYBE_SizeWindow) {
view->MoveContents(web_contents, set_bounds);
ui_test_utils::RunMessageLoop(); // TestWebDialogView will quit.
- actual_bounds = view->GetWidget()->GetClientAreaScreenBounds();
+ actual_bounds = view->GetWidget()->GetClientAreaBoundsInScreen();
EXPECT_EQ(set_bounds, actual_bounds);
rwhv_bounds =
@@ -152,7 +152,7 @@ IN_PROC_BROWSER_TEST_F(WebDialogBrowserTest, MAYBE_SizeWindow) {
view->MoveContents(web_contents, set_bounds);
ui_test_utils::RunMessageLoop(); // TestWebDialogView will quit.
- actual_bounds = view->GetWidget()->GetClientAreaScreenBounds();
+ actual_bounds = view->GetWidget()->GetClientAreaBoundsInScreen();
EXPECT_EQ(set_bounds, actual_bounds);
rwhv_bounds =
@@ -168,7 +168,7 @@ IN_PROC_BROWSER_TEST_F(WebDialogBrowserTest, MAYBE_SizeWindow) {
view->MoveContents(web_contents, set_bounds);
ui_test_utils::RunMessageLoop(); // TestWebDialogView will quit.
- actual_bounds = view->GetWidget()->GetClientAreaScreenBounds();
+ actual_bounds = view->GetWidget()->GetClientAreaBoundsInScreen();
EXPECT_LT(0, actual_bounds.width());
EXPECT_LT(0, actual_bounds.height());
}
diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash.cc b/chrome/browser/ui/window_sizer/window_sizer_ash.cc
index 8e5ef96..3089d69 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_ash.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_ash.cc
@@ -84,7 +84,7 @@ bool WindowSizer::GetBoundsIgnoringPreviousStateAsh(
if (top_window == NULL) {
GetDefaultWindowBounds(bounds);
} else {
- *bounds = top_window->GetRootWindowBounds();
+ *bounds = top_window->GetBoundsInRootWindow();
gfx::Rect work_area =
monitor_info_provider_->GetMonitorWorkAreaMatching(*bounds);
*bounds = bounds->AdjustToFit(work_area);
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index c9aa3ce..5ddb42d 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1629,9 +1629,9 @@ void RenderWidgetHostImpl::OnMsgGetWindowRect(gfx::NativeViewId window_id,
}
void RenderWidgetHostImpl::OnMsgGetRootWindowRect(gfx::NativeViewId window_id,
- gfx::Rect* results) {
+ gfx::Rect* results) {
if (view_)
- *results = view_->GetRootWindowBounds();
+ *results = view_->GetBoundsInRootWindow();
}
#endif
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 4a89189..960dfda 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -296,7 +296,7 @@ void RenderWidgetHostViewAndroid::GetScreenInfo(WebKit::WebScreenInfo* result) {
// TODO(jrg): Find out the implications and answer correctly here,
// as we are returning the WebView and not root window bounds.
-gfx::Rect RenderWidgetHostViewAndroid::GetRootWindowBounds() {
+gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() {
return GetViewBounds();
}
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index d3fbfc5..0d1fd41 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -89,7 +89,7 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase {
virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
- virtual gfx::Rect GetRootWindowBounds() OVERRIDE;
+ virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
virtual void UnhandledWheelEvent(
const WebKit::WebMouseWheelEvent& event) OVERRIDE;
virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type,
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 40b2e96..141a759 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -343,7 +343,7 @@ bool RenderWidgetHostViewAura::IsShowing() {
}
gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const {
- return window_->GetRootWindowBounds();
+ return window_->GetBoundsInRootWindow();
}
void RenderWidgetHostViewAura::UpdateCursor(const WebCursor& cursor) {
@@ -703,8 +703,8 @@ void RenderWidgetHostViewAura::GetScreenInfo(WebKit::WebScreenInfo* results) {
GetScreenInfoForWindow(results, window_);
}
-gfx::Rect RenderWidgetHostViewAura::GetRootWindowBounds() {
- return window_->GetToplevelWindow()->bounds();
+gfx::Rect RenderWidgetHostViewAura::GetBoundsInRootWindow() {
+ return window_->GetToplevelWindow()->GetBoundsInRootWindow();
}
void RenderWidgetHostViewAura::ProcessTouchAck(
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index ab76b06..2aea3b5 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -116,7 +116,7 @@ class RenderWidgetHostViewAura
uint64 surface_id) OVERRIDE;
virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE;
virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
- virtual gfx::Rect GetRootWindowBounds() OVERRIDE;
+ virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type,
bool processed) OVERRIDE;
virtual void SetHasHorizontalScrollbar(
diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc
index d32bf0e..91763dd 100644
--- a/content/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -1274,7 +1274,7 @@ void RenderWidgetHostViewGtk::GetScreenInfo(WebKit::WebScreenInfo* results) {
content::GetScreenInfoFromNativeWindow(gdk_window, results);
}
-gfx::Rect RenderWidgetHostViewGtk::GetRootWindowBounds() {
+gfx::Rect RenderWidgetHostViewGtk::GetBoundsInRootWindow() {
GtkWidget* toplevel = gtk_widget_get_toplevel(view_.get());
if (!toplevel)
return gfx::Rect();
diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.h b/content/browser/renderer_host/render_widget_host_view_gtk.h
index 8d2b357..e41af81 100644
--- a/content/browser/renderer_host/render_widget_host_view_gtk.h
+++ b/content/browser/renderer_host/render_widget_host_view_gtk.h
@@ -120,7 +120,7 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk
virtual void SetScrollOffsetPinning(
bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
- virtual gfx::Rect GetRootWindowBounds() OVERRIDE;
+ virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
virtual bool LockMouse() OVERRIDE;
virtual void UnlockMouse() OVERRIDE;
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index a47e848..3598480 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -288,7 +288,7 @@ class RenderWidgetHostViewMac : public content::RenderWidgetHostViewBase {
virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE;
virtual void AboutToWaitForBackingStoreMsg() OVERRIDE;
virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
- virtual gfx::Rect GetRootWindowBounds() OVERRIDE;
+ virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
void DrawAcceleratedSurfaceInstance(
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 4492222..60b5def 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1111,7 +1111,7 @@ void RenderWidgetHostViewMac::GetScreenInfo(WebKit::WebScreenInfo* results) {
*results = WebKit::WebScreenInfoFactory::screenInfo(GetNativeView());
}
-gfx::Rect RenderWidgetHostViewMac::GetRootWindowBounds() {
+gfx::Rect RenderWidgetHostViewMac::GetBoundsInRootWindow() {
// TODO(shess): In case of !window, the view has been removed from
// the view hierarchy because the tab isn't main. Could retrieve
// the information from the main tab for our window.
@@ -1257,7 +1257,7 @@ void RenderWidgetHostViewMac::SetWindowVisibility(bool visible) {
void RenderWidgetHostViewMac::WindowFrameChanged() {
if (render_widget_host_) {
render_widget_host_->Send(new ViewMsg_WindowFrameChanged(
- render_widget_host_->GetRoutingID(), GetRootWindowBounds(),
+ render_widget_host_->GetRoutingID(), GetBoundsInRootWindow(),
GetViewBounds()));
}
}
diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc
index 047b153..7c2165f 100644
--- a/content/browser/renderer_host/test_render_view_host.cc
+++ b/content/browser/renderer_host/test_render_view_host.cc
@@ -183,7 +183,7 @@ void TestRenderWidgetHostView::StartContentIntent(const GURL&) {}
#endif
#if defined(OS_POSIX) || defined(USE_AURA)
-gfx::Rect TestRenderWidgetHostView::GetRootWindowBounds() {
+gfx::Rect TestRenderWidgetHostView::GetBoundsInRootWindow() {
return gfx::Rect();
}
#endif
diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h
index 444a834..e851d3d 100644
--- a/content/browser/renderer_host/test_render_view_host.h
+++ b/content/browser/renderer_host/test_render_view_host.h
@@ -137,7 +137,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase {
#endif
#if defined(OS_POSIX) || defined(USE_AURA)
virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE {}
- virtual gfx::Rect GetRootWindowBounds() OVERRIDE;
+ virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
#endif
virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type,
bool processed) OVERRIDE { }
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 21b82af..072c00c 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -304,7 +304,7 @@ gfx::NativeWindow WebContentsViewAura::GetTopLevelNativeWindow() const {
}
void WebContentsViewAura::GetContainerBounds(gfx::Rect *out) const {
- *out = window_->GetScreenBounds();
+ *out = window_->GetBoundsInScreen();
}
void WebContentsViewAura::SetPageTitle(const string16& title) {
@@ -398,7 +398,7 @@ void WebContentsViewAura::CloseTabAfterEventTracking() {
}
gfx::Rect WebContentsViewAura::GetViewBounds() const {
- return window_->GetRootWindowBounds();
+ return window_->GetBoundsInRootWindow();
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/content/port/browser/render_widget_host_view_port.h b/content/port/browser/render_widget_host_view_port.h
index da4b7c4..12fc721 100644
--- a/content/port/browser/render_widget_host_view_port.h
+++ b/content/port/browser/render_widget_host_view_port.h
@@ -237,7 +237,7 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView {
static void GetDefaultScreenInfo(
WebKit::WebScreenInfo* results);
virtual void GetScreenInfo(WebKit::WebScreenInfo* results) = 0;
- virtual gfx::Rect GetRootWindowBounds() = 0;
+ virtual gfx::Rect GetBoundsInRootWindow() = 0;
#endif
virtual gfx::GLSurfaceHandle GetCompositingSurface() = 0;
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index e960583..7f8dd83 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -236,7 +236,7 @@ bool Window::IsVisible() const {
return visible_ && layer_ && layer_->IsDrawn();
}
-gfx::Rect Window::GetRootWindowBounds() const {
+gfx::Rect Window::GetBoundsInRootWindow() const {
// TODO(beng): There may be a better way to handle this, and the existing code
// is likely wrong anyway in a multi-display world, but this will
// do for now.
@@ -247,8 +247,8 @@ gfx::Rect Window::GetRootWindowBounds() const {
return gfx::Rect(origin, bounds().size());
}
-gfx::Rect Window::GetScreenBounds() const {
- gfx::Rect bounds(GetRootWindowBounds());
+gfx::Rect Window::GetBoundsInScreen() const {
+ gfx::Rect bounds(GetBoundsInRootWindow());
const RootWindow* root = GetRootWindow();
if (root) {
aura::client::ScreenPositionClient* screen_position_client =
@@ -292,7 +292,7 @@ void Window::SetBounds(const gfx::Rect& new_bounds) {
SetBoundsInternal(new_bounds);
}
-void Window::SetScreenBounds(const gfx::Rect& new_bounds_in_screen) {
+void Window::SetBoundsInScreen(const gfx::Rect& new_bounds_in_screen) {
RootWindow* root = GetRootWindow();
if (root) {
gfx::Point origin = new_bounds_in_screen.origin();
diff --git a/ui/aura/window.h b/ui/aura/window.h
index d9bc9b1..ede2c71 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -132,13 +132,13 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
bool TargetVisibility() const { return visible_; }
// Returns the window's bounds in root window's coordinates.
- gfx::Rect GetRootWindowBounds() const;
+ gfx::Rect GetBoundsInRootWindow() const;
// Returns the window's bounds in screen coordinates.
// How the root window's coordinates is mapped to screen's coordinates
// is platform dependent and defined in the implementation of the
// |aura::client::ScreenPositionClient| interface.
- gfx::Rect GetScreenBounds() const;
+ gfx::Rect GetBoundsInScreen() const;
virtual void SetTransform(const ui::Transform& transform);
@@ -153,7 +153,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
// Changes the bounds of the window in the screen coordintates.
// If present, the window's parent's LayoutManager may adjust the bounds.
- void SetScreenBounds(const gfx::Rect& new_bounds_in_screen_coords);
+ void SetBoundsInScreen(const gfx::Rect& new_bounds_in_screen_coords);
// Returns the target bounds of the window. If the window's layer is
// not animating, it simply returns the current bounds.
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index 54a2458..d955719 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -934,22 +934,22 @@ TEST_F(WindowTest, ReleaseCaptureOnDestroy) {
EXPECT_EQ(NULL, aura::client::GetCaptureWindow(root_window()));
}
-TEST_F(WindowTest, GetRootWindowBounds) {
+TEST_F(WindowTest, GetBoundsInRootWindow) {
scoped_ptr<Window> viewport(CreateTestWindowWithBounds(
gfx::Rect(0, 0, 300, 300), NULL));
scoped_ptr<Window> child(CreateTestWindowWithBounds(
gfx::Rect(0, 0, 100, 100), viewport.get()));
// Sanity check.
- EXPECT_EQ("0,0 100x100", child->GetRootWindowBounds().ToString());
+ EXPECT_EQ("0,0 100x100", child->GetBoundsInRootWindow().ToString());
// The |child| window's screen bounds should move along with the |viewport|.
viewport->SetBounds(gfx::Rect(-100, -100, 300, 300));
- EXPECT_EQ("-100,-100 100x100", child->GetRootWindowBounds().ToString());
+ EXPECT_EQ("-100,-100 100x100", child->GetBoundsInRootWindow().ToString());
// The |child| window is moved to the 0,0 in screen coordinates.
- // |GetRootWindowBounds()| should return 0,0.
+ // |GetBoundsInRootWindow()| should return 0,0.
child->SetBounds(gfx::Rect(100, 100, 100, 100));
- EXPECT_EQ("0,0 100x100", child->GetRootWindowBounds().ToString());
+ EXPECT_EQ("0,0 100x100", child->GetBoundsInRootWindow().ToString());
}
class MouseEnterExitWindowDelegate : public TestWindowDelegate {
diff --git a/ui/oak/oak_aura_window_display.cc b/ui/oak/oak_aura_window_display.cc
index 6bffa624..68130091 100644
--- a/ui/oak/oak_aura_window_display.cc
+++ b/ui/oak/oak_aura_window_display.cc
@@ -123,7 +123,7 @@ string16 OakAuraWindowDisplay::GetText(int row, int column_id) {
return PropertyWithBounds("Bounds: ", window_->bounds());
case ROW_BOUNDSINROOTWINDOW:
return PropertyWithBounds("Bounds in Root Window: ",
- window_->GetRootWindowBounds());
+ window_->GetBoundsInRootWindow());
case ROW_TRANSFORM:
return ASCIIToUTF16("Transform:");
case ROW_PARENT:
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc
index 38e25f0..446b7b2 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -220,7 +220,7 @@ void BubbleDelegateView::OnWidgetMoved(Widget* widget) {
}
gfx::Rect BubbleDelegateView::GetAnchorRect() {
- return anchor_view() ? anchor_view()->GetScreenBounds() : gfx::Rect();
+ return anchor_view() ? anchor_view()->GetBoundsInScreen() : gfx::Rect();
}
void BubbleDelegateView::Show() {
@@ -328,7 +328,7 @@ gfx::Rect BubbleDelegateView::GetBubbleBounds() {
#if defined(OS_WIN) && !defined(USE_AURA)
gfx::Rect BubbleDelegateView::GetBubbleClientBounds() const {
gfx::Rect client_bounds(GetBubbleFrameView()->GetBoundsForClientView());
- client_bounds.Offset(border_widget_->GetWindowScreenBounds().origin());
+ client_bounds.Offset(border_widget_->GetWindowBoundsInScreen().origin());
return client_bounds;
}
#endif
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc
index a572654..23607f4 100644
--- a/ui/views/controls/button/menu_button.cc
+++ b/ui/views/controls/button/menu_button.cc
@@ -266,7 +266,7 @@ int MenuButton::GetMaximumScreenXCoordinate() {
return 0;
}
- gfx::Rect monitor_bounds = GetWidget()->GetWorkAreaScreenBounds();
+ gfx::Rect monitor_bounds = GetWidget()->GetWorkAreaBoundsInScreen();
return monitor_bounds.right() - 1;
}
diff --git a/ui/views/controls/scrollbar/base_scroll_bar.cc b/ui/views/controls/scrollbar/base_scroll_bar.cc
index 58e2116..42b1b1d 100644
--- a/ui/views/controls/scrollbar/base_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/base_scroll_bar.cc
@@ -219,7 +219,7 @@ enum ScrollBarContextMenuCommands {
void BaseScrollBar::ShowContextMenuForView(View* source, const gfx::Point& p) {
Widget* widget = GetWidget();
- gfx::Rect widget_bounds = widget->GetWindowScreenBounds();
+ gfx::Rect widget_bounds = widget->GetWindowBoundsInScreen();
gfx::Point temp_pt(p.x() - widget_bounds.x(), p.y() - widget_bounds.y());
View::ConvertPointFromWidget(this, &temp_pt);
context_menu_mouse_position_ = IsHorizontal() ? temp_pt.x() : temp_pt.y();
diff --git a/ui/views/examples/widget_example.cc b/ui/views/examples/widget_example.cc
index 11d6504..2a635f5 100644
--- a/ui/views/examples/widget_example.cc
+++ b/ui/views/examples/widget_example.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -109,7 +109,7 @@ void WidgetExample::CreateChild(View* parent, bool transparent) {
// Compute where to place the child widget.
// We'll place it at the center of the root widget.
Widget* parent_widget = parent->GetWidget();
- gfx::Rect bounds = parent_widget->GetClientAreaScreenBounds();
+ gfx::Rect bounds = parent_widget->GetClientAreaBoundsInScreen();
// Child widget is 200x200 square.
bounds.SetRect((bounds.width() - 200) / 2, (bounds.height() - 200) / 2,
200, 200);
diff --git a/ui/views/touchui/touch_selection_controller_impl.cc b/ui/views/touchui/touch_selection_controller_impl.cc
index 185fff2..d00be25 100644
--- a/ui/views/touchui/touch_selection_controller_impl.cc
+++ b/ui/views/touchui/touch_selection_controller_impl.cc
@@ -154,7 +154,7 @@ class TouchSelectionControllerImpl::SelectionHandleView : public View {
}
gfx::Point GetScreenPosition() {
- return widget_->GetClientAreaScreenBounds().origin();
+ return widget_->GetClientAreaBoundsInScreen().origin();
}
private:
@@ -231,7 +231,7 @@ class TouchSelectionControllerImpl::TouchContextMenuView
}
gfx::Point GetScreenPosition() {
- return widget_->GetClientAreaScreenBounds().origin();
+ return widget_->GetClientAreaBoundsInScreen().origin();
}
void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE {
@@ -413,7 +413,7 @@ void TouchSelectionControllerImpl::SelectionHandleDragged(
void TouchSelectionControllerImpl::ConvertPointToClientView(
SelectionHandleView* source, gfx::Point* point) {
View::ConvertPointToScreen(source, point);
- gfx::Rect r = client_view_->GetWidget()->GetClientAreaScreenBounds();
+ gfx::Rect r = client_view_->GetWidget()->GetClientAreaBoundsInScreen();
point->SetPoint(point->x() - r.x(), point->y() - r.y());
View::ConvertPointFromWidget(client_view_, point);
}
diff --git a/ui/views/view.cc b/ui/views/view.cc
index d200d03..2bd368d 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -349,7 +349,7 @@ gfx::Rect View::GetVisibleBounds() const {
return vis_bounds;
}
-gfx::Rect View::GetScreenBounds() const {
+gfx::Rect View::GetBoundsInScreen() const {
gfx::Point origin;
View::ConvertPointToScreen(this, &origin);
return gfx::Rect(origin, size());
@@ -622,7 +622,7 @@ void View::ConvertPointToView(const View* source,
// API defines NULL |source| as returning the point in screen coordinates.
if (!source) {
*point = point->Subtract(
- root->GetWidget()->GetClientAreaScreenBounds().origin());
+ root->GetWidget()->GetClientAreaBoundsInScreen().origin());
}
}
@@ -651,7 +651,7 @@ void View::ConvertPointToScreen(const View* src, gfx::Point* p) {
const Widget* widget = src->GetWidget();
if (widget) {
ConvertPointToWidget(src, p);
- gfx::Rect r = widget->GetClientAreaScreenBounds();
+ gfx::Rect r = widget->GetClientAreaBoundsInScreen();
p->SetPoint(p->x() + r.x(), p->y() + r.y());
}
}
@@ -664,7 +664,7 @@ void View::ConvertPointFromScreen(const View* dst, gfx::Point* p) {
const views::Widget* widget = dst->GetWidget();
if (!widget)
return;
- const gfx::Rect r = widget->GetClientAreaScreenBounds();
+ const gfx::Rect r = widget->GetClientAreaBoundsInScreen();
p->Offset(-r.x(), -r.y());
views::View::ConvertPointFromWidget(dst, p);
}
diff --git a/ui/views/view.h b/ui/views/view.h
index d9a51c5..21fb1a0 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -204,7 +204,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
gfx::Rect GetVisibleBounds() const;
// Return the bounds of the View in screen coordinate system.
- gfx::Rect GetScreenBounds() const;
+ gfx::Rect GetBoundsInScreen() const;
// Returns the baseline of this view, or -1 if this view has no baseline. The
// return value is relative to the preferred height.
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index cf77b2f..9fae9f7 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -348,7 +348,7 @@ InputMethod* NativeWidgetAura::CreateInputMethod() {
}
void NativeWidgetAura::CenterWindow(const gfx::Size& size) {
- gfx::Rect parent_bounds(window_->parent()->GetRootWindowBounds());
+ gfx::Rect parent_bounds(window_->parent()->GetBoundsInRootWindow());
// When centering window, we take the intersection of the host and
// the parent. We assume the root window represents the visible
// rect of a single screen.
@@ -370,7 +370,7 @@ void NativeWidgetAura::CenterWindow(const gfx::Size& size) {
// center it with respect to the transient parent.
if (window_->transient_parent()) {
gfx::Rect transient_parent_rect = window_->transient_parent()->
- GetRootWindowBounds().Intersect(work_area);
+ GetBoundsInRootWindow().Intersect(work_area);
if (transient_parent_rect.height() >= size.height() &&
transient_parent_rect.width() >= size.width())
parent_bounds = transient_parent_rect;
@@ -428,14 +428,14 @@ void NativeWidgetAura::InitModalType(ui::ModalType modal_type) {
window_->SetProperty(aura::client::kModalKey, modal_type);
}
-gfx::Rect NativeWidgetAura::GetWindowScreenBounds() const {
- return window_->GetScreenBounds();
+gfx::Rect NativeWidgetAura::GetWindowBoundsInScreen() const {
+ return window_->GetBoundsInScreen();
}
-gfx::Rect NativeWidgetAura::GetClientAreaScreenBounds() const {
+gfx::Rect NativeWidgetAura::GetClientAreaBoundsInScreen() const {
// View-to-screen coordinate system transformations depend on this returning
// the full window bounds, for example View::ConvertPointToScreen().
- return window_->GetScreenBounds();
+ return window_->GetBoundsInScreen();
}
gfx::Rect NativeWidgetAura::GetRestoredBounds() const {
@@ -650,7 +650,7 @@ void NativeWidgetAura::FocusNativeView(gfx::NativeView native_view) {
window_->GetFocusManager()->SetFocusedWindow(native_view, NULL);
}
-gfx::Rect NativeWidgetAura::GetWorkAreaScreenBounds() const {
+gfx::Rect NativeWidgetAura::GetWorkAreaBoundsInScreen() const {
return gfx::Screen::GetDisplayNearestWindow(GetNativeView()).work_area();
}
diff --git a/ui/views/widget/native_widget_aura.h b/ui/views/widget/native_widget_aura.h
index d54c99e..afbc302 100644
--- a/ui/views/widget/native_widget_aura.h
+++ b/ui/views/widget/native_widget_aura.h
@@ -77,8 +77,8 @@ class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate,
virtual void SetAccessibleRole(ui::AccessibilityTypes::Role role) OVERRIDE;
virtual void SetAccessibleState(ui::AccessibilityTypes::State state) OVERRIDE;
virtual void InitModalType(ui::ModalType modal_type) OVERRIDE;
- virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE;
- virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE;
+ virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE;
+ virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE;
virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
virtual void SetSize(const gfx::Size& size) OVERRIDE;
@@ -117,7 +117,7 @@ class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate,
virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
virtual void ClearNativeFocus() OVERRIDE;
virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE;
- virtual gfx::Rect GetWorkAreaScreenBounds() const OVERRIDE;
+ virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE;
virtual void SetInactiveRenderingDisabled(bool value) OVERRIDE;
virtual Widget::MoveLoopResult RunMoveLoop() OVERRIDE;
virtual void EndMoveLoop() OVERRIDE;
diff --git a/ui/views/widget/native_widget_aura_unittest.cc b/ui/views/widget/native_widget_aura_unittest.cc
index cef5a85..d589f4d 100644
--- a/ui/views/widget/native_widget_aura_unittest.cc
+++ b/ui/views/widget/native_widget_aura_unittest.cc
@@ -172,7 +172,7 @@ TEST_F(NativeWidgetAuraTest, GetClientAreaScreenBounds) {
widget->Init(params);
// For Aura, client area bounds match window bounds.
- gfx::Rect client_bounds = widget->GetClientAreaScreenBounds();
+ gfx::Rect client_bounds = widget->GetClientAreaBoundsInScreen();
EXPECT_EQ(10, client_bounds.x());
EXPECT_EQ(20, client_bounds.y());
EXPECT_EQ(300, client_bounds.width());
diff --git a/ui/views/widget/native_widget_private.h b/ui/views/widget/native_widget_private.h
index 1ae8bd6..725f561 100644
--- a/ui/views/widget/native_widget_private.h
+++ b/ui/views/widget/native_widget_private.h
@@ -167,8 +167,8 @@ class VIEWS_EXPORT NativeWidgetPrivate : public NativeWidget,
virtual void InitModalType(ui::ModalType modal_type) = 0;
// See method documentation in Widget.
- virtual gfx::Rect GetWindowScreenBounds() const = 0;
- virtual gfx::Rect GetClientAreaScreenBounds() const = 0;
+ virtual gfx::Rect GetWindowBoundsInScreen() const = 0;
+ virtual gfx::Rect GetClientAreaBoundsInScreen() const = 0;
virtual gfx::Rect GetRestoredBounds() const = 0;
virtual void SetBounds(const gfx::Rect& bounds) = 0;
virtual void SetSize(const gfx::Size& size) = 0;
@@ -208,7 +208,7 @@ class VIEWS_EXPORT NativeWidgetPrivate : public NativeWidget,
virtual void SetCursor(gfx::NativeCursor cursor) = 0;
virtual void ClearNativeFocus() = 0;
virtual void FocusNativeView(gfx::NativeView native_view) = 0;
- virtual gfx::Rect GetWorkAreaScreenBounds() const = 0;
+ virtual gfx::Rect GetWorkAreaBoundsInScreen() const = 0;
virtual void SetInactiveRenderingDisabled(bool value) = 0;
virtual Widget::MoveLoopResult RunMoveLoop() = 0;
virtual void EndMoveLoop() = 0;
diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc
index fa64458..b04bc7f 100644
--- a/ui/views/widget/native_widget_win.cc
+++ b/ui/views/widget/native_widget_win.cc
@@ -801,13 +801,13 @@ void NativeWidgetWin::InitModalType(ui::ModalType modal_type) {
}
}
-gfx::Rect NativeWidgetWin::GetWindowScreenBounds() const {
+gfx::Rect NativeWidgetWin::GetWindowBoundsInScreen() const {
RECT r;
GetWindowRect(&r);
return gfx::Rect(r);
}
-gfx::Rect NativeWidgetWin::GetClientAreaScreenBounds() const {
+gfx::Rect NativeWidgetWin::GetClientAreaBoundsInScreen() const {
RECT r;
GetClientRect(&r);
POINT point = { r.left, r.top };
@@ -1169,7 +1169,7 @@ void NativeWidgetWin::FocusNativeView(gfx::NativeView native_view) {
::SetFocus(native_view);
}
-gfx::Rect NativeWidgetWin::GetWorkAreaScreenBounds() const {
+gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const {
return gfx::Screen::GetDisplayNearestWindow(GetNativeView()).work_area();
}
diff --git a/ui/views/widget/native_widget_win.h b/ui/views/widget/native_widget_win.h
index a45d3bb..f0cbfbd 100644
--- a/ui/views/widget/native_widget_win.h
+++ b/ui/views/widget/native_widget_win.h
@@ -216,8 +216,8 @@ class VIEWS_EXPORT NativeWidgetWin : public ui::WindowImpl,
virtual void SetAccessibleRole(ui::AccessibilityTypes::Role role) OVERRIDE;
virtual void SetAccessibleState(ui::AccessibilityTypes::State state) OVERRIDE;
virtual void InitModalType(ui::ModalType modal_type) OVERRIDE;
- virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE;
- virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE;
+ virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE;
+ virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE;
virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
virtual void SetSize(const gfx::Size& size) OVERRIDE;
@@ -256,7 +256,7 @@ class VIEWS_EXPORT NativeWidgetWin : public ui::WindowImpl,
virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
virtual void ClearNativeFocus() OVERRIDE;
virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE;
- virtual gfx::Rect GetWorkAreaScreenBounds() const OVERRIDE;
+ virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE;
virtual void SetInactiveRenderingDisabled(bool value) OVERRIDE;
virtual Widget::MoveLoopResult RunMoveLoop() OVERRIDE;
virtual void EndMoveLoop() OVERRIDE;
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index e8ab01a..12dd4ca 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -415,12 +415,12 @@ View* Widget::GetContentsView() {
return root_view_->GetContentsView();
}
-gfx::Rect Widget::GetWindowScreenBounds() const {
- return native_widget_->GetWindowScreenBounds();
+gfx::Rect Widget::GetWindowBoundsInScreen() const {
+ return native_widget_->GetWindowBoundsInScreen();
}
-gfx::Rect Widget::GetClientAreaScreenBounds() const {
- return native_widget_->GetClientAreaScreenBounds();
+gfx::Rect Widget::GetClientAreaBoundsInScreen() const {
+ return native_widget_->GetClientAreaBoundsInScreen();
}
gfx::Rect Widget::GetRestoredBounds() const {
@@ -891,8 +891,8 @@ View* Widget::GetChildViewParent() {
return GetContentsView() ? GetContentsView() : GetRootView();
}
-gfx::Rect Widget::GetWorkAreaScreenBounds() const {
- return native_widget_->GetWorkAreaScreenBounds();
+gfx::Rect Widget::GetWorkAreaBoundsInScreen() const {
+ return native_widget_->GetWorkAreaBoundsInScreen();
}
void Widget::OnOwnerClosing() {
@@ -1031,7 +1031,7 @@ bool Widget::OnNativeWidgetPaintAccelerated(const gfx::Rect& dirty_region) {
// Determine if the layer fills the client area.
gfx::Rect layer_bounds = GetRootView()->layer()->bounds();
layer_transform.TransformRect(&layer_bounds);
- gfx::Rect client_bounds = GetClientAreaScreenBounds();
+ gfx::Rect client_bounds = GetClientAreaBoundsInScreen();
// Translate bounds to origin (client area bounds are offset to account
// for buttons, etc).
client_bounds.set_origin(gfx::Point(0, 0));
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index b993108..6df205e 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -303,10 +303,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
View* GetContentsView();
// Returns the bounds of the Widget in screen coordinates.
- gfx::Rect GetWindowScreenBounds() const;
+ gfx::Rect GetWindowBoundsInScreen() const;
// Returns the bounds of the Widget's client area in screen coordinates.
- gfx::Rect GetClientAreaScreenBounds() const;
+ gfx::Rect GetClientAreaBoundsInScreen() const;
// Retrieves the restored bounds for the window.
gfx::Rect GetRestoredBounds() const;
@@ -616,7 +616,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
bool is_top_level() const { return is_top_level_; }
// Returns the work are bounds of the screen the Widget belongs to.
- gfx::Rect GetWorkAreaScreenBounds() const;
+ gfx::Rect GetWorkAreaBoundsInScreen() const;
// Notification that our owner is closing.
// NOTE: this is not invoked for aura as it's currently not needed there.
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index 9716a6c..7260c2b 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -756,24 +756,24 @@ TEST_F(WidgetObserverTest, DestroyBubble) {
// NativeWidgetGtk doesn't implement GetRestoredBounds.
TEST_F(WidgetTest, GetRestoredBounds) {
Widget* toplevel = CreateTopLevelPlatformWidget();
- EXPECT_EQ(toplevel->GetWindowScreenBounds().ToString(),
+ EXPECT_EQ(toplevel->GetWindowBoundsInScreen().ToString(),
toplevel->GetRestoredBounds().ToString());
toplevel->Show();
toplevel->Maximize();
RunPendingMessages();
- EXPECT_NE(toplevel->GetWindowScreenBounds().ToString(),
+ EXPECT_NE(toplevel->GetWindowBoundsInScreen().ToString(),
toplevel->GetRestoredBounds().ToString());
EXPECT_GT(toplevel->GetRestoredBounds().width(), 0);
EXPECT_GT(toplevel->GetRestoredBounds().height(), 0);
toplevel->Restore();
RunPendingMessages();
- EXPECT_EQ(toplevel->GetWindowScreenBounds().ToString(),
+ EXPECT_EQ(toplevel->GetWindowBoundsInScreen().ToString(),
toplevel->GetRestoredBounds().ToString());
toplevel->SetFullscreen(true);
RunPendingMessages();
- EXPECT_NE(toplevel->GetWindowScreenBounds().ToString(),
+ EXPECT_NE(toplevel->GetWindowBoundsInScreen().ToString(),
toplevel->GetRestoredBounds().ToString());
EXPECT_GT(toplevel->GetRestoredBounds().width(), 0);
EXPECT_GT(toplevel->GetRestoredBounds().height(), 0);