diff options
author | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-23 00:45:11 +0000 |
---|---|---|
committer | oshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-23 00:45:11 +0000 |
commit | 1eabfd7a4dd99d9d3eec4e8b2fa0032d00a31093 (patch) | |
tree | 459ffc42c473ab89a5ae13f45cb578e4a5b289cd /views/controls | |
parent | f70f061e17087785320b732ed985a580444464e7 (diff) | |
download | chromium_src-1eabfd7a4dd99d9d3eec4e8b2fa0032d00a31093.zip chromium_src-1eabfd7a4dd99d9d3eec4e8b2fa0032d00a31093.tar.gz chromium_src-1eabfd7a4dd99d9d3eec4e8b2fa0032d00a31093.tar.bz2 |
2nd try. added UI_API to Screen class.
Move screen.h to ui/gfx because Screen doesn't depend on views, and they're useful outside views.
BUG=none
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93724
Review URL: http://codereview.chromium.org/7483014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r-- | views/controls/button/custom_button.cc | 4 | ||||
-rw-r--r-- | views/controls/button/menu_button.cc | 5 | ||||
-rw-r--r-- | views/controls/button/native_button.cc | 6 | ||||
-rw-r--r-- | views/controls/menu/menu_controller.cc | 7 |
4 files changed, 12 insertions, 10 deletions
diff --git a/views/controls/button/custom_button.cc b/views/controls/button/custom_button.cc index 8e6e09c..abeedf3 100644 --- a/views/controls/button/custom_button.cc +++ b/views/controls/button/custom_button.cc @@ -7,7 +7,7 @@ #include "ui/base/accessibility/accessible_view_state.h" #include "ui/base/animation/throb_animation.h" #include "ui/base/keycodes/keyboard_codes.h" -#include "views/screen.h" +#include "ui/gfx/screen.h" #include "views/widget/widget.h" namespace views { @@ -69,7 +69,7 @@ bool CustomButton::IsMouseHovered() const { if (!GetWidget()) return false; - gfx::Point cursor_pos(Screen::GetCursorScreenPoint()); + gfx::Point cursor_pos(gfx::Screen::GetCursorScreenPoint()); ConvertPointToView(NULL, this, &cursor_pos); return HitTest(cursor_pos); } diff --git a/views/controls/button/menu_button.cc b/views/controls/button/menu_button.cc index 7701d59..64f4795 100644 --- a/views/controls/button/menu_button.cc +++ b/views/controls/button/menu_button.cc @@ -12,10 +12,10 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/canvas.h" +#include "ui/gfx/screen.h" #include "views/controls/button/button.h" #include "views/controls/menu/view_menu_delegate.h" #include "views/events/event.h" -#include "views/screen.h" #include "views/widget/root_view.h" #include "views/widget/widget.h" @@ -259,7 +259,8 @@ int MenuButton::GetMaximumScreenXCoordinate() { } gfx::Rect monitor_bounds = - Screen::GetMonitorWorkAreaNearestWindow(GetWidget()->GetNativeView()); + gfx::Screen::GetMonitorWorkAreaNearestWindow( + GetWidget()->GetTopLevelWidget()->GetNativeView()); return monitor_bounds.right() - 1; } diff --git a/views/controls/button/native_button.cc b/views/controls/button/native_button.cc index 06e6b4c..dace82f 100644 --- a/views/controls/button/native_button.cc +++ b/views/controls/button/native_button.cc @@ -12,7 +12,7 @@ #include "ui/gfx/platform_font_win.h" #elif defined(OS_LINUX) #include <gdk/gdkkeysyms.h> -#include "views/screen.h" +#include "ui/gfx/screen.h" #endif @@ -114,7 +114,7 @@ void NativeButton::ButtonPressed() { POINTS points = MAKEPOINTS(pos); gfx::Point cursor_point(points.x, points.y); #elif defined(OS_LINUX) - gfx::Point cursor_point = Screen::GetCursorScreenPoint(); + gfx::Point cursor_point = gfx::Screen::GetCursorScreenPoint(); #endif views::MouseEvent event(ui::ET_MOUSE_RELEASED, @@ -192,7 +192,7 @@ bool NativeButton::AcceleratorPressed(const Accelerator& accelerator) { POINTS points = MAKEPOINTS(pos); gfx::Point cursor_point(points.x, points.y); #elif defined(OS_LINUX) - gfx::Point cursor_point = Screen::GetCursorScreenPoint(); + gfx::Point cursor_point = gfx::Screen::GetCursorScreenPoint(); #endif views::MouseEvent event(ui::ET_MOUSE_RELEASED, cursor_point.x(), cursor_point.y(), diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc index b2038da..3fae8bc 100644 --- a/views/controls/menu/menu_controller.cc +++ b/views/controls/menu/menu_controller.cc @@ -12,11 +12,11 @@ #include "ui/base/keycodes/keyboard_codes.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/canvas_skia.h" +#include "ui/gfx/screen.h" #include "views/controls/button/menu_button.h" #include "views/controls/menu/menu_scroll_view_container.h" #include "views/controls/menu/submenu_view.h" #include "views/drag_utils.h" -#include "views/screen.h" #include "views/view_constants.h" #include "views/views_delegate.h" #include "views/widget/root_view.h" @@ -1036,7 +1036,7 @@ void MenuController::UpdateInitialLocation( // Calculate the bounds of the monitor we'll show menus on. Do this once to // avoid repeated system queries for the info. - pending_state_.monitor_bounds = Screen::GetMonitorWorkAreaNearestPoint( + pending_state_.monitor_bounds = gfx::Screen::GetMonitorWorkAreaNearestPoint( bounds.origin()); } @@ -1064,7 +1064,8 @@ bool MenuController::ShowSiblingMenu(SubmenuView* source, return false; } - gfx::NativeWindow window_under_mouse = Screen::GetWindowAtCursorScreenPoint(); + gfx::NativeWindow window_under_mouse = + gfx::Screen::GetWindowAtCursorScreenPoint(); if (window_under_mouse != owner_) return false; |