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

Side by Side Diff: content/browser/media/android/media_resource_getter_impl.h

Issue 411353002: MediaUrlInterceptor for embedders to handle custom urls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright nit Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_
6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ 6 #define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/synchronization/waitable_event.h" 13 #include "base/synchronization/waitable_event.h"
14 #include "media/base/android/media_resource_getter.h" 14 #include "media/base/android/media_resource_getter.h"
15 #include "media/base/android/media_url_interceptor.h"
15 #include "net/base/auth.h" 16 #include "net/base/auth.h"
16 #include "net/cookies/canonical_cookie.h" 17 #include "net/cookies/canonical_cookie.h"
17 18
18 namespace fileapi { 19 namespace fileapi {
19 class FileSystemContext; 20 class FileSystemContext;
20 } 21 }
21 22
22 namespace net { 23 namespace net {
23 class URLRequestContextGetter; 24 class URLRequestContextGetter;
24 } 25 }
(...skipping 25 matching lines...) Expand all
50 const GURL& first_party_for_cookies, 51 const GURL& first_party_for_cookies,
51 const GetCookieCB& callback) OVERRIDE; 52 const GetCookieCB& callback) OVERRIDE;
52 virtual void GetPlatformPathFromURL( 53 virtual void GetPlatformPathFromURL(
53 const GURL& url, 54 const GURL& url,
54 const GetPlatformPathCB& callback) OVERRIDE; 55 const GetPlatformPathCB& callback) OVERRIDE;
55 virtual void ExtractMediaMetadata( 56 virtual void ExtractMediaMetadata(
56 const std::string& url, 57 const std::string& url,
57 const std::string& cookies, 58 const std::string& cookies,
58 const std::string& user_agent, 59 const std::string& user_agent,
59 const ExtractMediaMetadataCB& callback) OVERRIDE; 60 const ExtractMediaMetadataCB& callback) OVERRIDE;
61 virtual void ExtractMediaMetadata(
62 const int fd,
63 const int64 offset,
64 const int64 size,
65 const ExtractMediaMetadataCB& callback) OVERRIDE;
60 66
61 static bool RegisterMediaResourceGetter(JNIEnv* env); 67 static bool RegisterMediaResourceGetter(JNIEnv* env);
62 68
63 private: 69 private:
64 // Called when GetAuthCredentials() finishes. 70 // Called when GetAuthCredentials() finishes.
65 void GetAuthCredentialsCallback( 71 void GetAuthCredentialsCallback(
66 const GetAuthCredentialsCB& callback, 72 const GetAuthCredentialsCB& callback,
67 const net::AuthCredentials& credentials); 73 const net::AuthCredentials& credentials);
68 74
69 // Called when GetCookies() finishes. 75 // Called when GetCookies() finishes.
(...skipping 18 matching lines...) Expand all
88 94
89 // NOTE: Weak pointers must be invalidated before all other member variables. 95 // NOTE: Weak pointers must be invalidated before all other member variables.
90 base::WeakPtrFactory<MediaResourceGetterImpl> weak_factory_; 96 base::WeakPtrFactory<MediaResourceGetterImpl> weak_factory_;
91 97
92 DISALLOW_COPY_AND_ASSIGN(MediaResourceGetterImpl); 98 DISALLOW_COPY_AND_ASSIGN(MediaResourceGetterImpl);
93 }; 99 };
94 100
95 } // namespace content 101 } // namespace content
96 102
97 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_ 103 #endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_RESOURCE_GETTER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698