| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 | 194 |
| 195 void AwWebContentsDelegate::RequestMediaAccessPermission( | 195 void AwWebContentsDelegate::RequestMediaAccessPermission( |
| 196 WebContents* web_contents, | 196 WebContents* web_contents, |
| 197 const content::MediaStreamRequest& request, | 197 const content::MediaStreamRequest& request, |
| 198 const content::MediaResponseCallback& callback) { | 198 const content::MediaResponseCallback& callback) { |
| 199 AwContents* aw_contents = AwContents::FromWebContents(web_contents); | 199 AwContents* aw_contents = AwContents::FromWebContents(web_contents); |
| 200 if (!aw_contents) { | 200 if (!aw_contents) { |
| 201 callback.Run(content::MediaStreamDevices(), | 201 callback.Run(content::MediaStreamDevices(), |
| 202 content::MEDIA_DEVICE_INVALID_STATE, | 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::ToggleFullscreenModeForTab( | 211 void AwWebContentsDelegate::ToggleFullscreenModeForTab( |
| 212 content::WebContents* web_contents, bool enter_fullscreen) { | 212 content::WebContents* web_contents, bool enter_fullscreen) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 DVLOG(0) << "File Chooser result: mode = " << mode | 266 DVLOG(0) << "File Chooser result: mode = " << mode |
| 267 << ", file paths = " << JoinString(file_path_str, ":"); | 267 << ", file paths = " << JoinString(file_path_str, ":"); |
| 268 rvh->FilesSelectedInChooser(files, mode); | 268 rvh->FilesSelectedInChooser(files, mode); |
| 269 } | 269 } |
| 270 | 270 |
| 271 bool RegisterAwWebContentsDelegate(JNIEnv* env) { | 271 bool RegisterAwWebContentsDelegate(JNIEnv* env) { |
| 272 return RegisterNativesImpl(env); | 272 return RegisterNativesImpl(env); |
| 273 } | 273 } |
| 274 | 274 |
| 275 } // namespace android_webview | 275 } // namespace android_webview |
| OLD | NEW |