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

Unified Diff: chrome/browser/android/chrome_web_contents_delegate_android.cc

Issue 894003005: Revert "Load web contents after tab is created." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/chrome_web_contents_delegate_android.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/chrome_web_contents_delegate_android.cc
diff --git a/chrome/browser/android/chrome_web_contents_delegate_android.cc b/chrome/browser/android/chrome_web_contents_delegate_android.cc
index 0372797ae584d71372a321b84118b90550ff47e9..038a27467b9ea005d6f39a9f75e796aebcea2c0c 100644
--- a/chrome/browser/android/chrome_web_contents_delegate_android.cc
+++ b/chrome/browser/android/chrome_web_contents_delegate_android.cc
@@ -320,8 +320,7 @@ void ChromeWebContentsDelegateAndroid::AddNewContents(
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
- AddWebContentsResult add_result =
- ADD_WEB_CONTENTS_RESULT_STOP_LOAD_AND_DELETE;
+ bool handled = false;
if (!obj.is_null()) {
ScopedJavaLocalRef<jobject> jsource;
if (source)
@@ -330,21 +329,19 @@ void ChromeWebContentsDelegateAndroid::AddNewContents(
if (new_contents)
jnew_contents = new_contents->GetJavaWebContents();
- add_result = static_cast<AddWebContentsResult>(
- Java_ChromeWebContentsDelegateAndroid_addNewContents(
- env,
- obj.obj(),
- jsource.obj(),
- jnew_contents.obj(),
- static_cast<jint>(disposition),
- NULL,
- user_gesture));
+ handled = Java_ChromeWebContentsDelegateAndroid_addNewContents(
+ env,
+ obj.obj(),
+ jsource.obj(),
+ jnew_contents.obj(),
+ static_cast<jint>(disposition),
+ NULL,
+ user_gesture);
}
if (was_blocked)
- *was_blocked = !(add_result == ADD_WEB_CONTENTS_RESULT_PROCEED);
-
- if (add_result == ADD_WEB_CONTENTS_RESULT_STOP_LOAD_AND_DELETE)
+ *was_blocked = !handled;
+ if (!handled)
delete new_contents;
}
« no previous file with comments | « chrome/browser/android/chrome_web_contents_delegate_android.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698