summaryrefslogtreecommitdiffstats
path: root/content/browser/streams/stream_handle_impl.h
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-20 00:26:45 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-20 00:26:45 +0000
commit6468898246c51a66808d05e8f4a95d7330204337 (patch)
tree2033e423c2ef4f73c87468ccf9303991d7fb47ec /content/browser/streams/stream_handle_impl.h
parentfc9b1717c2f1f9305e3e69a0bc8e00feaab27032 (diff)
downloadchromium_src-6468898246c51a66808d05e8f4a95d7330204337.zip
chromium_src-6468898246c51a66808d05e8f4a95d7330204337.tar.gz
chromium_src-6468898246c51a66808d05e8f4a95d7330204337.tar.bz2
Add Resource Handler for creating Streams to forward to extensions
BUG=171585 Review URL: https://chromiumcodereview.appspot.com/12645004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189172 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/streams/stream_handle_impl.h')
-rw-r--r--content/browser/streams/stream_handle_impl.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/content/browser/streams/stream_handle_impl.h b/content/browser/streams/stream_handle_impl.h
new file mode 100644
index 0000000..31bfbee
--- /dev/null
+++ b/content/browser/streams/stream_handle_impl.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_STREAMS_STREAM_HANDLE_IMPL_H_
+#define CONTENT_BROWSER_STREAMS_STREAM_HANDLE_IMPL_H_
+
+#include "base/memory/weak_ptr.h"
+#include "base/message_loop_proxy.h"
+#include "base/synchronization/lock.h"
+#include "content/public/browser/stream_handle.h"
+
+namespace content {
+
+class Stream;
+
+class StreamHandleImpl : public StreamHandle {
+ public:
+ StreamHandleImpl(const base::WeakPtr<Stream>& stream,
+ const GURL& original_url,
+ const std::string& mime_type);
+ virtual ~StreamHandleImpl();
+
+ private:
+ // StreamHandle overrides
+ virtual const GURL& GetURL() OVERRIDE;
+ virtual const GURL& GetOriginalURL() OVERRIDE;
+ virtual const std::string& GetMimeType() OVERRIDE;
+
+ base::WeakPtr<Stream> stream_;
+ GURL url_;
+ GURL original_url_;
+ std::string mime_type_;
+ base::MessageLoopProxy* stream_message_loop_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_STREAMS_STREAM_HANDLE_IMPL_H_
+