| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_STREAMS_STREAM_HANDLE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_STREAMS_STREAM_HANDLE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_STREAMS_STREAM_HANDLE_IMPL_H_ | 6 #define CONTENT_BROWSER_STREAMS_STREAM_HANDLE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "content/public/browser/stream_handle.h" | 10 #include "content/public/browser/stream_handle.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class MessageLoopProxy; | 13 class MessageLoopProxy; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class Stream; | 18 class Stream; |
| 19 | 19 |
| 20 class StreamHandleImpl : public StreamHandle { | 20 class StreamHandleImpl : public StreamHandle { |
| 21 public: | 21 public: |
| 22 StreamHandleImpl(const base::WeakPtr<Stream>& stream, | 22 StreamHandleImpl(const base::WeakPtr<Stream>& stream, |
| 23 const GURL& original_url, | 23 const GURL& original_url, |
| 24 const std::string& mime_type); | 24 const std::string& mime_type, |
| 25 const std::string& response_headers); |
| 25 virtual ~StreamHandleImpl(); | 26 virtual ~StreamHandleImpl(); |
| 26 | 27 |
| 27 private: | 28 private: |
| 28 // StreamHandle overrides | 29 // StreamHandle overrides |
| 29 virtual const GURL& GetURL() OVERRIDE; | 30 virtual const GURL& GetURL() OVERRIDE; |
| 30 virtual const GURL& GetOriginalURL() OVERRIDE; | 31 virtual const GURL& GetOriginalURL() OVERRIDE; |
| 31 virtual const std::string& GetMimeType() OVERRIDE; | 32 virtual const std::string& GetMimeType() OVERRIDE; |
| 33 virtual const std::string& GetResponseHeaders() OVERRIDE; |
| 32 | 34 |
| 33 base::WeakPtr<Stream> stream_; | 35 base::WeakPtr<Stream> stream_; |
| 34 GURL url_; | 36 GURL url_; |
| 35 GURL original_url_; | 37 GURL original_url_; |
| 36 std::string mime_type_; | 38 std::string mime_type_; |
| 39 std::string response_headers_; |
| 37 base::MessageLoopProxy* stream_message_loop_; | 40 base::MessageLoopProxy* stream_message_loop_; |
| 38 }; | 41 }; |
| 39 | 42 |
| 40 } // namespace content | 43 } // namespace content |
| 41 | 44 |
| 42 #endif // CONTENT_BROWSER_STREAMS_STREAM_HANDLE_IMPL_H_ | 45 #endif // CONTENT_BROWSER_STREAMS_STREAM_HANDLE_IMPL_H_ |
| 43 | 46 |
| OLD | NEW |