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

Unified Diff: chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc

Issue 6053012: This adds a "killed tab" page and pages reload when killed on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pre-review tweaks Created 9 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
Index: chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc
index 3d0db151d1fc7134ceda3f4da4593cc2a583eeb3..b34b25d8db18a4c5b36de60c3b86032d496f3c52 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_gtk.cc
@@ -239,7 +239,8 @@ void TabContentsViewGtk::SetPageTitle(const std::wstring& title) {
gdk_window_set_title(content_view->window, WideToUTF8(title).c_str());
}
-void TabContentsViewGtk::OnTabCrashed() {
+void TabContentsViewGtk::OnTabCrashed(base::TerminationStatus /* status */,
+ int /* error_code */) {
}
void TabContentsViewGtk::SizeContents(const gfx::Size& size) {
@@ -394,7 +395,12 @@ gboolean TabContentsViewGtk::OnPaint(GtkWidget* widget, GdkEventExpose* event) {
if (tab_contents()->render_view_host() &&
!tab_contents()->render_view_host()->IsRenderViewLive()) {
if (sad_tab_ == NULL) {
- sad_tab_ = new SadTabView(tab_contents());
+ base::TerminationStatus status =
+ tab_contents()->render_view_host()->render_view_termination_status();
+ SadTabView::Kind kind =
+ status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED ?
+ SadTabView::KILLED : SadTabView::CRASHED;
+ sad_tab_ = new SadTabView(tab_contents(), kind);
SetContentsView(sad_tab_);
}
gfx::Rect bounds;

Powered by Google App Engine
This is Rietveld 408576698