OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/renderer_host/render_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // favicon is displayed) happens synchronously. If the start loading | 227 // favicon is displayed) happens synchronously. If the start loading |
228 // messages was asynchronous, then the default favicon would flash in. | 228 // messages was asynchronous, then the default favicon would flash in. |
229 // | 229 // |
230 // WebKit doesn't send throb notifications for JavaScript URLs, so we | 230 // WebKit doesn't send throb notifications for JavaScript URLs, so we |
231 // don't want to either. | 231 // don't want to either. |
232 if (!params.url.SchemeIs(chrome::kJavaScriptScheme)) | 232 if (!params.url.SchemeIs(chrome::kJavaScriptScheme)) |
233 delegate_->DidStartLoading(); | 233 delegate_->DidStartLoading(); |
234 } | 234 } |
235 const GURL& url = params.url; | 235 const GURL& url = params.url; |
236 if (!delegate_->IsExternalTabContainer() && | 236 if (!delegate_->IsExternalTabContainer() && |
237 (url.SchemeIs("http") || url.SchemeIs("https"))) | 237 (url.SchemeIs(chrome::kHttpScheme) || url.SchemeIs(chrome::kHttpsScheme))) |
238 chrome_browser_net::PreconnectUrlAndSubresources(url); | 238 chrome_browser_net::PreconnectUrlAndSubresources(url); |
239 } | 239 } |
240 | 240 |
241 void RenderViewHost::NavigateToURL(const GURL& url) { | 241 void RenderViewHost::NavigateToURL(const GURL& url) { |
242 ViewMsg_Navigate_Params params; | 242 ViewMsg_Navigate_Params params; |
243 params.page_id = -1; | 243 params.page_id = -1; |
244 params.pending_history_list_offset = -1; | 244 params.pending_history_list_offset = -1; |
245 params.current_history_list_offset = -1; | 245 params.current_history_list_offset = -1; |
246 params.current_history_list_length = 0; | 246 params.current_history_list_length = 0; |
247 params.url = url; | 247 params.url = url; |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 if (view) { | 1261 if (view) { |
1262 view->ShowPopupMenu(params.bounds, | 1262 view->ShowPopupMenu(params.bounds, |
1263 params.item_height, | 1263 params.item_height, |
1264 params.item_font_size, | 1264 params.item_font_size, |
1265 params.selected_item, | 1265 params.selected_item, |
1266 params.popup_items, | 1266 params.popup_items, |
1267 params.right_aligned); | 1267 params.right_aligned); |
1268 } | 1268 } |
1269 } | 1269 } |
1270 #endif | 1270 #endif |
OLD | NEW |