| OLD | NEW |
| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2265 NavigationState* RenderViewImpl::CreateNavigationStateFromPending() { | 2265 NavigationState* RenderViewImpl::CreateNavigationStateFromPending() { |
| 2266 NavigationState* navigation_state = NULL; | 2266 NavigationState* navigation_state = NULL; |
| 2267 | 2267 |
| 2268 // A navigation resulting from loading a javascript URL should not be treated | 2268 // A navigation resulting from loading a javascript URL should not be treated |
| 2269 // as a browser initiated event. Instead, we want it to look as if the page | 2269 // as a browser initiated event. Instead, we want it to look as if the page |
| 2270 // initiated any load resulting from JS execution. | 2270 // initiated any load resulting from JS execution. |
| 2271 if (!pending_navigation_params_->common_params.url.SchemeIs( | 2271 if (!pending_navigation_params_->common_params.url.SchemeIs( |
| 2272 url::kJavaScriptScheme)) { | 2272 url::kJavaScriptScheme)) { |
| 2273 navigation_state = NavigationState::CreateBrowserInitiated( | 2273 navigation_state = NavigationState::CreateBrowserInitiated( |
| 2274 pending_navigation_params_->history_params.page_id, | 2274 pending_navigation_params_->history_params.page_id, |
| 2275 pending_navigation_params_->history_params.nav_entry_id, |
| 2275 pending_navigation_params_->history_params.pending_history_list_offset, | 2276 pending_navigation_params_->history_params.pending_history_list_offset, |
| 2276 pending_navigation_params_->history_params.should_clear_history_list, | 2277 pending_navigation_params_->history_params.should_clear_history_list, |
| 2277 pending_navigation_params_->common_params.transition); | 2278 pending_navigation_params_->common_params.transition); |
| 2278 navigation_state->set_allow_download( | 2279 navigation_state->set_allow_download( |
| 2279 pending_navigation_params_->common_params.allow_download); | 2280 pending_navigation_params_->common_params.allow_download); |
| 2280 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 2281 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 2281 switches::kEnableBrowserSideNavigation)) { | 2282 switches::kEnableBrowserSideNavigation)) { |
| 2282 navigation_state->set_should_replace_current_entry( | 2283 navigation_state->set_should_replace_current_entry( |
| 2283 pending_navigation_params_->start_params | 2284 pending_navigation_params_->start_params |
| 2284 .should_replace_current_entry); | 2285 .should_replace_current_entry); |
| (...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4028 std::vector<gfx::Size> sizes; | 4029 std::vector<gfx::Size> sizes; |
| 4029 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4030 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4030 if (!url.isEmpty()) | 4031 if (!url.isEmpty()) |
| 4031 urls.push_back( | 4032 urls.push_back( |
| 4032 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4033 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4033 } | 4034 } |
| 4034 SendUpdateFaviconURL(urls); | 4035 SendUpdateFaviconURL(urls); |
| 4035 } | 4036 } |
| 4036 | 4037 |
| 4037 } // namespace content | 4038 } // namespace content |
| OLD | NEW |