OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/android/tab_web_contents_delegate_android.h" | 5 #include "chrome/browser/android/tab_web_contents_delegate_android.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 jboolean IsCapturingVideo(JNIEnv* env, | 476 jboolean IsCapturingVideo(JNIEnv* env, |
477 const JavaParamRef<jclass>& clazz, | 477 const JavaParamRef<jclass>& clazz, |
478 const JavaParamRef<jobject>& java_web_contents) { | 478 const JavaParamRef<jobject>& java_web_contents) { |
479 content::WebContents* web_contents = | 479 content::WebContents* web_contents = |
480 content::WebContents::FromJavaWebContents(java_web_contents); | 480 content::WebContents::FromJavaWebContents(java_web_contents); |
481 scoped_refptr<MediaStreamCaptureIndicator> indicator = | 481 scoped_refptr<MediaStreamCaptureIndicator> indicator = |
482 MediaCaptureDevicesDispatcher::GetInstance()-> | 482 MediaCaptureDevicesDispatcher::GetInstance()-> |
483 GetMediaStreamCaptureIndicator(); | 483 GetMediaStreamCaptureIndicator(); |
484 return indicator->IsCapturingVideo(web_contents); | 484 return indicator->IsCapturingVideo(web_contents); |
485 } | 485 } |
| 486 |
| 487 jboolean IsCapturingScreen(JNIEnv* env, |
| 488 const JavaParamRef<jclass>& clazz, |
| 489 const JavaParamRef<jobject>& java_web_contents) { |
| 490 content::WebContents* web_contents = |
| 491 content::WebContents::FromJavaWebContents(java_web_contents); |
| 492 scoped_refptr<MediaStreamCaptureIndicator> indicator = |
| 493 MediaCaptureDevicesDispatcher::GetInstance() |
| 494 ->GetMediaStreamCaptureIndicator(); |
| 495 return indicator->IsBeingMirrored(web_contents); |
| 496 } |
| 497 |
| 498 void NotifyStopped(JNIEnv* env, |
| 499 const JavaParamRef<jclass>& clazz, |
| 500 const JavaParamRef<jobject>& java_web_contents) { |
| 501 content::WebContents* web_contents = |
| 502 content::WebContents::FromJavaWebContents(java_web_contents); |
| 503 scoped_refptr<MediaStreamCaptureIndicator> indicator = |
| 504 MediaCaptureDevicesDispatcher::GetInstance() |
| 505 ->GetMediaStreamCaptureIndicator(); |
| 506 return indicator->NotifyStopped(web_contents); |
| 507 } |
OLD | NEW |