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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1184423005: Add item and document sequence numbers to FrameNavigationEntry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add const; git cl format Created 5 years, 6 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after
2684 } 2684 }
2685 } 2685 }
2686 2686
2687 // Remember that we've already processed this request, so we don't update 2687 // Remember that we've already processed this request, so we don't update
2688 // the session history again. We do this regardless of whether this is 2688 // the session history again. We do this regardless of whether this is
2689 // a session history navigation, because if we attempted a session history 2689 // a session history navigation, because if we attempted a session history
2690 // navigation without valid HistoryItem state, WebCore will think it is a 2690 // navigation without valid HistoryItem state, WebCore will think it is a
2691 // new navigation. 2691 // new navigation.
2692 navigation_state->set_request_committed(true); 2692 navigation_state->set_request_committed(true);
2693 2693
2694 SendDidCommitProvisionalLoad(frame, commit_type); 2694 SendDidCommitProvisionalLoad(frame, commit_type, item);
2695 2695
2696 // Check whether we have new encoding name. 2696 // Check whether we have new encoding name.
2697 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); 2697 UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
2698 } 2698 }
2699 2699
2700 void RenderFrameImpl::didCreateNewDocument(blink::WebLocalFrame* frame) { 2700 void RenderFrameImpl::didCreateNewDocument(blink::WebLocalFrame* frame) {
2701 DCHECK(!frame_ || frame_ == frame); 2701 DCHECK(!frame_ || frame_ == frame);
2702 2702
2703 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, DidCreateNewDocument()); 2703 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, DidCreateNewDocument());
2704 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), 2704 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(),
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
3790 void RenderFrameImpl::WidgetWillClose() { 3790 void RenderFrameImpl::WidgetWillClose() {
3791 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WidgetWillClose()); 3791 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WidgetWillClose());
3792 } 3792 }
3793 3793
3794 bool RenderFrameImpl::IsHidden() { 3794 bool RenderFrameImpl::IsHidden() {
3795 return GetRenderWidget()->is_hidden(); 3795 return GetRenderWidget()->is_hidden();
3796 } 3796 }
3797 3797
3798 // Tell the embedding application that the URL of the active page has changed. 3798 // Tell the embedding application that the URL of the active page has changed.
3799 void RenderFrameImpl::SendDidCommitProvisionalLoad( 3799 void RenderFrameImpl::SendDidCommitProvisionalLoad(
3800 blink::WebFrame* frame, 3800 blink::WebFrame* frame,
3801 blink::WebHistoryCommitType commit_type) { 3801 blink::WebHistoryCommitType commit_type,
3802 const blink::WebHistoryItem& item) {
3802 DCHECK(!frame_ || frame_ == frame); 3803 DCHECK(!frame_ || frame_ == frame);
3803 WebDataSource* ds = frame->dataSource(); 3804 WebDataSource* ds = frame->dataSource();
3804 DCHECK(ds); 3805 DCHECK(ds);
3805 3806
3806 const WebURLRequest& request = ds->request(); 3807 const WebURLRequest& request = ds->request();
3807 const WebURLResponse& response = ds->response(); 3808 const WebURLResponse& response = ds->response();
3808 3809
3809 DocumentState* document_state = DocumentState::FromDataSource(ds); 3810 DocumentState* document_state = DocumentState::FromDataSource(ds);
3810 NavigationStateImpl* navigation_state = 3811 NavigationStateImpl* navigation_state =
3811 static_cast<NavigationStateImpl*>(document_state->navigation_state()); 3812 static_cast<NavigationStateImpl*>(document_state->navigation_state());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
3865 params.gesture = render_view_->navigation_gesture_; 3866 params.gesture = render_view_->navigation_gesture_;
3866 render_view_->navigation_gesture_ = NavigationGestureUnknown; 3867 render_view_->navigation_gesture_ = NavigationGestureUnknown;
3867 3868
3868 // Make navigation state a part of the DidCommitProvisionalLoad message so 3869 // Make navigation state a part of the DidCommitProvisionalLoad message so
3869 // that committed entry has it at all times. 3870 // that committed entry has it at all times.
3870 HistoryEntry* entry = render_view_->history_controller()->GetCurrentEntry(); 3871 HistoryEntry* entry = render_view_->history_controller()->GetCurrentEntry();
3871 if (entry) 3872 if (entry)
3872 params.page_state = HistoryEntryToPageState(entry); 3873 params.page_state = HistoryEntryToPageState(entry);
3873 else 3874 else
3874 params.page_state = PageState::CreateFromURL(request.url()); 3875 params.page_state = PageState::CreateFromURL(request.url());
3876 params.item_sequence_number = item.itemSequenceNumber();
3877 params.document_sequence_number = item.documentSequenceNumber();
3875 3878
3876 if (!frame->parent()) { 3879 if (!frame->parent()) {
3877 // Top-level navigation. 3880 // Top-level navigation.
3878 3881
3879 // Reset the zoom limits in case a plugin had changed them previously. This 3882 // Reset the zoom limits in case a plugin had changed them previously. This
3880 // will also call us back which will cause us to send a message to 3883 // will also call us back which will cause us to send a message to
3881 // update WebContentsImpl. 3884 // update WebContentsImpl.
3882 render_view_->webview()->zoomLimitsChanged( 3885 render_view_->webview()->zoomLimitsChanged(
3883 ZoomFactorToZoomLevel(kMinimumZoomFactor), 3886 ZoomFactorToZoomLevel(kMinimumZoomFactor),
3884 ZoomFactorToZoomLevel(kMaximumZoomFactor)); 3887 ZoomFactorToZoomLevel(kMaximumZoomFactor));
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
4925 #elif defined(ENABLE_BROWSER_CDMS) 4928 #elif defined(ENABLE_BROWSER_CDMS)
4926 cdm_manager_, 4929 cdm_manager_,
4927 #endif 4930 #endif
4928 this); 4931 this);
4929 } 4932 }
4930 4933
4931 return cdm_factory_; 4934 return cdm_factory_;
4932 } 4935 }
4933 4936
4934 } // namespace content 4937 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698