| 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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1442 *proceed_to_fire_unload = | 1442 *proceed_to_fire_unload = |
| 1443 fast_unload_controller_->BeforeUnloadFired(web_contents, proceed); | 1443 fast_unload_controller_->BeforeUnloadFired(web_contents, proceed); |
| 1444 } else { | 1444 } else { |
| 1445 *proceed_to_fire_unload = | 1445 *proceed_to_fire_unload = |
| 1446 unload_controller_->BeforeUnloadFired(web_contents, proceed); | 1446 unload_controller_->BeforeUnloadFired(web_contents, proceed); |
| 1447 } | 1447 } |
| 1448 } | 1448 } |
| 1449 | 1449 |
| 1450 bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) { | 1450 bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) { |
| 1451 const content::NavigationEntry* entry = | 1451 const content::NavigationEntry* entry = |
| 1452 source->GetController().GetActiveEntry(); | 1452 source->GetController().GetVisibleEntry(); |
| 1453 if (entry) { | 1453 if (entry) { |
| 1454 GURL url = entry->GetURL(); | 1454 GURL url = entry->GetURL(); |
| 1455 GURL virtual_url = entry->GetVirtualURL(); | 1455 GURL virtual_url = entry->GetVirtualURL(); |
| 1456 if ((url.SchemeIs(chrome::kChromeUIScheme) && | 1456 if ((url.SchemeIs(chrome::kChromeUIScheme) && |
| 1457 url.host() == chrome::kChromeUINewTabHost) || | 1457 url.host() == chrome::kChromeUINewTabHost) || |
| 1458 (virtual_url.SchemeIs(chrome::kChromeUIScheme) && | 1458 (virtual_url.SchemeIs(chrome::kChromeUIScheme) && |
| 1459 virtual_url.host() == chrome::kChromeUINewTabHost)) { | 1459 virtual_url.host() == chrome::kChromeUINewTabHost)) { |
| 1460 return true; | 1460 return true; |
| 1461 } | 1461 } |
| 1462 } | 1462 } |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2285 if (contents && !allow_js_access) { | 2285 if (contents && !allow_js_access) { |
| 2286 contents->web_contents()->GetController().LoadURL( | 2286 contents->web_contents()->GetController().LoadURL( |
| 2287 target_url, | 2287 target_url, |
| 2288 content::Referrer(), | 2288 content::Referrer(), |
| 2289 content::PAGE_TRANSITION_LINK, | 2289 content::PAGE_TRANSITION_LINK, |
| 2290 std::string()); // No extra headers. | 2290 std::string()); // No extra headers. |
| 2291 } | 2291 } |
| 2292 | 2292 |
| 2293 return contents != NULL; | 2293 return contents != NULL; |
| 2294 } | 2294 } |
| OLD | NEW |