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 "base/bind_helpers.h" | 5 #include "base/bind_helpers.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
10 #include "content/browser/frame_host/render_widget_host_view_guest.h" | 10 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 uint32 output_surface_id, | 190 uint32 output_surface_id, |
191 scoped_ptr<cc::CompositorFrame> frame) { | 191 scoped_ptr<cc::CompositorFrame> frame) { |
192 if (!guest_) | 192 if (!guest_) |
193 return; | 193 return; |
194 | 194 |
195 if (!guest_->attached()) { | 195 if (!guest_->attached()) { |
196 // If the guest doesn't have an embedder then there's nothing to give the | 196 // If the guest doesn't have an embedder then there's nothing to give the |
197 // the frame to. | 197 // the frame to. |
198 return; | 198 return; |
199 } | 199 } |
| 200 |
| 201 last_scroll_offset_ = frame->metadata.root_scroll_offset; |
200 base::SharedMemoryHandle software_frame_handle = | 202 base::SharedMemoryHandle software_frame_handle = |
201 base::SharedMemory::NULLHandle(); | 203 base::SharedMemory::NULLHandle(); |
202 if (frame->software_frame_data) { | 204 if (frame->software_frame_data) { |
203 cc::SoftwareFrameData* frame_data = frame->software_frame_data.get(); | 205 cc::SoftwareFrameData* frame_data = frame->software_frame_data.get(); |
204 scoped_ptr<cc::SharedBitmap> bitmap = | 206 scoped_ptr<cc::SharedBitmap> bitmap = |
205 HostSharedBitmapManager::current()->GetSharedBitmapFromId( | 207 HostSharedBitmapManager::current()->GetSharedBitmapFromId( |
206 frame_data->size, frame_data->bitmap_id); | 208 frame_data->size, frame_data->bitmap_id); |
207 if (!bitmap) | 209 if (!bitmap) |
208 return; | 210 return; |
209 | 211 |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 return kN32_SkColorType; | 554 return kN32_SkColorType; |
553 } | 555 } |
554 | 556 |
555 RenderWidgetHostViewBase* | 557 RenderWidgetHostViewBase* |
556 RenderWidgetHostViewGuest::GetGuestRenderWidgetHostView() const { | 558 RenderWidgetHostViewGuest::GetGuestRenderWidgetHostView() const { |
557 return static_cast<RenderWidgetHostViewBase*>( | 559 return static_cast<RenderWidgetHostViewBase*>( |
558 guest_->GetEmbedderRenderWidgetHostView()); | 560 guest_->GetEmbedderRenderWidgetHostView()); |
559 } | 561 } |
560 | 562 |
561 } // namespace content | 563 } // namespace content |
OLD | NEW |