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

Unified Diff: content/renderer/media/android/media_info_loader.h

Issue 2399463007: AssociatedURLLoader shouldn't derive from WebURLLoader (Closed)
Patch Set: Rebase Created 4 years, 2 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
Index: content/renderer/media/android/media_info_loader.h
diff --git a/content/renderer/media/android/media_info_loader.h b/content/renderer/media/android/media_info_loader.h
index c9895025a8a7e9436bc803920c62d1bece96b9bb..4ce81fd2e297a2cbb073e51e5afebd5f899c9e00 100644
--- a/content/renderer/media/android/media_info_loader.h
+++ b/content/renderer/media/android/media_info_loader.h
@@ -16,13 +16,13 @@
#include "content/common/content_export.h"
#include "media/blink/active_loader.h"
#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
-#include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
+#include "third_party/WebKit/public/web/WebAssociatedURLLoaderClient.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "url/gurl.h"
namespace blink {
+class WebAssociatedURLLoader;
class WebFrame;
-class WebURLLoader;
class WebURLRequest;
}
@@ -31,7 +31,8 @@ namespace content {
// This class provides additional information about a media URL. Currently it
// can be used to determine if a media URL has a single security origin and
// whether the URL passes a CORS access check.
-class CONTENT_EXPORT MediaInfoLoader : private blink::WebURLLoaderClient {
+class CONTENT_EXPORT MediaInfoLoader
+ : private blink::WebAssociatedURLLoaderClient {
public:
// Status codes for start operations on MediaInfoLoader.
enum Status {
@@ -78,38 +79,25 @@ class CONTENT_EXPORT MediaInfoLoader : private blink::WebURLLoaderClient {
private:
friend class MediaInfoLoaderTest;
- // blink::WebURLLoaderClient implementation.
+ // blink::WebAssociatedURLLoaderClient implementation.
bool willFollowRedirect(
- blink::WebURLLoader* loader,
- blink::WebURLRequest& newRequest,
+ const blink::WebURLRequest& newRequest,
const blink::WebURLResponse& redirectResponse) override;
- void didSendData(blink::WebURLLoader* loader,
- unsigned long long bytesSent,
+ void didSendData(unsigned long long bytesSent,
unsigned long long totalBytesToBeSent) override;
- void didReceiveResponse(blink::WebURLLoader* loader,
- const blink::WebURLResponse& response) override;
- void didDownloadData(blink::WebURLLoader* loader,
- int data_length,
- int encodedDataLength) override;
- void didReceiveData(blink::WebURLLoader* loader,
- const char* data,
- int data_length,
- int encoded_data_length,
- int encoded_body_length) override;
- void didReceiveCachedMetadata(blink::WebURLLoader* loader,
- const char* data,
- int dataLength) override;
- void didFinishLoading(blink::WebURLLoader* loader,
- double finishTime,
- int64_t total_encoded_data_length) override;
- void didFail(blink::WebURLLoader* loader, const blink::WebURLError&) override;
+ void didReceiveResponse(const blink::WebURLResponse& response) override;
+ void didDownloadData(int data_length) override;
+ void didReceiveData(const char* data, int data_length) override;
+ void didReceiveCachedMetadata(const char* data, int dataLength) override;
+ void didFinishLoading(double finishTime) override;
+ void didFail(const blink::WebURLError&) override;
void DidBecomeReady(Status status);
- // Injected WebURLLoader instance for testing purposes.
- std::unique_ptr<blink::WebURLLoader> test_loader_;
+ // Injected WebAssociatedURLLoader instance for testing purposes.
+ std::unique_ptr<blink::WebAssociatedURLLoader> test_loader_;
- // Keeps track of an active WebURLLoader and associated state.
+ // Keeps track of an active WebAssociatedURLLoader and associated state.
std::unique_ptr<media::ActiveLoader> active_loader_;
bool loader_failed_;
« no previous file with comments | « content/renderer/fetchers/web_url_loader_client_impl.cc ('k') | content/renderer/media/android/media_info_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698