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

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

Issue 745053002: Grant access to files in PageState, which have already been validated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Created 6 years 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
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 3592 matching lines...) Expand 10 before | Expand all | Expand 10 after
3603 RenderProcessGone(GetCrashedStatus())); 3603 RenderProcessGone(GetCrashedStatus()));
3604 } 3604 }
3605 3605
3606 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { 3606 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) {
3607 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh)); 3607 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh));
3608 } 3608 }
3609 3609
3610 void WebContentsImpl::UpdateState(RenderViewHost* rvh, 3610 void WebContentsImpl::UpdateState(RenderViewHost* rvh,
3611 int32 page_id, 3611 int32 page_id,
3612 const PageState& page_state) { 3612 const PageState& page_state) {
3613 // Ensure that this state update comes from either the active RVH or one of 3613 // Ensure that this state update comes from a RenderViewHost that belongs to
3614 // the swapped out RVHs. We don't expect to hear from any other RVHs. 3614 // this WebContents.
3615 // TODO(nasko): This should go through RenderFrameHost. 3615 // TODO(nasko): This should go through RenderFrameHost.
3616 // TODO(creis): We can't update state for cross-process subframes until we 3616 // TODO(creis): We can't update state for cross-process subframes until we
3617 // have FrameNavigationEntries. Once we do, this should be a DCHECK. 3617 // have FrameNavigationEntries. Once we do, this should be a DCHECK.
3618 if (rvh != GetRenderViewHost() && 3618 if (rvh->GetDelegate()->GetAsWebContents() != this)
3619 !GetRenderManager()->IsRVHOnSwappedOutList(
3620 static_cast<RenderViewHostImpl*>(rvh)))
Charlie Reis 2014/11/25 21:00:55 This was buggy and causing the test to fail. It m
3621 return; 3619 return;
3622 3620
3623 // We must be prepared to handle state updates for any page, these occur 3621 // We must be prepared to handle state updates for any page, these occur
3624 // when the user is scrolling and entering form data, as well as when we're 3622 // when the user is scrolling and entering form data, as well as when we're
3625 // leaving a page, in which case our state may have already been moved to 3623 // leaving a page, in which case our state may have already been moved to
3626 // the next page. The navigation controller will look up the appropriate 3624 // the next page. The navigation controller will look up the appropriate
3627 // NavigationEntry and update it when it is notified via the delegate. 3625 // NavigationEntry and update it when it is notified via the delegate.
3628 3626
3629 int entry_index = controller_.GetEntryIndexWithPageID( 3627 int entry_index = controller_.GetEntryIndexWithPageID(
3630 rvh->GetSiteInstance(), page_id); 3628 rvh->GetSiteInstance(), page_id);
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
4349 node->render_manager()->ResumeResponseDeferredAtStart(); 4347 node->render_manager()->ResumeResponseDeferredAtStart();
4350 } 4348 }
4351 4349
4352 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4350 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4353 force_disable_overscroll_content_ = force_disable; 4351 force_disable_overscroll_content_ = force_disable;
4354 if (view_) 4352 if (view_)
4355 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4353 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4356 } 4354 }
4357 4355
4358 } // namespace content 4356 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698