Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_BLINK_RESOURCE_MULTIBUFFER_H_ | |
| 6 #define MEDIA_BLINK_RESOURCE_MULTIBUFFER_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "media/blink/media_blink_export.h" | |
| 10 #include "media/blink/multibuffer.h" | |
| 11 #include "media/blink/url_index.h" | |
| 12 #include "third_party/WebKit/public/web/WebFrame.h" | |
| 13 | |
| 14 namespace media { | |
| 15 class MediaLog; | |
| 16 class ResourceMultiBufferDataProvider; | |
| 17 | |
| 18 // A multibuffer for loading media resources which knows | |
| 19 // how to create MultibufferDataProviders to load data | |
| 20 // into the cache. | |
| 21 class MEDIA_BLINK_EXPORT ResourceMultiBuffer | |
| 22 : NON_EXPORTED_BASE(public MultiBuffer) { | |
| 23 public: | |
| 24 explicit ResourceMultiBuffer(blink::WebFrame* frame); | |
| 25 ~ResourceMultiBuffer() override; | |
| 26 | |
| 27 // A redirect, fail or new urldata. | |
| 28 void OnRedirect(const scoped_refptr<UrlData>& from, | |
| 29 const scoped_refptr<UrlData>& to); | |
| 30 void Fail(const scoped_refptr<UrlData>& from); | |
| 31 UrlIndex* url_index() { return &url_index_; } | |
| 32 blink::WebFrame* frame() const { return frame_; } | |
| 33 | |
| 34 protected: | |
| 35 MultiBuffer::DataProvider* CreateWriter(const BlockId& pos) override; | |
| 36 | |
| 37 private: | |
| 38 friend class ResourceMultiBufferDataProvider; | |
|
liberato (no reviews please)
2015/11/05 19:03:18
why is this needed? didn't see anything other tha
hubbe
2015/11/13 22:56:52
Gone.
| |
| 39 blink::WebFrame* frame_; | |
| 40 UrlIndex url_index_; | |
| 41 }; | |
| 42 | |
| 43 } // namespace media | |
| 44 | |
| 45 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_H_ | |
| OLD | NEW |