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/browser_plugin/browser_plugin_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 uint32 output_surface_id, | 315 uint32 output_surface_id, |
316 int host_process_id, | 316 int host_process_id, |
317 int host_routing_id, | 317 int host_routing_id, |
318 scoped_ptr<cc::CompositorFrame> frame) { | 318 scoped_ptr<cc::CompositorFrame> frame) { |
319 if (!attached()) { | 319 if (!attached()) { |
320 // If the guest doesn't have an embedder then there's nothing to give the | 320 // If the guest doesn't have an embedder then there's nothing to give the |
321 // the frame to. | 321 // the frame to. |
322 return; | 322 return; |
323 } | 323 } |
324 | 324 |
325 gfx::Size view_size(frame->metadata.root_layer_size.width(), | 325 cc::RenderPass* root_pass = |
326 frame->metadata.root_layer_size.height()); | 326 frame->delegated_frame_data->render_pass_list.back(); |
| 327 gfx::Size view_size(root_pass->output_rect.size()); |
327 if (last_seen_view_size_ != view_size) { | 328 if (last_seen_view_size_ != view_size) { |
328 delegate_->GuestSizeChanged(last_seen_view_size_, view_size); | 329 delegate_->GuestSizeChanged(last_seen_view_size_, view_size); |
329 last_seen_view_size_ = view_size; | 330 last_seen_view_size_ = view_size; |
330 } | 331 } |
331 | 332 |
332 base::SharedMemoryHandle software_frame_handle = | 333 base::SharedMemoryHandle software_frame_handle = |
333 base::SharedMemory::NULLHandle(); | 334 base::SharedMemory::NULLHandle(); |
334 if (frame->software_frame_data) { | 335 if (frame->software_frame_data) { |
335 cc::SoftwareFrameData* frame_data = frame->software_frame_data.get(); | 336 cc::SoftwareFrameData* frame_data = frame->software_frame_data.get(); |
336 scoped_ptr<cc::SharedBitmap> bitmap = | 337 scoped_ptr<cc::SharedBitmap> bitmap = |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 892 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
892 const gfx::Range& range, | 893 const gfx::Range& range, |
893 const std::vector<gfx::Rect>& character_bounds) { | 894 const std::vector<gfx::Rect>& character_bounds) { |
894 static_cast<RenderWidgetHostViewBase*>( | 895 static_cast<RenderWidgetHostViewBase*>( |
895 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 896 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
896 range, character_bounds); | 897 range, character_bounds); |
897 } | 898 } |
898 #endif | 899 #endif |
899 | 900 |
900 } // namespace content | 901 } // namespace content |
OLD | NEW |