OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/shell/browser/media_capture_util.h" | 5 #include "extensions/shell/browser/media_capture_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "content/public/browser/media_capture_devices.h" | 11 #include "content/public/browser/media_capture_devices.h" |
| 12 #include "extensions/common/extension.h" |
12 #include "extensions/common/permissions/permissions_data.h" | 13 #include "extensions/common/permissions/permissions_data.h" |
13 | 14 |
14 using content::MediaCaptureDevices; | 15 using content::MediaCaptureDevices; |
15 using content::MediaStreamDevice; | 16 using content::MediaStreamDevice; |
16 using content::MediaStreamDevices; | 17 using content::MediaStreamDevices; |
17 using content::MediaStreamUI; | 18 using content::MediaStreamUI; |
18 | 19 |
19 namespace extensions { | 20 namespace extensions { |
20 | 21 |
21 const MediaStreamDevice* GetRequestedDeviceOrDefault( | 22 const MediaStreamDevice* GetRequestedDeviceOrDefault( |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 << "Audio capture request but no audioCapture permission in manifest."; | 80 << "Audio capture request but no audioCapture permission in manifest."; |
80 } else { | 81 } else { |
81 DCHECK(type == content::MEDIA_DEVICE_VIDEO_CAPTURE); | 82 DCHECK(type == content::MEDIA_DEVICE_VIDEO_CAPTURE); |
82 CHECK(permissions_data->HasAPIPermission(APIPermission::kVideoCapture)) | 83 CHECK(permissions_data->HasAPIPermission(APIPermission::kVideoCapture)) |
83 << "Video capture request but no videoCapture permission in manifest."; | 84 << "Video capture request but no videoCapture permission in manifest."; |
84 } | 85 } |
85 } | 86 } |
86 | 87 |
87 } // namespace media_capture_util | 88 } // namespace media_capture_util |
88 } // namespace extensions | 89 } // namespace extensions |
OLD | NEW |