OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/shell/ui/engine.h" | 5 #include "sky/shell/ui/engine.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
9 #include "mojo/public/cpp/application/connect.h" | 9 #include "mojo/public/cpp/application/connect.h" |
10 #include "sky/engine/public/platform/WebInputEvent.h" | 10 #include "sky/engine/public/platform/WebInputEvent.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 base::WeakPtr<Engine> Engine::GetWeakPtr() { | 52 base::WeakPtr<Engine> Engine::GetWeakPtr() { |
53 return weak_factory_.GetWeakPtr(); | 53 return weak_factory_.GetWeakPtr(); |
54 } | 54 } |
55 | 55 |
56 void Engine::Init() { | 56 void Engine::Init() { |
57 TRACE_EVENT0("sky", "Engine::Init"); | 57 TRACE_EVENT0("sky", "Engine::Init"); |
58 | 58 |
59 service_provider_ = CreateServiceProvider(config_.service_provider_context); | 59 service_provider_ = CreateServiceProvider(config_.service_provider_context); |
60 mojo::NetworkServicePtr network_service; | 60 mojo::NetworkServicePtr network_service; |
61 mojo::ConnectToService(service_provider_.get(), &network_service); | 61 mojo::ConnectToService(service_provider_.get(), &network_service); |
62 platform_impl_.reset(new PlatformImpl(network_service.Pass())); | 62 |
| 63 // TODO(blundell): Will have to either bundle in AuthenticatingURLLoader/ |
| 64 // AuthenticationService to use them in sky shell, or fall back to using |
| 65 // NetworkService within the sky engine if the |
| 66 // AuthenticatingURLLoaderFactory is null. |
| 67 platform_impl_.reset(new PlatformImpl(network_service.Pass(), nullptr)); |
63 | 68 |
64 blink::initialize(platform_impl_.get()); | 69 blink::initialize(platform_impl_.get()); |
65 } | 70 } |
66 | 71 |
67 void Engine::BeginFrame(base::TimeTicks frame_time) { | 72 void Engine::BeginFrame(base::TimeTicks frame_time) { |
68 TRACE_EVENT0("sky", "Engine::BeginFrame"); | 73 TRACE_EVENT0("sky", "Engine::BeginFrame"); |
69 | 74 |
70 double frame_time_sec = (frame_time - base::TimeTicks()).InSecondsF(); | 75 double frame_time_sec = (frame_time - base::TimeTicks()).InSecondsF(); |
71 double deadline_sec = frame_time_sec; | 76 double deadline_sec = frame_time_sec; |
72 double interval_sec = 1.0 / 60; | 77 double interval_sec = 1.0 / 60; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 239 |
235 void Engine::DidNavigateLocally(const mojo::String& url) { | 240 void Engine::DidNavigateLocally(const mojo::String& url) { |
236 } | 241 } |
237 | 242 |
238 void Engine::RequestNavigateHistory(int32_t delta) { | 243 void Engine::RequestNavigateHistory(int32_t delta) { |
239 NOTIMPLEMENTED(); | 244 NOTIMPLEMENTED(); |
240 } | 245 } |
241 | 246 |
242 } // namespace shell | 247 } // namespace shell |
243 } // namespace sky | 248 } // namespace sky |
OLD | NEW |