| 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/find_helper.h" | 7 #include "android_webview/browser/find_helper.h" |
| 8 #include "android_webview/native/aw_contents.h" | 8 #include "android_webview/native/aw_contents.h" |
| 9 #include "android_webview/native/aw_javascript_dialog_manager.h" | 9 #include "android_webview/native/aw_javascript_dialog_manager.h" |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 return; | 47 return; |
| 48 | 48 |
| 49 aw_contents->GetFindHelper()->HandleFindReply(request_id, | 49 aw_contents->GetFindHelper()->HandleFindReply(request_id, |
| 50 number_of_matches, | 50 number_of_matches, |
| 51 active_match_ordinal, | 51 active_match_ordinal, |
| 52 final_update); | 52 final_update); |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool AwWebContentsDelegate::CanDownload(content::RenderViewHost* source, | 55 bool AwWebContentsDelegate::CanDownload(content::RenderViewHost* source, |
| 56 int request_id, | 56 int request_id, |
| 57 bool has_auth, |
| 57 const std::string& request_method) { | 58 const std::string& request_method) { |
| 58 // Android webview intercepts download in its resource dispatcher host | 59 // Android webview intercepts download in its resource dispatcher host |
| 59 // delegate, so should not reach here. | 60 // delegate, so should not reach here. |
| 60 NOTREACHED(); | 61 NOTREACHED(); |
| 61 return false; | 62 return false; |
| 62 } | 63 } |
| 63 | 64 |
| 64 void AwWebContentsDelegate::AddNewContents(content::WebContents* source, | 65 void AwWebContentsDelegate::AddNewContents(content::WebContents* source, |
| 65 content::WebContents* new_contents, | 66 content::WebContents* new_contents, |
| 66 WindowOpenDisposition disposition, | 67 WindowOpenDisposition disposition, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 if (java_delegate.obj()) { | 119 if (java_delegate.obj()) { |
| 119 Java_AwWebContentsDelegate_activateContents(env, java_delegate.obj()); | 120 Java_AwWebContentsDelegate_activateContents(env, java_delegate.obj()); |
| 120 } | 121 } |
| 121 } | 122 } |
| 122 | 123 |
| 123 bool RegisterAwWebContentsDelegate(JNIEnv* env) { | 124 bool RegisterAwWebContentsDelegate(JNIEnv* env) { |
| 124 return RegisterNativesImpl(env); | 125 return RegisterNativesImpl(env); |
| 125 } | 126 } |
| 126 | 127 |
| 127 } // namespace android_webview | 128 } // namespace android_webview |
| OLD | NEW |