Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: android_webview/native/aw_web_contents_delegate.cc

Issue 970883002: [Android WebView] Synthesize a fake page loading event on page source modification (Re-land) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed findbugs warning Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // DeleteSoon as WebContentsImpl may call methods on |new_contents| 156 // DeleteSoon as WebContentsImpl may call methods on |new_contents|
157 // after this method returns. 157 // after this method returns.
158 base::MessageLoop::current()->DeleteSoon(FROM_HERE, new_contents); 158 base::MessageLoop::current()->DeleteSoon(FROM_HERE, new_contents);
159 } 159 }
160 160
161 if (was_blocked) { 161 if (was_blocked) {
162 *was_blocked = !create_popup; 162 *was_blocked = !create_popup;
163 } 163 }
164 } 164 }
165 165
166 void AwWebContentsDelegate::NavigationStateChanged(
167 content::WebContents* source,
168 content::InvalidateTypes changed_flags) {
169 JNIEnv* env = AttachCurrentThread();
170
171 ScopedJavaLocalRef<jobject> java_delegate = GetJavaDelegate(env);
172 if (java_delegate.obj()) {
173 Java_AwWebContentsDelegate_navigationStateChanged(env, java_delegate.obj(),
174 changed_flags);
175 }
176 }
177
166 // Notifies the delegate about the creation of a new WebContents. This 178 // Notifies the delegate about the creation of a new WebContents. This
167 // typically happens when popups are created. 179 // typically happens when popups are created.
168 void AwWebContentsDelegate::WebContentsCreated( 180 void AwWebContentsDelegate::WebContentsCreated(
169 WebContents* source_contents, 181 WebContents* source_contents,
170 int opener_render_frame_id, 182 int opener_render_frame_id,
171 const base::string16& frame_name, 183 const base::string16& frame_name,
172 const GURL& target_url, 184 const GURL& target_url,
173 content::WebContents* new_contents) { 185 content::WebContents* new_contents) {
174 AwContentsIoThreadClientImpl::RegisterPendingContents(new_contents); 186 AwContentsIoThreadClientImpl::RegisterPendingContents(new_contents);
175 } 187 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 DVLOG(0) << "File Chooser result: mode = " << mode 280 DVLOG(0) << "File Chooser result: mode = " << mode
269 << ", file paths = " << JoinString(file_path_str, ":"); 281 << ", file paths = " << JoinString(file_path_str, ":");
270 rvh->FilesSelectedInChooser(files, mode); 282 rvh->FilesSelectedInChooser(files, mode);
271 } 283 }
272 284
273 bool RegisterAwWebContentsDelegate(JNIEnv* env) { 285 bool RegisterAwWebContentsDelegate(JNIEnv* env) {
274 return RegisterNativesImpl(env); 286 return RegisterNativesImpl(env);
275 } 287 }
276 288
277 } // namespace android_webview 289 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_web_contents_delegate.h ('k') | chrome/android/java/src/org/chromium/chrome/browser/Tab.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698