| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
| (...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 *proceed_to_fire_unload = | 1409 *proceed_to_fire_unload = |
| 1410 fast_unload_controller_->BeforeUnloadFired(web_contents, proceed); | 1410 fast_unload_controller_->BeforeUnloadFired(web_contents, proceed); |
| 1411 } else { | 1411 } else { |
| 1412 *proceed_to_fire_unload = | 1412 *proceed_to_fire_unload = |
| 1413 unload_controller_->BeforeUnloadFired(web_contents, proceed); | 1413 unload_controller_->BeforeUnloadFired(web_contents, proceed); |
| 1414 } | 1414 } |
| 1415 } | 1415 } |
| 1416 | 1416 |
| 1417 bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) { | 1417 bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) { |
| 1418 const content::NavigationEntry* entry = | 1418 const content::NavigationEntry* entry = |
| 1419 source->GetController().GetVisibleEntry(); | 1419 source->GetController().GetActiveEntry(); |
| 1420 if (entry) { | 1420 if (entry) { |
| 1421 GURL url = entry->GetURL(); | 1421 GURL url = entry->GetURL(); |
| 1422 GURL virtual_url = entry->GetVirtualURL(); | 1422 GURL virtual_url = entry->GetVirtualURL(); |
| 1423 if ((url.SchemeIs(chrome::kChromeUIScheme) && | 1423 if ((url.SchemeIs(chrome::kChromeUIScheme) && |
| 1424 url.host() == chrome::kChromeUINewTabHost) || | 1424 url.host() == chrome::kChromeUINewTabHost) || |
| 1425 (virtual_url.SchemeIs(chrome::kChromeUIScheme) && | 1425 (virtual_url.SchemeIs(chrome::kChromeUIScheme) && |
| 1426 virtual_url.host() == chrome::kChromeUINewTabHost)) { | 1426 virtual_url.host() == chrome::kChromeUINewTabHost)) { |
| 1427 return true; | 1427 return true; |
| 1428 } | 1428 } |
| 1429 } | 1429 } |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2290 if (contents && !allow_js_access) { | 2290 if (contents && !allow_js_access) { |
| 2291 contents->web_contents()->GetController().LoadURL( | 2291 contents->web_contents()->GetController().LoadURL( |
| 2292 target_url, | 2292 target_url, |
| 2293 content::Referrer(), | 2293 content::Referrer(), |
| 2294 content::PAGE_TRANSITION_LINK, | 2294 content::PAGE_TRANSITION_LINK, |
| 2295 std::string()); // No extra headers. | 2295 std::string()); // No extra headers. |
| 2296 } | 2296 } |
| 2297 | 2297 |
| 2298 return contents != NULL; | 2298 return contents != NULL; |
| 2299 } | 2299 } |
| OLD | NEW |