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

Unified Diff: content/browser/streams/stream_handle_impl.h

Issue 12645004: Add Resource Handler for creating Streams to forward to extensions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make sure things are called on the right thread. Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/streams/stream_handle_impl.h
diff --git a/content/browser/streams/stream_handle_impl.h b/content/browser/streams/stream_handle_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..26a935253de819eec861c6e0d7691616c7bbbeb8
--- /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(base::WeakPtr<Stream> stream);
+ virtual ~StreamHandleImpl();
+
+ void SendCloseEvent();
+
+ private:
+ // StreamHandle overrides
+ virtual const GURL& GetUrl() OVERRIDE;
+ virtual void RegisterCloseCallback(const base::Closure& callback) OVERRIDE;
+
+ base::WeakPtr<Stream> stream_;
+ base::Closure callback_;
+ GURL url_;
+ base::MessageLoopProxy* stream_message_loop_;
+ base::MessageLoopProxy* callback_message_loop_;
+ base::Lock callback_lock_;
darin (slow to review) 2013/03/19 06:12:51 consider documenting what variables must be access
Zachary Kuznia 2013/03/19 06:59:35 Done.
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_STREAMS_STREAM_HANDLE_IMPL_H_
+

Powered by Google App Engine
This is Rietveld 408576698