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

Unified Diff: chrome/browser/views/edit_keyword_controller.cc

Issue 113940: Make Textfield more portable.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/bug_report_view.cc ('k') | chrome/browser/views/find_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/edit_keyword_controller.cc
===================================================================
--- chrome/browser/views/edit_keyword_controller.cc (revision 17056)
+++ chrome/browser/views/edit_keyword_controller.cc (working copy)
@@ -81,7 +81,7 @@
bool EditKeywordController::IsDialogButtonEnabled(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
- return (IsKeywordValid() && !title_tf_->GetText().empty() && IsURLValid());
+ return (IsKeywordValid() && !title_tf_->text().empty() && IsURLValid());
}
return true;
}
@@ -99,7 +99,7 @@
bool EditKeywordController::Accept() {
std::wstring url_string = GetURL();
DCHECK(!url_string.empty());
- const std::wstring& keyword = keyword_tf_->GetText();
+ const std::wstring& keyword = keyword_tf_->text();
const TemplateURL* existing =
profile_->GetTemplateURLModel()->GetTemplateURLForKeyword(keyword);
@@ -123,7 +123,7 @@
// does in a similar situation (updating an existing TemplateURL with
// data from a new one).
TemplateURL* modifiable_url = const_cast<TemplateURL*>(template_url_);
- modifiable_url->set_short_name(title_tf_->GetText());
+ modifiable_url->set_short_name(title_tf_->text());
modifiable_url->set_keyword(keyword);
modifiable_url->SetURL(url_string, 0, 0);
// TemplateURLModel takes ownership of template_url_.
@@ -133,16 +133,16 @@
// Adding a new entry via the KeywordEditorView.
DCHECK(keyword_editor_view_);
if (keyword_editor_view_)
- keyword_editor_view_->AddTemplateURL(title_tf_->GetText(),
- keyword_tf_->GetText(),
+ keyword_editor_view_->AddTemplateURL(title_tf_->text(),
+ keyword_tf_->text(),
url_string);
} else {
// Modifying an entry via the KeywordEditorView.
DCHECK(keyword_editor_view_);
if (keyword_editor_view_) {
keyword_editor_view_->ModifyTemplateURL(template_url_,
- title_tf_->GetText(),
- keyword_tf_->GetText(),
+ title_tf_->text(),
+ keyword_tf_->text(),
url_string);
}
}
@@ -304,7 +304,7 @@
std::wstring EditKeywordController::GetURL() const {
std::wstring url;
- TrimWhitespace(TemplateURLRef::DisplayURLToURLRef(url_tf_->GetText()),
+ TrimWhitespace(TemplateURLRef::DisplayURLToURLRef(url_tf_->text()),
TRIM_ALL, &url);
if (url.empty())
return url;
@@ -323,7 +323,7 @@
}
bool EditKeywordController::IsKeywordValid() const {
- std::wstring keyword = keyword_tf_->GetText();
+ std::wstring keyword = keyword_tf_->text();
if (keyword.empty())
return true; // Always allow no keyword.
const TemplateURL* turl_with_keyword =
@@ -335,7 +335,7 @@
UpdateImageView(keyword_iv_, IsKeywordValid(),
IDS_SEARCH_ENGINES_INVALID_KEYWORD_TT);
UpdateImageView(url_iv_, IsURLValid(), IDS_SEARCH_ENGINES_INVALID_URL_TT);
- UpdateImageView(title_iv_, !title_tf_->GetText().empty(),
+ UpdateImageView(title_iv_, !title_tf_->text().empty(),
IDS_SEARCH_ENGINES_INVALID_TITLE_TT);
}
« no previous file with comments | « chrome/browser/views/bug_report_view.cc ('k') | chrome/browser/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698