| 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 SERVICES_SKY_DART_LIBRARY_PROVIDER_IMPL_H_ | |
| 6 #define SERVICES_SKY_DART_LIBRARY_PROVIDER_IMPL_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "sky/shell/dart/dart_library_provider_network.h" | |
| 10 | |
| 11 namespace sky { | |
| 12 | |
| 13 class DartLibraryProviderImpl : public shell::DartLibraryProviderNetwork { | |
| 14 public: | |
| 15 struct PrefetchedLibrary { | |
| 16 PrefetchedLibrary(); | |
| 17 ~PrefetchedLibrary(); | |
| 18 | |
| 19 std::string name; | |
| 20 mojo::ScopedDataPipeConsumerHandle pipe; | |
| 21 }; | |
| 22 | |
| 23 explicit DartLibraryProviderImpl(mojo::NetworkService* network_service, | |
| 24 scoped_ptr<PrefetchedLibrary> prefetched); | |
| 25 ~DartLibraryProviderImpl() override; | |
| 26 | |
| 27 private: | |
| 28 void GetLibraryAsStream(const std::string& name, | |
| 29 blink::DataPipeConsumerCallback callback) override; | |
| 30 | |
| 31 scoped_ptr<PrefetchedLibrary> prefetched_library_; | |
| 32 | |
| 33 DISALLOW_COPY_AND_ASSIGN(DartLibraryProviderImpl); | |
| 34 }; | |
| 35 | |
| 36 } // namespace sky | |
| 37 | |
| 38 #endif // SERVICES_SKY_DART_LIBRARY_PROVIDER_IMPL_H_ | |
| OLD | NEW |