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 d27dd7bbfd39f78f1d91b7096e4e9fd5c653fb31..b75ef28ae529c87add97b602c50950e735e47860 100644 |
--- a/chrome/browser/android/tab_web_contents_delegate_android.cc |
+++ b/chrome/browser/android/tab_web_contents_delegate_android.cc |
@@ -484,3 +484,25 @@ jboolean IsCapturingVideo(JNIEnv* env, |
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(); |
gone
2016/08/10 19:04:03
Pull this code out instead of duplicating it four
braveyao
2016/08/12 23:37:44
As discussed offline, keep it as is.
|
+ 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(); |
+ return indicator->NotifyStopped(web_contents); |
+} |