| 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/extension_media_access_handler.h" | 5 #include "chrome/browser/media/extension_media_access_handler.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 9 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
| 10 #include "chrome/browser/media/media_stream_capture_indicator.h" | 10 #include "chrome/browser/media/webrtc/media_stream_capture_indicator.h" |
| 11 #include "chrome/browser/media/media_stream_device_permissions.h" | 11 #include "chrome/browser/media/webrtc/media_stream_device_permissions.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/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 15 #include "extensions/common/extension.h" | 15 #include "extensions/common/extension.h" |
| 16 #include "extensions/common/permissions/permissions_data.h" | 16 #include "extensions/common/permissions/permissions_data.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // This is a short-term solution to grant camera and/or microphone access to | 20 // This is a short-term solution to grant camera and/or microphone access to |
| 21 // extensions: | 21 // extensions: |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 std::unique_ptr<content::MediaStreamUI> ui; | 140 std::unique_ptr<content::MediaStreamUI> ui; |
| 141 if (!devices.empty()) { | 141 if (!devices.empty()) { |
| 142 result = content::MEDIA_DEVICE_OK; | 142 result = content::MEDIA_DEVICE_OK; |
| 143 ui = MediaCaptureDevicesDispatcher::GetInstance() | 143 ui = MediaCaptureDevicesDispatcher::GetInstance() |
| 144 ->GetMediaStreamCaptureIndicator() | 144 ->GetMediaStreamCaptureIndicator() |
| 145 ->RegisterMediaStream(web_contents, devices); | 145 ->RegisterMediaStream(web_contents, devices); |
| 146 } | 146 } |
| 147 | 147 |
| 148 callback.Run(devices, result, std::move(ui)); | 148 callback.Run(devices, result, std::move(ui)); |
| 149 } | 149 } |
| OLD | NEW |