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

Side by Side Diff: webkit/glue/media/simple_data_source.h

Issue 3053009: Pepper stream-to-file plumbing.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « webkit/glue/media/buffered_data_source.h ('k') | webkit/glue/media/simple_data_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // An extremely simple implementation of DataSource that downloads the entire 5 // An extremely simple implementation of DataSource that downloads the entire
6 // media resource into memory before signaling that initialization has finished. 6 // media resource into memory before signaling that initialization has finished.
7 // Primarily used to test <audio> and <video> with buffering/caching removed 7 // Primarily used to test <audio> and <video> with buffering/caching removed
8 // from the equation. 8 // from the equation.
9 9
10 #ifndef WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ 10 #ifndef WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // DataSource implementation. 44 // DataSource implementation.
45 virtual void Initialize(const std::string& url, 45 virtual void Initialize(const std::string& url,
46 media::FilterCallback* callback); 46 media::FilterCallback* callback);
47 virtual const media::MediaFormat& media_format(); 47 virtual const media::MediaFormat& media_format();
48 virtual void Read(int64 position, size_t size, 48 virtual void Read(int64 position, size_t size,
49 uint8* data, ReadCallback* read_callback); 49 uint8* data, ReadCallback* read_callback);
50 virtual bool GetSize(int64* size_out); 50 virtual bool GetSize(int64* size_out);
51 virtual bool IsStreaming(); 51 virtual bool IsStreaming();
52 52
53 // webkit_glue::ResourceLoaderBridge::Peer implementation. 53 // webkit_glue::ResourceLoaderBridge::Peer implementation.
54 virtual void OnDownloadProgress(uint64 position, uint64 size); 54 virtual void OnUploadProgress(uint64 position, uint64 size) {}
55 virtual void OnUploadProgress(uint64 position, uint64 size);
56 virtual bool OnReceivedRedirect( 55 virtual bool OnReceivedRedirect(
57 const GURL& new_url, 56 const GURL& new_url,
58 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, 57 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info,
59 bool* has_new_first_party_for_cookies, 58 bool* has_new_first_party_for_cookies,
60 GURL* new_first_party_for_cookies); 59 GURL* new_first_party_for_cookies);
61 virtual void OnReceivedResponse( 60 virtual void OnReceivedResponse(
62 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, 61 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info,
63 bool content_filtered); 62 bool content_filtered);
63 virtual void OnDownloadedData(int len) {}
64 virtual void OnReceivedData(const char* data, int len); 64 virtual void OnReceivedData(const char* data, int len);
65 virtual void OnCompletedRequest(const URLRequestStatus& status, 65 virtual void OnCompletedRequest(const URLRequestStatus& status,
66 const std::string& security_info); 66 const std::string& security_info);
67 virtual GURL GetURLForDebugging() const; 67 virtual GURL GetURLForDebugging() const;
68 68
69 private: 69 private:
70 friend class media::FilterFactoryImpl2< 70 friend class media::FilterFactoryImpl2<
71 SimpleDataSource, 71 SimpleDataSource,
72 MessageLoop*, 72 MessageLoop*,
73 webkit_glue::MediaResourceLoaderBridgeFactory*>; 73 webkit_glue::MediaResourceLoaderBridgeFactory*>;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 // Filter callbacks. 117 // Filter callbacks.
118 scoped_ptr<media::FilterCallback> initialize_callback_; 118 scoped_ptr<media::FilterCallback> initialize_callback_;
119 119
120 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); 120 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource);
121 }; 121 };
122 122
123 } // namespace webkit_glue 123 } // namespace webkit_glue
124 124
125 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ 125 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « webkit/glue/media/buffered_data_source.h ('k') | webkit/glue/media/simple_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698