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

Unified Diff: sky/engine/public/sky/sky_view.h

Issue 1203143004: Make it possible to run Sky apps offline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: gn check Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/public/sky/BUILD.gn ('k') | sky/engine/public/sky/sky_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/public/sky/sky_view.h
diff --git a/sky/engine/public/sky/sky_view.h b/sky/engine/public/sky/sky_view.h
index abf64fad9c84403c5380608bb1769dca8740aa37..08adc3b09d950ecc01ddf3e4610fed44e4b01de2 100644
--- a/sky/engine/public/sky/sky_view.h
+++ b/sky/engine/public/sky/sky_view.h
@@ -9,16 +9,22 @@
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
+#include "mojo/public/cpp/system/data_pipe.h"
#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
#include "skia/ext/refptr.h"
#include "sky/engine/public/platform/WebCommon.h"
#include "sky/engine/public/platform/WebURL.h"
#include "sky/engine/public/platform/sky_display_metrics.h"
+#include "sky/engine/wtf/OwnPtr.h"
+#include "sky/engine/wtf/RefPtr.h"
+#include "sky/engine/wtf/text/WTFString.h"
#include "third_party/skia/include/core/SkPicture.h"
namespace blink {
class DartController;
+class DartLibraryProvider;
class SkyViewClient;
+class View;
class WebInputEvent;
class SkyView {
@@ -30,8 +36,10 @@ class SkyView {
void SetDisplayMetrics(const SkyDisplayMetrics& metrics);
void BeginFrame(base::TimeTicks frame_time);
- // Sky can either issue the load itself or use an existing response pipe.
- void Load(const WebURL& url, mojo::URLResponsePtr response = nullptr);
+ void RunFromLibrary(const WebString& name,
+ DartLibraryProvider* library_provider);
+ void RunFromSnapshot(const WebString& name,
+ mojo::ScopedDataPipeConsumerHandle snapshot);
skia::RefPtr<SkPicture> Paint();
void HandleInputEvent(const WebInputEvent& event);
@@ -39,14 +47,13 @@ class SkyView {
private:
explicit SkyView(SkyViewClient* client);
+ void CreateView(const String& name);
void ScheduleFrame();
- class Data;
-
SkyViewClient* client_;
SkyDisplayMetrics display_metrics_;
- std::unique_ptr<DartController> dart_controller_;
- std::unique_ptr<Data> data_;
+ RefPtr<View> view_;
+ OwnPtr<DartController> dart_controller_;
base::WeakPtrFactory<SkyView> weak_factory_;
« no previous file with comments | « sky/engine/public/sky/BUILD.gn ('k') | sky/engine/public/sky/sky_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698