Chromium Code Reviews| 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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 3652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3663 // to let the user edit it and try again. Clear it now that content might | 3663 // to let the user edit it and try again. Clear it now that content might |
| 3664 // show up underneath it. | 3664 // show up underneath it. |
| 3665 if (!IsLoading() && controller_.GetPendingEntry()) | 3665 if (!IsLoading() && controller_.GetPendingEntry()) |
| 3666 controller_.DiscardPendingEntry(); | 3666 controller_.DiscardPendingEntry(); |
| 3667 | 3667 |
| 3668 // Update the URL display. | 3668 // Update the URL display. |
| 3669 NotifyNavigationStateChanged(content::INVALIDATE_TYPE_URL); | 3669 NotifyNavigationStateChanged(content::INVALIDATE_TYPE_URL); |
| 3670 } | 3670 } |
| 3671 | 3671 |
| 3672 void WebContentsImpl::DidDisownOpener(RenderFrameHost* render_frame_host) { | 3672 void WebContentsImpl::DidDisownOpener(RenderFrameHost* render_frame_host) { |
| 3673 if (opener_) { | 3673 // No action is necessary if the opener has already been cleared. |
|
Charlie Reis
2014/08/22 19:41:23
Bug 4: There was a risk of sending unnecessary not
| |
| 3674 // Clear our opener so that future cross-process navigations don't have an | 3674 if (!opener_) |
| 3675 // opener assigned. | 3675 return; |
| 3676 RemoveDestructionObserver(opener_); | 3676 |
| 3677 opener_ = NULL; | 3677 // Clear our opener so that future cross-process navigations don't have an |
| 3678 } | 3678 // opener assigned. |
| 3679 RemoveDestructionObserver(opener_); | |
| 3680 opener_ = NULL; | |
| 3679 | 3681 |
| 3680 // Notify all swapped out RenderViewHosts for this tab. This is important | 3682 // Notify all swapped out RenderViewHosts for this tab. This is important |
| 3681 // in case we go back to them, or if another window in those processes tries | 3683 // in case we go back to them, or if another window in those processes tries |
| 3682 // to access window.opener. | 3684 // to access window.opener. |
| 3683 GetRenderManager()->DidDisownOpener(render_frame_host->GetRenderViewHost()); | 3685 GetRenderManager()->DidDisownOpener(render_frame_host->GetRenderViewHost()); |
| 3684 } | 3686 } |
| 3685 | 3687 |
| 3686 void WebContentsImpl::DocumentOnLoadCompleted( | 3688 void WebContentsImpl::DocumentOnLoadCompleted( |
| 3687 RenderFrameHost* render_frame_host) { | 3689 RenderFrameHost* render_frame_host) { |
| 3688 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3690 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4240 node->render_manager()->ResumeResponseDeferredAtStart(); | 4242 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4241 } | 4243 } |
| 4242 | 4244 |
| 4243 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4245 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4244 force_disable_overscroll_content_ = force_disable; | 4246 force_disable_overscroll_content_ = force_disable; |
| 4245 if (view_) | 4247 if (view_) |
| 4246 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4248 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4247 } | 4249 } |
| 4248 | 4250 |
| 4249 } // namespace content | 4251 } // namespace content |
| OLD | NEW |