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) { | |
187 AwContentsIoThreadClient::RegisterPendingContents(new_contents); | 186 AwContentsIoThreadClient::RegisterPendingContents(new_contents); |
188 } | 187 } |
189 | 188 |
190 void AwWebContentsDelegate::CloseContents(WebContents* source) { | 189 void AwWebContentsDelegate::CloseContents(WebContents* source) { |
191 JNIEnv* env = AttachCurrentThread(); | 190 JNIEnv* env = AttachCurrentThread(); |
192 | 191 |
193 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); | 192 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); |
194 if (java_delegate.obj()) { | 193 if (java_delegate.obj()) { |
195 Java_AwWebContentsDelegate_closeContents(env, java_delegate); | 194 Java_AwWebContentsDelegate_closeContents(env, java_delegate); |
196 } | 195 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 DVLOG(0) << "File Chooser result: mode = " << mode | 309 DVLOG(0) << "File Chooser result: mode = " << mode |
311 << ", file paths = " << base::JoinString(file_path_str, ":"); | 310 << ", file paths = " << base::JoinString(file_path_str, ":"); |
312 rfh->FilesSelectedInChooser(files, mode); | 311 rfh->FilesSelectedInChooser(files, mode); |
313 } | 312 } |
314 | 313 |
315 bool RegisterAwWebContentsDelegate(JNIEnv* env) { | 314 bool RegisterAwWebContentsDelegate(JNIEnv* env) { |
316 return RegisterNativesImpl(env); | 315 return RegisterNativesImpl(env); |
317 } | 316 } |
318 | 317 |
319 } // namespace android_webview | 318 } // namespace android_webview |
OLD | NEW |