 Chromium Code Reviews
 Chromium Code Reviews Issue 11896028:
  Add an location bar icon and a content settings bubble for media settings.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 11896028:
  Add an location bar icon and a content settings bubble for media settings.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| 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 class TabSpecificContentSettings; | |
| 14 | 15 | 
| 15 class MediaStreamDevicesController { | 16 class MediaStreamDevicesController { | 
| 16 public: | 17 public: | 
| 17 MediaStreamDevicesController(Profile* profile, | 18 MediaStreamDevicesController(Profile* profile, | 
| 19 TabSpecificContentSettings* content_settings, | |
| 18 const content::MediaStreamRequest& request, | 20 const content::MediaStreamRequest& request, | 
| 19 const content::MediaResponseCallback& callback); | 21 const content::MediaResponseCallback& callback); | 
| 20 | 22 | 
| 21 virtual ~MediaStreamDevicesController(); | 23 virtual ~MediaStreamDevicesController(); | 
| 22 | 24 | 
| 23 // Registers the prefs backing the audio and video policies. | 25 // Registers the prefs backing the audio and video policies. | 
| 24 static void RegisterUserPrefs(PrefServiceSyncable* prefs); | 26 static void RegisterUserPrefs(PrefServiceSyncable* prefs); | 
| 25 | 27 | 
| 26 // Public method to be called before creating the MediaStreamInfoBarDelegate. | 28 // Public method to be called before creating the MediaStreamInfoBarDelegate. | 
| 27 // This function will check the content settings exceptions and take the | 29 // This function will check the content settings exceptions and take the | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 // chrome://URLs, otherwise returns false. | 66 // chrome://URLs, otherwise returns false. | 
| 65 bool ShouldAlwaysAllowOrigin() const; | 67 bool ShouldAlwaysAllowOrigin() const; | 
| 66 | 68 | 
| 67 // Sets the permission of the origin of the request. This is triggered when | 69 // Sets the permission of the origin of the request. This is triggered when | 
| 68 // the users deny the request or allow the request for https sites. | 70 // the users deny the request or allow the request for https sites. | 
| 69 void SetPermission(bool allowed) const; | 71 void SetPermission(bool allowed) const; | 
| 70 | 72 | 
| 71 // The owner of this class needs to make sure it does not outlive the profile. | 73 // The owner of this class needs to make sure it does not outlive the profile. | 
| 72 Profile* profile_; | 74 Profile* profile_; | 
| 73 | 75 | 
| 76 // The tab specific content settings of the tab for which the | |
| 77 // MediaStreamDevicesController was created. The MediaStreamDeviceController | |
| 78 // must not outlive the web contents for which it was created. | |
| 79 TabSpecificContentSettings* content_settings_; | |
| 
no longer working on chromium
2013/01/23 11:48:06
nit, add a comment to specify the owner ship of th
 
markusheintz_
2013/01/23 12:18:33
Done.
 | |
| 80 | |
| 74 // The original request for access to devices. | 81 // The original request for access to devices. | 
| 75 const content::MediaStreamRequest request_; | 82 const content::MediaStreamRequest request_; | 
| 76 | 83 | 
| 77 // The callback that needs to be Run to notify WebRTC of whether access to | 84 // The callback that needs to be Run to notify WebRTC of whether access to | 
| 78 // audio/video devices was granted or not. | 85 // audio/video devices was granted or not. | 
| 79 content::MediaResponseCallback callback_; | 86 content::MediaResponseCallback callback_; | 
| 80 | 87 | 
| 81 bool has_audio_; | 88 bool has_audio_; | 
| 82 bool has_video_; | 89 bool has_video_; | 
| 83 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 90 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 
| 84 }; | 91 }; | 
| 85 | 92 | 
| 86 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 93 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 
| OLD | NEW |