| 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 "mojo/services/html_viewer/weblayertreeview_impl.h" | 5 #include "mojo/services/html_viewer/weblayertreeview_impl.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
| 8 #include "cc/blink/web_layer_impl.h" | 8 #include "cc/blink/web_layer_impl.h" |
| 9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
| 10 #include "cc/output/begin_frame_args.h" | 10 #include "cc/output/begin_frame_args.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 widget_->layout(); | 72 widget_->layout(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void WebLayerTreeViewImpl::ApplyViewportDeltas( | 75 void WebLayerTreeViewImpl::ApplyViewportDeltas( |
| 76 const gfx::Vector2d& scroll_delta, | 76 const gfx::Vector2d& scroll_delta, |
| 77 float page_scale, | 77 float page_scale, |
| 78 float top_controls_delta) { | 78 float top_controls_delta) { |
| 79 widget_->applyViewportDeltas(scroll_delta, page_scale, top_controls_delta); | 79 widget_->applyViewportDeltas(scroll_delta, page_scale, top_controls_delta); |
| 80 } | 80 } |
| 81 | 81 |
| 82 scoped_ptr<cc::OutputSurface> WebLayerTreeViewImpl::CreateOutputSurface( | 82 void WebLayerTreeViewImpl::RequestNewOutputSurface(bool fallback) { |
| 83 bool fallback) { | 83 layer_tree_host_->SetOutputSurface(output_surface_.Pass()); |
| 84 return output_surface_.Pass(); | |
| 85 } | 84 } |
| 86 | 85 |
| 87 void WebLayerTreeViewImpl::DidInitializeOutputSurface() { | 86 void WebLayerTreeViewImpl::DidInitializeOutputSurface() { |
| 88 } | 87 } |
| 89 | 88 |
| 90 void WebLayerTreeViewImpl::WillCommit() { | 89 void WebLayerTreeViewImpl::WillCommit() { |
| 91 } | 90 } |
| 92 | 91 |
| 93 void WebLayerTreeViewImpl::DidCommit() { | 92 void WebLayerTreeViewImpl::DidCommit() { |
| 94 widget_->didCommitFrameToCompositor(); | 93 widget_->didCommitFrameToCompositor(); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, | 222 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, |
| 224 main_thread_bound_weak_ptr_, | 223 main_thread_bound_weak_ptr_, |
| 225 id)); | 224 id)); |
| 226 } | 225 } |
| 227 | 226 |
| 228 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { | 227 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { |
| 229 view_->SetSurfaceId(SurfaceId::From(id)); | 228 view_->SetSurfaceId(SurfaceId::From(id)); |
| 230 } | 229 } |
| 231 | 230 |
| 232 } // namespace mojo | 231 } // namespace mojo |
| OLD | NEW |