| 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 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1434 *proceed_to_fire_unload = | 1434 *proceed_to_fire_unload = |
| 1435 fast_unload_controller_->BeforeUnloadFired(web_contents, proceed); | 1435 fast_unload_controller_->BeforeUnloadFired(web_contents, proceed); |
| 1436 } else { | 1436 } else { |
| 1437 *proceed_to_fire_unload = | 1437 *proceed_to_fire_unload = |
| 1438 unload_controller_->BeforeUnloadFired(web_contents, proceed); | 1438 unload_controller_->BeforeUnloadFired(web_contents, proceed); |
| 1439 } | 1439 } |
| 1440 } | 1440 } |
| 1441 | 1441 |
| 1442 bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) { | 1442 bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) { |
| 1443 const content::NavigationEntry* entry = | 1443 const content::NavigationEntry* entry = |
| 1444 source->GetController().GetActiveEntry(); | 1444 source->GetController().GetVisibleEntry(); |
| 1445 if (entry) { | 1445 if (entry) { |
| 1446 GURL url = entry->GetURL(); | 1446 GURL url = entry->GetURL(); |
| 1447 GURL virtual_url = entry->GetVirtualURL(); | 1447 GURL virtual_url = entry->GetVirtualURL(); |
| 1448 if ((url.SchemeIs(chrome::kChromeUIScheme) && | 1448 if ((url.SchemeIs(chrome::kChromeUIScheme) && |
| 1449 url.host() == chrome::kChromeUINewTabHost) || | 1449 url.host() == chrome::kChromeUINewTabHost) || |
| 1450 (virtual_url.SchemeIs(chrome::kChromeUIScheme) && | 1450 (virtual_url.SchemeIs(chrome::kChromeUIScheme) && |
| 1451 virtual_url.host() == chrome::kChromeUINewTabHost)) { | 1451 virtual_url.host() == chrome::kChromeUINewTabHost)) { |
| 1452 return true; | 1452 return true; |
| 1453 } | 1453 } |
| 1454 } | 1454 } |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 if (contents && !allow_js_access) { | 2271 if (contents && !allow_js_access) { |
| 2272 contents->web_contents()->GetController().LoadURL( | 2272 contents->web_contents()->GetController().LoadURL( |
| 2273 target_url, | 2273 target_url, |
| 2274 content::Referrer(), | 2274 content::Referrer(), |
| 2275 content::PAGE_TRANSITION_LINK, | 2275 content::PAGE_TRANSITION_LINK, |
| 2276 std::string()); // No extra headers. | 2276 std::string()); // No extra headers. |
| 2277 } | 2277 } |
| 2278 | 2278 |
| 2279 return contents != NULL; | 2279 return contents != NULL; |
| 2280 } | 2280 } |
| OLD | NEW |