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