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

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

Issue 193092: Replace a bunch of hardcoded URLs with constants from url_constants.h... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 return; 867 return;
868 } 868 }
869 render_view_host()->SetInitialFocus(reverse); 869 render_view_host()->SetInitialFocus(reverse);
870 } 870 }
871 871
872 bool TabContents::FocusLocationBarByDefault() { 872 bool TabContents::FocusLocationBarByDefault() {
873 DOMUI* dom_ui = GetDOMUIForCurrentState(); 873 DOMUI* dom_ui = GetDOMUIForCurrentState();
874 if (dom_ui) 874 if (dom_ui)
875 return dom_ui->focus_location_bar_by_default(); 875 return dom_ui->focus_location_bar_by_default();
876 NavigationEntry* entry = controller_.GetActiveEntry(); 876 NavigationEntry* entry = controller_.GetActiveEntry();
877 if (entry && entry->url() == GURL("about:blank")) 877 if (entry && entry->url() == GURL(chrome::kAboutBlankURL))
878 return true; 878 return true;
879 return false; 879 return false;
880 } 880 }
881 881
882 void TabContents::AddInfoBar(InfoBarDelegate* delegate) { 882 void TabContents::AddInfoBar(InfoBarDelegate* delegate) {
883 // Look through the existing InfoBarDelegates we have for a match. If we've 883 // Look through the existing InfoBarDelegates we have for a match. If we've
884 // already got one that matches, then we don't add the new one. 884 // already got one that matches, then we don't add the new one.
885 for (int i = 0; i < infobar_delegate_count(); ++i) { 885 for (int i = 0; i < infobar_delegate_count(); ++i) {
886 if (GetInfoBarDelegateAt(i)->EqualsDelegate(delegate)) 886 if (GetInfoBarDelegateAt(i)->EqualsDelegate(delegate))
887 return; 887 return;
(...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 2508
2509 default: 2509 default:
2510 NOTREACHED(); 2510 NOTREACHED();
2511 } 2511 }
2512 } 2512 }
2513 2513
2514 void TabContents::set_encoding(const std::string& encoding) { 2514 void TabContents::set_encoding(const std::string& encoding) {
2515 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); 2515 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding);
2516 } 2516 }
2517 2517
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/test/site_instance_unittest.cc ('k') | chrome/browser/tab_contents/web_contents_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698