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 23:09:32 +0000
committeroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-22 23:09:32 +0000
commitd8e6018fb0b2d37104326a5c87b8d50e5ef8fa0e (patch)
treeb0310cc9c6304810256c781dd89a617cc26a5f9f /views/controls/button
parent2f6f4a6eb6c982ff297f8c468465a64c7716593c (diff)
downloadchromium_src-d8e6018fb0b2d37104326a5c87b8d50e5ef8fa0e.zip
chromium_src-d8e6018fb0b2d37104326a5c87b8d50e5ef8fa0e.tar.gz
chromium_src-d8e6018fb0b2d37104326a5c87b8d50e5ef8fa0e.tar.bz2
Revert 93724
"Move screen.h to ui/gfx because Screen doesn't depend on views, and they're useful outside views." This reverts commit 4b6b4b0a2a3d46f25ffe37d612742aba14c39462. TBR=jcivelli@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/7495019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93733 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, 7 insertions, 8 deletions
diff --git a/views/controls/button/custom_button.cc b/views/controls/button/custom_button.cc
index abeedf3..8e6e09c 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 "ui/gfx/screen.h"
+#include "views/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(gfx::Screen::GetCursorScreenPoint());
+ gfx::Point cursor_pos(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 64f4795..7701d59 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,8 +259,7 @@ int MenuButton::GetMaximumScreenXCoordinate() {
}
gfx::Rect monitor_bounds =
- gfx::Screen::GetMonitorWorkAreaNearestWindow(
- GetWidget()->GetTopLevelWidget()->GetNativeView());
+ Screen::GetMonitorWorkAreaNearestWindow(GetWidget()->GetNativeView());
return monitor_bounds.right() - 1;
}
diff --git a/views/controls/button/native_button.cc b/views/controls/button/native_button.cc
index dace82f..06e6b4c 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 "ui/gfx/screen.h"
+#include "views/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 = gfx::Screen::GetCursorScreenPoint();
+ gfx::Point cursor_point = 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 = gfx::Screen::GetCursorScreenPoint();
+ gfx::Point cursor_point = Screen::GetCursorScreenPoint();
#endif
views::MouseEvent event(ui::ET_MOUSE_RELEASED,
cursor_point.x(), cursor_point.y(),