OLD | NEW |
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_RENDERER_MEDIA_ANDROID_MEDIA_INFO_LOADER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_INFO_LOADER_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_INFO_LOADER_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_INFO_LOADER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 void Start(blink::WebFrame* frame); | 59 void Start(blink::WebFrame* frame); |
60 | 60 |
61 // Returns true if the media resource has a single origin, false otherwise. | 61 // Returns true if the media resource has a single origin, false otherwise. |
62 // Only valid to call after the loader becomes ready. | 62 // Only valid to call after the loader becomes ready. |
63 bool HasSingleOrigin() const; | 63 bool HasSingleOrigin() const; |
64 | 64 |
65 // Returns true if the media resource passed a CORS access control check. | 65 // Returns true if the media resource passed a CORS access control check. |
66 // Only valid to call after the loader becomes ready. | 66 // Only valid to call after the loader becomes ready. |
67 bool DidPassCORSAccessCheck() const; | 67 bool DidPassCORSAccessCheck() const; |
68 | 68 |
| 69 void set_single_origin(bool single_origin) { |
| 70 single_origin_ = single_origin; |
| 71 } |
| 72 |
69 private: | 73 private: |
70 friend class MediaInfoLoaderTest; | 74 friend class MediaInfoLoaderTest; |
71 | 75 |
72 // blink::WebURLLoaderClient implementation. | 76 // blink::WebURLLoaderClient implementation. |
73 virtual void willSendRequest( | 77 virtual void willSendRequest( |
74 blink::WebURLLoader* loader, | 78 blink::WebURLLoader* loader, |
75 blink::WebURLRequest& newRequest, | 79 blink::WebURLRequest& newRequest, |
76 const blink::WebURLResponse& redirectResponse); | 80 const blink::WebURLResponse& redirectResponse); |
77 virtual void didSendData( | 81 virtual void didSendData( |
78 blink::WebURLLoader* loader, | 82 blink::WebURLLoader* loader, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 120 |
117 ReadyCB ready_cb_; | 121 ReadyCB ready_cb_; |
118 base::TimeTicks start_time_; | 122 base::TimeTicks start_time_; |
119 | 123 |
120 DISALLOW_COPY_AND_ASSIGN(MediaInfoLoader); | 124 DISALLOW_COPY_AND_ASSIGN(MediaInfoLoader); |
121 }; | 125 }; |
122 | 126 |
123 } // namespace content | 127 } // namespace content |
124 | 128 |
125 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_INFO_LOADER_H_ | 129 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_INFO_LOADER_H_ |
OLD | NEW |