| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "android_webview/native/aw_web_contents_delegate.h" | 5 #include "android_webview/native/aw_web_contents_delegate.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_javascript_dialog_manager.h" | 7 #include "android_webview/browser/aw_javascript_dialog_manager.h" |
| 8 #include "android_webview/browser/find_helper.h" | 8 #include "android_webview/browser/find_helper.h" |
| 9 #include "android_webview/native/aw_contents.h" | 9 #include "android_webview/native/aw_contents.h" |
| 10 #include "android_webview/native/aw_contents_io_thread_client_impl.h" | 10 #include "android_webview/native/aw_contents_io_thread_client_impl.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 callback.Run(content::MediaStreamDevices(), | 201 callback.Run(content::MediaStreamDevices(), |
| 202 content::MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN, | 202 content::MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN, |
| 203 scoped_ptr<content::MediaStreamUI>().Pass()); | 203 scoped_ptr<content::MediaStreamUI>().Pass()); |
| 204 return; | 204 return; |
| 205 } | 205 } |
| 206 aw_contents->GetPermissionRequestHandler()->SendRequest( | 206 aw_contents->GetPermissionRequestHandler()->SendRequest( |
| 207 scoped_ptr<AwPermissionRequestDelegate>( | 207 scoped_ptr<AwPermissionRequestDelegate>( |
| 208 new MediaAccessPermissionRequest(request, callback))); | 208 new MediaAccessPermissionRequest(request, callback))); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void AwWebContentsDelegate::EnterFullscreenModeForTab( |
| 212 content::WebContents* web_contents, const GURL& origin) { |
| 213 ToggleFullscreenModeForTab(web_contents, true); |
| 214 } |
| 215 |
| 216 void AwWebContentsDelegate::ExitFullscreenModeForTab( |
| 217 content::WebContents* web_contents) { |
| 218 ToggleFullscreenModeForTab(web_contents, false); |
| 219 } |
| 220 |
| 211 void AwWebContentsDelegate::ToggleFullscreenModeForTab( | 221 void AwWebContentsDelegate::ToggleFullscreenModeForTab( |
| 212 content::WebContents* web_contents, bool enter_fullscreen) { | 222 content::WebContents* web_contents, bool enter_fullscreen) { |
| 213 JNIEnv* env = AttachCurrentThread(); | 223 JNIEnv* env = AttachCurrentThread(); |
| 214 | 224 |
| 215 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); | 225 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); |
| 216 if (java_delegate.obj()) { | 226 if (java_delegate.obj()) { |
| 217 Java_AwWebContentsDelegate_toggleFullscreenModeForTab( | 227 Java_AwWebContentsDelegate_toggleFullscreenModeForTab( |
| 218 env, java_delegate.obj(), enter_fullscreen); | 228 env, java_delegate.obj(), enter_fullscreen); |
| 219 } | 229 } |
| 220 is_fullscreen_ = enter_fullscreen; | 230 is_fullscreen_ = enter_fullscreen; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 DVLOG(0) << "File Chooser result: mode = " << mode | 277 DVLOG(0) << "File Chooser result: mode = " << mode |
| 268 << ", file paths = " << JoinString(file_path_str, ":"); | 278 << ", file paths = " << JoinString(file_path_str, ":"); |
| 269 rvh->FilesSelectedInChooser(files, mode); | 279 rvh->FilesSelectedInChooser(files, mode); |
| 270 } | 280 } |
| 271 | 281 |
| 272 bool RegisterAwWebContentsDelegate(JNIEnv* env) { | 282 bool RegisterAwWebContentsDelegate(JNIEnv* env) { |
| 273 return RegisterNativesImpl(env); | 283 return RegisterNativesImpl(env); |
| 274 } | 284 } |
| 275 | 285 |
| 276 } // namespace android_webview | 286 } // namespace android_webview |
| OLD | NEW |