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

Side by Side Diff: content/renderer/media/media_stream_dispatcher.h

Issue 11232014: Move a bunch of code in content\renderer to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/common/media/media_stream_options.h" 17 #include "content/common/media/media_stream_options.h"
18 #include "content/public/renderer/render_view_observer.h" 18 #include "content/public/renderer/render_view_observer.h"
19 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h" 19 #include "content/renderer/media/media_stream_dispatcher_eventhandler.h"
20 20
21 namespace base { 21 namespace base {
22 class MessageLoopProxy; 22 class MessageLoopProxy;
23 } 23 }
24 24
25 namespace content {
26
25 class RenderViewImpl; 27 class RenderViewImpl;
26 28
27 // MediaStreamDispatcher is a delegate for the Media Stream API messages. 29 // MediaStreamDispatcher is a delegate for the Media Stream API messages.
28 // MediaStreams are used by WebKit to open media devices such as Video Capture 30 // MediaStreams are used by WebKit to open media devices such as Video Capture
29 // and Audio input devices. 31 // and Audio input devices.
30 // It's the complement of MediaStreamDispatcherHost (owned by 32 // It's the complement of MediaStreamDispatcherHost (owned by
31 // BrowserRenderProcessHost). 33 // BrowserRenderProcessHost).
32 class CONTENT_EXPORT MediaStreamDispatcher 34 class CONTENT_EXPORT MediaStreamDispatcher
33 : public content::RenderViewObserver, 35 : public RenderViewObserver,
34 public base::SupportsWeakPtr<MediaStreamDispatcher> { 36 public base::SupportsWeakPtr<MediaStreamDispatcher> {
35 public: 37 public:
36 explicit MediaStreamDispatcher(RenderViewImpl* render_view); 38 explicit MediaStreamDispatcher(RenderViewImpl* render_view);
37 virtual ~MediaStreamDispatcher(); 39 virtual ~MediaStreamDispatcher();
38 40
39 // Request a new media stream to be created. 41 // Request a new media stream to be created.
40 // This can be used either by WebKit or a plugin. 42 // This can be used either by WebKit or a plugin.
41 // Note: The event_handler must be valid for as long as the stream exists. 43 // Note: The event_handler must be valid for as long as the stream exists.
42 virtual void GenerateStream( 44 virtual void GenerateStream(
43 int request_id, 45 int request_id,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 EnumerationState audio_enumeration_state_; 156 EnumerationState audio_enumeration_state_;
155 EnumerationState video_enumeration_state_; 157 EnumerationState video_enumeration_state_;
156 158
157 // List of calls made to GenerateStream that have not yet completed. 159 // List of calls made to GenerateStream that have not yet completed.
158 typedef std::list<Request> RequestList; 160 typedef std::list<Request> RequestList;
159 RequestList requests_; 161 RequestList requests_;
160 162
161 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcher); 163 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcher);
162 }; 164 };
163 165
166 } // namespace content
167
164 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 168 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_dependency_factory_unittest.cc ('k') | content/renderer/media/media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698