| OLD | NEW |
| 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> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by | 24 // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by |
| 25 // MediaStreamImpl. There is one MediaStreamDispatcherHost per | 25 // MediaStreamImpl. There is one MediaStreamDispatcherHost per |
| 26 // RenderProcessHost, the former owned by the latter. | 26 // RenderProcessHost, the former owned by the latter. |
| 27 class CONTENT_EXPORT MediaStreamDispatcherHost : public BrowserMessageFilter, | 27 class CONTENT_EXPORT MediaStreamDispatcherHost : public BrowserMessageFilter, |
| 28 public MediaStreamRequester { | 28 public MediaStreamRequester { |
| 29 public: | 29 public: |
| 30 MediaStreamDispatcherHost( | 30 MediaStreamDispatcherHost( |
| 31 int render_process_id, | 31 int render_process_id, |
| 32 const ResourceContext::SaltCallback& salt_callback, | 32 const ResourceContext::SaltCallback& salt_callback, |
| 33 MediaStreamManager* media_stream_manager, | 33 MediaStreamManager* media_stream_manager); |
| 34 ResourceContext* resource_context); | |
| 35 | 34 |
| 36 // MediaStreamRequester implementation. | 35 // MediaStreamRequester implementation. |
| 37 virtual void StreamGenerated( | 36 virtual void StreamGenerated( |
| 38 int render_frame_id, | 37 int render_frame_id, |
| 39 int page_request_id, | 38 int page_request_id, |
| 40 const std::string& label, | 39 const std::string& label, |
| 41 const StreamDeviceInfoArray& audio_devices, | 40 const StreamDeviceInfoArray& audio_devices, |
| 42 const StreamDeviceInfoArray& video_devices) OVERRIDE; | 41 const StreamDeviceInfoArray& video_devices) OVERRIDE; |
| 43 virtual void StreamGenerationFailed( | 42 virtual void StreamGenerationFailed( |
| 44 int render_frame_id, | 43 int render_frame_id, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 void StoreRequest(int render_frame_id, | 95 void StoreRequest(int render_frame_id, |
| 97 int page_request_id, | 96 int page_request_id, |
| 98 const std::string& label); | 97 const std::string& label); |
| 99 | 98 |
| 100 bool IsURLAllowed(const GURL& url); | 99 bool IsURLAllowed(const GURL& url); |
| 101 | 100 |
| 102 int render_process_id_; | 101 int render_process_id_; |
| 103 ResourceContext::SaltCallback salt_callback_; | 102 ResourceContext::SaltCallback salt_callback_; |
| 104 MediaStreamManager* media_stream_manager_; | 103 MediaStreamManager* media_stream_manager_; |
| 105 | 104 |
| 106 // Owned by ProfileIOData which is guaranteed to outlive MSDH. | |
| 107 ResourceContext* const resource_context_; | |
| 108 | |
| 109 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); | 105 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); |
| 110 }; | 106 }; |
| 111 | 107 |
| 112 } // namespace content | 108 } // namespace content |
| 113 | 109 |
| 114 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ | 110 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DISPATCHER_HOST_H_ |
| OLD | NEW |