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

Unified Diff: sky/viewer/dart_library_provider_impl.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/viewer/BUILD.gn ('k') | sky/viewer/dart_library_provider_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/dart_library_provider_impl.h
diff --git a/sky/viewer/dart_library_provider_impl.h b/sky/viewer/dart_library_provider_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..705975ec766f2fb873bd0141579ded0ff6fd11c1
--- /dev/null
+++ b/sky/viewer/dart_library_provider_impl.h
@@ -0,0 +1,38 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SKY_VIEWER_DART_LIBRARY_PROVIDER_IMPL_H_
+#define SKY_VIEWER_DART_LIBRARY_PROVIDER_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "sky/shell/dart/dart_library_provider_network.h"
+
+namespace sky {
+
+class DartLibraryProviderImpl : public shell::DartLibraryProviderNetwork {
+ public:
+ struct PrefetchedLibrary {
+ PrefetchedLibrary();
+ ~PrefetchedLibrary();
+
+ String name;
+ mojo::ScopedDataPipeConsumerHandle pipe;
+ };
+
+ explicit DartLibraryProviderImpl(mojo::NetworkService* network_service,
+ scoped_ptr<PrefetchedLibrary> prefetched);
+ ~DartLibraryProviderImpl() override;
+
+ private:
+ void GetLibraryAsStream(const String& name,
+ blink::DataPipeConsumerCallback callback) override;
+
+ scoped_ptr<PrefetchedLibrary> prefetched_library_;
+
+ DISALLOW_COPY_AND_ASSIGN(DartLibraryProviderImpl);
+};
+
+} // namespace sky
+
+#endif // SKY_VIEWER_DART_LIBRARY_PROVIDER_IMPL_H_
« no previous file with comments | « sky/viewer/BUILD.gn ('k') | sky/viewer/dart_library_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698