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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 if (was_blocked) { | 157 if (was_blocked) { |
158 *was_blocked = !create_popup; | 158 *was_blocked = !create_popup; |
159 } | 159 } |
160 } | 160 } |
161 | 161 |
162 // Notifies the delegate about the creation of a new WebContents. This | 162 // Notifies the delegate about the creation of a new WebContents. This |
163 // typically happens when popups are created. | 163 // typically happens when popups are created. |
164 void AwWebContentsDelegate::WebContentsCreated( | 164 void AwWebContentsDelegate::WebContentsCreated( |
165 WebContents* source_contents, | 165 WebContents* source_contents, |
166 int64 source_frame_id, | 166 int64 source_frame_id, |
167 const string16& frame_name, | 167 const base::string16& frame_name, |
168 const GURL& target_url, | 168 const GURL& target_url, |
169 content::WebContents* new_contents) { | 169 content::WebContents* new_contents) { |
170 AwContentsIoThreadClientImpl::RegisterPendingContents(new_contents); | 170 AwContentsIoThreadClientImpl::RegisterPendingContents(new_contents); |
171 } | 171 } |
172 | 172 |
173 void AwWebContentsDelegate::CloseContents(WebContents* source) { | 173 void AwWebContentsDelegate::CloseContents(WebContents* source) { |
174 JNIEnv* env = AttachCurrentThread(); | 174 JNIEnv* env = AttachCurrentThread(); |
175 | 175 |
176 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); | 176 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); |
177 if (java_delegate.obj()) { | 177 if (java_delegate.obj()) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 DVLOG(0) << "File Chooser result: mode = " << mode | 228 DVLOG(0) << "File Chooser result: mode = " << mode |
229 << ", file paths = " << JoinString(file_path_str, ":"); | 229 << ", file paths = " << JoinString(file_path_str, ":"); |
230 rvh->FilesSelectedInChooser(files, mode); | 230 rvh->FilesSelectedInChooser(files, mode); |
231 } | 231 } |
232 | 232 |
233 bool RegisterAwWebContentsDelegate(JNIEnv* env) { | 233 bool RegisterAwWebContentsDelegate(JNIEnv* env) { |
234 return RegisterNativesImpl(env); | 234 return RegisterNativesImpl(env); |
235 } | 235 } |
236 | 236 |
237 } // namespace android_webview | 237 } // namespace android_webview |
OLD | NEW |