Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: chrome/browser/media/media_stream_devices_controller.h

Issue 12092045: Revert 179093 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1397/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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;
15 14
16 class MediaStreamDevicesController { 15 class MediaStreamDevicesController {
17 public: 16 public:
18 MediaStreamDevicesController(Profile* profile, 17 MediaStreamDevicesController(Profile* profile,
19 TabSpecificContentSettings* content_settings,
20 const content::MediaStreamRequest& request, 18 const content::MediaStreamRequest& request,
21 const content::MediaResponseCallback& callback); 19 const content::MediaResponseCallback& callback);
22 20
23 virtual ~MediaStreamDevicesController(); 21 virtual ~MediaStreamDevicesController();
24 22
25 // Registers the prefs backing the audio and video policies. 23 // Registers the prefs backing the audio and video policies.
26 static void RegisterUserPrefs(PrefServiceSyncable* prefs); 24 static void RegisterUserPrefs(PrefServiceSyncable* prefs);
27 25
28 // Public method to be called before creating the MediaStreamInfoBarDelegate. 26 // Public method to be called before creating the MediaStreamInfoBarDelegate.
29 // This function will check the content settings exceptions and take the 27 // This function will check the content settings exceptions and take the
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // chrome://URLs, otherwise returns false. 64 // chrome://URLs, otherwise returns false.
67 bool ShouldAlwaysAllowOrigin() const; 65 bool ShouldAlwaysAllowOrigin() const;
68 66
69 // Sets the permission of the origin of the request. This is triggered when 67 // Sets the permission of the origin of the request. This is triggered when
70 // the users deny the request or allow the request for https sites. 68 // the users deny the request or allow the request for https sites.
71 void SetPermission(bool allowed) const; 69 void SetPermission(bool allowed) const;
72 70
73 // The owner of this class needs to make sure it does not outlive the profile. 71 // The owner of this class needs to make sure it does not outlive the profile.
74 Profile* profile_; 72 Profile* profile_;
75 73
76 // Weak pointer to the tab specific content settings of the tab for which the
77 // MediaStreamDevicesController was created. The tab specific content
78 // settings are associated with a the web contents of the tab. The
79 // MediaStreamDeviceController must not outlive the web contents for which it
80 // was created.
81 TabSpecificContentSettings* content_settings_;
82
83 // The original request for access to devices. 74 // The original request for access to devices.
84 const content::MediaStreamRequest request_; 75 const content::MediaStreamRequest request_;
85 76
86 // 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
87 // audio/video devices was granted or not. 78 // audio/video devices was granted or not.
88 content::MediaResponseCallback callback_; 79 content::MediaResponseCallback callback_;
89 80
90 bool has_audio_; 81 bool has_audio_;
91 bool has_video_; 82 bool has_video_;
92 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); 83 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController);
93 }; 84 };
94 85
95 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ 86 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698