Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2077)

Unified Diff: content/renderer/media/media_stream_video_capturer_source.cc

Issue 1873293002: Report if video capturing meets output protection requirement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments and rebased. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/media_stream_video_capturer_source.cc
diff --git a/content/renderer/media/media_stream_video_capturer_source.cc b/content/renderer/media/media_stream_video_capturer_source.cc
index b080ec826df549babe74356c95e481e190ab809c..0a29d2964c9b8f621e785879a041c906e5860248 100644
--- a/content/renderer/media/media_stream_video_capturer_source.cc
+++ b/content/renderer/media/media_stream_video_capturer_source.cc
@@ -11,6 +11,7 @@
#include "base/location.h"
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
+#include "content/common/media/media_stream_messages.h"
#include "content/public/common/media_stream_request.h"
#include "content/renderer/media/media_stream_constraints_util.h"
#include "content/renderer/media/video_capture_impl_manager.h"
@@ -318,7 +319,6 @@ void LocalVideoCapturerSource::RequestRefreshFrame() {
manager_->RequestRefreshFrame(session_id_);
}
-
void LocalVideoCapturerSource::StopCapture() {
DVLOG(3) << __FUNCTION__;
DCHECK(thread_checker_.CalledOnValidThread());
@@ -393,14 +393,16 @@ void LocalVideoCapturerSource::OnDeviceSupportedFormatsEnumerated(
MediaStreamVideoCapturerSource::MediaStreamVideoCapturerSource(
const SourceStoppedCallback& stop_callback,
std::unique_ptr<media::VideoCapturerSource> source)
- : source_(std::move(source)) {
+ : source_(std::move(source)), render_frame_(nullptr) {
SetStopCallback(stop_callback);
}
MediaStreamVideoCapturerSource::MediaStreamVideoCapturerSource(
const SourceStoppedCallback& stop_callback,
- const StreamDeviceInfo& device_info)
- : source_(new LocalVideoCapturerSource(device_info)) {
+ const StreamDeviceInfo& device_info,
+ RenderFrame* render_frame)
+ : source_(new LocalVideoCapturerSource(device_info)),
+ render_frame_(render_frame) {
SetStopCallback(stop_callback);
SetDeviceInfo(device_info);
}
@@ -412,6 +414,13 @@ void MediaStreamVideoCapturerSource::RequestRefreshFrame() {
source_->RequestRefreshFrame();
}
+void MediaStreamVideoCapturerSource::SetCapturingLinkSecured(bool is_secure) {
+ if (render_frame_) {
miu 2016/05/06 18:56:22 If this class extends RenderFrameObserver, all the
xjz 2016/05/06 22:08:45 Done.
+ render_frame_->Send(new MediaStreamHostMsg_SetCapturingLinkSecured(
+ device_info().session_id, device_info().device.type, is_secure));
+ }
+}
+
void MediaStreamVideoCapturerSource::GetCurrentSupportedFormats(
int max_requested_width,
int max_requested_height,

Powered by Google App Engine
This is Rietveld 408576698