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/browser/aw_web_contents_delegate.h" | 5 #include "android_webview/browser/aw_web_contents_delegate.h" |
6 | 6 |
7 #include "android_webview/browser/aw_contents.h" | 7 #include "android_webview/browser/aw_contents.h" |
8 #include "android_webview/browser/aw_contents_io_thread_client.h" | 8 #include "android_webview/browser/aw_contents_io_thread_client.h" |
9 #include "android_webview/browser/aw_javascript_dialog_manager.h" | 9 #include "android_webview/browser/aw_javascript_dialog_manager.h" |
10 #include "android_webview/browser/find_helper.h" | 10 #include "android_webview/browser/find_helper.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 } | 175 } |
176 | 176 |
177 // Notifies the delegate about the creation of a new WebContents. This | 177 // Notifies the delegate about the creation of a new WebContents. This |
178 // typically happens when popups are created. | 178 // typically happens when popups are created. |
179 void AwWebContentsDelegate::WebContentsCreated( | 179 void AwWebContentsDelegate::WebContentsCreated( |
180 WebContents* source_contents, | 180 WebContents* source_contents, |
181 int opener_render_process_id, | 181 int opener_render_process_id, |
182 int opener_render_frame_id, | 182 int opener_render_frame_id, |
183 const std::string& frame_name, | 183 const std::string& frame_name, |
184 const GURL& target_url, | 184 const GURL& target_url, |
185 content::WebContents* new_contents) { | 185 content::WebContents* new_contents, |
| 186 const base::Optional<content::WebContents::CreateParams>& create_params) { |
186 AwContentsIoThreadClient::RegisterPendingContents(new_contents); | 187 AwContentsIoThreadClient::RegisterPendingContents(new_contents); |
187 } | 188 } |
188 | 189 |
189 void AwWebContentsDelegate::CloseContents(WebContents* source) { | 190 void AwWebContentsDelegate::CloseContents(WebContents* source) { |
190 JNIEnv* env = AttachCurrentThread(); | 191 JNIEnv* env = AttachCurrentThread(); |
191 | 192 |
192 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); | 193 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); |
193 if (java_delegate.obj()) { | 194 if (java_delegate.obj()) { |
194 Java_AwWebContentsDelegate_closeContents(env, java_delegate); | 195 Java_AwWebContentsDelegate_closeContents(env, java_delegate); |
195 } | 196 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 DVLOG(0) << "File Chooser result: mode = " << mode | 310 DVLOG(0) << "File Chooser result: mode = " << mode |
310 << ", file paths = " << base::JoinString(file_path_str, ":"); | 311 << ", file paths = " << base::JoinString(file_path_str, ":"); |
311 rfh->FilesSelectedInChooser(files, mode); | 312 rfh->FilesSelectedInChooser(files, mode); |
312 } | 313 } |
313 | 314 |
314 bool RegisterAwWebContentsDelegate(JNIEnv* env) { | 315 bool RegisterAwWebContentsDelegate(JNIEnv* env) { |
315 return RegisterNativesImpl(env); | 316 return RegisterNativesImpl(env); |
316 } | 317 } |
317 | 318 |
318 } // namespace android_webview | 319 } // namespace android_webview |
OLD | NEW |