| 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> |
| 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_message_filter.h" | 16 #include "content/public/browser/browser_message_filter.h" |
| 17 #include "content/public/browser/resource_context.h" | 17 #include "content/public/browser/resource_context.h" |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 | 20 |
| 21 class MediaStreamManager; | 21 class MediaStreamManager; |
| 22 class ResourceContext; |
| 22 | 23 |
| 23 // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by | 24 // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by |
| 24 // MediaStreamImpl. It's the complement of MediaStreamDispatcher | 25 // MediaStreamImpl. It's the complement of MediaStreamDispatcher |
| 25 // (owned by RenderView). | 26 // (owned by RenderView). |
| 26 class CONTENT_EXPORT MediaStreamDispatcherHost : public BrowserMessageFilter, | 27 class CONTENT_EXPORT MediaStreamDispatcherHost : public BrowserMessageFilter, |
| 27 public MediaStreamRequester { | 28 public MediaStreamRequester { |
| 28 public: | 29 public: |
| 29 MediaStreamDispatcherHost( | 30 MediaStreamDispatcherHost( |
| 30 int render_process_id, | 31 int render_process_id, |
| 31 const ResourceContext::SaltCallback& salt_callback, | 32 const ResourceContext::SaltCallback& salt_callback, |
| 32 MediaStreamManager* media_stream_manager); | 33 MediaStreamManager* media_stream_manager, |
| 34 ResourceContext* resource_context); |
| 33 | 35 |
| 34 // MediaStreamRequester implementation. | 36 // MediaStreamRequester implementation. |
| 35 virtual void StreamGenerated( | 37 virtual void StreamGenerated( |
| 36 int render_view_id, | 38 int render_view_id, |
| 37 int page_request_id, | 39 int page_request_id, |
| 38 const std::string& label, | 40 const std::string& label, |
| 39 const StreamDeviceInfoArray& audio_devices, | 41 const StreamDeviceInfoArray& audio_devices, |
| 40 const StreamDeviceInfoArray& video_devices) OVERRIDE; | 42 const StreamDeviceInfoArray& video_devices) OVERRIDE; |
| 41 virtual void StreamGenerationFailed( | 43 virtual void StreamGenerationFailed( |
| 42 int render_view_id, | 44 int render_view_id, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void StoreRequest(int render_view_id, | 96 void StoreRequest(int render_view_id, |
| 95 int page_request_id, | 97 int page_request_id, |
| 96 const std::string& label);; | 98 const std::string& label);; |
| 97 | 99 |
| 98 bool IsURLAllowed(const GURL& url); | 100 bool IsURLAllowed(const GURL& url); |
| 99 | 101 |
| 100 int render_process_id_; | 102 int render_process_id_; |
| 101 ResourceContext::SaltCallback salt_callback_; | 103 ResourceContext::SaltCallback salt_callback_; |
| 102 MediaStreamManager* media_stream_manager_; | 104 MediaStreamManager* media_stream_manager_; |
| 103 | 105 |
| 106 // Owned by ProfileIOData which is guaranteed to outlive MSDH. |
| 107 ResourceContext* resource_context_; |
| 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_ |
| OLD | NEW |