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

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

Issue 1208273003: Stocks.apk should have icons when run offline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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/sdk/lib/widgets/icon.dart ('k') | sky/shell/ui/internals.h » ('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/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/threading/worker_pool.h" 9 #include "base/threading/worker_pool.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 mojo::GetProxy(&root_bundle_), base::WorkerPool::GetTaskRunner(true)); 193 mojo::GetProxy(&root_bundle_), base::WorkerPool::GetTaskRunner(true));
194 std::string path_str = path; 194 std::string path_str = path;
195 unpacker->Unpack(Fetch(base::FilePath(path_str))); 195 unpacker->Unpack(Fetch(base::FilePath(path_str)));
196 root_bundle_->GetAsStream(kSnapshotKey, 196 root_bundle_->GetAsStream(kSnapshotKey,
197 base::Bind(&Engine::RunFromSnapshotStream, 197 base::Bind(&Engine::RunFromSnapshotStream,
198 weak_factory_.GetWeakPtr(), path_str)); 198 weak_factory_.GetWeakPtr(), path_str));
199 } 199 }
200 200
201 void Engine::DidCreateIsolate(Dart_Isolate isolate) { 201 void Engine::DidCreateIsolate(Dart_Isolate isolate) {
202 Internals::Create(isolate, 202 Internals::Create(isolate,
203 CreateServiceProvider(config_.service_provider_context)); 203 CreateServiceProvider(config_.service_provider_context),
204 root_bundle_.Pass());
204 } 205 }
205 206
206 void Engine::ScheduleFrame() { 207 void Engine::ScheduleFrame() {
207 animator_->RequestFrame(); 208 animator_->RequestFrame();
208 } 209 }
209 210
210 mojo::NavigatorHost* Engine::NavigatorHost() { 211 mojo::NavigatorHost* Engine::NavigatorHost() {
211 return this; 212 return this;
212 } 213 }
213 214
214 void Engine::RequestNavigate(mojo::Target target, 215 void Engine::RequestNavigate(mojo::Target target,
215 mojo::URLRequestPtr request) { 216 mojo::URLRequestPtr request) {
216 // Ignoring target for now. 217 // Ignoring target for now.
217 base::MessageLoop::current()->PostTask( 218 base::MessageLoop::current()->PostTask(
218 FROM_HERE, 219 FROM_HERE,
219 base::Bind(&Engine::RunFromNetwork, GetWeakPtr(), request->url)); 220 base::Bind(&Engine::RunFromNetwork, GetWeakPtr(), request->url));
220 } 221 }
221 222
222 void Engine::DidNavigateLocally(const mojo::String& url) { 223 void Engine::DidNavigateLocally(const mojo::String& url) {
223 } 224 }
224 225
225 void Engine::RequestNavigateHistory(int32_t delta) { 226 void Engine::RequestNavigateHistory(int32_t delta) {
226 NOTIMPLEMENTED(); 227 NOTIMPLEMENTED();
227 } 228 }
228 229
229 } // namespace shell 230 } // namespace shell
230 } // namespace sky 231 } // namespace sky
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/icon.dart ('k') | sky/shell/ui/internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698