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

Side by Side Diff: content/browser/renderer_host/media/video_capture_host.h

Issue 9433006: Remove GetAudioManager and GetMediaStreamManager from ResourceContext. The reason is the content mo… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // VideoCaptureHost serves video capture related messages from 5 // VideoCaptureHost serves video capture related messages from
6 // VideCaptureMessageFilter which lives inside the render process. 6 // VideCaptureMessageFilter which lives inside the render process.
7 // 7 //
8 // This class is owned by BrowserRenderProcessHost, and instantiated on UI 8 // This class is owned by BrowserRenderProcessHost, and instantiated on UI
9 // thread, but all other operations and method calls happen on IO thread. 9 // thread, but all other operations and method calls happen on IO thread.
10 // 10 //
(...skipping 27 matching lines...) Expand all
38 38
39 #include <map> 39 #include <map>
40 40
41 #include "base/memory/ref_counted.h" 41 #include "base/memory/ref_counted.h"
42 #include "base/message_loop_helpers.h" 42 #include "base/message_loop_helpers.h"
43 #include "content/browser/renderer_host/media/video_capture_controller.h" 43 #include "content/browser/renderer_host/media/video_capture_controller.h"
44 #include "content/common/content_export.h" 44 #include "content/common/content_export.h"
45 #include "content/public/browser/browser_message_filter.h" 45 #include "content/public/browser/browser_message_filter.h"
46 #include "ipc/ipc_message.h" 46 #include "ipc/ipc_message.h"
47 47
48 class AudioManager;
49
48 namespace content { 50 namespace content {
49 class ResourceContext; 51 class ResourceContext;
50 } // namespace content 52 } // namespace content
51 53
52 class CONTENT_EXPORT VideoCaptureHost 54 class CONTENT_EXPORT VideoCaptureHost
53 : public content::BrowserMessageFilter, 55 : public content::BrowserMessageFilter,
54 public VideoCaptureControllerEventHandler { 56 public VideoCaptureControllerEventHandler {
55 public: 57 public:
56 explicit VideoCaptureHost(content::ResourceContext* resource_context); 58 explicit VideoCaptureHost(content::ResourceContext* resource_context,
59 AudioManager* audio_manager);
57 60
58 // content::BrowserMessageFilter implementation. 61 // content::BrowserMessageFilter implementation.
59 virtual void OnChannelClosing() OVERRIDE; 62 virtual void OnChannelClosing() OVERRIDE;
60 virtual void OnDestruct() const OVERRIDE; 63 virtual void OnDestruct() const OVERRIDE;
61 virtual bool OnMessageReceived(const IPC::Message& message, 64 virtual bool OnMessageReceived(const IPC::Message& message,
62 bool* message_was_ok) OVERRIDE; 65 bool* message_was_ok) OVERRIDE;
63 66
64 // VideoCaptureControllerEventHandler implementation. 67 // VideoCaptureControllerEventHandler implementation.
65 virtual void OnError(const VideoCaptureControllerID& id) OVERRIDE; 68 virtual void OnError(const VideoCaptureControllerID& id) OVERRIDE;
66 virtual void OnBufferCreated(const VideoCaptureControllerID& id, 69 virtual void OnBufferCreated(const VideoCaptureControllerID& id,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Helpers. 138 // Helpers.
136 media_stream::VideoCaptureManager* GetVideoCaptureManager(); 139 media_stream::VideoCaptureManager* GetVideoCaptureManager();
137 140
138 struct Entry; 141 struct Entry;
139 typedef std::map<VideoCaptureControllerID, Entry*> EntryMap; 142 typedef std::map<VideoCaptureControllerID, Entry*> EntryMap;
140 // A map of VideoCaptureControllerID to its state and VideoCaptureController. 143 // A map of VideoCaptureControllerID to its state and VideoCaptureController.
141 EntryMap entries_; 144 EntryMap entries_;
142 145
143 // Used to get a pointer to VideoCaptureManager to start/stop capture devices. 146 // Used to get a pointer to VideoCaptureManager to start/stop capture devices.
144 content::ResourceContext* resource_context_; 147 content::ResourceContext* resource_context_;
148 AudioManager* audio_manager_;
145 149
146 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); 150 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost);
147 }; 151 };
148 152
149 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ 153 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/media_stream_manager.cc ('k') | content/browser/renderer_host/media/video_capture_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698