OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_permission.h" | 5 #include "chrome/browser/media/webrtc/media_permission.h" |
6 | 6 |
7 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 7 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
8 #include "chrome/browser/media/media_stream_device_permission_context.h" | 8 #include "chrome/browser/media/webrtc/media_stream_device_permission_context.h" |
9 #include "chrome/browser/media/media_stream_device_permissions.h" | 9 #include "chrome/browser/media/webrtc/media_stream_device_permissions.h" |
10 #include "chrome/browser/permissions/permission_context_base.h" | 10 #include "chrome/browser/permissions/permission_context_base.h" |
11 #include "chrome/browser/permissions/permission_manager.h" | 11 #include "chrome/browser/permissions/permission_manager.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 #include "content/public/browser/permission_manager.h" | 14 #include "content/public/browser/permission_manager.h" |
15 #include "content/public/browser/permission_type.h" | 15 #include "content/public/browser/permission_type.h" |
16 #include "content/public/common/url_constants.h" | 16 #include "content/public/common/url_constants.h" |
17 #include "extensions/common/constants.h" | 17 #include "extensions/common/constants.h" |
18 | 18 |
19 namespace { | 19 namespace { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 return false; | 120 return false; |
121 | 121 |
122 // Note: we check device_id before dereferencing devices. If the requested | 122 // Note: we check device_id before dereferencing devices. If the requested |
123 // device id is non-empty, then the corresponding device list must not be | 123 // device id is non-empty, then the corresponding device list must not be |
124 // NULL. | 124 // NULL. |
125 if (!device_id.empty() && !devices->FindById(device_id)) | 125 if (!device_id.empty() && !devices->FindById(device_id)) |
126 return false; | 126 return false; |
127 | 127 |
128 return true; | 128 return true; |
129 } | 129 } |
OLD | NEW |