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

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

Issue 1672103002: Pass the frame instead of the WebContents through RunBluetoothChooser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@doc-bubble-lifetimes
Patch Set: Sync Created 4 years, 10 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 LoadProgressChanged(source, has_stopped ? 1 : 0); 116 LoadProgressChanged(source, has_stopped ? 1 : 0);
117 } 117 }
118 118
119 void TabWebContentsDelegateAndroid::RunFileChooser( 119 void TabWebContentsDelegateAndroid::RunFileChooser(
120 WebContents* web_contents, 120 WebContents* web_contents,
121 const FileChooserParams& params) { 121 const FileChooserParams& params) {
122 FileSelectHelper::RunFileChooser(web_contents, params); 122 FileSelectHelper::RunFileChooser(web_contents, params);
123 } 123 }
124 124
125 scoped_ptr<BluetoothChooser> TabWebContentsDelegateAndroid::RunBluetoothChooser( 125 scoped_ptr<BluetoothChooser> TabWebContentsDelegateAndroid::RunBluetoothChooser(
126 content::WebContents* web_contents, 126 content::RenderFrameHost* frame,
127 const BluetoothChooser::EventHandler& event_handler, 127 const BluetoothChooser::EventHandler& event_handler,
128 const url::Origin& origin) { 128 const url::Origin& origin) {
129 return make_scoped_ptr( 129 return make_scoped_ptr(
130 new BluetoothChooserAndroid(web_contents, event_handler, origin)); 130 new BluetoothChooserAndroid(frame, event_handler, origin));
131 } 131 }
132 132
133 void TabWebContentsDelegateAndroid::CloseContents( 133 void TabWebContentsDelegateAndroid::CloseContents(
134 WebContents* web_contents) { 134 WebContents* web_contents) {
135 // Prevent dangling registrations assigned to closed web contents. 135 // Prevent dangling registrations assigned to closed web contents.
136 if (notification_registrar_.IsRegistered(this, 136 if (notification_registrar_.IsRegistered(this,
137 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, 137 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
138 content::Source<WebContents>(web_contents))) { 138 content::Source<WebContents>(web_contents))) {
139 notification_registrar_.Remove(this, 139 notification_registrar_.Remove(this,
140 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, 140 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE,
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 jboolean IsCapturingVideo(JNIEnv* env, 483 jboolean IsCapturingVideo(JNIEnv* env,
484 const JavaParamRef<jclass>& clazz, 484 const JavaParamRef<jclass>& clazz,
485 const JavaParamRef<jobject>& java_web_contents) { 485 const JavaParamRef<jobject>& java_web_contents) {
486 content::WebContents* web_contents = 486 content::WebContents* web_contents =
487 content::WebContents::FromJavaWebContents(java_web_contents); 487 content::WebContents::FromJavaWebContents(java_web_contents);
488 scoped_refptr<MediaStreamCaptureIndicator> indicator = 488 scoped_refptr<MediaStreamCaptureIndicator> indicator =
489 MediaCaptureDevicesDispatcher::GetInstance()-> 489 MediaCaptureDevicesDispatcher::GetInstance()->
490 GetMediaStreamCaptureIndicator(); 490 GetMediaStreamCaptureIndicator();
491 return indicator->IsCapturingVideo(web_contents); 491 return indicator->IsCapturingVideo(web_contents);
492 } 492 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698