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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 #include "chrome/browser/media/media_stream_devices_controller.h" 5 #include "chrome/browser/media/media_stream_devices_controller.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/content_settings/content_settings_provider.h" 8 #include "chrome/browser/content_settings/content_settings_provider.h"
9 #include "chrome/browser/content_settings/host_content_settings_map.h" 9 #include "chrome/browser/content_settings/host_content_settings_map.h"
10 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h" 10 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 has_audio_(content::IsAudioMediaType(request->audio_type) && 49 has_audio_(content::IsAudioMediaType(request->audio_type) &&
50 !IsAudioDeviceBlockedByPolicy()), 50 !IsAudioDeviceBlockedByPolicy()),
51 has_video_(content::IsVideoMediaType(request->video_type) && 51 has_video_(content::IsVideoMediaType(request->video_type) &&
52 !IsVideoDeviceBlockedByPolicy()) { 52 !IsVideoDeviceBlockedByPolicy()) {
53 DCHECK(request); 53 DCHECK(request);
54 } 54 }
55 55
56 MediaStreamDevicesController::~MediaStreamDevicesController() {} 56 MediaStreamDevicesController::~MediaStreamDevicesController() {}
57 57
58 // static 58 // static
59 void MediaStreamDevicesController::RegisterUserPrefs(PrefService* prefs) { 59 void MediaStreamDevicesController::RegisterUserPrefs(
60 PrefServiceSyncable* prefs) {
60 prefs->RegisterBooleanPref(prefs::kVideoCaptureAllowed, 61 prefs->RegisterBooleanPref(prefs::kVideoCaptureAllowed,
61 true, 62 true,
62 PrefService::UNSYNCABLE_PREF); 63 PrefServiceSyncable::UNSYNCABLE_PREF);
63 prefs->RegisterBooleanPref(prefs::kAudioCaptureAllowed, 64 prefs->RegisterBooleanPref(prefs::kAudioCaptureAllowed,
64 true, 65 true,
65 PrefService::UNSYNCABLE_PREF); 66 PrefServiceSyncable::UNSYNCABLE_PREF);
66 } 67 }
67 68
68 69
69 bool MediaStreamDevicesController::DismissInfoBarAndTakeActionOnSettings() { 70 bool MediaStreamDevicesController::DismissInfoBarAndTakeActionOnSettings() {
70 // If this is a no UI check for policies only go straight to accept - policy 71 // If this is a no UI check for policies only go straight to accept - policy
71 // check will be done automatically on the way. 72 // check will be done automatically on the way.
72 if (request_.request_type == content::MEDIA_OPEN_DEVICE) { 73 if (request_.request_type == content::MEDIA_OPEN_DEVICE) {
73 Accept(false); 74 Accept(false);
74 return true; 75 return true;
75 } 76 }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 267 }
267 if (has_video_) { 268 if (has_video_) {
268 profile_->GetHostContentSettingsMap()->SetContentSetting( 269 profile_->GetHostContentSettingsMap()->SetContentSetting(
269 primary_pattern, 270 primary_pattern,
270 ContentSettingsPattern::Wildcard(), 271 ContentSettingsPattern::Wildcard(),
271 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, 272 CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
272 std::string(), 273 std::string(),
273 content_setting); 274 content_setting);
274 } 275 }
275 } 276 }
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_devices_controller.h ('k') | chrome/browser/media_gallery/media_galleries_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698