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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 14985014: Introduce content::PageState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to the top of page_state.h Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 1645bb296ae49b2f0f763f9f199481380a96b10a..4d9f4cca5a6dd66810e8f2b8d50dd8d58c81e4d7 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -217,7 +217,7 @@ void MakeNavigateParams(const NavigationEntryImpl& entry,
}
params->referrer = entry.GetReferrer();
params->transition = entry.GetTransitionType();
- params->state = entry.GetContentState();
+ params->page_state = entry.GetPageState();
params->navigation_type =
GetNavigationType(controller.GetBrowserContext(), entry, reload_type);
params->request_time = base::Time::Now();
@@ -1984,11 +1984,11 @@ void WebContentsImpl::ViewSource() {
}
void WebContentsImpl::ViewFrameSource(const GURL& url,
- const std::string& content_state) {
+ const PageState& page_state) {
if (!delegate_)
return;
- delegate_->ViewSourceForFrame(this, url, content_state);
+ delegate_->ViewSourceForFrame(this, url, page_state);
}
int WebContentsImpl::GetMinimumZoomPercent() const {
@@ -2901,7 +2901,7 @@ void WebContentsImpl::DidNavigate(
void WebContentsImpl::UpdateState(RenderViewHost* rvh,
int32 page_id,
- const std::string& state) {
+ const PageState& page_state) {
// Ensure that this state update comes from either the active RVH or one of
// the swapped out RVHs. We don't expect to hear from any other RVHs.
DCHECK(rvh == GetRenderViewHost() || render_manager_.IsOnSwappedOutList(rvh));
@@ -2918,9 +2918,9 @@ void WebContentsImpl::UpdateState(RenderViewHost* rvh,
return;
NavigationEntry* entry = controller_.GetEntryAtIndex(entry_index);
- if (state == entry->GetContentState())
+ if (page_state == entry->GetPageState())
return; // Nothing to update.
- entry->SetContentState(state);
+ entry->SetPageState(page_state);
controller_.NotifyEntryChanged(entry, entry_index);
}

Powered by Google App Engine
This is Rietveld 408576698