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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_gtk.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 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/render_widget_host_view_gtk.h" 5 #include "content/browser/renderer_host/render_widget_host_view_gtk.h"
6 6
7 // If this gets included after the gtk headers, then a bunch of compiler 7 // If this gets included after the gtk headers, then a bunch of compiler
8 // errors happen because of a "#define Status int" in Xlib.h, which interacts 8 // errors happen because of a "#define Status int" in Xlib.h, which interacts
9 // badly with net::URLRequestStatus::Status. 9 // badly with net::URLRequestStatus::Status.
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 gfx::Point RenderWidgetHostViewGtk::GetWidgetCenter() { 1376 gfx::Point RenderWidgetHostViewGtk::GetWidgetCenter() {
1377 if (widget_center_valid_) 1377 if (widget_center_valid_)
1378 return widget_center_; 1378 return widget_center_;
1379 1379
1380 GdkWindow* window = gtk_widget_get_window(view_.get()); 1380 GdkWindow* window = gtk_widget_get_window(view_.get());
1381 gint window_x = 0; 1381 gint window_x = 0;
1382 gint window_y = 0; 1382 gint window_y = 0;
1383 gdk_window_get_origin(window, &window_x, &window_y); 1383 gdk_window_get_origin(window, &window_x, &window_y);
1384 gint window_w = 0; 1384 gint window_w = 0;
1385 gint window_h = 0; 1385 gint window_h = 0;
1386 gdk_drawable_get_size(window, &window_w, &window_h); 1386 gdk_window_get_size(window, &window_w, &window_h);
1387 1387
1388 widget_center_.SetPoint(window_x + window_w / 2, 1388 widget_center_.SetPoint(window_x + window_w / 2,
1389 window_y + window_h / 2); 1389 window_y + window_h / 2);
1390 widget_center_valid_ = true; 1390 widget_center_valid_ = true;
1391 return widget_center_; 1391 return widget_center_;
1392 } 1392 }
1393 1393
1394 void RenderWidgetHostViewGtk::ModifyEventMovementAndCoords( 1394 void RenderWidgetHostViewGtk::ModifyEventMovementAndCoords(
1395 WebKit::WebMouseEvent* event) { 1395 WebKit::WebMouseEvent* event) {
1396 // Movement is computed by taking the difference of the new cursor position 1396 // Movement is computed by taking the difference of the new cursor position
(...skipping 22 matching lines...) Expand all
1419 } 1419 }
1420 } 1420 }
1421 1421
1422 // static 1422 // static
1423 void RenderWidgetHostView::GetDefaultScreenInfo( 1423 void RenderWidgetHostView::GetDefaultScreenInfo(
1424 WebKit::WebScreenInfo* results) { 1424 WebKit::WebScreenInfo* results) {
1425 GdkWindow* gdk_window = 1425 GdkWindow* gdk_window =
1426 gdk_display_get_default_group(gdk_display_get_default()); 1426 gdk_display_get_default_group(gdk_display_get_default());
1427 content::GetScreenInfoFromNativeWindow(gdk_window, results); 1427 content::GetScreenInfoFromNativeWindow(gdk_window, results);
1428 } 1428 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/gtk_window_utils.cc ('k') | content/browser/tab_contents/web_drag_source_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698