summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-27 19:47:23 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-27 19:47:23 +0000
commitba96e33fd8a5b9610de51f6d3e15e6c469674dc2 (patch)
treeda17919af6b99801762e4d7618e92e53dc13a9f3 /chrome
parent44c1d4872df77d6ac3bd064a7634078c443a332f (diff)
downloadchromium_src-ba96e33fd8a5b9610de51f6d3e15e6c469674dc2.zip
chromium_src-ba96e33fd8a5b9610de51f6d3e15e6c469674dc2.tar.gz
chromium_src-ba96e33fd8a5b9610de51f6d3e15e6c469674dc2.tar.bz2
Move text_field.cc and rename the class to Textfield in preparation for porting.
BUG=none TEST=none Review URL: http://codereview.chromium.org/115825 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17014 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/debugger/debugger_view.cc1
-rw-r--r--chrome/browser/debugger/debugger_view.h2
-rw-r--r--chrome/browser/input_window_dialog_win.cc28
-rw-r--r--chrome/browser/views/about_chrome_view.cc4
-rw-r--r--chrome/browser/views/about_chrome_view.h4
-rw-r--r--chrome/browser/views/about_network_dialog.cc6
-rw-r--r--chrome/browser/views/about_network_dialog.h4
-rw-r--r--chrome/browser/views/bookmark_bubble_view.cc4
-rw-r--r--chrome/browser/views/bookmark_bubble_view.h6
-rw-r--r--chrome/browser/views/bookmark_editor_view.cc8
-rw-r--r--chrome/browser/views/bookmark_editor_view.h18
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc10
-rw-r--r--chrome/browser/views/bookmark_manager_view.h14
-rw-r--r--chrome/browser/views/bug_report_view.cc10
-rw-r--r--chrome/browser/views/bug_report_view.h16
-rw-r--r--chrome/browser/views/edit_keyword_controller.cc28
-rw-r--r--chrome/browser/views/edit_keyword_controller.h22
-rw-r--r--chrome/browser/views/find_bar_view.cc20
-rw-r--r--chrome/browser/views/find_bar_view.h18
-rw-r--r--chrome/browser/views/keyword_editor_view.cc2
-rw-r--r--chrome/browser/views/login_view.cc12
-rw-r--r--chrome/browser/views/login_view.h6
-rw-r--r--chrome/browser/views/new_profile_dialog.cc6
-rw-r--r--chrome/browser/views/new_profile_dialog.h12
-rw-r--r--chrome/browser/views/options/content_page_view.cc12
-rw-r--r--chrome/browser/views/options/cookies_view.cc46
-rw-r--r--chrome/browser/views/options/cookies_view.h14
-rw-r--r--chrome/browser/views/options/fonts_page_view.cc1
-rw-r--r--chrome/browser/views/options/general_page_view.cc12
-rw-r--r--chrome/browser/views/options/general_page_view.h14
-rw-r--r--chrome/browser/views/options/languages_page_view.cc1
-rw-r--r--chrome/browser/views/shelf_item_dialog.cc10
-rw-r--r--chrome/browser/views/shelf_item_dialog.h14
33 files changed, 191 insertions, 194 deletions
diff --git a/chrome/browser/debugger/debugger_view.cc b/chrome/browser/debugger/debugger_view.cc
index 81ce36e..8775aa5 100644
--- a/chrome/browser/debugger/debugger_view.cc
+++ b/chrome/browser/debugger/debugger_view.cc
@@ -25,7 +25,6 @@
#include "views/grid_layout.h"
#include "views/controls/scrollbar/native_scroll_bar.h"
#include "views/controls/scroll_view.h"
-#include "views/controls/text_field.h"
#include "views/standard_layout.h"
#include "views/view.h"
diff --git a/chrome/browser/debugger/debugger_view.h b/chrome/browser/debugger/debugger_view.h
index a83ce58..6790497 100644
--- a/chrome/browser/debugger/debugger_view.h
+++ b/chrome/browser/debugger/debugger_view.h
@@ -10,10 +10,10 @@
#ifndef CHROME_BROWSER_DEBUGGER_DEBUGGER_VIEW_H__
#define CHROME_BROWSER_DEBUGGER_DEBUGGER_VIEW_H__
+#include "app/gfx/font.h"
#include "base/gfx/size.h"
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
#include "views/view.h"
-#include "views/controls/text_field.h"
class DebuggerView;
class DebuggerWindow;
diff --git a/chrome/browser/input_window_dialog_win.cc b/chrome/browser/input_window_dialog_win.cc
index 3f7b641..1f942c0 100644
--- a/chrome/browser/input_window_dialog_win.cc
+++ b/chrome/browser/input_window_dialog_win.cc
@@ -10,14 +10,14 @@
#include "base/task.h"
#include "views/grid_layout.h"
#include "views/controls/label.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/standard_layout.h"
#include "views/window/dialog_delegate.h"
#include "views/window/window.h"
#include "grit/generated_resources.h"
// Width to make the text field, in pixels.
-static const int kTextFieldWidth = 200;
+static const int kTextfieldWidth = 200;
class ContentView;
@@ -57,7 +57,7 @@ class WinInputWindowDialog : public InputWindowDialog {
// It registers accelerators that accept/cancel the input.
class ContentView : public views::View,
public views::DialogDelegate,
- public views::TextField::Controller {
+ public views::Textfield::Controller {
public:
explicit ContentView(WinInputWindowDialog* delegate)
: delegate_(delegate),
@@ -75,11 +75,11 @@ class ContentView : public views::View,
virtual bool IsModal() const { return true; }
virtual views::View* GetContentsView();
- // views::TextField::Controller overrides:
- virtual void ContentsChanged(views::TextField* sender,
+ // views::Textfield::Controller overrides:
+ virtual void ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents);
- virtual bool HandleKeystroke(views::TextField*,
- const views::TextField::Keystroke&) {
+ virtual bool HandleKeystroke(views::Textfield*,
+ const views::Textfield::Keystroke&) {
return false;
}
@@ -95,14 +95,14 @@ class ContentView : public views::View,
// Sets focus to the first focusable element within the dialog.
void FocusFirstFocusableControl();
- // The TextField that the user can type into.
- views::TextField* text_field_;
+ // The Textfield that the user can type into.
+ views::Textfield* text_field_;
// The delegate that the ContentView uses to communicate changes to the
// caller.
WinInputWindowDialog* delegate_;
- // Helps us set focus to the first TextField in the window.
+ // Helps us set focus to the first Textfield in the window.
ScopedRunnableMethodFactory<ContentView> focus_grabber_factory_;
DISALLOW_COPY_AND_ASSIGN(ContentView);
@@ -143,9 +143,9 @@ views::View* ContentView::GetContentsView() {
}
///////////////////////////////////////////////////////////////////////////////
-// ContentView, views::TextField::Controller implementation:
+// ContentView, views::Textfield::Controller implementation:
-void ContentView::ContentsChanged(views::TextField* sender,
+void ContentView::ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents) {
GetDialogClientView()->UpdateDialogButtons();
}
@@ -164,7 +164,7 @@ void ContentView::ViewHierarchyChanged(bool is_add,
// ContentView, private:
void ContentView::InitControlLayout() {
- text_field_ = new views::TextField;
+ text_field_ = new views::Textfield;
text_field_->SetText(delegate_->contents());
text_field_->SetController(this);
@@ -180,7 +180,7 @@ void ContentView::InitControlLayout() {
GridLayout::USE_PREF, 0, 0);
c1->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
c1->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
- GridLayout::USE_PREF, kTextFieldWidth, kTextFieldWidth);
+ GridLayout::USE_PREF, kTextfieldWidth, kTextfieldWidth);
layout->StartRow(0, 0);
views::Label* label = new views::Label(delegate_->label());
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc
index a9cca4f..923e9bb 100644
--- a/chrome/browser/views/about_chrome_view.cc
+++ b/chrome/browser/views/about_chrome_view.cc
@@ -23,7 +23,7 @@
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/controls/throbber.h"
#include "views/standard_layout.h"
#include "views/widget/widget.h"
@@ -172,7 +172,7 @@ void AboutChromeView::Init() {
AddChildView(about_title_label_);
// This is a text field so people can copy the version number from the dialog.
- version_label_ = new views::TextField();
+ version_label_ = new views::Textfield();
version_label_->SetText(current_version_);
version_label_->SetReadOnly(true);
version_label_->RemoveBorder();
diff --git a/chrome/browser/views/about_chrome_view.h b/chrome/browser/views/about_chrome_view.h
index 64438bb..8935cf9 100644
--- a/chrome/browser/views/about_chrome_view.h
+++ b/chrome/browser/views/about_chrome_view.h
@@ -13,7 +13,7 @@
#include "views/window/dialog_delegate.h"
namespace views {
-class TextField;
+class Textfield;
class Throbber;
class Window;
}
@@ -126,7 +126,7 @@ class AboutChromeView : public views::View,
// UI elements on the dialog.
views::ImageView* about_dlg_background_logo_;
views::Label* about_title_label_;
- views::TextField* version_label_;
+ views::Textfield* version_label_;
views::Label* copyright_label_;
views::Label* main_text_label_;
int main_text_label_height_;
diff --git a/chrome/browser/views/about_network_dialog.cc b/chrome/browser/views/about_network_dialog.cc
index 74235ba..51e5670 100644
--- a/chrome/browser/views/about_network_dialog.cc
+++ b/chrome/browser/views/about_network_dialog.cc
@@ -12,7 +12,7 @@
#include "net/url_request/url_request_job_tracker.h"
#include "views/grid_layout.h"
#include "views/controls/button/text_button.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/standard_layout.h"
#include "views/window/window.h"
@@ -300,8 +300,8 @@ void AboutNetworkDialog::SetupControls() {
show_button_ = new views::TextButton(this, kShowCurrentLabel);
clear_button_ = new views::TextButton(this, kClearLabel);
- text_field_ = new views::TextField(static_cast<views::TextField::StyleFlags>(
- views::TextField::STYLE_MULTILINE));
+ text_field_ = new views::Textfield(static_cast<views::Textfield::StyleFlags>(
+ views::Textfield::STYLE_MULTILINE));
text_field_->SetReadOnly(true);
// TODO(brettw): We may want to add this in the future. It can't be called
diff --git a/chrome/browser/views/about_network_dialog.h b/chrome/browser/views/about_network_dialog.h
index d49da4e..54dd254 100644
--- a/chrome/browser/views/about_network_dialog.h
+++ b/chrome/browser/views/about_network_dialog.h
@@ -11,7 +11,7 @@
namespace views {
class TextButton;
-class TextField;
+class Textfield;
} // namespace views
class AboutNetworkDialog : public views::DialogDelegate,
@@ -53,7 +53,7 @@ class AboutNetworkDialog : public views::DialogDelegate,
views::TextButton* track_toggle_;
views::TextButton* show_button_;
views::TextButton* clear_button_;
- views::TextField* text_field_;
+ views::Textfield* text_field_;
// Set to true when we're tracking network status.
bool tracking_;
diff --git a/chrome/browser/views/bookmark_bubble_view.cc b/chrome/browser/views/bookmark_bubble_view.cc
index d6f0a99..e1e75ac 100644
--- a/chrome/browser/views/bookmark_bubble_view.cc
+++ b/chrome/browser/views/bookmark_bubble_view.cc
@@ -19,7 +19,7 @@
#include "grit/theme_resources.h"
#include "views/standard_layout.h"
#include "views/controls/button/native_button.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
using views::ComboBox;
using views::ColumnSet;
@@ -285,7 +285,7 @@ void BookmarkBubbleView::Init() {
layout->StartRow(0, 2);
layout->AddView(
new Label(l10n_util::GetString(IDS_BOOMARK_BUBBLE_TITLE_TEXT)));
- title_tf_ = new views::TextField();
+ title_tf_ = new views::Textfield();
title_tf_->SetText(GetTitle());
layout->AddView(title_tf_);
diff --git a/chrome/browser/views/bookmark_bubble_view.h b/chrome/browser/views/bookmark_bubble_view.h
index a6e032a2..187a193e 100644
--- a/chrome/browser/views/bookmark_bubble_view.h
+++ b/chrome/browser/views/bookmark_bubble_view.h
@@ -20,7 +20,7 @@ class BookmarkNode;
namespace views {
class NativeButton;
-class TextField;
+class Textfield;
}
// BookmarkBubbleView is a view intended to be used as the content of an
@@ -155,8 +155,8 @@ class BookmarkBubbleView : public views::View,
// Button to close the window.
views::NativeButton* close_button_;
- // TextField showing the title of the bookmark.
- views::TextField* title_tf_;
+ // Textfield showing the title of the bookmark.
+ views::Textfield* title_tf_;
// ComboBox showing a handful of folders the user can choose from, including
// the current parent.
diff --git a/chrome/browser/views/bookmark_editor_view.cc b/chrome/browser/views/bookmark_editor_view.cc
index b79ef28..f479997 100644
--- a/chrome/browser/views/bookmark_editor_view.cc
+++ b/chrome/browser/views/bookmark_editor_view.cc
@@ -33,7 +33,7 @@ using views::ColumnSet;
using views::GridLayout;
using views::Label;
using views::NativeButton;
-using views::TextField;
+using views::Textfield;
// Background color of text field when URL is invalid.
static const SkColor kErrorColor = SkColorSetRGB(0xFF, 0xBC, 0xBC);
@@ -170,7 +170,7 @@ bool BookmarkEditorView::CanEdit(views::TreeView* tree_view,
return (bb_node->GetParent() && bb_node->GetParent()->GetParent());
}
-void BookmarkEditorView::ContentsChanged(TextField* sender,
+void BookmarkEditorView::ContentsChanged(Textfield* sender,
const std::wstring& new_contents) {
UserInputChanged();
}
@@ -207,9 +207,9 @@ void BookmarkEditorView::Show(HWND parent_hwnd) {
if (show_tree_ && bb_model_->IsLoaded())
ExpandAndSelect();
window()->Show();
- // Select all the text in the name textfield.
+ // Select all the text in the name Textfield.
title_tf_.SelectAll();
- // Give focus to the name textfield.
+ // Give focus to the name Textfield.
title_tf_.RequestFocus();
}
diff --git a/chrome/browser/views/bookmark_editor_view.h b/chrome/browser/views/bookmark_editor_view.h
index 055b1a8..1758325 100644
--- a/chrome/browser/views/bookmark_editor_view.h
+++ b/chrome/browser/views/bookmark_editor_view.h
@@ -12,7 +12,7 @@
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "views/controls/button/button.h"
#include "views/controls/menu/menu.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/controls/tree/tree_view.h"
#include "views/window/dialog_delegate.h"
@@ -38,7 +38,7 @@ class BookmarkEditorView : public BookmarkEditor,
public views::ButtonListener,
public views::TreeViewController,
public views::DialogDelegate,
- public views::TextField::Controller,
+ public views::Textfield::Controller,
public views::ContextMenuController,
public views::Menu::Delegate,
public BookmarkModelObserver {
@@ -80,11 +80,11 @@ class BookmarkEditorView : public BookmarkEditor,
virtual void OnTreeViewSelectionChanged(views::TreeView* tree_view);
virtual bool CanEdit(views::TreeView* tree_view, TreeModelNode* node);
- // TextField::Controller methods.
- virtual void ContentsChanged(views::TextField* sender,
+ // Textfield::Controller methods.
+ virtual void ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents);
- virtual bool HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke&) {
+ virtual bool HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke&) {
return false;
}
@@ -206,7 +206,7 @@ class BookmarkEditorView : public BookmarkEditor,
std::wstring GetInputTitle() const;
// Invoked when the url or title has possibly changed. Updates the background
- // of textfields and ok button appropriately.
+ // of Textfields and ok button appropriately.
void UserInputChanged();
// Creates a new group as a child of the selected node. If no node is
@@ -232,10 +232,10 @@ class BookmarkEditorView : public BookmarkEditor,
scoped_ptr<views::NativeButton> new_group_button_;
// Used for editing the URL.
- views::TextField url_tf_;
+ views::Textfield url_tf_;
// Used for editing the title.
- views::TextField title_tf_;
+ views::Textfield title_tf_;
// Initial parent to select. Is only used if node_ is NULL.
BookmarkNode* parent_;
diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc
index 761f34c..e772c5a 100644
--- a/chrome/browser/views/bookmark_manager_view.cc
+++ b/chrome/browser/views/bookmark_manager_view.cc
@@ -147,7 +147,7 @@ BookmarkManagerView::BookmarkManagerView(Profile* profile)
table_view_(NULL),
tree_view_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(search_factory_(this)) {
- search_tf_ = new views::TextField();
+ search_tf_ = new views::Textfield();
search_tf_->set_default_width_in_chars(30);
table_view_ = new BookmarkTableView(profile_, NULL);
@@ -480,7 +480,7 @@ void BookmarkManagerView::Loaded(BookmarkModel* model) {
LoadedImpl();
}
-void BookmarkManagerView::ContentsChanged(views::TextField* sender,
+void BookmarkManagerView::ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents) {
search_factory_.RevokeAll();
MessageLoop::current()->PostDelayedTask(FROM_HERE,
@@ -489,9 +489,9 @@ void BookmarkManagerView::ContentsChanged(views::TextField* sender,
}
bool BookmarkManagerView::HandleKeystroke(
- views::TextField* sender,
- const views::TextField::Keystroke& key) {
- if (views::TextField::IsKeystrokeEnter(key)) {
+ views::Textfield* sender,
+ const views::Textfield::Keystroke& key) {
+ if (views::Textfield::IsKeystrokeEnter(key)) {
PerformSearch();
search_tf_->SelectAll();
}
diff --git a/chrome/browser/views/bookmark_manager_view.h b/chrome/browser/views/bookmark_manager_view.h
index 814f3a6..a6ee77c96 100644
--- a/chrome/browser/views/bookmark_manager_view.h
+++ b/chrome/browser/views/bookmark_manager_view.h
@@ -12,7 +12,7 @@
#include "chrome/browser/shell_dialogs.h"
#include "views/controls/menu/view_menu_delegate.h"
#include "views/controls/table/table_view.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/controls/tree/tree_view.h"
#include "views/view.h"
#include "views/window/window_delegate.h"
@@ -38,7 +38,7 @@ class BookmarkManagerView : public views::View,
public views::WindowDelegate,
public views::TreeViewController,
public views::TableViewObserver,
- public views::TextField::Controller,
+ public views::Textfield::Controller,
public BookmarkModelObserver,
public views::ContextMenuController,
public views::ViewMenuDelegate,
@@ -136,13 +136,13 @@ class BookmarkManagerView : public views::View,
virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model,
BookmarkNode* node) {}
- // TextField::Controller methods.
+ // Textfield::Controller methods.
// Starts a timer to search for the search text.
- virtual void ContentsChanged(views::TextField* sender,
+ virtual void ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents);
// If return has been pressed this performs an immediate search.
- virtual bool HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key);
+ virtual bool HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key);
// ContextMenuController.
virtual void ShowContextMenu(views::View* source,
@@ -210,7 +210,7 @@ class BookmarkManagerView : public views::View,
BookmarkFolderTreeView* tree_view_;
scoped_ptr<BookmarkTableModel> table_model_;
scoped_ptr<BookmarkFolderTreeModel> tree_model_;
- views::TextField* search_tf_;
+ views::Textfield* search_tf_;
views::SingleSplitView* split_view_;
// Import/export file dialog.
diff --git a/chrome/browser/views/bug_report_view.cc b/chrome/browser/views/bug_report_view.cc
index a349b31..b6eb9d3 100644
--- a/chrome/browser/views/bug_report_view.cc
+++ b/chrome/browser/views/bug_report_view.cc
@@ -200,13 +200,13 @@ void BugReportView::SetupControl() {
page_url_label_ = new views::Label(
l10n_util::GetString(IDS_BUGREPORT_REPORT_URL_LABEL));
// page_url_text_'s text (if any) is filled in after dialog creation
- page_url_text_ = new views::TextField;
+ page_url_text_ = new views::Textfield;
page_url_text_->SetController(this);
description_label_ = new views::Label(
l10n_util::GetString(IDS_BUGREPORT_DESCRIPTION_LABEL));
description_text_ =
- new views::TextField(views::TextField::STYLE_MULTILINE);
+ new views::Textfield(views::Textfield::STYLE_MULTILINE);
description_text_->SetHeightInLines(kDescriptionLines);
include_page_source_checkbox_ = new views::Checkbox(
@@ -298,12 +298,12 @@ void BugReportView::ItemChanged(views::ComboBox* combo_box,
GetDialogClientView()->UpdateDialogButtons();
}
-void BugReportView::ContentsChanged(views::TextField* sender,
+void BugReportView::ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents) {
}
-bool BugReportView::HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key) {
+bool BugReportView::HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key) {
return false;
}
diff --git a/chrome/browser/views/bug_report_view.h b/chrome/browser/views/bug_report_view.h
index 9fec67f..59df265 100644
--- a/chrome/browser/views/bug_report_view.h
+++ b/chrome/browser/views/bug_report_view.h
@@ -8,7 +8,7 @@
#include "chrome/browser/net/url_fetcher.h"
#include "googleurl/src/gurl.h"
#include "views/controls/combo_box.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/view.h"
#include "views/window/dialog_delegate.h"
@@ -35,7 +35,7 @@ class BugReportComboBoxModel;
class BugReportView : public views::View,
public views::DialogDelegate,
public views::ComboBox::Listener,
- public views::TextField::Controller {
+ public views::Textfield::Controller {
public:
explicit BugReportView(Profile* profile, TabContents* tab);
virtual ~BugReportView();
@@ -48,11 +48,11 @@ class BugReportView : public views::View,
// Overridden from views::View:
virtual gfx::Size GetPreferredSize();
- // views::TextField::Controller implementation:
- virtual void ContentsChanged(views::TextField* sender,
+ // views::Textfield::Controller implementation:
+ virtual void ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents);
- virtual bool HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key);
+ virtual bool HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key);
// views::ComboBox::Listener implementation:
virtual void ItemChanged(views::ComboBox* combo_box, int prev_index,
@@ -92,9 +92,9 @@ class BugReportView : public views::View,
views::Label* page_title_label_;
views::Label* page_title_text_;
views::Label* page_url_label_;
- views::TextField* page_url_text_;
+ views::Textfield* page_url_text_;
views::Label* description_label_;
- views::TextField* description_text_;
+ views::Textfield* description_text_;
views::Checkbox* include_page_source_checkbox_;
views::Checkbox* include_page_image_checkbox_;
diff --git a/chrome/browser/views/edit_keyword_controller.cc b/chrome/browser/views/edit_keyword_controller.cc
index c2142c5..56ec93e 100644
--- a/chrome/browser/views/edit_keyword_controller.cc
+++ b/chrome/browser/views/edit_keyword_controller.cc
@@ -26,7 +26,7 @@
using views::GridLayout;
using views::ImageView;
-using views::TextField;
+using views::Textfield;
namespace {
@@ -153,15 +153,15 @@ views::View* EditKeywordController::GetContentsView() {
return view_;
}
-void EditKeywordController::ContentsChanged(TextField* sender,
+void EditKeywordController::ContentsChanged(Textfield* sender,
const std::wstring& new_contents) {
GetDialogClientView()->UpdateDialogButtons();
UpdateImageViews();
}
bool EditKeywordController::HandleKeystroke(
- TextField* sender,
- const views::TextField::Keystroke& key) {
+ Textfield* sender,
+ const views::Textfield::Keystroke& key) {
return false;
}
@@ -169,16 +169,16 @@ void EditKeywordController::Init() {
// Create the views we'll need.
view_ = new views::View();
if (template_url_) {
- title_tf_ = CreateTextField(template_url_->short_name(), false);
- keyword_tf_ = CreateTextField(template_url_->keyword(), true);
- url_tf_ = CreateTextField(GetDisplayURL(*template_url_), false);
+ title_tf_ = CreateTextfield(template_url_->short_name(), false);
+ keyword_tf_ = CreateTextfield(template_url_->keyword(), true);
+ url_tf_ = CreateTextfield(GetDisplayURL(*template_url_), false);
// We don't allow users to edit prepopulate URLs. This is done as
// occasionally we need to update the URL of prepopulated TemplateURLs.
url_tf_->SetReadOnly(template_url_->prepopulate_id() != 0);
} else {
- title_tf_ = CreateTextField(std::wstring(), false);
- keyword_tf_ = CreateTextField(std::wstring(), true);
- url_tf_ = CreateTextField(std::wstring(), false);
+ title_tf_ = CreateTextfield(std::wstring(), false);
+ keyword_tf_ = CreateTextfield(std::wstring(), true);
+ url_tf_ = CreateTextfield(std::wstring(), false);
}
title_iv_ = new ImageView();
keyword_iv_ = new ImageView();
@@ -206,7 +206,7 @@ void EditKeywordController::Init() {
GridLayout::USE_PREF, 0, 0);
column_set->LinkColumnSizes(1, 3, -1);
- // For the textfields.
+ // For the Textfields.
column_set = layout->AddColumnSet(1);
column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
@@ -273,10 +273,10 @@ views::Label* EditKeywordController::CreateLabel(int message_id) {
return label;
}
-TextField* EditKeywordController::CreateTextField(const std::wstring& text,
+Textfield* EditKeywordController::CreateTextfield(const std::wstring& text,
bool lowercase) {
- TextField* text_field = new TextField(
- lowercase ? TextField::STYLE_LOWERCASE : TextField::STYLE_DEFAULT);
+ Textfield* text_field = new Textfield(
+ lowercase ? Textfield::STYLE_LOWERCASE : Textfield::STYLE_DEFAULT);
text_field->SetText(text);
text_field->SetController(this);
return text_field;
diff --git a/chrome/browser/views/edit_keyword_controller.h b/chrome/browser/views/edit_keyword_controller.h
index baf7efd..432ed14 100644
--- a/chrome/browser/views/edit_keyword_controller.h
+++ b/chrome/browser/views/edit_keyword_controller.h
@@ -12,7 +12,7 @@
#include <windows.h>
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/window/dialog_delegate.h"
namespace views {
@@ -26,7 +26,7 @@ class Profile;
class TemplateURL;
class TemplateURLModel;
-class EditKeywordController : public views::TextField::Controller,
+class EditKeywordController : public views::Textfield::Controller,
public views::DialogDelegate {
public:
// The template_url and/or keyword_editor_view may be NULL.
@@ -51,13 +51,13 @@ class EditKeywordController : public views::TextField::Controller,
virtual bool Accept();
virtual views::View* GetContentsView();
- // views::TextField::Controller overrides. Updates whether the user can
+ // views::Textfield::Controller overrides. Updates whether the user can
// accept the dialog as well as updating image views showing whether value is
// valid.
- virtual void ContentsChanged(views::TextField* sender,
+ virtual void ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents);
- virtual bool HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key);
+ virtual bool HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key);
private:
void Init();
@@ -66,8 +66,8 @@ class EditKeywordController : public views::TextField::Controller,
views::Label* CreateLabel(int message_id);
// Creates a text field with the specified text. If |lowercase| is true, the
- // textfield is configured to map all input to lower case.
- views::TextField* CreateTextField(const std::wstring& text, bool lowercase);
+ // Textfield is configured to map all input to lower case.
+ views::Textfield* CreateTextfield(const std::wstring& text, bool lowercase);
// Returns true if the currently input URL is valid. The URL is valid if it
// contains no search terms and is a valid url, or if it contains a search
@@ -117,9 +117,9 @@ class EditKeywordController : public views::TextField::Controller,
Profile* profile_;
// Text fields.
- views::TextField* title_tf_;
- views::TextField* keyword_tf_;
- views::TextField* url_tf_;
+ views::Textfield* title_tf_;
+ views::Textfield* keyword_tf_;
+ views::Textfield* url_tf_;
// Shows error images.
views::ImageView* title_iv_;
diff --git a/chrome/browser/views/find_bar_view.cc b/chrome/browser/views/find_bar_view.cc
index 8685246..42e0531 100644
--- a/chrome/browser/views/find_bar_view.cc
+++ b/chrome/browser/views/find_bar_view.cc
@@ -28,7 +28,7 @@ static const int kWhiteSpaceAfterMatchCountLabel = 3;
// The margins around the search field and the close button.
static const int kMarginLeftOfCloseButton = 3;
static const int kMarginRightOfCloseButton = 7;
-static const int kMarginLeftOfFindTextField = 12;
+static const int kMarginLeftOfFindTextfield = 12;
// The margins around the match count label (We add extra space so that the
// background highlight extends beyond just the text).
@@ -87,7 +87,7 @@ FindBarView::FindBarView(FindBarWin* container)
animation_offset_(0) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- find_text_ = new views::TextField();
+ find_text_ = new views::Textfield();
find_text_->SetID(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD);
find_text_->SetFont(rb.GetFont(ResourceBundle::BaseFont));
find_text_->set_default_width_in_chars(kDefaultCharWidth);
@@ -256,7 +256,7 @@ void FindBarView::Paint(gfx::Canvas* canvas) {
canvas->DrawBitmapInt(*kDialog_right, lb.right() - kDialog_right->width(), 0);
- // Then we draw the background image for the Find TextField. We start by
+ // Then we draw the background image for the Find Textfield. We start by
// calculating the position of background images for the Find text box.
gfx::Rect find_text_rect;
gfx::Rect back_button_rect;
@@ -352,7 +352,7 @@ void FindBarView::Layout() {
// And whatever space is left in between, gets filled up by the find edit box.
sz = find_text_->GetPreferredSize();
- sz.set_width(match_count_text_->x() - kMarginLeftOfFindTextField);
+ sz.set_width(match_count_text_->x() - kMarginLeftOfFindTextfield);
find_text_->SetBounds(match_count_text_->x() - sz.width(),
(height() - sz.height()) / 2 + 1,
sz.width(),
@@ -383,7 +383,7 @@ gfx::Size FindBarView::GetPreferredSize() {
// Add up all the preferred sizes and margins of the rest of the controls.
prefsize.Enlarge(kMarginLeftOfCloseButton + kMarginRightOfCloseButton +
- kMarginLeftOfFindTextField,
+ kMarginLeftOfFindTextfield,
0);
prefsize.Enlarge(find_previous_button_->GetPreferredSize().width(), 0);
prefsize.Enlarge(find_next_button_->GetPreferredSize().width(), 0);
@@ -420,9 +420,9 @@ void FindBarView::ButtonPressed(views::Button* sender) {
}
////////////////////////////////////////////////////////////////////////////////
-// FindBarView, views::TextField::Controller implementation:
+// FindBarView, views::Textfield::Controller implementation:
-void FindBarView::ContentsChanged(views::TextField* sender,
+void FindBarView::ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents) {
FindBarController* controller = container_->GetFindBarController();
DCHECK(controller);
@@ -445,8 +445,8 @@ void FindBarView::ContentsChanged(views::TextField* sender,
}
}
-bool FindBarView::HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key) {
+bool FindBarView::HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key) {
// If the dialog is not visible, there is no reason to process keyboard input.
if (!container_->IsVisible())
return false;
@@ -457,7 +457,7 @@ bool FindBarView::HandleKeystroke(views::TextField* sender,
key.flags))
return true; // Handled, we are done!
- if (views::TextField::IsKeystrokeEnter(key)) {
+ if (views::Textfield::IsKeystrokeEnter(key)) {
// Pressing Return/Enter starts the search (unless text box is empty).
std::wstring find_string = find_text_->GetText();
if (!find_string.empty()) {
diff --git a/chrome/browser/views/find_bar_view.h b/chrome/browser/views/find_bar_view.h
index a769887..f83b175 100644
--- a/chrome/browser/views/find_bar_view.h
+++ b/chrome/browser/views/find_bar_view.h
@@ -9,7 +9,7 @@
#include "base/string16.h"
#include "chrome/browser/find_notification_details.h"
#include "views/controls/button/button.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
class FindBarWin;
@@ -29,7 +29,7 @@ class View;
////////////////////////////////////////////////////////////////////////////////
class FindBarView : public views::View,
public views::ButtonListener,
- public views::TextField::Controller {
+ public views::Textfield::Controller {
public:
// A tag denoting which button the user pressed.
enum ButtonTag {
@@ -65,11 +65,11 @@ class FindBarView : public views::View,
// Overridden from views::ButtonListener:
virtual void ButtonPressed(views::Button* sender);
- // Overridden from views::TextField::Controller:
- virtual void ContentsChanged(views::TextField* sender,
+ // Overridden from views::Textfield::Controller:
+ virtual void ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents);
- virtual bool HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key);
+ virtual bool HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key);
private:
// Resets the background for the match count label.
@@ -84,13 +84,13 @@ class FindBarView : public views::View,
class FocusForwarderView : public views::View {
public:
explicit FocusForwarderView(
- views::TextField* view_to_focus_on_mousedown)
+ views::Textfield* view_to_focus_on_mousedown)
: view_to_focus_on_mousedown_(view_to_focus_on_mousedown) {}
private:
virtual bool OnMousePressed(const views::MouseEvent& event);
- views::TextField* view_to_focus_on_mousedown_;
+ views::Textfield* view_to_focus_on_mousedown_;
DISALLOW_COPY_AND_ASSIGN(FocusForwarderView);
};
@@ -100,7 +100,7 @@ class FindBarView : public views::View,
FindBarWin* container_;
// The controls in the window.
- views::TextField* find_text_;
+ views::Textfield* find_text_;
views::Label* match_count_text_;
FocusForwarderView* focus_forwarder_view_;
views::ImageButton* find_previous_button_;
diff --git a/chrome/browser/views/keyword_editor_view.cc b/chrome/browser/views/keyword_editor_view.cc
index d84afa0..d17056d 100644
--- a/chrome/browser/views/keyword_editor_view.cc
+++ b/chrome/browser/views/keyword_editor_view.cc
@@ -28,7 +28,7 @@
#include "views/background.h"
#include "views/grid_layout.h"
#include "views/controls/button/native_button.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/standard_layout.h"
#include "views/widget/widget.h"
#include "views/window/dialog_delegate.h"
diff --git a/chrome/browser/views/login_view.cc b/chrome/browser/views/login_view.cc
index df7f1b4..d4e40f8 100644
--- a/chrome/browser/views/login_view.cc
+++ b/chrome/browser/views/login_view.cc
@@ -12,21 +12,21 @@
#include "grit/generated_resources.h"
#include "views/grid_layout.h"
#include "views/controls/label.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/standard_layout.h"
#include "views/widget/root_view.h"
namespace views {
static const int kMessageWidth = 320;
-static const int kTextFieldStackHorizontalSpacing = 30;
+static const int kTextfieldStackHorizontalSpacing = 30;
///////////////////////////////////////////////////////////////////////////////
// LoginView, public:
LoginView::LoginView(const std::wstring& explanation)
- : username_field_(new TextField),
- password_field_(new TextField(TextField::STYLE_PASSWORD)),
+ : username_field_(new Textfield),
+ password_field_(new Textfield(Textfield::STYLE_PASSWORD)),
username_label_(new Label(
l10n_util::GetString(IDS_LOGIN_DIALOG_USERNAME_FIELD))),
password_label_(new Label(
@@ -51,13 +51,13 @@ LoginView::LoginView(const std::wstring& explanation)
// Add the column set for the user name and password fields and labels.
const int labels_column_set_id = 1;
column_set = layout->AddColumnSet(labels_column_set_id);
- column_set->AddPaddingColumn(0, kTextFieldStackHorizontalSpacing);
+ column_set->AddPaddingColumn(0, kTextfieldStackHorizontalSpacing);
column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
GridLayout::USE_PREF, 0, 0);
- column_set->AddPaddingColumn(0, kTextFieldStackHorizontalSpacing);
+ column_set->AddPaddingColumn(0, kTextfieldStackHorizontalSpacing);
layout->StartRow(0, single_column_view_set_id);
layout->AddView(message_label_);
diff --git a/chrome/browser/views/login_view.h b/chrome/browser/views/login_view.h
index fa0a837..b5868b1 100644
--- a/chrome/browser/views/login_view.h
+++ b/chrome/browser/views/login_view.h
@@ -10,7 +10,7 @@
namespace views {
class Label;
-class TextField;
+class Textfield;
class LoginModel;
// Simple Model & Observer interfaces for a LoginView to facilitate exchanging
@@ -60,8 +60,8 @@ class LoginView : public View, public LoginModelObserver {
void FocusFirstField();
// Non-owning refs to the input text fields.
- TextField* username_field_;
- TextField* password_field_;
+ Textfield* username_field_;
+ Textfield* password_field_;
// Button labels
Label* username_label_;
diff --git a/chrome/browser/views/new_profile_dialog.cc b/chrome/browser/views/new_profile_dialog.cc
index 8b851f4..c3b12bb 100644
--- a/chrome/browser/views/new_profile_dialog.cc
+++ b/chrome/browser/views/new_profile_dialog.cc
@@ -15,7 +15,7 @@
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "views/controls/message_box_view.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/view.h"
#include "views/window/window.h"
@@ -56,7 +56,7 @@ NewProfileDialog::~NewProfileDialog() {
}
views::View* NewProfileDialog::GetInitiallyFocusedView() {
- views::TextField* text_box = message_box_view_->text_box();
+ views::Textfield* text_box = message_box_view_->text_box();
DCHECK(text_box);
return text_box;
}
@@ -85,7 +85,7 @@ void NewProfileDialog::DeleteDelegate() {
delete this;
}
-void NewProfileDialog::ContentsChanged(views::TextField* sender,
+void NewProfileDialog::ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents) {
GetDialogClientView()->UpdateDialogButtons();
}
diff --git a/chrome/browser/views/new_profile_dialog.h b/chrome/browser/views/new_profile_dialog.h
index a06729d..2ce169e 100644
--- a/chrome/browser/views/new_profile_dialog.h
+++ b/chrome/browser/views/new_profile_dialog.h
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/message_loop.h"
#include "chrome/browser/shell_dialogs.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/window/dialog_delegate.h"
class MessageBoxView;
@@ -22,7 +22,7 @@ class Window;
// Dialog that prompts the user to create a new profile.
class NewProfileDialog : public views::DialogDelegate,
- public views::TextField::Controller {
+ public views::Textfield::Controller {
public:
// Creates and runs the dialog.
static void RunDialog();
@@ -36,11 +36,11 @@ class NewProfileDialog : public views::DialogDelegate,
virtual std::wstring GetWindowTitle() const;
virtual void DeleteDelegate();
- // views::TextField::Controller methods.
- virtual void ContentsChanged(views::TextField* sender,
+ // views::Textfield::Controller methods.
+ virtual void ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents);
- virtual bool HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key) {
+ virtual bool HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key) {
return false;
}
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index e5667f2..639e0e7 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -28,7 +28,7 @@
#include "skia/ext/skia_utils_win.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/controls/button/radio_button.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/grid_layout.h"
#include "views/standard_layout.h"
#include "views/widget/widget.h"
@@ -40,7 +40,7 @@ static const int kPasswordSavingRadioGroup = 2;
static const int kFileIconSize = 16;
static const int kFileIconVerticalSpacing = 3;
static const int kFileIconHorizontalSpacing = 3;
-static const int kFileIconTextFieldSpacing = 3;
+static const int kFileIconTextfieldSpacing = 3;
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -67,7 +67,7 @@ class FileDisplayArea : public views::View {
private:
void Init();
- views::TextField* text_field_;
+ views::Textfield* text_field_;
SkColor text_field_background_color_;
gfx::Rect icon_bounds_;
@@ -84,7 +84,7 @@ class FileDisplayArea : public views::View {
SkBitmap FileDisplayArea::default_folder_icon_;
FileDisplayArea::FileDisplayArea()
- : text_field_(new views::TextField),
+ : text_field_(new views::Textfield),
text_field_background_color_(0),
initialized_(false) {
InitClass();
@@ -121,11 +121,11 @@ void FileDisplayArea::Layout() {
icon_bounds_.SetRect(kFileIconHorizontalSpacing, kFileIconVerticalSpacing,
kFileIconSize, kFileIconSize);
gfx::Size ps = text_field_->GetPreferredSize();
- text_field_->SetBounds(icon_bounds_.right() + kFileIconTextFieldSpacing,
+ text_field_->SetBounds(icon_bounds_.right() + kFileIconTextfieldSpacing,
(height() - ps.height()) / 2,
width() - icon_bounds_.right() -
kFileIconHorizontalSpacing -
- kFileIconTextFieldSpacing, ps.height());
+ kFileIconTextfieldSpacing, ps.height());
}
gfx::Size FileDisplayArea::GetPreferredSize() {
diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc
index ac5e495..24dcaae 100644
--- a/chrome/browser/views/options/cookies_view.cc
+++ b/chrome/browser/views/options/cookies_view.cc
@@ -23,8 +23,8 @@
#include "views/grid_layout.h"
#include "views/controls/label.h"
#include "views/controls/button/native_button.h"
-#include "views/controls/text_field.h"
#include "views/controls/table/table_view.h"
+#include "views/controls/textfield/textfield.h"
#include "views/standard_layout.h"
// static
@@ -339,19 +339,19 @@ class CookieInfoView : public views::View {
// Individual property labels
views::Label* name_label_;
- views::TextField* name_value_field_;
+ views::Textfield* name_value_field_;
views::Label* content_label_;
- views::TextField* content_value_field_;
+ views::Textfield* content_value_field_;
views::Label* domain_label_;
- views::TextField* domain_value_field_;
+ views::Textfield* domain_value_field_;
views::Label* path_label_;
- views::TextField* path_value_field_;
+ views::Textfield* path_value_field_;
views::Label* send_for_label_;
- views::TextField* send_for_value_field_;
+ views::Textfield* send_for_value_field_;
views::Label* created_label_;
- views::TextField* created_value_field_;
+ views::Textfield* created_value_field_;
views::Label* expires_label_;
- views::TextField* expires_value_field_;
+ views::Textfield* expires_value_field_;
DISALLOW_COPY_AND_ASSIGN(CookieInfoView);
};
@@ -453,25 +453,25 @@ void CookieInfoView::Init() {
name_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_NAME_LABEL));
- name_value_field_ = new views::TextField;
+ name_value_field_ = new views::Textfield;
content_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_CONTENT_LABEL));
- content_value_field_ = new views::TextField;
+ content_value_field_ = new views::Textfield;
domain_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_DOMAIN_LABEL));
- domain_value_field_ = new views::TextField;
+ domain_value_field_ = new views::Textfield;
path_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_PATH_LABEL));
- path_value_field_ = new views::TextField;
+ path_value_field_ = new views::Textfield;
send_for_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_SENDFOR_LABEL));
- send_for_value_field_ = new views::TextField;
+ send_for_value_field_ = new views::Textfield;
created_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_CREATED_LABEL));
- created_value_field_ = new views::TextField;
+ created_value_field_ = new views::Textfield;
expires_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_EXPIRES_LABEL));
- expires_value_field_ = new views::TextField;
+ expires_value_field_ = new views::Textfield;
using views::GridLayout;
using views::ColumnSet;
@@ -521,7 +521,7 @@ void CookieInfoView::Init() {
// Color these borderless text areas the same as the containing dialog.
SkColor text_area_background = color_utils::GetSysSkColor(COLOR_3DFACE);
- // Now that the TextFields are in the view hierarchy, we can initialize them.
+ // Now that the Textfields are in the view hierarchy, we can initialize them.
name_value_field_->SetReadOnly(true);
name_value_field_->RemoveBorder();
name_value_field_->SetBackgroundColor(text_area_background);
@@ -610,9 +610,9 @@ void CookiesView::OnTableViewDelete(views::TableView* table_view) {
}
///////////////////////////////////////////////////////////////////////////////
-// CookiesView, views::TextField::Controller implementation:
+// CookiesView, views::Textfield::Controller implementation:
-void CookiesView::ContentsChanged(views::TextField* sender,
+void CookiesView::ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents) {
search_update_factory_.RevokeAll();
MessageLoop::current()->PostDelayedTask(FROM_HERE,
@@ -620,11 +620,11 @@ void CookiesView::ContentsChanged(views::TextField* sender,
&CookiesView::UpdateSearchResults), kSearchFilterDelayMs);
}
-bool CookiesView::HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key) {
- if (views::TextField::IsKeystrokeEscape(key)) {
+bool CookiesView::HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key) {
+ if (views::Textfield::IsKeystrokeEscape(key)) {
ResetSearchQuery();
- } else if (views::TextField::IsKeystrokeEnter(key)) {
+ } else if (views::Textfield::IsKeystrokeEnter(key)) {
search_update_factory_.RevokeAll();
UpdateSearchResults();
}
@@ -700,7 +700,7 @@ CookiesView::CookiesView(Profile* profile)
void CookiesView::Init() {
search_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_SEARCH_LABEL));
- search_field_ = new views::TextField;
+ search_field_ = new views::Textfield;
search_field_->SetController(this);
clear_search_button_ = new views::NativeButton(
this, l10n_util::GetString(IDS_COOKIES_CLEAR_SEARCH_LABEL));
diff --git a/chrome/browser/views/options/cookies_view.h b/chrome/browser/views/options/cookies_view.h
index 7de565d..521dc7f 100644
--- a/chrome/browser/views/options/cookies_view.h
+++ b/chrome/browser/views/options/cookies_view.h
@@ -8,7 +8,7 @@
#include "base/task.h"
#include "views/controls/button/button.h"
#include "views/controls/table/table_view.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/view.h"
#include "views/window/dialog_delegate.h"
#include "views/window/window.h"
@@ -27,7 +27,7 @@ class CookiesView : public views::View,
public views::DialogDelegate,
public views::ButtonListener,
public views::TableViewObserver,
- public views::TextField::Controller {
+ public views::Textfield::Controller {
public:
// Show the Cookies Window, creating one if necessary.
static void ShowCookiesWindow(Profile* profile);
@@ -47,11 +47,11 @@ class CookiesView : public views::View,
// cookies.
virtual void OnTableViewDelete(views::TableView* table_view);
- // views::TextField::Controller implementation:
- virtual void ContentsChanged(views::TextField* sender,
+ // views::Textfield::Controller implementation:
+ virtual void ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents);
- virtual bool HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key);
+ virtual bool HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key);
// views::WindowDelegate implementation:
virtual int GetDialogButtons() const {
@@ -90,7 +90,7 @@ class CookiesView : public views::View,
// Assorted dialog controls
views::Label* search_label_;
- views::TextField* search_field_;
+ views::Textfield* search_field_;
views::NativeButton* clear_search_button_;
views::Label* description_label_;
CookiesTableView* cookies_table_;
diff --git a/chrome/browser/views/options/fonts_page_view.cc b/chrome/browser/views/options/fonts_page_view.cc
index 73159b1..a8a115b 100644
--- a/chrome/browser/views/options/fonts_page_view.cc
+++ b/chrome/browser/views/options/fonts_page_view.cc
@@ -28,7 +28,6 @@
#include "grit/locale_settings.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/controls/button/native_button.h"
-#include "views/controls/text_field.h"
#include "views/grid_layout.h"
#include "views/standard_layout.h"
#include "views/widget/widget.h"
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index f315c27..a7b6806 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -36,7 +36,7 @@
#include "views/controls/button/radio_button.h"
#include "views/controls/label.h"
#include "views/controls/table/table_view.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/grid_layout.h"
#include "views/standard_layout.h"
@@ -606,9 +606,9 @@ void GeneralPageView::ItemChanged(views::ComboBox* combo_box,
}
///////////////////////////////////////////////////////////////////////////////
-// GeneralPageView, views::TextField::Controller implementation:
+// GeneralPageView, views::Textfield::Controller implementation:
-void GeneralPageView::ContentsChanged(views::TextField* sender,
+void GeneralPageView::ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents) {
if (sender == homepage_use_url_textfield_) {
// If the text field contains a valid URL, sync it to prefs. We run it
@@ -621,8 +621,8 @@ void GeneralPageView::ContentsChanged(views::TextField* sender,
}
}
-bool GeneralPageView::HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke&) {
+bool GeneralPageView::HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke&) {
return false;
}
@@ -874,7 +874,7 @@ void GeneralPageView::InitHomepageGroup() {
l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_USE_URL),
kHomePageRadioGroup);
homepage_use_url_radio_->set_listener(this);
- homepage_use_url_textfield_ = new views::TextField;
+ homepage_use_url_textfield_ = new views::Textfield;
homepage_use_url_textfield_->SetController(this);
homepage_show_home_button_checkbox_ = new views::Checkbox(
l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_SHOW_BUTTON));
diff --git a/chrome/browser/views/options/general_page_view.h b/chrome/browser/views/options/general_page_view.h
index 1e2d72f..077c2f3 100644
--- a/chrome/browser/views/options/general_page_view.h
+++ b/chrome/browser/views/options/general_page_view.h
@@ -20,7 +20,7 @@ class NativeButton;
class RadioButton;
class TableModel;
class TableView;
-class TextField;
+class Textfield;
}
class CustomHomePagesTableModel;
class OptionsGroupView;
@@ -32,7 +32,7 @@ class SearchEngineListModel;
class GeneralPageView : public OptionsPageView,
public views::ComboBox::Listener,
public views::ButtonListener,
- public views::TextField::Controller,
+ public views::Textfield::Controller,
public ShelfItemDialogDelegate,
public views::TableViewObserver {
public:
@@ -48,11 +48,11 @@ class GeneralPageView : public OptionsPageView,
int prev_index,
int new_index);
- // views::TextField::Controller implementation:
- virtual void ContentsChanged(views::TextField* sender,
+ // views::Textfield::Controller implementation:
+ virtual void ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents);
- virtual bool HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key);
+ virtual bool HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key);
// OptionsPageView implementation:
virtual void InitControlLayout();
@@ -132,7 +132,7 @@ class GeneralPageView : public OptionsPageView,
OptionsGroupView* homepage_group_;
views::RadioButton* homepage_use_newtab_radio_;
views::RadioButton* homepage_use_url_radio_;
- views::TextField* homepage_use_url_textfield_;
+ views::Textfield* homepage_use_url_textfield_;
views::Checkbox* homepage_show_home_button_checkbox_;
BooleanPrefMember new_tab_page_is_home_page_;
StringPrefMember homepage_;
diff --git a/chrome/browser/views/options/languages_page_view.cc b/chrome/browser/views/options/languages_page_view.cc
index 2dc80db..817bdac 100644
--- a/chrome/browser/views/options/languages_page_view.cc
+++ b/chrome/browser/views/options/languages_page_view.cc
@@ -31,7 +31,6 @@
#include "views/controls/button/radio_button.h"
#include "views/controls/combo_box.h"
#include "views/controls/tabbed_pane.h"
-#include "views/controls/text_field.h"
#include "views/grid_layout.h"
#include "views/standard_layout.h"
#include "views/widget/widget.h"
diff --git a/chrome/browser/views/shelf_item_dialog.cc b/chrome/browser/views/shelf_item_dialog.cc
index ebe7fd9..84d9193 100644
--- a/chrome/browser/views/shelf_item_dialog.cc
+++ b/chrome/browser/views/shelf_item_dialog.cc
@@ -21,7 +21,7 @@
#include "net/base/net_util.h"
#include "views/background.h"
#include "views/controls/label.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/focus/focus_manager.h"
#include "views/grid_layout.h"
#include "views/standard_layout.h"
@@ -304,7 +304,7 @@ ShelfItemDialog::ShelfItemDialog(ShelfItemDialogDelegate* delegate,
title_label->SetText(l10n_util::GetString(IDS_ASI_TITLE_LABEL));
layout->AddView(title_label);
- title_field_ = new views::TextField();
+ title_field_ = new views::Textfield();
title_field_->SetController(this);
layout->AddView(title_field_);
@@ -319,7 +319,7 @@ ShelfItemDialog::ShelfItemDialog(ShelfItemDialogDelegate* delegate,
url_label->SetText(l10n_util::GetString(IDS_ASI_URL));
layout->AddView(url_label);
- url_field_ = new views::TextField();
+ url_field_ = new views::Textfield();
url_field_->SetController(this);
layout->AddView(url_field_);
@@ -397,7 +397,7 @@ void ShelfItemDialog::OnURLInfoAvailable(
s = l10n_util::GetString(IDS_ASI_DEFAULT_TITLE);
if (title_field_) {
- // expected_title_handle_ is reset if the title textfield is edited so we
+ // expected_title_handle_ is reset if the title Textfield is edited so we
// can safely set the value.
title_field_->SetText(s);
title_field_->SelectAll();
@@ -417,7 +417,7 @@ void ShelfItemDialog::InitiateTitleAutoFill(const GURL& url) {
NewCallback(this, &ShelfItemDialog::OnURLInfoAvailable));
}
-void ShelfItemDialog::ContentsChanged(views::TextField* sender,
+void ShelfItemDialog::ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents) {
// If the user has edited the title field we no longer want to autofill it
// so we reset the expected handle to an impossible value.
diff --git a/chrome/browser/views/shelf_item_dialog.h b/chrome/browser/views/shelf_item_dialog.h
index 9ac740d..78088fe6 100644
--- a/chrome/browser/views/shelf_item_dialog.h
+++ b/chrome/browser/views/shelf_item_dialog.h
@@ -9,7 +9,7 @@
#include "chrome/browser/history/history.h"
#include "views/controls/button/native_button.h"
#include "views/controls/table/table_view.h"
-#include "views/controls/text_field.h"
+#include "views/controls/textfield/textfield.h"
#include "views/view.h"
#include "views/window/dialog_delegate.h"
#include "views/window/window.h"
@@ -42,7 +42,7 @@ class ShelfItemDialogDelegate {
////////////////////////////////////////////////////////////////////////////////
class ShelfItemDialog : public views::View,
public views::DialogDelegate,
- public views::TextField::Controller,
+ public views::Textfield::Controller,
public views::TableViewObserver {
public:
ShelfItemDialog(ShelfItemDialogDelegate* delegate,
@@ -66,10 +66,10 @@ class ShelfItemDialog : public views::View,
virtual views::View* GetContentsView();
// TextField::Controller.
- virtual void ContentsChanged(views::TextField* sender,
+ virtual void ContentsChanged(views::Textfield* sender,
const std::wstring& new_contents);
- virtual bool HandleKeystroke(views::TextField* sender,
- const views::TextField::Keystroke& key) {
+ virtual bool HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key) {
return false;
}
@@ -102,10 +102,10 @@ class ShelfItemDialog : public views::View,
Profile* profile_;
// URL Field.
- views::TextField* url_field_;
+ views::Textfield* url_field_;
// Title field. This is NULL if we're not showing the title.
- views::TextField* title_field_;
+ views::Textfield* title_field_;
// The table model.
scoped_ptr<PossibleURLModel> url_table_model_;