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 13 matching lines...) Expand all Loading... |
24 #include "components/pref_registry/pref_registry_syncable.h" | 24 #include "components/pref_registry/pref_registry_syncable.h" |
25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
26 #include "content/public/browser/navigation_entry.h" | 26 #include "content/public/browser/navigation_entry.h" |
27 #include "content/public/common/media_stream_request.h" | 27 #include "content/public/common/media_stream_request.h" |
28 #include "extensions/common/constants.h" | 28 #include "extensions/common/constants.h" |
29 #include "grit/generated_resources.h" | 29 #include "grit/generated_resources.h" |
30 #include "grit/theme_resources.h" | 30 #include "grit/theme_resources.h" |
31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
32 | 32 |
33 #if defined(OS_CHROMEOS) | 33 #if defined(OS_CHROMEOS) |
34 #include "chrome/browser/chromeos/login/user_manager.h" | 34 #include "chrome/browser/chromeos/login/users/user_manager.h" |
35 #endif | 35 #endif |
36 | 36 |
37 using content::BrowserThread; | 37 using content::BrowserThread; |
38 | 38 |
39 namespace { | 39 namespace { |
40 | 40 |
41 // This prefix is combined with request security origins to store media access | 41 // This prefix is combined with request security origins to store media access |
42 // permissions that the user has granted a specific page navigation instance. | 42 // permissions that the user has granted a specific page navigation instance. |
43 // The string value stored with the navigation instance will contain one or more | 43 // The string value stored with the navigation instance will contain one or more |
44 // kMediaPermissionXxx constants that indicates the permission(s) that the user | 44 // kMediaPermissionXxx constants that indicates the permission(s) that the user |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 it->second.permission == MEDIA_ALLOWED); | 763 it->second.permission == MEDIA_ALLOWED); |
764 } | 764 } |
765 | 765 |
766 bool MediaStreamDevicesController::IsDeviceVideoCaptureRequestedAndAllowed() | 766 bool MediaStreamDevicesController::IsDeviceVideoCaptureRequestedAndAllowed() |
767 const { | 767 const { |
768 MediaStreamTypeSettingsMap::const_iterator it = | 768 MediaStreamTypeSettingsMap::const_iterator it = |
769 request_permissions_.find(content::MEDIA_DEVICE_VIDEO_CAPTURE); | 769 request_permissions_.find(content::MEDIA_DEVICE_VIDEO_CAPTURE); |
770 return (it != request_permissions_.end() && | 770 return (it != request_permissions_.end() && |
771 it->second.permission == MEDIA_ALLOWED); | 771 it->second.permission == MEDIA_ALLOWED); |
772 } | 772 } |
OLD | NEW |