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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 if (!frame_connector_) | 404 if (!frame_connector_) |
405 return; | 405 return; |
406 ProcessCompositorFrame(local_surface_id, std::move(frame)); | 406 ProcessCompositorFrame(local_surface_id, std::move(frame)); |
407 } | 407 } |
408 | 408 |
409 void RenderWidgetHostViewChildFrame::OnBeginFrameDidNotSwap( | 409 void RenderWidgetHostViewChildFrame::OnBeginFrameDidNotSwap( |
410 const cc::BeginFrameAck& ack) { | 410 const cc::BeginFrameAck& ack) { |
411 support_->BeginFrameDidNotSwap(ack); | 411 support_->BeginFrameDidNotSwap(ack); |
412 } | 412 } |
413 | 413 |
| 414 void RenderWidgetHostViewChildFrame::OnSurfaceChanged( |
| 415 const cc::SurfaceInfo& surface_info) { |
| 416 cc::SurfaceSequence sequence(frame_sink_id_, next_surface_sequence_++); |
| 417 SendSurfaceInfoToEmbedderImpl(surface_info, sequence); |
| 418 } |
| 419 |
414 void RenderWidgetHostViewChildFrame::ProcessFrameSwappedCallbacks() { | 420 void RenderWidgetHostViewChildFrame::ProcessFrameSwappedCallbacks() { |
415 // We only use callbacks once, therefore we make a new list for registration | 421 // We only use callbacks once, therefore we make a new list for registration |
416 // before we start, and discard the old list entries when we are done. | 422 // before we start, and discard the old list entries when we are done. |
417 FrameSwappedCallbackList process_callbacks; | 423 FrameSwappedCallbackList process_callbacks; |
418 process_callbacks.swap(frame_swapped_callbacks_); | 424 process_callbacks.swap(frame_swapped_callbacks_); |
419 for (std::unique_ptr<base::Closure>& callback : process_callbacks) | 425 for (std::unique_ptr<base::Closure>& callback : process_callbacks) |
420 callback->Run(); | 426 callback->Run(); |
421 } | 427 } |
422 | 428 |
423 gfx::Rect RenderWidgetHostViewChildFrame::GetBoundsInRootWindow() { | 429 gfx::Rect RenderWidgetHostViewChildFrame::GetBoundsInRootWindow() { |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 frame_sink_id_); | 708 frame_sink_id_); |
703 } | 709 } |
704 support_.reset(); | 710 support_.reset(); |
705 } | 711 } |
706 | 712 |
707 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() { | 713 bool RenderWidgetHostViewChildFrame::HasEmbedderChanged() { |
708 return false; | 714 return false; |
709 } | 715 } |
710 | 716 |
711 } // namespace content | 717 } // namespace content |
OLD | NEW |