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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 505443002: Move DisownOpener to RenderFrameHost / RenderFrameProxyHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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) 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
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.
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);
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_,
3689 DocumentOnLoadCompletedInMainFrame()); 3691 DocumentOnLoadCompletedInMainFrame());
3690 3692
3691 // TODO(avi): Remove. http://crbug.com/170921 3693 // TODO(avi): Remove. http://crbug.com/170921
3692 NotificationService::current()->Notify( 3694 NotificationService::current()->Notify(
3693 NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, 3695 NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698