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

Side by Side Diff: chrome/browser/android/tab_web_contents_delegate_android.cc

Issue 2353063005: Refactor ContentViewClient (1/6) (Closed)
Patch Set: fix tests Created 4 years, 2 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 return MediaCaptureDevicesDispatcher::GetInstance() 275 return MediaCaptureDevicesDispatcher::GetInstance()
276 ->CheckMediaAccessPermission(web_contents, security_origin, type); 276 ->CheckMediaAccessPermission(web_contents, security_origin, type);
277 } 277 }
278 278
279 void TabWebContentsDelegateAndroid::RequestMediaDecodePermission( 279 void TabWebContentsDelegateAndroid::RequestMediaDecodePermission(
280 content::WebContents* web_contents, 280 content::WebContents* web_contents,
281 const base::Callback<void(bool)>& callback) { 281 const base::Callback<void(bool)>& callback) {
282 MediaThrottleInfoBarDelegate::Create(web_contents, callback); 282 MediaThrottleInfoBarDelegate::Create(web_contents, callback);
283 } 283 }
284 284
285 ScopedJavaLocalRef<jobject>
286 TabWebContentsDelegateAndroid::GetContentVideoViewEmbedder() {
287 JNIEnv* env = base::android::AttachCurrentThread();
288 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
289 if (obj.is_null())
290 return ScopedJavaLocalRef<jobject>();
291
292 return Java_TabWebContentsDelegateAndroid_getContentVideoViewEmbedder(env, obj );
293 }
294
285 bool TabWebContentsDelegateAndroid::RequestPpapiBrokerPermission( 295 bool TabWebContentsDelegateAndroid::RequestPpapiBrokerPermission(
286 WebContents* web_contents, 296 WebContents* web_contents,
287 const GURL& url, 297 const GURL& url,
288 const base::FilePath& plugin_path, 298 const base::FilePath& plugin_path,
289 const base::Callback<void(bool)>& callback) { 299 const base::Callback<void(bool)>& callback) {
290 #if defined(ENABLE_PLUGINS) 300 #if defined(ENABLE_PLUGINS)
291 PepperBrokerInfoBarDelegate::Create( 301 PepperBrokerInfoBarDelegate::Create(
292 web_contents, url, plugin_path, callback); 302 web_contents, url, plugin_path, callback);
293 return true; 303 return true;
294 #else 304 #else
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 void NotifyStopped(JNIEnv* env, 489 void NotifyStopped(JNIEnv* env,
480 const JavaParamRef<jclass>& clazz, 490 const JavaParamRef<jclass>& clazz,
481 const JavaParamRef<jobject>& java_web_contents) { 491 const JavaParamRef<jobject>& java_web_contents) {
482 content::WebContents* web_contents = 492 content::WebContents* web_contents =
483 content::WebContents::FromJavaWebContents(java_web_contents); 493 content::WebContents::FromJavaWebContents(java_web_contents);
484 scoped_refptr<MediaStreamCaptureIndicator> indicator = 494 scoped_refptr<MediaStreamCaptureIndicator> indicator =
485 MediaCaptureDevicesDispatcher::GetInstance() 495 MediaCaptureDevicesDispatcher::GetInstance()
486 ->GetMediaStreamCaptureIndicator(); 496 ->GetMediaStreamCaptureIndicator();
487 indicator->NotifyStopped(web_contents); 497 indicator->NotifyStopped(web_contents);
488 } 498 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698