summaryrefslogtreecommitdiffstats
path: root/views/controls/button
diff options
context:
space:
mode:
authoroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-22 22:45:03 +0000
committeroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-22 22:45:03 +0000
commit8c7f65db00d5994cc430be11934ec564a894ec76 (patch)
treefac501ea2588816be1665529bcda1d7093dddccf /views/controls/button
parent9b867976a757b80ed566a49736d1c3591e7cc3e4 (diff)
downloadchromium_src-8c7f65db00d5994cc430be11934ec564a894ec76.zip
chromium_src-8c7f65db00d5994cc430be11934ec564a894ec76.tar.gz
chromium_src-8c7f65db00d5994cc430be11934ec564a894ec76.tar.bz2
Move screen.h to ui/gfx because Screen doesn't depend on views, and they're useful outside views.
BUG=none TEST=none Review URL: http://codereview.chromium.org/7483014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/button')
-rw-r--r--views/controls/button/custom_button.cc4
-rw-r--r--views/controls/button/menu_button.cc5
-rw-r--r--views/controls/button/native_button.cc6
3 files changed, 8 insertions, 7 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(),