| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 void AwWebContentsDelegate::ActivateContents(WebContents* contents) { | 182 void AwWebContentsDelegate::ActivateContents(WebContents* contents) { |
| 183 JNIEnv* env = AttachCurrentThread(); | 183 JNIEnv* env = AttachCurrentThread(); |
| 184 | 184 |
| 185 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); | 185 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); |
| 186 if (java_delegate.obj()) { | 186 if (java_delegate.obj()) { |
| 187 Java_AwWebContentsDelegate_activateContents(env, java_delegate.obj()); | 187 Java_AwWebContentsDelegate_activateContents(env, java_delegate.obj()); |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 void AwWebContentsDelegate::RequestProtectedMediaIdentifierPermission( | |
| 192 const content::WebContents* web_contents, | |
| 193 const GURL& frame_url, | |
| 194 const base::Callback<void(bool)>& callback) { | |
| 195 NOTIMPLEMENTED(); | |
| 196 } | |
| 197 | |
| 198 static void FilesSelectedInChooser( | 191 static void FilesSelectedInChooser( |
| 199 JNIEnv* env, jclass clazz, | 192 JNIEnv* env, jclass clazz, |
| 200 jint process_id, jint render_id, jint mode_flags, | 193 jint process_id, jint render_id, jint mode_flags, |
| 201 jobjectArray file_paths) { | 194 jobjectArray file_paths) { |
| 202 content::RenderViewHost* rvh = content::RenderViewHost::FromID(process_id, | 195 content::RenderViewHost* rvh = content::RenderViewHost::FromID(process_id, |
| 203 render_id); | 196 render_id); |
| 204 if (!rvh) | 197 if (!rvh) |
| 205 return; | 198 return; |
| 206 | 199 |
| 207 std::vector<std::string> file_path_str; | 200 std::vector<std::string> file_path_str; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 228 DVLOG(0) << "File Chooser result: mode = " << mode | 221 DVLOG(0) << "File Chooser result: mode = " << mode |
| 229 << ", file paths = " << JoinString(file_path_str, ":"); | 222 << ", file paths = " << JoinString(file_path_str, ":"); |
| 230 rvh->FilesSelectedInChooser(files, mode); | 223 rvh->FilesSelectedInChooser(files, mode); |
| 231 } | 224 } |
| 232 | 225 |
| 233 bool RegisterAwWebContentsDelegate(JNIEnv* env) { | 226 bool RegisterAwWebContentsDelegate(JNIEnv* env) { |
| 234 return RegisterNativesImpl(env); | 227 return RegisterNativesImpl(env); |
| 235 } | 228 } |
| 236 | 229 |
| 237 } // namespace android_webview | 230 } // namespace android_webview |
| OLD | NEW |