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

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: UI tweaking and rebase Created 4 years, 4 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 jboolean IsCapturingVideo(JNIEnv* env, 477 jboolean IsCapturingVideo(JNIEnv* env,
478 const JavaParamRef<jclass>& clazz, 478 const JavaParamRef<jclass>& clazz,
479 const JavaParamRef<jobject>& java_web_contents) { 479 const JavaParamRef<jobject>& java_web_contents) {
480 content::WebContents* web_contents = 480 content::WebContents* web_contents =
481 content::WebContents::FromJavaWebContents(java_web_contents); 481 content::WebContents::FromJavaWebContents(java_web_contents);
482 scoped_refptr<MediaStreamCaptureIndicator> indicator = 482 scoped_refptr<MediaStreamCaptureIndicator> indicator =
483 MediaCaptureDevicesDispatcher::GetInstance()-> 483 MediaCaptureDevicesDispatcher::GetInstance()->
484 GetMediaStreamCaptureIndicator(); 484 GetMediaStreamCaptureIndicator();
485 return indicator->IsCapturingVideo(web_contents); 485 return indicator->IsCapturingVideo(web_contents);
486 } 486 }
487
488 jboolean IsCapturingScreen(JNIEnv* env,
489 const JavaParamRef<jclass>& clazz,
490 const JavaParamRef<jobject>& java_web_contents) {
491 content::WebContents* web_contents =
492 content::WebContents::FromJavaWebContents(java_web_contents);
493 scoped_refptr<MediaStreamCaptureIndicator> indicator =
494 MediaCaptureDevicesDispatcher::GetInstance()
495 ->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.
496 return indicator->IsBeingMirrored(web_contents);
497 }
498
499 void NotifyStopped(JNIEnv* env,
500 const JavaParamRef<jclass>& clazz,
501 const JavaParamRef<jobject>& java_web_contents) {
502 content::WebContents* web_contents =
503 content::WebContents::FromJavaWebContents(java_web_contents);
504 scoped_refptr<MediaStreamCaptureIndicator> indicator =
505 MediaCaptureDevicesDispatcher::GetInstance()
506 ->GetMediaStreamCaptureIndicator();
507 return indicator->NotifyStopped(web_contents);
508 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698