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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 196133032: Add test for filtering of IPC messages when RenderFrameHost is swapped out. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing url_chain and comment. Created 6 years, 9 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 if (suspended_nav_params_) 570 if (suspended_nav_params_)
571 suspended_nav_params_.reset(); 571 suspended_nav_params_.reset();
572 navigations_suspended_ = false; 572 navigations_suspended_ = false;
573 } 573 }
574 574
575 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { 575 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() {
576 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID())); 576 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID()));
577 } 577 }
578 578
579 void RenderViewHostImpl::SwapOut() { 579 void RenderViewHostImpl::SwapOut() {
580 // If this RenderViewHost is not in the default state, it must have already
581 // gone through this, therefore just return.
582 if (rvh_state_ != STATE_DEFAULT)
583 return;
584
580 SetState(STATE_WAITING_FOR_UNLOAD_ACK); 585 SetState(STATE_WAITING_FOR_UNLOAD_ACK);
581 unload_event_monitor_timeout_->Start( 586 unload_event_monitor_timeout_->Start(
582 base::TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); 587 base::TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
583 588
584 if (IsRenderViewLive()) { 589 if (IsRenderViewLive()) {
585 Send(new ViewMsg_SwapOut(GetRoutingID())); 590 Send(new ViewMsg_SwapOut(GetRoutingID()));
586 } 591 }
587 delegate_->SwappedOut(this); 592 delegate_->SwappedOut(this);
588 } 593 }
589 594
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 return true; 1925 return true;
1921 } 1926 }
1922 1927
1923 void RenderViewHostImpl::AttachToFrameTree() { 1928 void RenderViewHostImpl::AttachToFrameTree() {
1924 FrameTree* frame_tree = delegate_->GetFrameTree(); 1929 FrameTree* frame_tree = delegate_->GetFrameTree();
1925 1930
1926 frame_tree->ResetForMainFrameSwap(); 1931 frame_tree->ResetForMainFrameSwap();
1927 } 1932 }
1928 1933
1929 } // namespace content 1934 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698