Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(913)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 99853005: Revert of https://codereview.chromium.org/68713009/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698