| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 | 1004 |
| 1005 void RenderWidgetHostViewGtk::AcceleratedSurfacePostSubBuffer( | 1005 void RenderWidgetHostViewGtk::AcceleratedSurfacePostSubBuffer( |
| 1006 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 1006 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
| 1007 int gpu_host_id) { | 1007 int gpu_host_id) { |
| 1008 RenderWidgetHostImpl::AcknowledgePostSubBuffer(params.route_id, gpu_host_id); | 1008 RenderWidgetHostImpl::AcknowledgePostSubBuffer(params.route_id, gpu_host_id); |
| 1009 } | 1009 } |
| 1010 | 1010 |
| 1011 void RenderWidgetHostViewGtk::AcceleratedSurfaceSuspend() { | 1011 void RenderWidgetHostViewGtk::AcceleratedSurfaceSuspend() { |
| 1012 } | 1012 } |
| 1013 | 1013 |
| 1014 bool RenderWidgetHostViewGtk::HasAcceleratedSurface( |
| 1015 const gfx::Size& desired_size) { |
| 1016 // TODO(jbates) Implement this so this view can use GetBackingStore for both |
| 1017 // software and GPU frames. Defaulting to false just makes GetBackingStore |
| 1018 // only useable for software frames. |
| 1019 return false; |
| 1020 } |
| 1014 | 1021 |
| 1015 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) { | 1022 void RenderWidgetHostViewGtk::SetBackground(const SkBitmap& background) { |
| 1016 content::RenderWidgetHostViewBase::SetBackground(background); | 1023 content::RenderWidgetHostViewBase::SetBackground(background); |
| 1017 host_->Send(new ViewMsg_SetBackground(host_->GetRoutingID(), background)); | 1024 host_->Send(new ViewMsg_SetBackground(host_->GetRoutingID(), background)); |
| 1018 } | 1025 } |
| 1019 | 1026 |
| 1020 void RenderWidgetHostViewGtk::ModifyEventForEdgeDragging( | 1027 void RenderWidgetHostViewGtk::ModifyEventForEdgeDragging( |
| 1021 GtkWidget* widget, GdkEventMotion* event) { | 1028 GtkWidget* widget, GdkEventMotion* event) { |
| 1022 // If the widget is aligned with an edge of the monitor its on and the user | 1029 // If the widget is aligned with an edge of the monitor its on and the user |
| 1023 // attempts to drag past that edge we track the number of times it has | 1030 // attempts to drag past that edge we track the number of times it has |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1390 return new RenderWidgetHostViewGtk(widget); | 1397 return new RenderWidgetHostViewGtk(widget); |
| 1391 } | 1398 } |
| 1392 | 1399 |
| 1393 // static | 1400 // static |
| 1394 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( | 1401 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo( |
| 1395 WebKit::WebScreenInfo* results) { | 1402 WebKit::WebScreenInfo* results) { |
| 1396 GdkWindow* gdk_window = | 1403 GdkWindow* gdk_window = |
| 1397 gdk_display_get_default_group(gdk_display_get_default()); | 1404 gdk_display_get_default_group(gdk_display_get_default()); |
| 1398 content::GetScreenInfoFromNativeWindow(gdk_window, results); | 1405 content::GetScreenInfoFromNativeWindow(gdk_window, results); |
| 1399 } | 1406 } |
| OLD | NEW |