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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 params.title.empty() ? NULL : | 118 params.title.empty() ? NULL : |
119 ConvertUTF16ToJavaString(env, params.title).obj(), | 119 ConvertUTF16ToJavaString(env, params.title).obj(), |
120 params.default_file_name.empty() ? NULL : | 120 params.default_file_name.empty() ? NULL : |
121 ConvertUTF8ToJavaString(env, params.default_file_name.value()).obj(), | 121 ConvertUTF8ToJavaString(env, params.default_file_name.value()).obj(), |
122 params.capture); | 122 params.capture); |
123 } | 123 } |
124 | 124 |
125 void AwWebContentsDelegate::AddNewContents(WebContents* source, | 125 void AwWebContentsDelegate::AddNewContents(WebContents* source, |
126 WebContents* new_contents, | 126 WebContents* new_contents, |
127 WindowOpenDisposition disposition, | 127 WindowOpenDisposition disposition, |
128 const gfx::Rect& initial_pos, | 128 const gfx::Rect& initial_rect, |
129 bool user_gesture, | 129 bool user_gesture, |
130 bool* was_blocked) { | 130 bool* was_blocked) { |
131 JNIEnv* env = AttachCurrentThread(); | 131 JNIEnv* env = AttachCurrentThread(); |
132 | 132 |
133 bool is_dialog = disposition == NEW_POPUP; | 133 bool is_dialog = disposition == NEW_POPUP; |
134 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); | 134 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env); |
135 bool create_popup = false; | 135 bool create_popup = false; |
136 | 136 |
137 if (java_delegate.obj()) { | 137 if (java_delegate.obj()) { |
138 create_popup = Java_AwWebContentsDelegate_addNewContents(env, | 138 create_popup = Java_AwWebContentsDelegate_addNewContents(env, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 DVLOG(0) << "File Chooser result: mode = " << mode | 268 DVLOG(0) << "File Chooser result: mode = " << mode |
269 << ", file paths = " << JoinString(file_path_str, ":"); | 269 << ", file paths = " << JoinString(file_path_str, ":"); |
270 rvh->FilesSelectedInChooser(files, mode); | 270 rvh->FilesSelectedInChooser(files, mode); |
271 } | 271 } |
272 | 272 |
273 bool RegisterAwWebContentsDelegate(JNIEnv* env) { | 273 bool RegisterAwWebContentsDelegate(JNIEnv* env) { |
274 return RegisterNativesImpl(env); | 274 return RegisterNativesImpl(env); |
275 } | 275 } |
276 | 276 |
277 } // namespace android_webview | 277 } // namespace android_webview |
OLD | NEW |