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

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

Issue 2441803002: DO NOT COMMIT: Revert "Enable subframe FrameNavigationEntries by default." (Closed)
Patch Set: Fix bug in UpdateState. Created 4 years, 2 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 4286 matching lines...) Expand 10 before | Expand all | Expand 10 after
4297 void WebContentsImpl::UpdateState(RenderViewHost* rvh, 4297 void WebContentsImpl::UpdateState(RenderViewHost* rvh,
4298 const PageState& page_state) { 4298 const PageState& page_state) {
4299 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); 4299 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries());
4300 4300
4301 // Ensure that this state update comes from a RenderViewHost that belongs to 4301 // Ensure that this state update comes from a RenderViewHost that belongs to
4302 // this WebContents. 4302 // this WebContents.
4303 // TODO(nasko): This should go through RenderFrameHost. 4303 // TODO(nasko): This should go through RenderFrameHost.
4304 if (rvh->GetDelegate()->GetAsWebContents() != this) 4304 if (rvh->GetDelegate()->GetAsWebContents() != this)
4305 return; 4305 return;
4306 4306
4307 if (!rvh->GetMainFrame()) { 4307 if (!rvh->GetMainFrame())
4308 // When UseSubframeNavigationEntries is turned off, state updates only come
4309 // in on main frames. When UseSubframeNavigationEntries is turned on,
4310 // UpdateStateForFrame() should have been called rather than this function.
4311 NOTREACHED();
4312 return; 4308 return;
4313 }
4314 4309
4315 NavigationEntryImpl* entry = controller_.GetEntryWithUniqueID( 4310 NavigationEntryImpl* entry = controller_.GetEntryWithUniqueID(
4316 static_cast<RenderFrameHostImpl*>(rvh->GetMainFrame())->nav_entry_id()); 4311 static_cast<RenderFrameHostImpl*>(rvh->GetMainFrame())->nav_entry_id());
4312 if (!entry)
4313 return;
4317 4314
4318 if (page_state == entry->GetPageState()) 4315 if (page_state == entry->GetPageState())
4319 return; // Nothing to update. 4316 return; // Nothing to update.
4320 entry->SetPageState(page_state); 4317 entry->SetPageState(page_state);
4321 controller_.NotifyEntryChanged(entry); 4318 controller_.NotifyEntryChanged(entry);
4322 } 4319 }
4323 4320
4324 void WebContentsImpl::UpdateTargetURL(RenderViewHost* render_view_host, 4321 void WebContentsImpl::UpdateTargetURL(RenderViewHost* render_view_host,
4325 const GURL& url) { 4322 const GURL& url) {
4326 if (fullscreen_widget_routing_id_ != MSG_ROUTING_NONE) { 4323 if (fullscreen_widget_routing_id_ != MSG_ROUTING_NONE) {
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
5196 dialog_manager_ = dialog_manager; 5193 dialog_manager_ = dialog_manager;
5197 } 5194 }
5198 5195
5199 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5196 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5200 auto it = binding_sets_.find(interface_name); 5197 auto it = binding_sets_.find(interface_name);
5201 if (it != binding_sets_.end()) 5198 if (it != binding_sets_.end())
5202 binding_sets_.erase(it); 5199 binding_sets_.erase(it);
5203 } 5200 }
5204 5201
5205 } // namespace content 5202 } // namespace content
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_process_policy.cc ('k') | content/common/site_isolation_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698