Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6593)

Unified Diff: chrome/browser/ui/gtk/gtk_util.cc

Issue 9390038: Move automation/ui_controls to ui/ui_controls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win_aura fix, sync Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/gtk_util.h ('k') | chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/gtk_util.cc
diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc
index cbf228690095a77fe68dfe66234f58dcfc0325c3..d7f9fc8c45fb63d2953e6aa8eb17016114ae76da 100644
--- a/chrome/browser/ui/gtk/gtk_util.cc
+++ b/chrome/browser/ui/gtk/gtk_util.cc
@@ -36,6 +36,7 @@
#include "ui/base/events.h"
#include "ui/base/gtk/gtk_compat.h"
#include "ui/base/gtk/gtk_hig_constants.h"
+#include "ui/base/gtk/gtk_screen_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/text/text_elider.h"
@@ -544,37 +545,6 @@ void UndoForceFontSize(GtkWidget* widget) {
gtk_widget_modify_font(widget, NULL);
}
-gfx::Point GetWidgetScreenPosition(GtkWidget* widget) {
- GdkWindow* window = gtk_widget_get_window(widget);
-
- if (!window) {
- NOTREACHED() << "Must only be called on realized widgets.";
- return gfx::Point(0, 0);
- }
-
- gint x, y;
- gdk_window_get_origin(window, &x, &y);
-
- if (!gtk_widget_get_has_window(widget)) {
- GtkAllocation allocation;
- gtk_widget_get_allocation(widget, &allocation);
- x += allocation.x;
- y += allocation.y;
- }
-
- return gfx::Point(x, y);
-}
-
-gfx::Rect GetWidgetScreenBounds(GtkWidget* widget) {
- gfx::Point position = GetWidgetScreenPosition(widget);
-
- GtkAllocation allocation;
- gtk_widget_get_allocation(widget, &allocation);
-
- return gfx::Rect(position.x(), position.y(),
- allocation.width, allocation.height);
-}
-
gfx::Size GetWidgetSize(GtkWidget* widget) {
GtkRequisition size;
gtk_widget_size_request(widget, &size);
@@ -585,7 +555,7 @@ void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p) {
DCHECK(widget);
DCHECK(p);
- gfx::Point position = GetWidgetScreenPosition(widget);
+ gfx::Point position = ui::GetWidgetScreenPosition(widget);
p->SetPoint(p->x() + position.x(), p->y() + position.y());
}
« no previous file with comments | « chrome/browser/ui/gtk/gtk_util.h ('k') | chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698