OLD | NEW |
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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 gtk_widget_show_all(GTK_WIDGET(window)); | 995 gtk_widget_show_all(GTK_WIDGET(window)); |
996 } | 996 } |
997 | 997 |
998 BackingStore* RenderWidgetHostViewGtk::AllocBackingStore( | 998 BackingStore* RenderWidgetHostViewGtk::AllocBackingStore( |
999 const gfx::Size& size) { | 999 const gfx::Size& size) { |
1000 return new BackingStoreGtk(host_, size, | 1000 return new BackingStoreGtk(host_, size, |
1001 ui::GetVisualFromGtkWidget(view_.get()), | 1001 ui::GetVisualFromGtkWidget(view_.get()), |
1002 gtk_widget_get_visual(view_.get())->depth); | 1002 gtk_widget_get_visual(view_.get())->depth); |
1003 } | 1003 } |
1004 | 1004 |
| 1005 void RenderWidgetHostViewGtk::AcceleratedSurfaceBuffersSwapped( |
| 1006 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, |
| 1007 int gpu_host_id) { |
| 1008 } |
| 1009 |
1005 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) { | 1010 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) { |
1006 RenderWidgetHostView::SetBackground(background); | 1011 RenderWidgetHostView::SetBackground(background); |
1007 host_->Send(new ViewMsg_SetBackground(host_->routing_id(), background)); | 1012 host_->Send(new ViewMsg_SetBackground(host_->routing_id(), background)); |
1008 } | 1013 } |
1009 | 1014 |
1010 void RenderWidgetHostViewGtk::ModifyEventForEdgeDragging( | 1015 void RenderWidgetHostViewGtk::ModifyEventForEdgeDragging( |
1011 GtkWidget* widget, GdkEventMotion* event) { | 1016 GtkWidget* widget, GdkEventMotion* event) { |
1012 // If the widget is aligned with an edge of the monitor its on and the user | 1017 // If the widget is aligned with an edge of the monitor its on and the user |
1013 // attempts to drag past that edge we track the number of times it has | 1018 // attempts to drag past that edge we track the number of times it has |
1014 // occurred, so that we can force the widget to scroll when it otherwise | 1019 // occurred, so that we can force the widget to scroll when it otherwise |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1412 } | 1417 } |
1413 } | 1418 } |
1414 | 1419 |
1415 // static | 1420 // static |
1416 void RenderWidgetHostView::GetDefaultScreenInfo( | 1421 void RenderWidgetHostView::GetDefaultScreenInfo( |
1417 WebKit::WebScreenInfo* results) { | 1422 WebKit::WebScreenInfo* results) { |
1418 GdkWindow* gdk_window = | 1423 GdkWindow* gdk_window = |
1419 gdk_display_get_default_group(gdk_display_get_default()); | 1424 gdk_display_get_default_group(gdk_display_get_default()); |
1420 content::GetScreenInfoFromNativeWindow(gdk_window, results); | 1425 content::GetScreenInfoFromNativeWindow(gdk_window, results); |
1421 } | 1426 } |
OLD | NEW |