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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 void AwWebContentsDelegate::CloseContents(WebContents* source) { | 189 void AwWebContentsDelegate::CloseContents(WebContents* source) { |
190 JNIEnv* env = AttachCurrentThread(); | 190 JNIEnv* env = AttachCurrentThread(); |
191 | 191 |
192 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); | 192 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); |
193 if (java_delegate.obj()) { | 193 if (java_delegate.obj()) { |
194 Java_AwWebContentsDelegate_closeContents(env, java_delegate.obj()); | 194 Java_AwWebContentsDelegate_closeContents(env, java_delegate.obj()); |
195 } | 195 } |
196 } | 196 } |
197 | 197 |
198 void AwWebContentsDelegate::ActivateContents(WebContents* contents) { | 198 void AwWebContentsDelegate::ActivateContents(WebContents* contents, |
| 199 bool user_gesture) { |
199 JNIEnv* env = AttachCurrentThread(); | 200 JNIEnv* env = AttachCurrentThread(); |
200 | 201 |
201 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); | 202 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); |
202 if (java_delegate.obj()) { | 203 if (java_delegate.obj()) { |
203 Java_AwWebContentsDelegate_activateContents(env, java_delegate.obj()); | 204 Java_AwWebContentsDelegate_activateContents(env, java_delegate.obj()); |
204 } | 205 } |
205 } | 206 } |
206 | 207 |
207 void AwWebContentsDelegate::LoadingStateChanged(WebContents* source, | 208 void AwWebContentsDelegate::LoadingStateChanged(WebContents* source, |
208 bool to_different_document) { | 209 bool to_different_document) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 DVLOG(0) << "File Chooser result: mode = " << mode | 293 DVLOG(0) << "File Chooser result: mode = " << mode |
293 << ", file paths = " << JoinString(file_path_str, ":"); | 294 << ", file paths = " << JoinString(file_path_str, ":"); |
294 rvh->FilesSelectedInChooser(files, mode); | 295 rvh->FilesSelectedInChooser(files, mode); |
295 } | 296 } |
296 | 297 |
297 bool RegisterAwWebContentsDelegate(JNIEnv* env) { | 298 bool RegisterAwWebContentsDelegate(JNIEnv* env) { |
298 return RegisterNativesImpl(env); | 299 return RegisterNativesImpl(env); |
299 } | 300 } |
300 | 301 |
301 } // namespace android_webview | 302 } // namespace android_webview |
OLD | NEW |