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

Unified Diff: ui/base/gtk/gtk_screen_util.cc

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 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
Index: ui/base/gtk/gtk_screen_util.cc
diff --git a/ui/base/gtk/gtk_screen_util.cc b/ui/base/gtk/gtk_screen_util.cc
deleted file mode 100644
index 000f9509472b01ac1b554d54135412eb3755a1cf..0000000000000000000000000000000000000000
--- a/ui/base/gtk/gtk_screen_util.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/base/gtk/gtk_screen_util.h"
-
-#include "base/logging.h"
-
-namespace ui {
-
-bool IsScreenComposited() {
- GdkScreen* screen = gdk_screen_get_default();
- return gdk_screen_is_composited(screen) == TRUE;
-}
-
-gfx::Point ScreenPoint(GtkWidget* widget) {
- int x, y;
- gdk_display_get_pointer(gtk_widget_get_display(widget), NULL, &x, &y,
- NULL);
- return gfx::Point(x, y);
-}
-
-gfx::Point ClientPoint(GtkWidget* widget) {
- int x, y;
- gtk_widget_get_pointer(widget, &x, &y);
- return gfx::Point(x, y);
-}
-
-gfx::Vector2d GetWidgetScreenOffset(GtkWidget* widget) {
- GdkWindow* window = gtk_widget_get_window(widget);
-
- if (!window) {
- NOTREACHED() << "Must only be called on realized widgets.";
- return gfx::Vector2d(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::Vector2d(x, y);
-}
-
-gfx::Rect GetWidgetScreenBounds(GtkWidget* widget) {
- GtkAllocation allocation;
- gtk_widget_get_allocation(widget, &allocation);
-
- return gfx::Rect(PointAtOffsetFromOrigin(GetWidgetScreenOffset(widget)),
- gfx::Size(allocation.width, allocation.height));
-}
-
-} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698