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