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 CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/public/browser/web_contents_delegate.h" | 10 #include "content/public/browser/web_contents_delegate.h" |
11 | 11 |
12 class PrefServiceSyncable; | 12 class PrefServiceSyncable; |
13 class Profile; | 13 class Profile; |
14 | 14 |
15 class MediaStreamDevicesController { | 15 class MediaStreamDevicesController { |
16 public: | 16 public: |
17 // TODO(xians): Use const content::MediaStreamRequest& instead of *. | |
18 MediaStreamDevicesController(Profile* profile, | 17 MediaStreamDevicesController(Profile* profile, |
19 const content::MediaStreamRequest* request, | 18 const content::MediaStreamRequest& request, |
20 const content::MediaResponseCallback& callback); | 19 const content::MediaResponseCallback& callback); |
21 | 20 |
22 virtual ~MediaStreamDevicesController(); | 21 virtual ~MediaStreamDevicesController(); |
23 | 22 |
24 // Registers the prefs backing the audio and video policies. | 23 // Registers the prefs backing the audio and video policies. |
25 static void RegisterUserPrefs(PrefServiceSyncable* prefs); | 24 static void RegisterUserPrefs(PrefServiceSyncable* prefs); |
26 | 25 |
27 // Public method to be called before creating the MediaStreamInfoBarDelegate. | 26 // Public method to be called before creating the MediaStreamInfoBarDelegate. |
28 // This function will check the content settings exceptions and take the | 27 // This function will check the content settings exceptions and take the |
29 // corresponding action on exception which matches the request. | 28 // corresponding action on exception which matches the request. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // The callback that needs to be Run to notify WebRTC of whether access to | 77 // The callback that needs to be Run to notify WebRTC of whether access to |
79 // audio/video devices was granted or not. | 78 // audio/video devices was granted or not. |
80 content::MediaResponseCallback callback_; | 79 content::MediaResponseCallback callback_; |
81 | 80 |
82 bool has_audio_; | 81 bool has_audio_; |
83 bool has_video_; | 82 bool has_video_; |
84 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 83 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); |
85 }; | 84 }; |
86 | 85 |
87 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 86 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
OLD | NEW |