| 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 15 matching lines...) Expand all Loading... |
| 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 | 34 |
| 35 // MediaStreamRequester implementation. | 35 // MediaStreamRequester implementation. |
| 36 virtual void StreamGenerated( | 36 void StreamGenerated(int render_frame_id, |
| 37 int render_frame_id, | 37 int page_request_id, |
| 38 int page_request_id, | 38 const std::string& label, |
| 39 const std::string& label, | 39 const StreamDeviceInfoArray& audio_devices, |
| 40 const StreamDeviceInfoArray& audio_devices, | 40 const StreamDeviceInfoArray& video_devices) override; |
| 41 const StreamDeviceInfoArray& video_devices) override; | 41 void StreamGenerationFailed( |
| 42 virtual void StreamGenerationFailed( | |
| 43 int render_frame_id, | 42 int render_frame_id, |
| 44 int page_request_id, | 43 int page_request_id, |
| 45 content::MediaStreamRequestResult result) override; | 44 content::MediaStreamRequestResult result) override; |
| 46 virtual void DeviceStopped(int render_frame_id, | 45 void DeviceStopped(int render_frame_id, |
| 47 const std::string& label, | 46 const std::string& label, |
| 48 const StreamDeviceInfo& device) override; | 47 const StreamDeviceInfo& device) override; |
| 49 virtual void DevicesEnumerated(int render_frame_id, | 48 void DevicesEnumerated(int render_frame_id, |
| 50 int page_request_id, | 49 int page_request_id, |
| 51 const std::string& label, | 50 const std::string& label, |
| 52 const StreamDeviceInfoArray& devices) override; | 51 const StreamDeviceInfoArray& devices) override; |
| 53 virtual void DeviceOpened(int render_frame_id, | 52 void DeviceOpened(int render_frame_id, |
| 54 int page_request_id, | 53 int page_request_id, |
| 55 const std::string& label, | 54 const std::string& label, |
| 56 const StreamDeviceInfo& video_device) override; | 55 const StreamDeviceInfo& video_device) override; |
| 57 | 56 |
| 58 // BrowserMessageFilter implementation. | 57 // BrowserMessageFilter implementation. |
| 59 virtual bool OnMessageReceived(const IPC::Message& message) override; | 58 bool OnMessageReceived(const IPC::Message& message) override; |
| 60 virtual void OnChannelClosing() override; | 59 void OnChannelClosing() override; |
| 61 | 60 |
| 62 protected: | 61 protected: |
| 63 virtual ~MediaStreamDispatcherHost(); | 62 ~MediaStreamDispatcherHost() override; |
| 64 | 63 |
| 65 private: | 64 private: |
| 66 friend class MockMediaStreamDispatcherHost; | 65 friend class MockMediaStreamDispatcherHost; |
| 67 | 66 |
| 68 void OnGenerateStream(int render_frame_id, | 67 void OnGenerateStream(int render_frame_id, |
| 69 int page_request_id, | 68 int page_request_id, |
| 70 const StreamOptions& components, | 69 const StreamOptions& components, |
| 71 const GURL& security_origin, | 70 const GURL& security_origin, |
| 72 bool user_gesture); | 71 bool user_gesture); |
| 73 void OnCancelGenerateStream(int render_frame_id, | 72 void OnCancelGenerateStream(int render_frame_id, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 101 int render_process_id_; | 100 int render_process_id_; |
| 102 ResourceContext::SaltCallback salt_callback_; | 101 ResourceContext::SaltCallback salt_callback_; |
| 103 MediaStreamManager* media_stream_manager_; | 102 MediaStreamManager* media_stream_manager_; |
| 104 | 103 |
| 105 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); | 104 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcherHost); |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 } // namespace content | 107 } // namespace content |
| 109 | 108 |
| 110 #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 |