| 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_->beginFrame(web_begin_frame_args); | 72 widget_->beginFrame(web_begin_frame_args); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void WebLayerTreeViewImpl::Layout() { | 75 void WebLayerTreeViewImpl::Layout() { |
| 76 widget_->layout(); | 76 widget_->layout(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 void WebLayerTreeViewImpl::ApplyViewportDeltas( | 79 void WebLayerTreeViewImpl::ApplyViewportDeltas( |
| 80 const gfx::Vector2d& inner_delta, | 80 const gfx::Vector2d& inner_delta, |
| 81 const gfx::Vector2d& outer_delta, | 81 const gfx::Vector2d& outer_delta, |
| 82 const gfx::Vector2dF& elastic_overscroll_delta, |
| 82 float page_scale, | 83 float page_scale, |
| 83 float top_controls_delta) { | 84 float top_controls_delta) { |
| 84 widget_->applyViewportDeltas( | 85 widget_->applyViewportDeltas( |
| 85 inner_delta, | 86 inner_delta, |
| 86 outer_delta, | 87 outer_delta, |
| 88 elastic_overscroll_delta, |
| 87 page_scale, | 89 page_scale, |
| 88 top_controls_delta); | 90 top_controls_delta); |
| 89 } | 91 } |
| 90 | 92 |
| 91 void WebLayerTreeViewImpl::ApplyViewportDeltas( | 93 void WebLayerTreeViewImpl::ApplyViewportDeltas( |
| 92 const gfx::Vector2d& scroll_delta, | 94 const gfx::Vector2d& scroll_delta, |
| 93 float page_scale, | 95 float page_scale, |
| 94 float top_controls_delta) { | 96 float top_controls_delta) { |
| 95 widget_->applyViewportDeltas(scroll_delta, page_scale, top_controls_delta); | 97 widget_->applyViewportDeltas(scroll_delta, page_scale, top_controls_delta); |
| 96 } | 98 } |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, | 248 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, |
| 247 main_thread_bound_weak_ptr_, | 249 main_thread_bound_weak_ptr_, |
| 248 id)); | 250 id)); |
| 249 } | 251 } |
| 250 | 252 |
| 251 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { | 253 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { |
| 252 view_->SetSurfaceId(SurfaceId::From(id)); | 254 view_->SetSurfaceId(SurfaceId::From(id)); |
| 253 } | 255 } |
| 254 | 256 |
| 255 } // namespace mojo | 257 } // namespace mojo |
| OLD | NEW |