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

Side by Side Diff: sky/engine/public/sky/sky_view.cc

Issue 1212623002: Support snapshots in sky_shell (again) (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
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/engine/public/sky/sky_view.h" 5 #include "sky/engine/public/sky/sky_view.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 "sky/engine/core/events/GestureEvent.h" 9 #include "sky/engine/core/events/GestureEvent.h"
10 #include "sky/engine/core/events/KeyboardEvent.h" 10 #include "sky/engine/core/events/KeyboardEvent.h"
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 void SkyView::RunFromLibrary(const WebString& name, 43 void SkyView::RunFromLibrary(const WebString& name,
44 DartLibraryProvider* library_provider) { 44 DartLibraryProvider* library_provider) {
45 CreateView(name); 45 CreateView(name);
46 dart_controller_->RunFromLibrary(name, library_provider); 46 dart_controller_->RunFromLibrary(name, library_provider);
47 } 47 }
48 48
49 void SkyView::RunFromSnapshot(const WebString& name, 49 void SkyView::RunFromSnapshot(const WebString& name,
50 mojo::ScopedDataPipeConsumerHandle snapshot) { 50 mojo::ScopedDataPipeConsumerHandle snapshot) {
51 // TODO(abarth): Implement. 51 CreateView(name);
52 dart_controller_->RunFromSnapshot(snapshot.Pass());
52 } 53 }
53 54
54 void SkyView::BeginFrame(base::TimeTicks frame_time) { 55 void SkyView::BeginFrame(base::TimeTicks frame_time) {
55 view_->beginFrame(frame_time); 56 view_->beginFrame(frame_time);
56 } 57 }
57 58
58 skia::RefPtr<SkPicture> SkyView::Paint() { 59 skia::RefPtr<SkPicture> SkyView::Paint() {
59 if (Picture* picture = view_->picture()) 60 if (Picture* picture = view_->picture())
60 return skia::SharePtr(picture->toSkia()); 61 return skia::SharePtr(picture->toSkia());
61 return skia::RefPtr<SkPicture>(); 62 return skia::RefPtr<SkPicture>();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 DartIsolateScope scope(isolate); 99 DartIsolateScope scope(isolate);
99 DartApiScope api_scope; 100 DartApiScope api_scope;
100 client_->DidCreateIsolate(isolate); 101 client_->DidCreateIsolate(isolate);
101 } 102 }
102 103
103 void SkyView::ScheduleFrame() { 104 void SkyView::ScheduleFrame() {
104 client_->ScheduleFrame(); 105 client_->ScheduleFrame();
105 } 106 }
106 107
107 } // namespace blink 108 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/script/dart_controller.cc ('k') | sky/services/viewport/viewport_observer.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698