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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 return make_scoped_ptr(new BluetoothChooserAndroid(frame, event_handler)); |
129 return make_scoped_ptr( | |
130 new BluetoothChooserAndroid(web_contents, event_handler, origin)); | |
131 } | 129 } |
132 | 130 |
133 void TabWebContentsDelegateAndroid::CloseContents( | 131 void TabWebContentsDelegateAndroid::CloseContents( |
134 WebContents* web_contents) { | 132 WebContents* web_contents) { |
135 // Prevent dangling registrations assigned to closed web contents. | 133 // Prevent dangling registrations assigned to closed web contents. |
136 if (notification_registrar_.IsRegistered(this, | 134 if (notification_registrar_.IsRegistered(this, |
137 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, | 135 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, |
138 content::Source<WebContents>(web_contents))) { | 136 content::Source<WebContents>(web_contents))) { |
139 notification_registrar_.Remove(this, | 137 notification_registrar_.Remove(this, |
140 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, | 138 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 jboolean IsCapturingVideo(JNIEnv* env, | 481 jboolean IsCapturingVideo(JNIEnv* env, |
484 const JavaParamRef<jclass>& clazz, | 482 const JavaParamRef<jclass>& clazz, |
485 const JavaParamRef<jobject>& java_web_contents) { | 483 const JavaParamRef<jobject>& java_web_contents) { |
486 content::WebContents* web_contents = | 484 content::WebContents* web_contents = |
487 content::WebContents::FromJavaWebContents(java_web_contents); | 485 content::WebContents::FromJavaWebContents(java_web_contents); |
488 scoped_refptr<MediaStreamCaptureIndicator> indicator = | 486 scoped_refptr<MediaStreamCaptureIndicator> indicator = |
489 MediaCaptureDevicesDispatcher::GetInstance()-> | 487 MediaCaptureDevicesDispatcher::GetInstance()-> |
490 GetMediaStreamCaptureIndicator(); | 488 GetMediaStreamCaptureIndicator(); |
491 return indicator->IsCapturingVideo(web_contents); | 489 return indicator->IsCapturingVideo(web_contents); |
492 } | 490 } |
OLD | NEW |