| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 6 | 6 |
| 7 #include "content/browser/frame_host/cross_process_frame_connector.h" | 7 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 8 #include "content/browser/renderer_host/render_widget_host_impl.h" | 8 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 9 #include "content/common/gpu/gpu_messages.h" | 9 #include "content/common/gpu/gpu_messages.h" |
| 10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 return !host_->is_hidden(); | 63 return !host_->is_hidden(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 gfx::Rect RenderWidgetHostViewChildFrame::GetViewBounds() const { | 66 gfx::Rect RenderWidgetHostViewChildFrame::GetViewBounds() const { |
| 67 gfx::Rect rect; | 67 gfx::Rect rect; |
| 68 if (frame_connector_) | 68 if (frame_connector_) |
| 69 rect = frame_connector_->ChildFrameRect(); | 69 rect = frame_connector_->ChildFrameRect(); |
| 70 return rect; | 70 return rect; |
| 71 } | 71 } |
| 72 | 72 |
| 73 gfx::Vector2dF RenderWidgetHostViewChildFrame::GetLastScrollOffset() const { |
| 74 return last_scroll_offset_; |
| 75 } |
| 76 |
| 73 gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() const { | 77 gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() const { |
| 74 NOTREACHED(); | 78 NOTREACHED(); |
| 75 return NULL; | 79 return NULL; |
| 76 } | 80 } |
| 77 | 81 |
| 78 gfx::NativeViewId RenderWidgetHostViewChildFrame::GetNativeViewId() const { | 82 gfx::NativeViewId RenderWidgetHostViewChildFrame::GetNativeViewId() const { |
| 79 NOTREACHED(); | 83 NOTREACHED(); |
| 80 return 0; | 84 return 0; |
| 81 } | 85 } |
| 82 | 86 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 } | 211 } |
| 208 | 212 |
| 209 void RenderWidgetHostViewChildFrame::AcceleratedSurfacePostSubBuffer( | 213 void RenderWidgetHostViewChildFrame::AcceleratedSurfacePostSubBuffer( |
| 210 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 214 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
| 211 int gpu_host_id) { | 215 int gpu_host_id) { |
| 212 } | 216 } |
| 213 | 217 |
| 214 void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame( | 218 void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame( |
| 215 uint32 output_surface_id, | 219 uint32 output_surface_id, |
| 216 scoped_ptr<cc::CompositorFrame> frame) { | 220 scoped_ptr<cc::CompositorFrame> frame) { |
| 221 last_scroll_offset_ = frame->metadata.root_scroll_offset; |
| 217 if (frame_connector_) { | 222 if (frame_connector_) { |
| 218 frame_connector_->ChildFrameCompositorFrameSwapped( | 223 frame_connector_->ChildFrameCompositorFrameSwapped( |
| 219 output_surface_id, | 224 output_surface_id, |
| 220 host_->GetProcess()->GetID(), | 225 host_->GetProcess()->GetID(), |
| 221 host_->GetRoutingID(), | 226 host_->GetRoutingID(), |
| 222 frame.Pass()); | 227 frame.Pass()); |
| 223 } | 228 } |
| 224 } | 229 } |
| 225 | 230 |
| 226 void RenderWidgetHostViewChildFrame::GetScreenInfo( | 231 void RenderWidgetHostViewChildFrame::GetScreenInfo( |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 340 |
| 336 BrowserAccessibilityManager* | 341 BrowserAccessibilityManager* |
| 337 RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( | 342 RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( |
| 338 BrowserAccessibilityDelegate* delegate) { | 343 BrowserAccessibilityDelegate* delegate) { |
| 339 // This eventually needs to be implemented for cross-process iframes. | 344 // This eventually needs to be implemented for cross-process iframes. |
| 340 // http://crbug.com/368298 | 345 // http://crbug.com/368298 |
| 341 return NULL; | 346 return NULL; |
| 342 } | 347 } |
| 343 | 348 |
| 344 } // namespace content | 349 } // namespace content |
| OLD | NEW |