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

Unified Diff: sky/shell/dart/dart_library_provider_files.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/shell/dart/BUILD.gn ('k') | sky/shell/dart/dart_library_provider_files.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/dart/dart_library_provider_files.h
diff --git a/sky/shell/dart/dart_library_provider_files.h b/sky/shell/dart/dart_library_provider_files.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a3c46cc5100010531b373bd8ced8c0b3c513cee
--- /dev/null
+++ b/sky/shell/dart/dart_library_provider_files.h
@@ -0,0 +1,36 @@
+// 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_SHELL_DART_DART_LIBRARY_PROVIDER_FILES_H_
+#define SKY_SHELL_DART_DART_LIBRARY_PROVIDER_FILES_H_
+
+#include "base/files/file_path.h"
+#include "sky/engine/tonic/dart_library_provider.h"
+
+namespace sky {
+namespace shell {
+
+class DartLibraryProviderFiles : public blink::DartLibraryProvider {
+ public:
+ explicit DartLibraryProviderFiles(const base::FilePath& package_root);
+ ~DartLibraryProviderFiles() override;
+
+ protected:
+ // |DartLibraryProvider| implementation:
+ void GetLibraryAsStream(const String& name,
+ blink::DataPipeConsumerCallback callback) override;
+ Dart_Handle CanonicalizeURL(Dart_Handle library, Dart_Handle url) override;
+
+ private:
+ std::string CanonicalizePackageURL(std::string url);
+
+ base::FilePath package_root_;
+
+ DISALLOW_COPY_AND_ASSIGN(DartLibraryProviderFiles);
+};
+
+} // namespace shell
+} // namespace sky
+
+#endif // SKY_SHELL_DART_DART_LIBRARY_PROVIDER_FILES_H_
« no previous file with comments | « sky/shell/dart/BUILD.gn ('k') | sky/shell/dart/dart_library_provider_files.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698