| 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 "sky/viewer/document_view.h" | 5 #include "sky/viewer/document_view.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( | 164 web_layer_tree_view_impl_.reset(new WebLayerTreeViewImpl( |
| 165 compositor_thread_, surfaces_service.Pass(), gpu_service.Pass())); | 165 compositor_thread_, surfaces_service.Pass(), gpu_service.Pass())); |
| 166 | 166 |
| 167 return web_layer_tree_view_impl_.get(); | 167 return web_layer_tree_view_impl_.get(); |
| 168 #endif | 168 #endif |
| 169 } | 169 } |
| 170 | 170 |
| 171 #if ENABLE_SKY_COMPOSITOR | 171 #if ENABLE_SKY_COMPOSITOR |
| 172 | 172 |
| 173 mojo::Shell* DocumentView::GetShell() { | 173 mojo::Shell* DocumentView::GetShell() { |
| 174 return shell_.get(); | 174 return shell_; |
| 175 } | 175 } |
| 176 | 176 |
| 177 void DocumentView::BeginFrame(base::TimeTicks frame_time) { | 177 void DocumentView::BeginFrame(base::TimeTicks frame_time) { |
| 178 double frame_time_sec = (frame_time - base::TimeTicks()).InSecondsF(); | 178 double frame_time_sec = (frame_time - base::TimeTicks()).InSecondsF(); |
| 179 double deadline_sec = frame_time_sec; | 179 double deadline_sec = frame_time_sec; |
| 180 double interval_sec = 1.0/60; | 180 double interval_sec = 1.0/60; |
| 181 blink::WebBeginFrameArgs web_begin_frame_args( | 181 blink::WebBeginFrameArgs web_begin_frame_args( |
| 182 frame_time_sec, deadline_sec, interval_sec); | 182 frame_time_sec, deadline_sec, interval_sec); |
| 183 web_view_->beginFrame(web_begin_frame_args); | 183 web_view_->beginFrame(web_begin_frame_args); |
| 184 web_view_->layout(); | 184 web_view_->layout(); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 void DocumentView::StartDebuggerInspectorBackend() { | 321 void DocumentView::StartDebuggerInspectorBackend() { |
| 322 if (!inspector_backend_) { | 322 if (!inspector_backend_) { |
| 323 inspector_host_.reset(new InspectorHostImpl(web_view_, shell_)); | 323 inspector_host_.reset(new InspectorHostImpl(web_view_, shell_)); |
| 324 inspector_backend_.reset( | 324 inspector_backend_.reset( |
| 325 new inspector::InspectorBackendMojo(inspector_host_.get())); | 325 new inspector::InspectorBackendMojo(inspector_host_.get())); |
| 326 } | 326 } |
| 327 inspector_backend_->Connect(); | 327 inspector_backend_->Connect(); |
| 328 } | 328 } |
| 329 | 329 |
| 330 } // namespace sky | 330 } // namespace sky |
| OLD | NEW |