summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authoroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-23 07:02:48 +0000
committeroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-23 07:02:48 +0000
commitff967dcaae01a2e807bff93e26a4b7c9dffe9ed8 (patch)
tree682aa27b7afb950f797e8520ac50e0a63c71c838 /views/widget
parent9349003401f0c97a8931d38df8fc8ff0a24e7492 (diff)
downloadchromium_src-ff967dcaae01a2e807bff93e26a4b7c9dffe9ed8.zip
chromium_src-ff967dcaae01a2e807bff93e26a4b7c9dffe9ed8.tar.gz
chromium_src-ff967dcaae01a2e807bff93e26a4b7c9dffe9ed8.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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93744 Review URL: http://codereview.chromium.org/7483014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/native_widget_gtk.cc4
-rw-r--r--views/widget/native_widget_win.cc4
-rw-r--r--views/widget/tooltip_manager_gtk.cc4
-rw-r--r--views/widget/tooltip_manager_views.cc6
-rw-r--r--views/widget/tooltip_manager_win.cc4
5 files changed, 11 insertions, 11 deletions
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc
index 82ac4b33..8399107 100644
--- a/views/widget/native_widget_gtk.cc
+++ b/views/widget/native_widget_gtk.cc
@@ -28,10 +28,10 @@
#include "ui/gfx/compositor/compositor.h"
#include "ui/gfx/gtk_util.h"
#include "ui/gfx/path.h"
+#include "ui/gfx/screen.h"
#include "views/controls/textfield/native_textfield_views.h"
#include "views/focus/view_storage.h"
#include "views/ime/input_method_gtk.h"
-#include "views/screen.h"
#include "views/views_delegate.h"
#include "views/widget/drop_target_gtk.h"
#include "views/widget/gtk_views_fixed.h"
@@ -1005,7 +1005,7 @@ void NativeWidgetGtk::CenterWindow(const gfx::Size& size) {
center_rect = gfx::Rect(parent_x, parent_y, parent_w, parent_h);
} else {
// We have no parent window, center over the screen.
- center_rect = Screen::GetMonitorWorkAreaNearestWindow(GetNativeView());
+ center_rect = gfx::Screen::GetMonitorWorkAreaNearestWindow(GetNativeView());
}
gfx::Rect bounds(center_rect.x() + (center_rect.width() - size.width()) / 2,
center_rect.y() + (center_rect.height() - size.height()) / 2,
diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc
index 41d38fd..c327330 100644
--- a/views/widget/native_widget_win.cc
+++ b/views/widget/native_widget_win.cc
@@ -27,6 +27,7 @@
#include "ui/gfx/icon_util.h"
#include "ui/gfx/native_theme_win.h"
#include "ui/gfx/path.h"
+#include "ui/gfx/screen.h"
#include "views/accessibility/native_view_accessibility_win.h"
#include "views/controls/native_control_win.h"
#include "views/controls/textfield/native_textfield_views.h"
@@ -34,7 +35,6 @@
#include "views/focus/focus_util_win.h"
#include "views/focus/view_storage.h"
#include "views/ime/input_method_win.h"
-#include "views/screen.h"
#include "views/views_delegate.h"
#include "views/widget/aero_tooltip_manager.h"
#include "views/widget/child_window_message_processor.h"
@@ -191,7 +191,7 @@ void SetChildBounds(HWND child_window,
window = insert_after_window;
gfx::Rect work_area =
- views::Screen::GetMonitorWorkAreaNearestPoint(bounds.origin());
+ gfx::Screen::GetMonitorWorkAreaNearestPoint(bounds.origin());
if (!work_area.IsEmpty())
parent_rect = work_area.ToRECT();
}
diff --git a/views/widget/tooltip_manager_gtk.cc b/views/widget/tooltip_manager_gtk.cc
index d88f345..27ef1a2 100644
--- a/views/widget/tooltip_manager_gtk.cc
+++ b/views/widget/tooltip_manager_gtk.cc
@@ -7,8 +7,8 @@
#include "base/logging.h"
#include "base/utf_string_conversions.h"
#include "ui/gfx/font.h"
+#include "ui/gfx/screen.h"
#include "views/focus/focus_manager.h"
-#include "views/screen.h"
#include "views/view.h"
#include "views/widget/native_widget_gtk.h"
@@ -64,7 +64,7 @@ const std::wstring& TooltipManager::GetLineSeparator() {
// static
int TooltipManager::GetMaxWidth(int x, int y) {
gfx::Rect monitor_bounds =
- Screen::GetMonitorAreaNearestPoint(gfx::Point(x, y));
+ gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point(x, y));
// GtkLabel (gtk_label_ensure_layout) forces wrapping at this size. We mirror
// the size here otherwise tooltips wider than the size used by gtklabel end
// up with extraneous empty lines.
diff --git a/views/widget/tooltip_manager_views.cc b/views/widget/tooltip_manager_views.cc
index 98f38dc..4c0a728 100644
--- a/views/widget/tooltip_manager_views.cc
+++ b/views/widget/tooltip_manager_views.cc
@@ -13,10 +13,10 @@
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/font.h"
+#include "ui/gfx/screen.h"
#include "views/background.h"
#include "views/border.h"
#include "views/focus/focus_manager.h"
-#include "views/screen.h"
#include "views/view.h"
#include "views/widget/native_widget.h"
#include "views/widget/root_view.h"
@@ -57,7 +57,7 @@ int TooltipManager::GetMaxWidth(int x, int y) {
// We always display the tooltip inside the root view. So the max width is
// the width of the view.
gfx::Rect monitor_bounds =
- Screen::GetMonitorAreaNearestPoint(gfx::Point(x, y));
+ gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point(x, y));
// GtkLabel (gtk_label_ensure_layout) forces wrapping at this size. We mirror
// the size here otherwise tooltips wider than the size used by gtklabel end
// up with extraneous empty lines.
@@ -179,7 +179,7 @@ void TooltipManagerViews::SetTooltipBounds(gfx::Point mouse_pos,
tooltip_rect.Offset(kCursorOffsetX, kCursorOffsetY);
gfx::Rect monitor_bounds =
- Screen::GetMonitorAreaNearestPoint(tooltip_rect.origin());
+ gfx::Screen::GetMonitorAreaNearestPoint(tooltip_rect.origin());
tooltip_widget_->SetBounds(tooltip_rect.AdjustToFit(monitor_bounds));
}
diff --git a/views/widget/tooltip_manager_win.cc b/views/widget/tooltip_manager_win.cc
index 68714b9..9e50087 100644
--- a/views/widget/tooltip_manager_win.cc
+++ b/views/widget/tooltip_manager_win.cc
@@ -13,7 +13,7 @@
#include "ui/base/l10n/l10n_util_win.h"
#include "ui/base/win/hwnd_util.h"
#include "ui/gfx/font.h"
-#include "views/screen.h"
+#include "ui/gfx/screen.h"
#include "views/view.h"
#include "views/widget/monitor_win.h"
#include "views/widget/widget.h"
@@ -63,7 +63,7 @@ const std::wstring& TooltipManager::GetLineSeparator() {
// static
int TooltipManager::GetMaxWidth(int x, int y) {
gfx::Rect monitor_bounds =
- Screen::GetMonitorAreaNearestPoint(gfx::Point(x, y));
+ gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point(x, y));
// Allow the tooltip to be almost as wide as the screen.
// Otherwise, we would truncate important text, since we're not word-wrapping
// the text onto multiple lines.