| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ | 5 #ifndef MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ |
| 6 #define MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ | 6 #define MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> |
| 10 #include <string> | 11 #include <string> |
| 11 | 12 |
| 12 #include "base/callback.h" | 13 #include "base/callback.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "media/blink/active_loader.h" | 15 #include "media/blink/active_loader.h" |
| 16 #include "media/blink/media_blink_export.h" | 16 #include "media/blink/media_blink_export.h" |
| 17 #include "media/blink/multibuffer.h" | 17 #include "media/blink/multibuffer.h" |
| 18 #include "media/blink/url_index.h" | 18 #include "media/blink/url_index.h" |
| 19 #include "third_party/WebKit/public/platform/WebURLLoader.h" | 19 #include "third_party/WebKit/public/platform/WebURLLoader.h" |
| 20 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" | 20 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
| 21 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 21 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 22 #include "third_party/WebKit/public/web/WebFrame.h" | 22 #include "third_party/WebKit/public/web/WebFrame.h" |
| 23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 // Copy of url_data_->cors_mode() | 109 // Copy of url_data_->cors_mode() |
| 110 // const to make it obvious that redirects cannot change it. | 110 // const to make it obvious that redirects cannot change it. |
| 111 const UrlData::CORSMode cors_mode_; | 111 const UrlData::CORSMode cors_mode_; |
| 112 | 112 |
| 113 // The origin for the initial request. | 113 // The origin for the initial request. |
| 114 // const to make it obvious that redirects cannot change it. | 114 // const to make it obvious that redirects cannot change it. |
| 115 const GURL origin_; | 115 const GURL origin_; |
| 116 | 116 |
| 117 // Keeps track of an active WebURLLoader and associated state. | 117 // Keeps track of an active WebURLLoader and associated state. |
| 118 scoped_ptr<ActiveLoader> active_loader_; | 118 std::unique_ptr<ActiveLoader> active_loader_; |
| 119 | 119 |
| 120 // Injected WebURLLoader instance for testing purposes. | 120 // Injected WebURLLoader instance for testing purposes. |
| 121 scoped_ptr<blink::WebURLLoader> test_loader_; | 121 std::unique_ptr<blink::WebURLLoader> test_loader_; |
| 122 | 122 |
| 123 // When we encounter a redirect, this is the source of the redirect. | 123 // When we encounter a redirect, this is the source of the redirect. |
| 124 GURL redirects_to_; | 124 GURL redirects_to_; |
| 125 | 125 |
| 126 base::WeakPtrFactory<ResourceMultiBufferDataProvider> weak_factory_; | 126 base::WeakPtrFactory<ResourceMultiBufferDataProvider> weak_factory_; |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 } // namespace media | 129 } // namespace media |
| 130 | 130 |
| 131 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_RESOURCE_LOADER_H_ | 131 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_RESOURCE_LOADER_H_ |
| OLD | NEW |