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

Side by Side 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 unified diff | Download patch
OLDNEW
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 ->OnRendererResponsive(); 442 ->OnRendererResponsive();
443 infobar_service->RemoveInfoBar(hung_renderer_infobar); 443 infobar_service->RemoveInfoBar(hung_renderer_infobar);
444 } 444 }
445 445
446 jboolean IsCapturingAudio(JNIEnv* env, 446 jboolean IsCapturingAudio(JNIEnv* env,
447 const JavaParamRef<jclass>& clazz, 447 const JavaParamRef<jclass>& clazz,
448 const JavaParamRef<jobject>& java_web_contents) { 448 const JavaParamRef<jobject>& java_web_contents) {
449 content::WebContents* web_contents = 449 content::WebContents* web_contents =
450 content::WebContents::FromJavaWebContents(java_web_contents); 450 content::WebContents::FromJavaWebContents(java_web_contents);
451 scoped_refptr<MediaStreamCaptureIndicator> indicator = 451 scoped_refptr<MediaStreamCaptureIndicator> indicator =
452 MediaCaptureDevicesDispatcher::GetInstance()-> 452 MediaCaptureDevicesDispatcher::GetInstance()
453 GetMediaStreamCaptureIndicator(); 453 ->GetMediaStreamCaptureIndicator();
454 return indicator->IsCapturingAudio(web_contents); 454 return indicator->IsCapturingAudio(web_contents);
455 } 455 }
456 456
457 jboolean IsCapturingVideo(JNIEnv* env, 457 jboolean IsCapturingVideo(JNIEnv* env,
458 const JavaParamRef<jclass>& clazz, 458 const JavaParamRef<jclass>& clazz,
459 const JavaParamRef<jobject>& java_web_contents) { 459 const JavaParamRef<jobject>& java_web_contents) {
460 content::WebContents* web_contents = 460 content::WebContents* web_contents =
461 content::WebContents::FromJavaWebContents(java_web_contents); 461 content::WebContents::FromJavaWebContents(java_web_contents);
462 scoped_refptr<MediaStreamCaptureIndicator> indicator = 462 scoped_refptr<MediaStreamCaptureIndicator> indicator =
463 MediaCaptureDevicesDispatcher::GetInstance()-> 463 MediaCaptureDevicesDispatcher::GetInstance()
464 GetMediaStreamCaptureIndicator(); 464 ->GetMediaStreamCaptureIndicator();
465 return indicator->IsCapturingVideo(web_contents); 465 return indicator->IsCapturingVideo(web_contents);
466 } 466 }
467
468 jboolean IsCapturingScreen(JNIEnv* env,
469 const JavaParamRef<jclass>& clazz,
470 const JavaParamRef<jobject>& java_web_contents) {
471 content::WebContents* web_contents =
472 content::WebContents::FromJavaWebContents(java_web_contents);
473 scoped_refptr<MediaStreamCaptureIndicator> indicator =
474 MediaCaptureDevicesDispatcher::GetInstance()
475 ->GetMediaStreamCaptureIndicator();
476 return indicator->IsBeingMirrored(web_contents);
477 }
478
479 void NotifyStopped(JNIEnv* env,
480 const JavaParamRef<jclass>& clazz,
481 const JavaParamRef<jobject>& java_web_contents) {
482 content::WebContents* web_contents =
483 content::WebContents::FromJavaWebContents(java_web_contents);
484 scoped_refptr<MediaStreamCaptureIndicator> indicator =
485 MediaCaptureDevicesDispatcher::GetInstance()
486 ->GetMediaStreamCaptureIndicator();
487 indicator->NotifyStopped(web_contents);
488 }
OLDNEW
« 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