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

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

Issue 54863002: Implement a salt for MediaSource IDs that can be cleared by a user. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 11
12 #include "content/browser/renderer_host/media/media_stream_manager.h" 12 #include "content/browser/renderer_host/media/media_stream_manager.h"
13 #include "content/browser/renderer_host/media/media_stream_requester.h" 13 #include "content/browser/renderer_host/media/media_stream_requester.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/common/media/media_stream_options.h" 15 #include "content/common/media/media_stream_options.h"
16 #include "content/public/browser/browser_context.h"
16 #include "content/public/browser/browser_message_filter.h" 17 #include "content/public/browser/browser_message_filter.h"
17 18
18 namespace content { 19 namespace content {
20
21 class BrowserContext;
19 class MediaStreamManager; 22 class MediaStreamManager;
20 23
21 // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by 24 // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by
22 // MediaStreamImpl. It's the complement of MediaStreamDispatcher 25 // MediaStreamImpl. It's the complement of MediaStreamDispatcher
23 // (owned by RenderView). 26 // (owned by RenderView).
24 class CONTENT_EXPORT MediaStreamDispatcherHost : public BrowserMessageFilter, 27 class CONTENT_EXPORT MediaStreamDispatcherHost : public BrowserMessageFilter,
25 public MediaStreamRequester { 28 public MediaStreamRequester {
26 public: 29 public:
27 MediaStreamDispatcherHost(int render_process_id, 30 MediaStreamDispatcherHost(int render_process_id,
31 BrowserContext* browser_context,
28 MediaStreamManager* media_stream_manager); 32 MediaStreamManager* media_stream_manager);
29 33
30 // MediaStreamRequester implementation. 34 // MediaStreamRequester implementation.
31 virtual void StreamGenerated( 35 virtual void StreamGenerated(
32 const std::string& label, 36 const std::string& label,
33 const StreamDeviceInfoArray& audio_devices, 37 const StreamDeviceInfoArray& audio_devices,
34 const StreamDeviceInfoArray& video_devices) OVERRIDE; 38 const StreamDeviceInfoArray& video_devices) OVERRIDE;
35 virtual void StreamGenerationFailed(const std::string& label) OVERRIDE; 39 virtual void StreamGenerationFailed(const std::string& label) OVERRIDE;
36 virtual void StopGeneratedStream(int render_view_id, 40 virtual void StopGeneratedStream(int render_view_id,
37 const std::string& label) OVERRIDE; 41 const std::string& label) OVERRIDE;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 92
89 void OnCloseDevice(int render_view_id, 93 void OnCloseDevice(int render_view_id,
90 const std::string& label); 94 const std::string& label);
91 95
92 void StoreRequest(int render_view_id, 96 void StoreRequest(int render_view_id,
93 int page_request_id, 97 int page_request_id,
94 const std::string& label); 98 const std::string& label);
95 StreamRequest PopRequest(const std::string& label); 99 StreamRequest PopRequest(const std::string& label);
96 100
97 int render_process_id_; 101 int render_process_id_;
102 ResourceContext* resource_context_;
98 MediaStreamManager* media_stream_manager_; 103 MediaStreamManager* media_stream_manager_;
99 104
100 // Active requests. When the MediaStreamManager responds to a a request the 105 // Active requests. When the MediaStreamManager responds to a a request the
101 // request is removed from this map. 106 // request is removed from this map.
102 StreamMap streams_; 107 StreamMap streams_;
103 108
104 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); 109 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost);
105 }; 110 };
106 111
107 } // namespace content 112 } // namespace content
108 113
109 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ 114 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698