| 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 #include "chrome/browser/media/media_stream_devices_controller.h" | 5 #include "chrome/browser/media/media_stream_devices_controller.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/prefs/scoped_user_pref_update.h" | 10 #include "base/prefs/scoped_user_pref_update.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 | 79 |
| 80 return true; | 80 return true; |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool IsInKioskMode() { | 83 bool IsInKioskMode() { |
| 84 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) | 84 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) |
| 85 return true; | 85 return true; |
| 86 | 86 |
| 87 #if defined(OS_CHROMEOS) | 87 #if defined(OS_CHROMEOS) |
| 88 const chromeos::UserManager* user_manager = chromeos::UserManager::Get(); | 88 const chromeos::UserManager* user_manager = chromeos::GetUserManager(); |
| 89 return user_manager && user_manager->IsLoggedInAsKioskApp(); | 89 return user_manager && user_manager->IsLoggedInAsKioskApp(); |
| 90 #else | 90 #else |
| 91 return false; | 91 return false; |
| 92 #endif | 92 #endif |
| 93 } | 93 } |
| 94 | 94 |
| 95 enum DevicePermissionActions { | 95 enum DevicePermissionActions { |
| 96 kAllowHttps = 0, | 96 kAllowHttps = 0, |
| 97 kAllowHttp, | 97 kAllowHttp, |
| 98 kDeny, | 98 kDeny, |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 it->second.permission == MEDIA_ALLOWED); | 653 it->second.permission == MEDIA_ALLOWED); |
| 654 } | 654 } |
| 655 | 655 |
| 656 bool MediaStreamDevicesController::IsDeviceVideoCaptureRequestedAndAllowed() | 656 bool MediaStreamDevicesController::IsDeviceVideoCaptureRequestedAndAllowed() |
| 657 const { | 657 const { |
| 658 MediaStreamTypeSettingsMap::const_iterator it = | 658 MediaStreamTypeSettingsMap::const_iterator it = |
| 659 request_permissions_.find(content::MEDIA_DEVICE_VIDEO_CAPTURE); | 659 request_permissions_.find(content::MEDIA_DEVICE_VIDEO_CAPTURE); |
| 660 return (it != request_permissions_.end() && | 660 return (it != request_permissions_.end() && |
| 661 it->second.permission == MEDIA_ALLOWED); | 661 it->second.permission == MEDIA_ALLOWED); |
| 662 } | 662 } |
| OLD | NEW |