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

Unified Diff: content/browser/renderer_host/render_widget_host_view_gtk.cc

Issue 7753013: content: Make ifdefs match with where this is used (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Factor out common code Created 9 years, 4 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 | « content/browser/renderer_host/render_widget_host_view.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_gtk.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc
index ed63c9aba291faa8c0e81aab3f8f6fe36bf53f80..0e7733ee80a5fbeacdc1be705b44379e21cbff76 100644
--- a/content/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -27,6 +27,7 @@
#include "base/utf_string_conversions.h"
#include "content/browser/renderer_host/backing_store_x.h"
#include "content/browser/renderer_host/gtk_im_context_wrapper.h"
+#include "content/browser/renderer_host/gtk_window_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/render_widget_host.h"
@@ -94,23 +95,6 @@ GdkCursor* GetMozSpinningCursor() {
return moz_spinning_cursor;
}
-void GetScreenInfoFromNativeWindow(
- GdkWindow* gdk_window, WebKit::WebScreenInfo* results) {
- GdkScreen* screen = gdk_drawable_get_screen(gdk_window);
- *results = WebKit::WebScreenInfoFactory::screenInfo(
- gdk_x11_drawable_get_xdisplay(gdk_window),
- gdk_x11_screen_get_screen_number(screen));
-
- // TODO(tony): We should move this code into WebScreenInfoFactory.
- gint monitor_number = gdk_screen_get_monitor_at_window(screen, gdk_window);
- GdkRectangle monitor_rect;
- gdk_screen_get_monitor_geometry(screen, monitor_number, &monitor_rect);
- results->rect = WebKit::WebRect(monitor_rect.x, monitor_rect.y,
- monitor_rect.width, monitor_rect.height);
- // TODO(tony): Should we query _NET_WORKAREA to get the workarea?
- results->availableRect = results->rect;
-}
-
} // namespace
using WebKit::WebInputEventFactory;
@@ -1174,7 +1158,7 @@ void RenderWidgetHostViewGtk::GetScreenInfo(WebKit::WebScreenInfo* results) {
}
if (!gdk_window)
return;
- GetScreenInfoFromNativeWindow(gdk_window, results);
+ content::GetScreenInfoFromNativeWindow(gdk_window, results);
}
gfx::Rect RenderWidgetHostViewGtk::GetRootWindowBounds() {
@@ -1257,5 +1241,5 @@ void RenderWidgetHostView::GetDefaultScreenInfo(
WebKit::WebScreenInfo* results) {
GdkWindow* gdk_window =
gdk_display_get_default_group(gdk_display_get_default());
- GetScreenInfoFromNativeWindow(gdk_window, results);
+ content::GetScreenInfoFromNativeWindow(gdk_window, results);
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698