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

Side by Side Diff: content/browser/renderer_host/gtk_window_utils.cc

Issue 8588068: GTK: Create the start of a compatibility header wrapping deprecated methods. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to ToT and remove views/ cleanups. Created 9 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/gtk_window_utils.h" 5 #include "content/browser/renderer_host/gtk_window_utils.h"
6 6
7 #include <gdk/gdkx.h> 7 #include <gdk/gdkx.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "ui/base/gtk/gtk_compat.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFact ory.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFact ory.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 void GetScreenInfoFromNativeWindow( 16 void GetScreenInfoFromNativeWindow(
16 GdkWindow* gdk_window, WebKit::WebScreenInfo* results) { 17 GdkWindow* gdk_window, WebKit::WebScreenInfo* results) {
17 GdkScreen* screen = gdk_drawable_get_screen(gdk_window); 18 GdkScreen* screen = gdk_window_get_screen(gdk_window);
18 *results = WebKit::WebScreenInfoFactory::screenInfo( 19 *results = WebKit::WebScreenInfoFactory::screenInfo(
19 gdk_x11_drawable_get_xdisplay(gdk_window), 20 gdk_x11_drawable_get_xdisplay(gdk_window),
20 gdk_x11_screen_get_screen_number(screen)); 21 gdk_x11_screen_get_screen_number(screen));
21 22
22 // TODO(tony): We should move this code into WebScreenInfoFactory. 23 // TODO(tony): We should move this code into WebScreenInfoFactory.
23 int monitor_number = gdk_screen_get_monitor_at_window(screen, gdk_window); 24 int monitor_number = gdk_screen_get_monitor_at_window(screen, gdk_window);
24 GdkRectangle monitor_rect; 25 GdkRectangle monitor_rect;
25 gdk_screen_get_monitor_geometry(screen, monitor_number, &monitor_rect); 26 gdk_screen_get_monitor_geometry(screen, monitor_number, &monitor_rect);
26 results->rect = WebKit::WebRect(monitor_rect.x, monitor_rect.y, 27 results->rect = WebKit::WebRect(monitor_rect.x, monitor_rect.y,
27 monitor_rect.width, monitor_rect.height); 28 monitor_rect.width, monitor_rect.height);
28 // TODO(tony): Should we query _NET_WORKAREA to get the workarea? 29 // TODO(tony): Should we query _NET_WORKAREA to get the workarea?
29 results->availableRect = results->rect; 30 results->availableRect = results->rect;
30 } 31 }
31 32
32 } // namespace content 33 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/login/login_prompt_gtk.cc ('k') | content/browser/renderer_host/render_widget_host_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698