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

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

Issue 68713009: Removed a bunch of references to GetActiveEntry in chrome/browser/ui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 *proceed_to_fire_unload = 1439 *proceed_to_fire_unload =
1440 fast_unload_controller_->BeforeUnloadFired(web_contents, proceed); 1440 fast_unload_controller_->BeforeUnloadFired(web_contents, proceed);
1441 } else { 1441 } else {
1442 *proceed_to_fire_unload = 1442 *proceed_to_fire_unload =
1443 unload_controller_->BeforeUnloadFired(web_contents, proceed); 1443 unload_controller_->BeforeUnloadFired(web_contents, proceed);
1444 } 1444 }
1445 } 1445 }
1446 1446
1447 bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) { 1447 bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) {
1448 const content::NavigationEntry* entry = 1448 const content::NavigationEntry* entry =
1449 source->GetController().GetActiveEntry(); 1449 source->GetController().GetVisibleEntry();
1450 if (entry) { 1450 if (entry) {
1451 GURL url = entry->GetURL(); 1451 GURL url = entry->GetURL();
1452 GURL virtual_url = entry->GetVirtualURL(); 1452 GURL virtual_url = entry->GetVirtualURL();
1453 if ((url.SchemeIs(chrome::kChromeUIScheme) && 1453 if ((url.SchemeIs(chrome::kChromeUIScheme) &&
1454 url.host() == chrome::kChromeUINewTabHost) || 1454 url.host() == chrome::kChromeUINewTabHost) ||
1455 (virtual_url.SchemeIs(chrome::kChromeUIScheme) && 1455 (virtual_url.SchemeIs(chrome::kChromeUIScheme) &&
1456 virtual_url.host() == chrome::kChromeUINewTabHost)) { 1456 virtual_url.host() == chrome::kChromeUINewTabHost)) {
1457 return true; 1457 return true;
1458 } 1458 }
1459 } 1459 }
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2276 if (contents && !allow_js_access) { 2276 if (contents && !allow_js_access) {
2277 contents->web_contents()->GetController().LoadURL( 2277 contents->web_contents()->GetController().LoadURL(
2278 target_url, 2278 target_url,
2279 content::Referrer(), 2279 content::Referrer(),
2280 content::PAGE_TRANSITION_LINK, 2280 content::PAGE_TRANSITION_LINK,
2281 std::string()); // No extra headers. 2281 std::string()); // No extra headers.
2282 } 2282 }
2283 2283
2284 return contents != NULL; 2284 return contents != NULL;
2285 } 2285 }
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