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

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

Issue 416053002: Revert of Turn webspeech on/off when tab goes fore/background (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/media/media_stream_devices_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 // Return true if the type has been requested and permission is currently set 132 // Return true if the type has been requested and permission is currently set
133 // to allowed. Note that it does not reflect the final permission decision. 133 // to allowed. Note that it does not reflect the final permission decision.
134 // This function is called during the filtering steps to check if the type has 134 // This function is called during the filtering steps to check if the type has
135 // been blocked yet or not and the permission may be changed to blocked during 135 // been blocked yet or not and the permission may be changed to blocked during
136 // these filterings. See also the initialization in the constructor and 136 // these filterings. See also the initialization in the constructor and
137 // comments on that. 137 // comments on that.
138 bool IsDeviceAudioCaptureRequestedAndAllowed() const; 138 bool IsDeviceAudioCaptureRequestedAndAllowed() const;
139 bool IsDeviceVideoCaptureRequestedAndAllowed() const; 139 bool IsDeviceVideoCaptureRequestedAndAllowed() const;
140 140
141 // Returns true if media capture device is allowed to be used. This could
142 // return false when tab goes to background.
143 bool IsCaptureDeviceRequestAllowed() const;
144
145 content::WebContents* web_contents_; 141 content::WebContents* web_contents_;
146 142
147 // The owner of this class needs to make sure it does not outlive the profile. 143 // The owner of this class needs to make sure it does not outlive the profile.
148 Profile* profile_; 144 Profile* profile_;
149 145
150 // Weak pointer to the tab specific content settings of the tab for which the 146 // Weak pointer to the tab specific content settings of the tab for which the
151 // MediaStreamDevicesController was created. The tab specific content 147 // MediaStreamDevicesController was created. The tab specific content
152 // settings are associated with a the web contents of the tab. The 148 // settings are associated with a the web contents of the tab. The
153 // MediaStreamDeviceController must not outlive the web contents for which it 149 // MediaStreamDeviceController must not outlive the web contents for which it
154 // was created. 150 // was created.
(...skipping 10 matching lines...) Expand all
165 // passed to the tab specific content settings when the permissions have been 161 // passed to the tab specific content settings when the permissions have been
166 // resolved. Currently only used by MEDIA_DEVICE_AUDIO_CAPTURE and 162 // resolved. Currently only used by MEDIA_DEVICE_AUDIO_CAPTURE and
167 // MEDIA_DEVICE_VIDEO_CAPTURE since those are the only types that require 163 // MEDIA_DEVICE_VIDEO_CAPTURE since those are the only types that require
168 // updates in the settings. 164 // updates in the settings.
169 MediaStreamTypeSettingsMap request_permissions_; 165 MediaStreamTypeSettingsMap request_permissions_;
170 166
171 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); 167 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController);
172 }; 168 };
173 169
174 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ 170 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/media_stream_devices_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698