| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 3684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3695 (!delegate_ || delegate_->ShouldFocusPageAfterCrash())) { | 3695 (!delegate_ || delegate_->ShouldFocusPageAfterCrash())) { |
| 3696 view_->Focus(); | 3696 view_->Focus(); |
| 3697 } | 3697 } |
| 3698 | 3698 |
| 3699 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewReady()); | 3699 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewReady()); |
| 3700 } | 3700 } |
| 3701 | 3701 |
| 3702 void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh, | 3702 void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh, |
| 3703 base::TerminationStatus status, | 3703 base::TerminationStatus status, |
| 3704 int error_code) { | 3704 int error_code) { |
| 3705 // TODO(nasko): This isn't ideal; the termination process should be handled by |
| 3706 // RenderFrameDeleted(). See http://crbug.com/455943. |
| 3707 ClearPowerSaveBlockers(rvh->GetMainFrame()); |
| 3708 |
| 3705 if (rvh != GetRenderViewHost()) { | 3709 if (rvh != GetRenderViewHost()) { |
| 3706 // The pending page's RenderViewHost is gone. | 3710 // The pending page's RenderViewHost is gone. |
| 3707 return; | 3711 return; |
| 3708 } | 3712 } |
| 3709 | 3713 |
| 3710 // Ensure fullscreen mode is exited in the |delegate_| since a crashed | 3714 // Ensure fullscreen mode is exited in the |delegate_| since a crashed |
| 3711 // renderer may not have made a clean exit. | 3715 // renderer may not have made a clean exit. |
| 3712 if (IsFullscreenForCurrentTab()) | 3716 if (IsFullscreenForCurrentTab()) |
| 3713 ExitFullscreenMode(); | 3717 ExitFullscreenMode(); |
| 3714 | 3718 |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4516 node->render_manager()->ResumeResponseDeferredAtStart(); | 4520 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4517 } | 4521 } |
| 4518 | 4522 |
| 4519 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4523 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4520 force_disable_overscroll_content_ = force_disable; | 4524 force_disable_overscroll_content_ = force_disable; |
| 4521 if (view_) | 4525 if (view_) |
| 4522 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4526 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4523 } | 4527 } |
| 4524 | 4528 |
| 4525 } // namespace content | 4529 } // namespace content |
| OLD | NEW |