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

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

Issue 149643010: Cleanup: Move kChromeUIScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months 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
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 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 unload_controller_->BeforeUnloadFired(web_contents, proceed); 1414 unload_controller_->BeforeUnloadFired(web_contents, proceed);
1415 } 1415 }
1416 } 1416 }
1417 1417
1418 bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) { 1418 bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) {
1419 const content::NavigationEntry* entry = 1419 const content::NavigationEntry* entry =
1420 source->GetController().GetActiveEntry(); 1420 source->GetController().GetActiveEntry();
1421 if (entry) { 1421 if (entry) {
1422 GURL url = entry->GetURL(); 1422 GURL url = entry->GetURL();
1423 GURL virtual_url = entry->GetVirtualURL(); 1423 GURL virtual_url = entry->GetVirtualURL();
1424 if ((url.SchemeIs(chrome::kChromeUIScheme) && 1424 if ((url.SchemeIs(content::kChromeUIScheme) &&
1425 url.host() == chrome::kChromeUINewTabHost) || 1425 url.host() == chrome::kChromeUINewTabHost) ||
1426 (virtual_url.SchemeIs(chrome::kChromeUIScheme) && 1426 (virtual_url.SchemeIs(content::kChromeUIScheme) &&
1427 virtual_url.host() == chrome::kChromeUINewTabHost)) { 1427 virtual_url.host() == chrome::kChromeUINewTabHost)) {
1428 return true; 1428 return true;
1429 } 1429 }
1430 } 1430 }
1431 1431
1432 return chrome::NavEntryIsInstantNTP(source, entry); 1432 return chrome::NavEntryIsInstantNTP(source, entry);
1433 } 1433 }
1434 1434
1435 void Browser::SetFocusToLocationBar(bool select_all) { 1435 void Browser::SetFocusToLocationBar(bool select_all) {
1436 // Two differences between this and FocusLocationBar(): 1436 // Two differences between this and FocusLocationBar():
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
2292 if (contents && !allow_js_access) { 2292 if (contents && !allow_js_access) {
2293 contents->web_contents()->GetController().LoadURL( 2293 contents->web_contents()->GetController().LoadURL(
2294 target_url, 2294 target_url,
2295 content::Referrer(), 2295 content::Referrer(),
2296 content::PAGE_TRANSITION_LINK, 2296 content::PAGE_TRANSITION_LINK,
2297 std::string()); // No extra headers. 2297 std::string()); // No extra headers.
2298 } 2298 }
2299 2299
2300 return contents != NULL; 2300 return contents != NULL;
2301 } 2301 }
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_manager_unittest.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698