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

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

Issue 445133003: Rename "UpdateURL" to be more descriptive of what it actually does. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/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 2045 matching lines...) Expand 10 before | Expand all | Expand 10 after
2056 } 2056 }
2057 } 2057 }
2058 2058
2059 // Remember that we've already processed this request, so we don't update 2059 // Remember that we've already processed this request, so we don't update
2060 // the session history again. We do this regardless of whether this is 2060 // the session history again. We do this regardless of whether this is
2061 // a session history navigation, because if we attempted a session history 2061 // a session history navigation, because if we attempted a session history
2062 // navigation without valid HistoryItem state, WebCore will think it is a 2062 // navigation without valid HistoryItem state, WebCore will think it is a
2063 // new navigation. 2063 // new navigation.
2064 navigation_state->set_request_committed(true); 2064 navigation_state->set_request_committed(true);
2065 2065
2066 UpdateURL(frame); 2066 SendDidCommitProvisionalLoad(frame);
2067 2067
2068 // Check whether we have new encoding name. 2068 // Check whether we have new encoding name.
2069 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); 2069 UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
2070 } 2070 }
2071 2071
2072 void RenderFrameImpl::didClearWindowObject(blink::WebLocalFrame* frame) { 2072 void RenderFrameImpl::didClearWindowObject(blink::WebLocalFrame* frame) {
2073 DCHECK(!frame_ || frame_ == frame); 2073 DCHECK(!frame_ || frame_ == frame);
2074 // TODO(nasko): Move implementation here. Needed state: 2074 // TODO(nasko): Move implementation here. Needed state:
2075 // * enabled_bindings_ 2075 // * enabled_bindings_
2076 // * dom_automation_controller_ 2076 // * dom_automation_controller_
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
2981 2981
2982 void RenderFrameImpl::WasShown() { 2982 void RenderFrameImpl::WasShown() {
2983 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WasShown()); 2983 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WasShown());
2984 } 2984 }
2985 2985
2986 bool RenderFrameImpl::IsHidden() { 2986 bool RenderFrameImpl::IsHidden() {
2987 return GetRenderWidget()->is_hidden(); 2987 return GetRenderWidget()->is_hidden();
2988 } 2988 }
2989 2989
2990 // Tell the embedding application that the URL of the active page has changed. 2990 // Tell the embedding application that the URL of the active page has changed.
2991 void RenderFrameImpl::UpdateURL(blink::WebFrame* frame) { 2991 void RenderFrameImpl::SendDidCommitProvisionalLoad(blink::WebFrame* frame) {
2992 DCHECK(!frame_ || frame_ == frame); 2992 DCHECK(!frame_ || frame_ == frame);
2993 WebDataSource* ds = frame->dataSource(); 2993 WebDataSource* ds = frame->dataSource();
2994 DCHECK(ds); 2994 DCHECK(ds);
2995 2995
2996 const WebURLRequest& request = ds->request(); 2996 const WebURLRequest& request = ds->request();
2997 const WebURLResponse& response = ds->response(); 2997 const WebURLResponse& response = ds->response();
2998 2998
2999 DocumentState* document_state = DocumentState::FromDataSource(ds); 2999 DocumentState* document_state = DocumentState::FromDataSource(ds);
3000 NavigationState* navigation_state = document_state->navigation_state(); 3000 NavigationState* navigation_state = document_state->navigation_state();
3001 InternalDocumentStateData* internal_data = 3001 InternalDocumentStateData* internal_data =
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 3131
3132 // This message needs to be sent before any of allowScripts(), 3132 // This message needs to be sent before any of allowScripts(),
3133 // allowImages(), allowPlugins() is called for the new page, so that when 3133 // allowImages(), allowPlugins() is called for the new page, so that when
3134 // these functions send a ViewHostMsg_ContentBlocked message, it arrives 3134 // these functions send a ViewHostMsg_ContentBlocked message, it arrives
3135 // after the FrameHostMsg_DidCommitProvisionalLoad message. 3135 // after the FrameHostMsg_DidCommitProvisionalLoad message.
3136 Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params)); 3136 Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params));
3137 } else { 3137 } else {
3138 // Subframe navigation: the type depends on whether this navigation 3138 // Subframe navigation: the type depends on whether this navigation
3139 // generated a new session history entry. When they do generate a session 3139 // generated a new session history entry. When they do generate a session
3140 // history entry, it means the user initiated the navigation and we should 3140 // history entry, it means the user initiated the navigation and we should
3141 // mark it as such. This test checks if this is the first time UpdateURL 3141 // mark it as such. This test checks if this is the first time
3142 // has been called since WillNavigateToURL was called to initiate the load. 3142 // SendDidCommitProvisionalLoad has been called since WillNavigateToURL was
3143 // called to initiate the load.
3143 if (render_view_->page_id_ > render_view_->last_page_id_sent_to_browser_) 3144 if (render_view_->page_id_ > render_view_->last_page_id_sent_to_browser_)
3144 params.transition = PAGE_TRANSITION_MANUAL_SUBFRAME; 3145 params.transition = PAGE_TRANSITION_MANUAL_SUBFRAME;
3145 else 3146 else
3146 params.transition = PAGE_TRANSITION_AUTO_SUBFRAME; 3147 params.transition = PAGE_TRANSITION_AUTO_SUBFRAME;
3147 3148
3148 DCHECK(!navigation_state->history_list_was_cleared()); 3149 DCHECK(!navigation_state->history_list_was_cleared());
3149 params.history_list_was_cleared = false; 3150 params.history_list_was_cleared = false;
3150 3151
3151 // Don't send this message while the subframe is swapped out. 3152 // Don't send this message while the subframe is swapped out.
3152 if (!is_swapped_out()) 3153 if (!is_swapped_out())
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
3627 3628
3628 #if defined(ENABLE_BROWSER_CDMS) 3629 #if defined(ENABLE_BROWSER_CDMS)
3629 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3630 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3630 if (!cdm_manager_) 3631 if (!cdm_manager_)
3631 cdm_manager_ = new RendererCdmManager(this); 3632 cdm_manager_ = new RendererCdmManager(this);
3632 return cdm_manager_; 3633 return cdm_manager_;
3633 } 3634 }
3634 #endif // defined(ENABLE_BROWSER_CDMS) 3635 #endif // defined(ENABLE_BROWSER_CDMS)
3635 3636
3636 } // namespace content 3637 } // 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