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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 blink::WebBeginFrameArgs web_begin_frame_args( | 66 blink::WebBeginFrameArgs web_begin_frame_args( |
67 frame_time_sec, deadline_sec, interval_sec); | 67 frame_time_sec, deadline_sec, interval_sec); |
68 widget_->beginFrame(web_begin_frame_args); | 68 widget_->beginFrame(web_begin_frame_args); |
69 } | 69 } |
70 | 70 |
71 void WebLayerTreeViewImpl::Layout() { | 71 void WebLayerTreeViewImpl::Layout() { |
72 widget_->layout(); | 72 widget_->layout(); |
73 } | 73 } |
74 | 74 |
75 void WebLayerTreeViewImpl::ApplyViewportDeltas( | 75 void WebLayerTreeViewImpl::ApplyViewportDeltas( |
| 76 const gfx::Vector2d& inner_delta, |
| 77 const gfx::Vector2d& outer_delta, |
| 78 float page_scale, |
| 79 float top_controls_delta) { |
| 80 widget_->applyViewportDeltas( |
| 81 inner_delta, |
| 82 outer_delta, |
| 83 page_scale, |
| 84 top_controls_delta); |
| 85 } |
| 86 |
| 87 void WebLayerTreeViewImpl::ApplyViewportDeltas( |
76 const gfx::Vector2d& scroll_delta, | 88 const gfx::Vector2d& scroll_delta, |
77 float page_scale, | 89 float page_scale, |
78 float top_controls_delta) { | 90 float top_controls_delta) { |
79 widget_->applyViewportDeltas(scroll_delta, page_scale, top_controls_delta); | 91 widget_->applyViewportDeltas(scroll_delta, page_scale, top_controls_delta); |
80 } | 92 } |
81 | 93 |
82 scoped_ptr<cc::OutputSurface> WebLayerTreeViewImpl::CreateOutputSurface( | 94 scoped_ptr<cc::OutputSurface> WebLayerTreeViewImpl::CreateOutputSurface( |
83 bool fallback) { | 95 bool fallback) { |
84 return output_surface_.Pass(); | 96 return output_surface_.Pass(); |
85 } | 97 } |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, | 235 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, |
224 main_thread_bound_weak_ptr_, | 236 main_thread_bound_weak_ptr_, |
225 id)); | 237 id)); |
226 } | 238 } |
227 | 239 |
228 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { | 240 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { |
229 view_->SetSurfaceId(SurfaceId::From(id)); | 241 view_->SetSurfaceId(SurfaceId::From(id)); |
230 } | 242 } |
231 | 243 |
232 } // namespace mojo | 244 } // namespace mojo |
OLD | NEW |