| 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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 const size_t bitmap_size = bitmap.getSize(); | 1057 const size_t bitmap_size = bitmap.getSize(); |
| 1058 DCHECK_EQ(bitmap_size, | 1058 DCHECK_EQ(bitmap_size, |
| 1059 static_cast<size_t>(image->height * image->bytes_per_line)); | 1059 static_cast<size_t>(image->height * image->bytes_per_line)); |
| 1060 unsigned char* pixels = static_cast<unsigned char*>(bitmap.getPixels()); | 1060 unsigned char* pixels = static_cast<unsigned char*>(bitmap.getPixels()); |
| 1061 memcpy(pixels, image->data, bitmap_size); | 1061 memcpy(pixels, image->data, bitmap_size); |
| 1062 | 1062 |
| 1063 scoped_callback_runner.Release(); | 1063 scoped_callback_runner.Release(); |
| 1064 callback.Run(true, bitmap); | 1064 callback.Run(true, bitmap); |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 void RenderWidgetHostViewGtk::CopyFromCompositingSurfaceToVideoFrame( |
| 1068 const gfx::Rect& src_subrect, |
| 1069 const scoped_refptr<media::VideoFrame>& target, |
| 1070 const base::Callback<void(bool)>& callback) { |
| 1071 NOTIMPLEMENTED(); |
| 1072 callback.Run(false); |
| 1073 } |
| 1074 |
| 1075 bool RenderWidgetHostViewGtk::CanCopyToVideoFrame() const { |
| 1076 return false; |
| 1077 } |
| 1078 |
| 1067 void RenderWidgetHostViewGtk::AcceleratedSurfaceBuffersSwapped( | 1079 void RenderWidgetHostViewGtk::AcceleratedSurfaceBuffersSwapped( |
| 1068 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, | 1080 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, |
| 1069 int gpu_host_id) { | 1081 int gpu_host_id) { |
| 1070 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; | 1082 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; |
| 1071 ack_params.sync_point = 0; | 1083 ack_params.sync_point = 0; |
| 1072 RenderWidgetHostImpl::AcknowledgeBufferPresent( | 1084 RenderWidgetHostImpl::AcknowledgeBufferPresent( |
| 1073 params.route_id, gpu_host_id, ack_params); | 1085 params.route_id, gpu_host_id, ack_params); |
| 1074 } | 1086 } |
| 1075 | 1087 |
| 1076 void RenderWidgetHostViewGtk::AcceleratedSurfacePostSubBuffer( | 1088 void RenderWidgetHostViewGtk::AcceleratedSurfacePostSubBuffer( |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1560 this)); | 1572 this)); |
| 1561 } | 1573 } |
| 1562 BrowserAccessibilityGtk* root = | 1574 BrowserAccessibilityGtk* root = |
| 1563 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); | 1575 browser_accessibility_manager_->GetRoot()->ToBrowserAccessibilityGtk(); |
| 1564 | 1576 |
| 1565 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); | 1577 atk_object_set_role(root->GetAtkObject(), ATK_ROLE_HTML_CONTAINER); |
| 1566 return root->GetAtkObject(); | 1578 return root->GetAtkObject(); |
| 1567 } | 1579 } |
| 1568 | 1580 |
| 1569 } // namespace content | 1581 } // namespace content |
| OLD | NEW |