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

Unified Diff: chrome/browser/ui/views/tab_contents/tab_contents_view_win.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: Fixed indent 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
« no previous file with comments | « chrome/browser/ui/views/tab_contents/tab_contents_view_win.h ('k') | chrome/common/about_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc
index ca93676527be8482a32eed0a16474549898adf7a..52ad4ba5cccd90be7eb2faba01ecb085f548e1d4 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_win.cc
@@ -155,7 +155,8 @@ void TabContentsViewWin::SetPageTitle(const std::wstring& title) {
}
}
-void TabContentsViewWin::OnTabCrashed() {
+void TabContentsViewWin::OnTabCrashed(base::TerminationStatus /* status */,
+ int /* error_code */) {
// Force an invalidation to render sad tab. We will notice we crashed when we
// paint.
// Note that it's possible to get this message after the window was destroyed.
@@ -398,7 +399,12 @@ void TabContentsViewWin::OnPaint(HDC junk_dc) {
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_);
}
CRect cr;
« no previous file with comments | « chrome/browser/ui/views/tab_contents/tab_contents_view_win.h ('k') | chrome/common/about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698