summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options
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/browser/views/options
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/browser/views/options')
-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
7 files changed, 49 insertions, 51 deletions
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"