OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SKY_SHELL_DART_DART_LIBRARY_PROVIDER_FILES_H_ |
| 6 #define SKY_SHELL_DART_DART_LIBRARY_PROVIDER_FILES_H_ |
| 7 |
| 8 #include "base/files/file_path.h" |
| 9 #include "sky/engine/tonic/dart_library_provider.h" |
| 10 |
| 11 namespace sky { |
| 12 namespace shell { |
| 13 |
| 14 class DartLibraryProviderFiles : public blink::DartLibraryProvider { |
| 15 public: |
| 16 explicit DartLibraryProviderFiles(const base::FilePath& package_root); |
| 17 ~DartLibraryProviderFiles() override; |
| 18 |
| 19 protected: |
| 20 // |DartLibraryProvider| implementation: |
| 21 void GetLibraryAsStream(const String& name, |
| 22 blink::DataPipeConsumerCallback callback) override; |
| 23 Dart_Handle CanonicalizeURL(Dart_Handle library, Dart_Handle url) override; |
| 24 |
| 25 private: |
| 26 std::string CanonicalizePackageURL(std::string url); |
| 27 |
| 28 base::FilePath package_root_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(DartLibraryProviderFiles); |
| 31 }; |
| 32 |
| 33 } // namespace shell |
| 34 } // namespace sky |
| 35 |
| 36 #endif // SKY_SHELL_DART_DART_LIBRARY_PROVIDER_FILES_H_ |
OLD | NEW |