OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/tab_contents/tab_contents.h" | 5 #include "content/browser/tab_contents/tab_contents.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 if (rvh != render_view_host()) { | 1480 if (rvh != render_view_host()) { |
1481 // The pending page's RenderViewHost is gone. | 1481 // The pending page's RenderViewHost is gone. |
1482 return; | 1482 return; |
1483 } | 1483 } |
1484 | 1484 |
1485 SetIsLoading(false, NULL); | 1485 SetIsLoading(false, NULL); |
1486 NotifyDisconnected(); | 1486 NotifyDisconnected(); |
1487 SetIsCrashed(status, error_code); | 1487 SetIsCrashed(status, error_code); |
1488 view()->OnTabCrashed(crashed_status(), crashed_error_code()); | 1488 view()->OnTabCrashed(crashed_status(), crashed_error_code()); |
1489 | 1489 |
1490 FOR_EACH_OBSERVER(TabContentsObserver, observers_, RenderViewGone()); | 1490 FOR_EACH_OBSERVER(TabContentsObserver, |
| 1491 observers_, |
| 1492 RenderViewGone(crashed_status())); |
1491 } | 1493 } |
1492 | 1494 |
1493 void TabContents::RenderViewDeleted(RenderViewHost* rvh) { | 1495 void TabContents::RenderViewDeleted(RenderViewHost* rvh) { |
1494 render_manager_.RenderViewDeleted(rvh); | 1496 render_manager_.RenderViewDeleted(rvh); |
1495 FOR_EACH_OBSERVER(TabContentsObserver, observers_, RenderViewDeleted(rvh)); | 1497 FOR_EACH_OBSERVER(TabContentsObserver, observers_, RenderViewDeleted(rvh)); |
1496 } | 1498 } |
1497 | 1499 |
1498 void TabContents::DidNavigate(RenderViewHost* rvh, | 1500 void TabContents::DidNavigate(RenderViewHost* rvh, |
1499 const ViewHostMsg_FrameNavigate_Params& params) { | 1501 const ViewHostMsg_FrameNavigate_Params& params) { |
1500 if (content::PageTransitionIsMainFrame(params.transition)) | 1502 if (content::PageTransitionIsMainFrame(params.transition)) |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2015 | 2017 |
2016 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2018 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2017 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 2019 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
2018 rwh_view->SetSize(view()->GetContainerSize()); | 2020 rwh_view->SetSize(view()->GetContainerSize()); |
2019 } | 2021 } |
2020 | 2022 |
2021 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { | 2023 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { |
2022 return render_view_host() ? | 2024 return render_view_host() ? |
2023 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; | 2025 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; |
2024 } | 2026 } |
OLD | NEW |