Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: sky/shell/ui/engine.cc

Issue 1154223003: NOT FOR COMMIT: POC of using AuthenticatingURLLoader in Sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: updated comment Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/services/platform/weburlloader_impl.cc ('k') | sky/viewer/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « sky/services/platform/weburlloader_impl.cc ('k') | sky/viewer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698