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

Unified Diff: chrome/browser/android/tab_web_contents_delegate_android.cc

Issue 2123863004: ScreenCapture for Android phase1, part II (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 3 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: chrome/browser/android/tab_web_contents_delegate_android.cc
diff --git a/chrome/browser/android/tab_web_contents_delegate_android.cc b/chrome/browser/android/tab_web_contents_delegate_android.cc
index 52704a0cb215517047541da985747de49242c2ac..03c84d77515bd70e021ca2261bbc65c517531b87 100644
--- a/chrome/browser/android/tab_web_contents_delegate_android.cc
+++ b/chrome/browser/android/tab_web_contents_delegate_android.cc
@@ -449,8 +449,8 @@ jboolean IsCapturingAudio(JNIEnv* env,
content::WebContents* web_contents =
content::WebContents::FromJavaWebContents(java_web_contents);
scoped_refptr<MediaStreamCaptureIndicator> indicator =
- MediaCaptureDevicesDispatcher::GetInstance()->
- GetMediaStreamCaptureIndicator();
+ MediaCaptureDevicesDispatcher::GetInstance()
+ ->GetMediaStreamCaptureIndicator();
return indicator->IsCapturingAudio(web_contents);
}
@@ -460,7 +460,29 @@ jboolean IsCapturingVideo(JNIEnv* env,
content::WebContents* web_contents =
content::WebContents::FromJavaWebContents(java_web_contents);
scoped_refptr<MediaStreamCaptureIndicator> indicator =
- MediaCaptureDevicesDispatcher::GetInstance()->
- GetMediaStreamCaptureIndicator();
+ MediaCaptureDevicesDispatcher::GetInstance()
+ ->GetMediaStreamCaptureIndicator();
return indicator->IsCapturingVideo(web_contents);
}
+
+jboolean IsCapturingScreen(JNIEnv* env,
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& java_web_contents) {
+ content::WebContents* web_contents =
+ content::WebContents::FromJavaWebContents(java_web_contents);
+ scoped_refptr<MediaStreamCaptureIndicator> indicator =
+ MediaCaptureDevicesDispatcher::GetInstance()
+ ->GetMediaStreamCaptureIndicator();
+ return indicator->IsBeingMirrored(web_contents);
+}
+
+void NotifyStopped(JNIEnv* env,
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& java_web_contents) {
+ content::WebContents* web_contents =
+ content::WebContents::FromJavaWebContents(java_web_contents);
+ scoped_refptr<MediaStreamCaptureIndicator> indicator =
+ MediaCaptureDevicesDispatcher::GetInstance()
+ ->GetMediaStreamCaptureIndicator();
+ indicator->NotifyStopped(web_contents);
+}
« no previous file with comments | « chrome/browser/android/chrome_feature_list.cc ('k') | chrome/browser/media/webrtc/media_stream_capture_indicator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698