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

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

Issue 1299513002: [Android] Add support for a hung renderer dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
Index: chrome/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index ab3a25c7059ce91a032b1e5667febeb75dcfae2f..83471cfd7a84d84764ffb6fc85ab3f731b8b25d8 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -68,6 +68,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/result_codes.h"
#include "content/public/common/top_controls_state.h"
#include "jni/Tab_jni.h"
#include "net/base/escape.h"
@@ -794,6 +795,12 @@ bool TabAndroid::HasPrerenderedUrl(JNIEnv* env, jobject obj, jstring url) {
return HasPrerenderedUrl(gurl);
}
+void TabAndroid::ShutdownHungRenderer(JNIEnv* env, jobject obj) {
+ DCHECK(web_contents());
+ content::RenderProcessHost* process = web_contents()->GetRenderProcessHost();
+ process->Shutdown(content::RESULT_CODE_HUNG, false);
+}
+
namespace {
class ChromeInterceptNavigationDelegate : public InterceptNavigationDelegate {

Powered by Google App Engine
This is Rietveld 408576698