OLD | NEW |
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 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2522 | 2522 |
2523 // Remove all infobars. | 2523 // Remove all infobars. |
2524 for (int i = infobar_delegate_count() - 1; i >=0 ; --i) | 2524 for (int i = infobar_delegate_count() - 1; i >=0 ; --i) |
2525 RemoveInfoBar(GetInfoBarDelegateAt(i)); | 2525 RemoveInfoBar(GetInfoBarDelegateAt(i)); |
2526 | 2526 |
2527 // Tell the view that we've crashed so it can prepare the sad tab page. | 2527 // Tell the view that we've crashed so it can prepare the sad tab page. |
2528 // Only do this if we're not in browser shutdown, so that TabContents | 2528 // Only do this if we're not in browser shutdown, so that TabContents |
2529 // objects that are not in a browser (e.g., HTML dialogs) and thus are | 2529 // objects that are not in a browser (e.g., HTML dialogs) and thus are |
2530 // visible do not flash a sad tab page. | 2530 // visible do not flash a sad tab page. |
2531 if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) | 2531 if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) |
2532 view_->OnTabCrashed(); | 2532 view_->OnTabCrashed(status, error_code); |
2533 | 2533 |
2534 // Hide any visible hung renderer warning for this web contents' process. | 2534 // Hide any visible hung renderer warning for this web contents' process. |
2535 hung_renderer_dialog::HideForTabContents(this); | 2535 hung_renderer_dialog::HideForTabContents(this); |
2536 } | 2536 } |
2537 | 2537 |
2538 void TabContents::RenderViewDeleted(RenderViewHost* rvh) { | 2538 void TabContents::RenderViewDeleted(RenderViewHost* rvh) { |
2539 NotificationService::current()->Notify( | 2539 NotificationService::current()->Notify( |
2540 NotificationType::RENDER_VIEW_HOST_DELETED, | 2540 NotificationType::RENDER_VIEW_HOST_DELETED, |
2541 Source<TabContents>(this), | 2541 Source<TabContents>(this), |
2542 Details<RenderViewHost>(rvh)); | 2542 Details<RenderViewHost>(rvh)); |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3363 } | 3363 } |
3364 | 3364 |
3365 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { | 3365 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { |
3366 render_manager_.SwapInRenderViewHost(rvh); | 3366 render_manager_.SwapInRenderViewHost(rvh); |
3367 } | 3367 } |
3368 | 3368 |
3369 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 3369 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
3370 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 3370 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
3371 rwh_view->SetSize(view()->GetContainerSize()); | 3371 rwh_view->SetSize(view()->GetContainerSize()); |
3372 } | 3372 } |
OLD | NEW |