OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_ |
6 #define CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_ | 6 #define CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 public mojom::URLLoaderFactory { | 28 public mojom::URLLoaderFactory { |
29 public: | 29 public: |
30 using BlobContextGetter = | 30 using BlobContextGetter = |
31 base::OnceCallback<base::WeakPtr<storage::BlobStorageContext>()>; | 31 base::OnceCallback<base::WeakPtr<storage::BlobStorageContext>()>; |
32 CONTENT_EXPORT BlobURLLoaderFactory( | 32 CONTENT_EXPORT BlobURLLoaderFactory( |
33 BlobContextGetter blob_storage_context_getter, | 33 BlobContextGetter blob_storage_context_getter, |
34 scoped_refptr<storage::FileSystemContext> file_system_context); | 34 scoped_refptr<storage::FileSystemContext> file_system_context); |
35 | 35 |
36 // Creates a URLLoaderFactory interface pointer for serving blob requests. | 36 // Creates a URLLoaderFactory interface pointer for serving blob requests. |
37 // Called on the UI thread. | 37 // Called on the UI thread. |
38 mojom::URLLoaderFactoryPtr CreateFactory(); | 38 void HandleRequest(mojom::URLLoaderFactoryRequest request); |
39 | 39 |
40 // mojom::URLLoaderFactory implementation: | 40 // mojom::URLLoaderFactory implementation: |
41 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest loader, | 41 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest loader, |
42 int32_t routing_id, | 42 int32_t routing_id, |
43 int32_t request_id, | 43 int32_t request_id, |
44 uint32_t options, | 44 uint32_t options, |
45 const ResourceRequest& request, | 45 const ResourceRequest& request, |
46 mojom::URLLoaderClientPtr client) override; | 46 mojom::URLLoaderClientPtr client) override; |
47 void SyncLoad(int32_t routing_id, | 47 void SyncLoad(int32_t routing_id, |
48 int32_t request_id, | 48 int32_t request_id, |
(...skipping 14 matching lines...) Expand all Loading... |
63 | 63 |
64 // Used on the IO thread. | 64 // Used on the IO thread. |
65 mojo::BindingSet<mojom::URLLoaderFactory> loader_factory_bindings_; | 65 mojo::BindingSet<mojom::URLLoaderFactory> loader_factory_bindings_; |
66 | 66 |
67 DISALLOW_COPY_AND_ASSIGN(BlobURLLoaderFactory); | 67 DISALLOW_COPY_AND_ASSIGN(BlobURLLoaderFactory); |
68 }; | 68 }; |
69 | 69 |
70 } // namespace content | 70 } // namespace content |
71 | 71 |
72 #endif // CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_ | 72 #endif // CONTENT_BROWSER_BLOB_STORAGE_BLOB_URL_LOADER_FACTORY_H_ |
OLD | NEW |