| Index: content/renderer/render_view_impl.cc
|
| ===================================================================
|
| --- content/renderer/render_view_impl.cc (revision 149870)
|
| +++ content/renderer/render_view_impl.cc (working copy)
|
| @@ -1292,9 +1292,9 @@
|
|
|
| void RenderViewImpl::OnSetHistoryLengthAndPrune(int history_length,
|
| int32 minimum_page_id) {
|
| - DCHECK(history_length >= 0);
|
| + DCHECK_GE(history_length, 0);
|
| DCHECK(history_list_offset_ == history_list_length_ - 1);
|
| - DCHECK(minimum_page_id >= -1);
|
| + DCHECK_GE(minimum_page_id, -1);
|
|
|
| // Generate the new list.
|
| std::vector<int32> new_history_page_ids(history_length, -1);
|
| @@ -2791,10 +2791,10 @@
|
|
|
| // The rest of RenderView assumes that a WebDataSource will always have a
|
| // non-null NavigationState.
|
| - if (content_initiated)
|
| + if (content_initiated) {
|
| document_state->set_navigation_state(
|
| NavigationState::CreateContentInitiated());
|
| - else {
|
| + } else {
|
| document_state->set_navigation_state(CreateNavigationStateFromPending());
|
| pending_navigation_params_.reset();
|
| }
|
| @@ -2928,7 +2928,7 @@
|
| int width, height;
|
| if (base::StringToInt(tokens[0], &width) &&
|
| base::StringToInt(tokens[1], &height))
|
| - webview()->setFixedLayoutSize(WebSize(width,height));
|
| + webview()->setFixedLayoutSize(WebSize(width, height));
|
| }
|
| }
|
| }
|
| @@ -3308,20 +3308,21 @@
|
| WebDataSource* data_source =
|
| provisional_data_source ? provisional_data_source : top_data_source;
|
|
|
| + content::PageTransition transition_type = content::PAGE_TRANSITION_LINK;
|
| + DocumentState* document_state = DocumentState::FromDataSource(data_source);
|
| + DCHECK(document_state);
|
| + NavigationState* navigation_state = document_state->navigation_state();
|
| + transition_type = navigation_state->transition_type();
|
| +
|
| GURL request_url(request.url());
|
| GURL new_url;
|
| if (content::GetContentClient()->renderer()->WillSendRequest(
|
| - frame, request_url, &new_url)) {
|
| + frame, transition_type, request_url, &new_url)) {
|
| request.setURL(WebURL(new_url));
|
| }
|
|
|
| - content::PageTransition transition_type = content::PAGE_TRANSITION_LINK;
|
| - DocumentState* document_state = DocumentState::FromDataSource(data_source);
|
| - DCHECK(document_state);
|
| - NavigationState* navigation_state = document_state->navigation_state();
|
| if (document_state->is_cache_policy_override_set())
|
| request.setCachePolicy(document_state->cache_policy_override());
|
| - transition_type = navigation_state->transition_type();
|
|
|
| WebKit::WebReferrerPolicy referrer_policy;
|
| if (document_state && document_state->is_referrer_policy_set()) {
|
| @@ -4533,7 +4534,7 @@
|
| void RenderViewImpl::OnPostMessageEvent(
|
| const ViewMsg_PostMessage_Params& params) {
|
| // TODO(creis): Support sending to subframes.
|
| - WebFrame *frame = webview()->mainFrame();
|
| + WebFrame* frame = webview()->mainFrame();
|
|
|
| // Find the source frame if it exists.
|
| // TODO(creis): Support source subframes.
|
| @@ -5289,7 +5290,6 @@
|
| #endif
|
| (*plugin_it)->SetContentAreaFocus(enable);
|
| }
|
| -
|
| }
|
| // Notify all Pepper plugins.
|
| pepper_delegate_.OnSetFocus(enable);
|
|
|