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

Side by Side Diff: chrome/browser/tab_contents/tab_contents.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 2518 matching lines...) Expand 10 before | Expand all | Expand 10 after
2529 2529
2530 // Remove all infobars. 2530 // Remove all infobars.
2531 for (int i = infobar_delegate_count() - 1; i >=0 ; --i) 2531 for (int i = infobar_delegate_count() - 1; i >=0 ; --i)
2532 RemoveInfoBar(GetInfoBarDelegateAt(i)); 2532 RemoveInfoBar(GetInfoBarDelegateAt(i));
2533 2533
2534 // Tell the view that we've crashed so it can prepare the sad tab page. 2534 // Tell the view that we've crashed so it can prepare the sad tab page.
2535 // Only do this if we're not in browser shutdown, so that TabContents 2535 // Only do this if we're not in browser shutdown, so that TabContents
2536 // objects that are not in a browser (e.g., HTML dialogs) and thus are 2536 // objects that are not in a browser (e.g., HTML dialogs) and thus are
2537 // visible do not flash a sad tab page. 2537 // visible do not flash a sad tab page.
2538 if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) 2538 if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID)
2539 view_->OnTabCrashed(); 2539 view_->OnTabCrashed(status, error_code);
2540 2540
2541 // Hide any visible hung renderer warning for this web contents' process. 2541 // Hide any visible hung renderer warning for this web contents' process.
2542 hung_renderer_dialog::HideForTabContents(this); 2542 hung_renderer_dialog::HideForTabContents(this);
2543 } 2543 }
2544 2544
2545 void TabContents::RenderViewDeleted(RenderViewHost* rvh) { 2545 void TabContents::RenderViewDeleted(RenderViewHost* rvh) {
2546 NotificationService::current()->Notify( 2546 NotificationService::current()->Notify(
2547 NotificationType::RENDER_VIEW_HOST_DELETED, 2547 NotificationType::RENDER_VIEW_HOST_DELETED,
2548 Source<TabContents>(this), 2548 Source<TabContents>(this),
2549 Details<RenderViewHost>(rvh)); 2549 Details<RenderViewHost>(rvh));
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
3370 } 3370 }
3371 3371
3372 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 3372 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
3373 render_manager_.SwapInRenderViewHost(rvh); 3373 render_manager_.SwapInRenderViewHost(rvh);
3374 } 3374 }
3375 3375
3376 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 3376 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
3377 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 3377 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
3378 rwh_view->SetSize(view()->GetContainerSize()); 3378 rwh_view->SetSize(view()->GetContainerSize());
3379 } 3379 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698