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/tab_capture_access_handler.h" | 5 #include "chrome/browser/media/tab_capture_access_handler.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h" | 9 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h" |
10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 extensions::APIPermission::kTabCapture)) { | 72 extensions::APIPermission::kTabCapture)) { |
73 devices.push_back(content::MediaStreamDevice( | 73 devices.push_back(content::MediaStreamDevice( |
74 content::MEDIA_TAB_VIDEO_CAPTURE, std::string(), std::string())); | 74 content::MEDIA_TAB_VIDEO_CAPTURE, std::string(), std::string())); |
75 } | 75 } |
76 | 76 |
77 if (!devices.empty()) { | 77 if (!devices.empty()) { |
78 ui = MediaCaptureDevicesDispatcher::GetInstance() | 78 ui = MediaCaptureDevicesDispatcher::GetInstance() |
79 ->GetMediaStreamCaptureIndicator() | 79 ->GetMediaStreamCaptureIndicator() |
80 ->RegisterMediaStream(web_contents, devices); | 80 ->RegisterMediaStream(web_contents, devices); |
81 } | 81 } |
| 82 UpdateExtensionTrusted(request, extension); |
82 callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE | 83 callback.Run(devices, devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE |
83 : content::MEDIA_DEVICE_OK, | 84 : content::MEDIA_DEVICE_OK, |
84 std::move(ui)); | 85 std::move(ui)); |
85 } | 86 } |
OLD | NEW |