summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 23:51:38 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 23:51:38 +0000
commitc2dacc9ec41232903ba700c6aef5ef98bfcb8af8 (patch)
tree4aa4d7100862c64bdd92d70e6323001beb19edb7 /chrome/browser/views/options
parentd66e710ec668e34271def44d7f0416260657171c (diff)
downloadchromium_src-c2dacc9ec41232903ba700c6aef5ef98bfcb8af8.zip
chromium_src-c2dacc9ec41232903ba700c6aef5ef98bfcb8af8.tar.gz
chromium_src-c2dacc9ec41232903ba700c6aef5ef98bfcb8af8.tar.bz2
Rename ChromeViews namespace to views
http://crbug.com/2188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/options')
-rw-r--r--chrome/browser/views/options/advanced_contents_view.cc297
-rw-r--r--chrome/browser/views/options/advanced_contents_view.h8
-rw-r--r--chrome/browser/views/options/advanced_page_view.cc20
-rw-r--r--chrome/browser/views/options/advanced_page_view.h8
-rw-r--r--chrome/browser/views/options/content_page_view.cc65
-rw-r--r--chrome/browser/views/options/content_page_view.h28
-rw-r--r--chrome/browser/views/options/cookies_view.cc169
-rw-r--r--chrome/browser/views/options/cookies_view.h52
-rw-r--r--chrome/browser/views/options/fonts_languages_window_view.cc14
-rw-r--r--chrome/browser/views/options/fonts_languages_window_view.h20
-rw-r--r--chrome/browser/views/options/fonts_page_view.cc70
-rw-r--r--chrome/browser/views/options/fonts_page_view.h38
-rw-r--r--chrome/browser/views/options/general_page_view.cc114
-rw-r--r--chrome/browser/views/options/general_page_view.h56
-rw-r--r--chrome/browser/views/options/language_combobox_model.cc6
-rw-r--r--chrome/browser/views/options/language_combobox_model.h8
-rw-r--r--chrome/browser/views/options/languages_page_view.cc101
-rw-r--r--chrome/browser/views/options/languages_page_view.h42
-rw-r--r--chrome/browser/views/options/options_group_view.cc22
-rw-r--r--chrome/browser/views/options/options_group_view.h20
-rw-r--r--chrome/browser/views/options/options_page_view.cc6
-rw-r--r--chrome/browser/views/options/options_page_view.h8
-rw-r--r--chrome/browser/views/options/options_window_view.cc42
23 files changed, 602 insertions, 612 deletions
diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc
index b8a759c..07237de 100644
--- a/chrome/browser/views/options/advanced_contents_view.cc
+++ b/chrome/browser/views/options/advanced_contents_view.cc
@@ -49,7 +49,7 @@ namespace {
// A background object that paints the scrollable list background,
// which may be rendered by the system visual styles system.
-class ListBackground : public ChromeViews::Background {
+class ListBackground : public views::Background {
public:
explicit ListBackground() {
SkColor list_color =
@@ -59,7 +59,7 @@ class ListBackground : public ChromeViews::Background {
}
virtual ~ListBackground() {}
- virtual void Paint(ChromeCanvas* canvas, ChromeViews::View* view) const {
+ virtual void Paint(ChromeCanvas* canvas, views::View* view) const {
HDC dc = canvas->beginPlatformPaint();
RECT native_lb = view->GetLocalBounds(true).ToRECT();
gfx::NativeTheme::instance()->PaintListBackground(dc, true, &native_lb);
@@ -87,47 +87,47 @@ class AdvancedSection : public OptionsPageView {
protected:
// Convenience helpers to add different kinds of ColumnSets for specific
// types of layout.
- void AddWrappingColumnSet(ChromeViews::GridLayout* layout, int id);
- void AddDependentTwoColumnSet(ChromeViews::GridLayout* layout, int id);
- void AddTwoColumnSet(ChromeViews::GridLayout* layout, int id);
- void AddIndentedColumnSet(ChromeViews::GridLayout* layout, int id);
+ void AddWrappingColumnSet(views::GridLayout* layout, int id);
+ void AddDependentTwoColumnSet(views::GridLayout* layout, int id);
+ void AddTwoColumnSet(views::GridLayout* layout, int id);
+ void AddIndentedColumnSet(views::GridLayout* layout, int id);
// Convenience helpers for adding controls to specific layouts in an
// aesthetically pleasing way.
- void AddWrappingCheckboxRow(ChromeViews::GridLayout* layout,
- ChromeViews::CheckBox* checkbox,
+ void AddWrappingCheckboxRow(views::GridLayout* layout,
+ views::CheckBox* checkbox,
int id,
bool related_follows);
- void AddWrappingLabelRow(ChromeViews::GridLayout* layout,
- ChromeViews::Label* label,
+ void AddWrappingLabelRow(views::GridLayout* layout,
+ views::Label* label,
int id,
bool related_follows);
- void AddTwoColumnRow(ChromeViews::GridLayout* layout,
- ChromeViews::Label* label,
- ChromeViews::View* control,
+ void AddTwoColumnRow(views::GridLayout* layout,
+ views::Label* label,
+ views::View* control,
bool control_stretches, // Whether or not the control
// expands to fill the width.
int id,
bool related_follows);
- void AddLeadingControl(ChromeViews::GridLayout* layout,
- ChromeViews::View* control,
+ void AddLeadingControl(views::GridLayout* layout,
+ views::View* control,
int id,
bool related_follows);
- void AddIndentedControl(ChromeViews::GridLayout* layout,
- ChromeViews::View* control,
+ void AddIndentedControl(views::GridLayout* layout,
+ views::View* control,
int id,
bool related_follows);
- void AddSpacing(ChromeViews::GridLayout* layout, bool related_follows);
+ void AddSpacing(views::GridLayout* layout, bool related_follows);
// OptionsPageView overrides:
virtual void InitControlLayout();
// The View that contains the contents of the section.
- ChromeViews::View* contents_;
+ views::View* contents_;
private:
// The section title.
- ChromeViews::Label* title_label_;
+ views::Label* title_label_;
DISALLOW_EVIL_CONSTRUCTORS(AdvancedSection);
};
@@ -138,7 +138,7 @@ class AdvancedSection : public OptionsPageView {
AdvancedSection::AdvancedSection(Profile* profile,
const std::wstring& title)
: contents_(NULL),
- title_label_(new ChromeViews::Label(title)),
+ title_label_(new views::Label(title)),
OptionsPageView(profile) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
ChromeFont title_font =
@@ -160,21 +160,20 @@ void AdvancedSection::DidChangeBounds(const gfx::Rect& previous,
////////////////////////////////////////////////////////////////////////////////
// AdvancedSection, protected:
-void AdvancedSection::AddWrappingColumnSet(ChromeViews::GridLayout* layout,
- int id) {
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+void AdvancedSection::AddWrappingColumnSet(views::GridLayout* layout, int id) {
+ using views::GridLayout;
+ using views::ColumnSet;
ColumnSet* column_set = layout->AddColumnSet(id);
column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
GridLayout::USE_PREF, 0, 0);
}
-void AdvancedSection::AddDependentTwoColumnSet(ChromeViews::GridLayout* layout,
+void AdvancedSection::AddDependentTwoColumnSet(views::GridLayout* layout,
int id) {
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
ColumnSet* column_set = layout->AddColumnSet(id);
- column_set->AddPaddingColumn(0, ChromeViews::CheckBox::GetTextIndent());
+ column_set->AddPaddingColumn(0, views::CheckBox::GetTextIndent());
column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
@@ -183,10 +182,9 @@ void AdvancedSection::AddDependentTwoColumnSet(ChromeViews::GridLayout* layout,
column_set->AddPaddingColumn(0, kUnrelatedControlHorizontalSpacing);
}
-void AdvancedSection::AddTwoColumnSet(ChromeViews::GridLayout* layout,
- int id) {
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+void AdvancedSection::AddTwoColumnSet(views::GridLayout* layout, int id) {
+ using views::GridLayout;
+ using views::ColumnSet;
ColumnSet* column_set = layout->AddColumnSet(id);
column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
@@ -195,18 +193,17 @@ void AdvancedSection::AddTwoColumnSet(ChromeViews::GridLayout* layout,
GridLayout::USE_PREF, 0, 0);
}
-void AdvancedSection::AddIndentedColumnSet(ChromeViews::GridLayout* layout,
- int id) {
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+void AdvancedSection::AddIndentedColumnSet(views::GridLayout* layout, int id) {
+ using views::GridLayout;
+ using views::ColumnSet;
ColumnSet* column_set = layout->AddColumnSet(id);
- column_set->AddPaddingColumn(0, ChromeViews::CheckBox::GetTextIndent());
+ column_set->AddPaddingColumn(0, views::CheckBox::GetTextIndent());
column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
GridLayout::USE_PREF, 0, 0);
}
-void AdvancedSection::AddWrappingCheckboxRow(ChromeViews::GridLayout* layout,
- ChromeViews::CheckBox* checkbox,
+void AdvancedSection::AddWrappingCheckboxRow(views::GridLayout* layout,
+ views::CheckBox* checkbox,
int id,
bool related_follows) {
checkbox->SetMultiLine(true);
@@ -215,46 +212,46 @@ void AdvancedSection::AddWrappingCheckboxRow(ChromeViews::GridLayout* layout,
AddSpacing(layout, related_follows);
}
-void AdvancedSection::AddWrappingLabelRow(ChromeViews::GridLayout* layout,
- ChromeViews::Label* label,
+void AdvancedSection::AddWrappingLabelRow(views::GridLayout* layout,
+ views::Label* label,
int id,
bool related_follows) {
label->SetMultiLine(true);
- label->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT);
+ label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
layout->StartRow(0, id);
layout->AddView(label);
AddSpacing(layout, related_follows);
}
-void AdvancedSection::AddTwoColumnRow(ChromeViews::GridLayout* layout,
- ChromeViews::Label* label,
- ChromeViews::View* control,
+void AdvancedSection::AddTwoColumnRow(views::GridLayout* layout,
+ views::Label* label,
+ views::View* control,
bool control_stretches,
int id,
bool related_follows) {
- label->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT);
+ label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
layout->StartRow(0, id);
layout->AddView(label);
if (control_stretches) {
layout->AddView(control);
} else {
- layout->AddView(control, 1, 1, ChromeViews::GridLayout::LEADING,
- ChromeViews::GridLayout::CENTER);
+ layout->AddView(control, 1, 1, views::GridLayout::LEADING,
+ views::GridLayout::CENTER);
}
AddSpacing(layout, related_follows);
}
-void AdvancedSection::AddLeadingControl(ChromeViews::GridLayout* layout,
- ChromeViews::View* control,
+void AdvancedSection::AddLeadingControl(views::GridLayout* layout,
+ views::View* control,
int id,
bool related_follows) {
- using ChromeViews::GridLayout;
+ using views::GridLayout;
layout->StartRow(0, id);
layout->AddView(control, 1, 1, GridLayout::LEADING, GridLayout::CENTER);
AddSpacing(layout, related_follows);
}
-void AdvancedSection::AddSpacing(ChromeViews::GridLayout* layout,
+void AdvancedSection::AddSpacing(views::GridLayout* layout,
bool related_follows) {
layout->AddPaddingRow(0, related_follows ? kRelatedControlVerticalSpacing
: kUnrelatedControlVerticalSpacing);
@@ -264,10 +261,10 @@ void AdvancedSection::AddSpacing(ChromeViews::GridLayout* layout,
// AdvancedSection, OptionsPageView overrides:
void AdvancedSection::InitControlLayout() {
- contents_ = new ChromeViews::View;
+ contents_ = new views::View;
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = new GridLayout(this);
SetLayoutManager(layout);
@@ -293,19 +290,19 @@ void AdvancedSection::InitControlLayout() {
// GeneralSection
class GeneralSection : public AdvancedSection,
- public ChromeViews::NativeButton::Listener,
- public ChromeViews::LinkController {
+ public views::NativeButton::Listener,
+ public views::LinkController {
public:
explicit GeneralSection(Profile* profile);
virtual ~GeneralSection() {}
- // Overridden from ChromeViews::NativeButton::Listener:
- virtual void ButtonPressed(ChromeViews::NativeButton* sender);
+ // Overridden from views::NativeButton::Listener:
+ virtual void ButtonPressed(views::NativeButton* sender);
- // Overridden from ChromeViews::LinkController:
- virtual void LinkActivated(ChromeViews::Link* source, int event_flags);
+ // Overridden from views::LinkController:
+ virtual void LinkActivated(views::Link* source, int event_flags);
- // Overridden from ChromeViews::View:
+ // Overridden from views::View:
virtual void Layout();
protected:
@@ -315,10 +312,10 @@ class GeneralSection : public AdvancedSection,
private:
// Controls for this section:
- ChromeViews::Label* reset_file_handlers_label_;
- ChromeViews::NativeButton* reset_file_handlers_button_;
- ChromeViews::CheckBox* reporting_enabled_checkbox_;
- ChromeViews::Link* learn_more_link_;
+ views::Label* reset_file_handlers_label_;
+ views::NativeButton* reset_file_handlers_button_;
+ views::CheckBox* reporting_enabled_checkbox_;
+ views::Link* learn_more_link_;
// Preferences for this section:
StringPrefMember auto_open_files_;
@@ -338,7 +335,7 @@ GeneralSection::GeneralSection(Profile* profile)
l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_GENERAL)) {
}
-void GeneralSection::ButtonPressed(ChromeViews::NativeButton* sender) {
+void GeneralSection::ButtonPressed(views::NativeButton* sender) {
if (sender == reset_file_handlers_button_) {
profile()->GetDownloadManager()->ResetAutoOpenFiles();
UserMetricsRecordAction(L"Options_ResetAutoOpenFiles",
@@ -358,8 +355,7 @@ void GeneralSection::ButtonPressed(ChromeViews::NativeButton* sender) {
}
}
-void GeneralSection::LinkActivated(ChromeViews::Link* source,
- int event_flags) {
+void GeneralSection::LinkActivated(views::Link* source, int event_flags) {
if (source == learn_more_link_) {
// We open a new browser window so the Options dialog doesn't get lost
// behind other windows.
@@ -379,7 +375,7 @@ void GeneralSection::Layout() {
// preferred size calculation code is dependent on its width, and if we don't
// do this then it will return 0 as a preferred width when GridLayout (called
// from View::Layout) tries to access it.
- ChromeViews::View* parent = GetParent();
+ views::View* parent = GetParent();
if (parent && parent->width()) {
const int parent_width = parent->width();
reporting_enabled_checkbox_->SetBounds(0, 0, parent_width - 20, 0);
@@ -390,21 +386,20 @@ void GeneralSection::Layout() {
void GeneralSection::InitControlLayout() {
AdvancedSection::InitControlLayout();
- reset_file_handlers_label_ = new ChromeViews::Label(
+ reset_file_handlers_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_AUTOOPENFILETYPES_INFO));
- reset_file_handlers_button_ = new ChromeViews::NativeButton(
+ reset_file_handlers_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_AUTOOPENFILETYPES_RESETTODEFAULT));
reset_file_handlers_button_->SetListener(this);
- reporting_enabled_checkbox_ = new ChromeViews::CheckBox(
+ reporting_enabled_checkbox_ = new views::CheckBox(
l10n_util::GetString(IDS_OPTIONS_ENABLE_LOGGING));
reporting_enabled_checkbox_->SetMultiLine(true);
reporting_enabled_checkbox_->SetListener(this);
- learn_more_link_ =
- new ChromeViews::Link(l10n_util::GetString(IDS_LEARN_MORE));
+ learn_more_link_ = new views::Link(l10n_util::GetString(IDS_LEARN_MORE));
learn_more_link_->SetController(this);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = new GridLayout(contents_);
contents_->SetLayoutManager(layout);
@@ -478,13 +473,13 @@ void GeneralSection::ResolveMetricsReportingEnabled() {
// ContentSection
class ContentSection : public AdvancedSection,
- public ChromeViews::NativeButton::Listener {
+ public views::NativeButton::Listener {
public:
explicit ContentSection(Profile* profile);
virtual ~ContentSection() {}
- // Overridden from ChromeViews::NativeButton::Listener:
- virtual void ButtonPressed(ChromeViews::NativeButton* sender);
+ // Overridden from views::NativeButton::Listener:
+ virtual void ButtonPressed(views::NativeButton* sender);
protected:
// OptionsPageView overrides:
@@ -493,9 +488,9 @@ class ContentSection : public AdvancedSection,
private:
// Controls for this section:
- ChromeViews::CheckBox* popup_blocked_notification_checkbox_;
- ChromeViews::Label* gears_label_;
- ChromeViews::NativeButton* gears_settings_button_;
+ views::CheckBox* popup_blocked_notification_checkbox_;
+ views::Label* gears_label_;
+ views::NativeButton* gears_settings_button_;
BooleanPrefMember disable_popup_blocked_notification_pref_;
@@ -510,7 +505,7 @@ ContentSection::ContentSection(Profile* profile)
l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT)) {
}
-void ContentSection::ButtonPressed(ChromeViews::NativeButton* sender) {
+void ContentSection::ButtonPressed(views::NativeButton* sender) {
if (sender == popup_blocked_notification_checkbox_) {
bool notification_disabled =
popup_blocked_notification_checkbox_->IsSelected();
@@ -531,18 +526,18 @@ void ContentSection::ButtonPressed(ChromeViews::NativeButton* sender) {
void ContentSection::InitControlLayout() {
AdvancedSection::InitControlLayout();
- popup_blocked_notification_checkbox_ = new ChromeViews::CheckBox(
+ popup_blocked_notification_checkbox_ = new views::CheckBox(
l10n_util::GetString(IDS_OPTIONS_SHOWPOPUPBLOCKEDNOTIFICATION));
popup_blocked_notification_checkbox_->SetListener(this);
- gears_label_ = new ChromeViews::Label(
+ gears_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_GEARSSETTINGS_GROUP_NAME));
- gears_settings_button_ = new ChromeViews::NativeButton(
+ gears_settings_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_GEARSSETTINGS_CONFIGUREGEARS_BUTTON));
gears_settings_button_->SetListener(this);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = new GridLayout(contents_);
contents_->SetLayoutManager(layout);
@@ -571,16 +566,16 @@ void ContentSection::NotifyPrefChanged(const std::wstring* pref_name) {
////////////////////////////////////////////////////////////////////////////////
// SecuritySection
-class MixedContentComboModel : public ChromeViews::ComboBox::Model {
+class MixedContentComboModel : public views::ComboBox::Model {
public:
MixedContentComboModel() {}
// Return the number of items in the combo box.
- virtual int GetItemCount(ChromeViews::ComboBox* source) {
+ virtual int GetItemCount(views::ComboBox* source) {
return 3;
}
- virtual std::wstring GetItemAt(ChromeViews::ComboBox* source, int index) {
+ virtual std::wstring GetItemAt(views::ComboBox* source, int index) {
const int kStringIDs[] = {
IDS_OPTIONS_INCLUDE_MIXED_CONTENT,
IDS_OPTIONS_INCLUDE_MIXED_CONTENT_IMAGE_ONLY,
@@ -609,16 +604,16 @@ class MixedContentComboModel : public ChromeViews::ComboBox::Model {
DISALLOW_EVIL_CONSTRUCTORS(MixedContentComboModel);
};
-class CookieBehaviorComboModel : public ChromeViews::ComboBox::Model {
+class CookieBehaviorComboModel : public views::ComboBox::Model {
public:
CookieBehaviorComboModel() {}
// Return the number of items in the combo box.
- virtual int GetItemCount(ChromeViews::ComboBox* source) {
+ virtual int GetItemCount(views::ComboBox* source) {
return 3;
}
- virtual std::wstring GetItemAt(ChromeViews::ComboBox* source, int index) {
+ virtual std::wstring GetItemAt(views::ComboBox* source, int index) {
const int kStringIDs[] = {
IDS_OPTIONS_COOKIES_ACCEPT_ALL_COOKIES,
IDS_OPTIONS_COOKIES_RESTRICT_THIRD_PARTY_COOKIES,
@@ -648,17 +643,17 @@ class CookieBehaviorComboModel : public ChromeViews::ComboBox::Model {
};
class SecuritySection : public AdvancedSection,
- public ChromeViews::NativeButton::Listener,
- public ChromeViews::ComboBox::Listener {
+ public views::NativeButton::Listener,
+ public views::ComboBox::Listener {
public:
explicit SecuritySection(Profile* profile);
virtual ~SecuritySection() {}
- // Overridden from ChromeViews::NativeButton::Listener:
- virtual void ButtonPressed(ChromeViews::NativeButton* sender);
+ // Overridden from views::NativeButton::Listener:
+ virtual void ButtonPressed(views::NativeButton* sender);
- // Overridden from ChromeViews::ComboBox::Listener:
- virtual void ItemChanged(ChromeViews::ComboBox* sender,
+ // Overridden from views::ComboBox::Listener:
+ virtual void ItemChanged(views::ComboBox* sender,
int prev_index,
int new_index);
@@ -669,17 +664,17 @@ class SecuritySection : public AdvancedSection,
private:
// Controls for this section:
- ChromeViews::CheckBox* enable_safe_browsing_checkbox_;
- ChromeViews::Label* ssl_info_label_;
- ChromeViews::CheckBox* enable_ssl2_checkbox_;
- ChromeViews::CheckBox* check_for_cert_revocation_checkbox_;
- ChromeViews::Label* mixed_content_info_label_;
- ChromeViews::ComboBox* mixed_content_combobox_;
- ChromeViews::Label* manage_certificates_label_;
- ChromeViews::NativeButton* manage_certificates_button_;
- ChromeViews::Label* cookie_behavior_label_;
- ChromeViews::ComboBox* cookie_behavior_combobox_;
- ChromeViews::NativeButton* show_cookies_button_;
+ views::CheckBox* enable_safe_browsing_checkbox_;
+ views::Label* ssl_info_label_;
+ views::CheckBox* enable_ssl2_checkbox_;
+ views::CheckBox* check_for_cert_revocation_checkbox_;
+ views::Label* mixed_content_info_label_;
+ views::ComboBox* mixed_content_combobox_;
+ views::Label* manage_certificates_label_;
+ views::NativeButton* manage_certificates_button_;
+ views::Label* cookie_behavior_label_;
+ views::ComboBox* cookie_behavior_combobox_;
+ views::NativeButton* show_cookies_button_;
// The contents of the mixed content combobox.
scoped_ptr<MixedContentComboModel> mixed_content_model_;
@@ -710,7 +705,7 @@ SecuritySection::SecuritySection(Profile* profile)
l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY)) {
}
-void SecuritySection::ButtonPressed(ChromeViews::NativeButton* sender) {
+void SecuritySection::ButtonPressed(views::NativeButton* sender) {
if (sender == enable_safe_browsing_checkbox_) {
bool enabled = enable_safe_browsing_checkbox_->IsSelected();
if (enabled) {
@@ -753,7 +748,7 @@ void SecuritySection::ButtonPressed(ChromeViews::NativeButton* sender) {
}
}
-void SecuritySection::ItemChanged(ChromeViews::ComboBox* sender,
+void SecuritySection::ItemChanged(views::ComboBox* sender,
int prev_index,
int new_index) {
if (sender == mixed_content_combobox_) {
@@ -786,40 +781,40 @@ void SecuritySection::ItemChanged(ChromeViews::ComboBox* sender,
void SecuritySection::InitControlLayout() {
AdvancedSection::InitControlLayout();
- enable_safe_browsing_checkbox_ = new ChromeViews::CheckBox(
+ enable_safe_browsing_checkbox_ = new views::CheckBox(
l10n_util::GetString(IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION));
enable_safe_browsing_checkbox_->SetListener(this);
- ssl_info_label_ = new ChromeViews::Label(
+ ssl_info_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_SSL_GROUP_DESCRIPTION));
- enable_ssl2_checkbox_ = new ChromeViews::CheckBox(
+ enable_ssl2_checkbox_ = new views::CheckBox(
l10n_util::GetString(IDS_OPTIONS_SSL_USESSL2));
enable_ssl2_checkbox_->SetListener(this);
- check_for_cert_revocation_checkbox_ = new ChromeViews::CheckBox(
+ check_for_cert_revocation_checkbox_ = new views::CheckBox(
l10n_util::GetString(IDS_OPTIONS_SSL_CHECKREVOCATION));
check_for_cert_revocation_checkbox_->SetListener(this);
- mixed_content_info_label_ = new ChromeViews::Label(
+ mixed_content_info_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_MIXED_CONTENT_LABEL));
mixed_content_model_.reset(new MixedContentComboModel);
- mixed_content_combobox_ = new ChromeViews::ComboBox(
+ mixed_content_combobox_ = new views::ComboBox(
mixed_content_model_.get());
mixed_content_combobox_->SetListener(this);
- manage_certificates_label_ = new ChromeViews::Label(
+ manage_certificates_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_CERTIFICATES_LABEL));
- manage_certificates_button_ = new ChromeViews::NativeButton(
+ manage_certificates_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON));
manage_certificates_button_->SetListener(this);
- cookie_behavior_label_ = new ChromeViews::Label(
+ cookie_behavior_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_COOKIES_ACCEPT_LABEL));
allow_cookies_model_.reset(new CookieBehaviorComboModel);
- cookie_behavior_combobox_ = new ChromeViews::ComboBox(
+ cookie_behavior_combobox_ = new views::ComboBox(
allow_cookies_model_.get());
cookie_behavior_combobox_->SetListener(this);
- show_cookies_button_ = new ChromeViews::NativeButton(
+ show_cookies_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_COOKIES_SHOWCOOKIES));
show_cookies_button_->SetListener(this);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = new GridLayout(contents_);
contents_->SetLayoutManager(layout);
@@ -939,13 +934,13 @@ class OpenConnectionDialogTask : public Task {
} // namespace
class NetworkSection : public AdvancedSection,
- public ChromeViews::NativeButton::Listener {
+ public views::NativeButton::Listener {
public:
explicit NetworkSection(Profile* profile);
virtual ~NetworkSection() {}
- // Overridden from ChromeViews::NativeButton::Listener:
- virtual void ButtonPressed(ChromeViews::NativeButton* sender);
+ // Overridden from views::NativeButton::Listener:
+ virtual void ButtonPressed(views::NativeButton* sender);
protected:
// OptionsPageView overrides:
@@ -954,10 +949,10 @@ class NetworkSection : public AdvancedSection,
private:
// Controls for this section:
- ChromeViews::Label* change_proxies_label_;
- ChromeViews::NativeButton* change_proxies_button_;
- ChromeViews::CheckBox* enable_link_doctor_checkbox_;
- ChromeViews::CheckBox* enable_dns_prefetching_checkbox_;
+ views::Label* change_proxies_label_;
+ views::NativeButton* change_proxies_button_;
+ views::CheckBox* enable_link_doctor_checkbox_;
+ views::CheckBox* enable_dns_prefetching_checkbox_;
BooleanPrefMember alternate_error_pages_;
BooleanPrefMember dns_prefetch_enabled_;
@@ -974,7 +969,7 @@ NetworkSection::NetworkSection(Profile* profile)
l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_NETWORK)) {
}
-void NetworkSection::ButtonPressed(ChromeViews::NativeButton* sender) {
+void NetworkSection::ButtonPressed(views::NativeButton* sender) {
if (sender == change_proxies_button_) {
UserMetricsRecordAction(L"Options_ChangeProxies", NULL);
base::Thread* thread = g_browser_process->file_thread();
@@ -1007,20 +1002,20 @@ void NetworkSection::ButtonPressed(ChromeViews::NativeButton* sender) {
void NetworkSection::InitControlLayout() {
AdvancedSection::InitControlLayout();
- change_proxies_label_ = new ChromeViews::Label(
+ change_proxies_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_PROXIES_LABEL));
- change_proxies_button_ = new ChromeViews::NativeButton(
+ change_proxies_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON));
change_proxies_button_->SetListener(this);
- enable_link_doctor_checkbox_ = new ChromeViews::CheckBox(
+ enable_link_doctor_checkbox_ = new views::CheckBox(
l10n_util::GetString(IDS_OPTIONS_LINKDOCTOR_PREF));
enable_link_doctor_checkbox_->SetListener(this);
- enable_dns_prefetching_checkbox_ = new ChromeViews::CheckBox(
+ enable_dns_prefetching_checkbox_ = new views::CheckBox(
l10n_util::GetString(IDS_NETWORK_DNS_PREFETCH_ENABLED_DESCRIPTION));
enable_dns_prefetching_checkbox_->SetListener(this);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = new GridLayout(contents_);
contents_->SetLayoutManager(layout);
@@ -1074,8 +1069,8 @@ class AdvancedContentsView : public OptionsPageView {
explicit AdvancedContentsView(Profile* profile);
virtual ~AdvancedContentsView();
- // ChromeViews::View overrides:
- virtual int GetLineScrollIncrement(ChromeViews::ScrollView* scroll_view,
+ // views::View overrides:
+ virtual int GetLineScrollIncrement(views::ScrollView* scroll_view,
bool is_horizontal, bool is_positive);
virtual void Layout();
virtual void DidChangeBounds(const gfx::Rect& previous,
@@ -1108,10 +1103,10 @@ AdvancedContentsView::~AdvancedContentsView() {
}
////////////////////////////////////////////////////////////////////////////////
-// AdvancedContentsView, ChromeViews::View overrides:
+// AdvancedContentsView, views::View overrides:
int AdvancedContentsView::GetLineScrollIncrement(
- ChromeViews::ScrollView* scroll_view,
+ views::ScrollView* scroll_view,
bool is_horizontal,
bool is_positive) {
@@ -1121,7 +1116,7 @@ int AdvancedContentsView::GetLineScrollIncrement(
}
void AdvancedContentsView::Layout() {
- ChromeViews::View* parent = GetParent();
+ views::View* parent = GetParent();
if (parent && parent->width()) {
const int width = parent->width();
const int height = GetHeightForWidth(width);
@@ -1143,8 +1138,8 @@ void AdvancedContentsView::DidChangeBounds(const gfx::Rect& previous,
// AdvancedContentsView, OptionsPageView implementation:
void AdvancedContentsView::InitControlLayout() {
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = CreatePanelGridLayout(this);
SetLayoutManager(layout);
@@ -1181,7 +1176,7 @@ void AdvancedContentsView::InitClass() {
AdvancedScrollViewContainer::AdvancedScrollViewContainer(Profile* profile)
: contents_view_(new AdvancedContentsView(profile)),
- scroll_view_(new ChromeViews::ScrollView) {
+ scroll_view_(new views::ScrollView) {
AddChildView(scroll_view_);
scroll_view_->SetContents(contents_view_);
SetBackground(new ListBackground());
@@ -1191,7 +1186,7 @@ AdvancedScrollViewContainer::~AdvancedScrollViewContainer() {
}
////////////////////////////////////////////////////////////////////////////////
-// AdvancedScrollViewContainer, ChromeViews::View overrides:
+// AdvancedScrollViewContainer, views::View overrides:
void AdvancedScrollViewContainer::Layout() {
gfx::Rect lb = GetLocalBounds(false);
diff --git a/chrome/browser/views/options/advanced_contents_view.h b/chrome/browser/views/options/advanced_contents_view.h
index 1f332ab..8d62bf1 100644
--- a/chrome/browser/views/options/advanced_contents_view.h
+++ b/chrome/browser/views/options/advanced_contents_view.h
@@ -8,7 +8,7 @@
#include "chrome/browser/views/options/options_page_view.h"
class AdvancedContentsView;
-namespace ChromeViews {
+namespace views {
class ScrollView;
}
@@ -17,12 +17,12 @@ class ScrollView;
//
// A View that contains a scroll view containing the Advanced options.
-class AdvancedScrollViewContainer : public ChromeViews::View {
+class AdvancedScrollViewContainer : public views::View {
public:
explicit AdvancedScrollViewContainer(Profile* profile);
virtual ~AdvancedScrollViewContainer();
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void Layout();
private:
@@ -30,7 +30,7 @@ class AdvancedScrollViewContainer : public ChromeViews::View {
AdvancedContentsView* contents_view_;
// The scroll view that contains the advanced options.
- ChromeViews::ScrollView* scroll_view_;
+ views::ScrollView* scroll_view_;
DISALLOW_EVIL_CONSTRUCTORS(AdvancedScrollViewContainer);
};
diff --git a/chrome/browser/views/options/advanced_page_view.cc b/chrome/browser/views/options/advanced_page_view.cc
index 2865882..9e3382c 100644
--- a/chrome/browser/views/options/advanced_page_view.cc
+++ b/chrome/browser/views/options/advanced_page_view.cc
@@ -26,7 +26,7 @@
namespace {
// A dialog box that asks the user to confirm resetting settings.
-class ResetDefaultsConfirmBox : public ChromeViews::DialogDelegate {
+class ResetDefaultsConfirmBox : public views::DialogDelegate {
public:
// This box is modal to |parent_hwnd|.
static void ShowConfirmBox(HWND parent_hwnd, AdvancedPageView* page_view) {
@@ -35,7 +35,7 @@ class ResetDefaultsConfirmBox : public ChromeViews::DialogDelegate {
}
protected:
- // ChromeViews::DialogDelegate
+ // views::DialogDelegate
virtual int GetDialogButtons() const {
return DIALOGBUTTON_OK | DIALOGBUTTON_CANCEL;
}
@@ -58,10 +58,10 @@ class ResetDefaultsConfirmBox : public ChromeViews::DialogDelegate {
advanced_page_view_->ResetToDefaults();
return true;
}
- // ChromeViews::WindowDelegate
+ // views::WindowDelegate
virtual void WindowClosing() { delete this; }
virtual bool IsModal() const { return true; }
- virtual ChromeViews::View* GetContentsView() { return message_box_view_; }
+ virtual views::View* GetContentsView() { return message_box_view_; }
private:
ResetDefaultsConfirmBox(HWND parent_hwnd, AdvancedPageView* page_view)
@@ -73,7 +73,7 @@ class ResetDefaultsConfirmBox : public ChromeViews::DialogDelegate {
l10n_util::GetString(IDS_OPTIONS_RESET_MESSAGE).c_str(),
std::wstring(),
kDialogWidth);
- ChromeViews::Window::CreateChromeWindow(parent_hwnd, gfx::Rect(),
+ views::Window::CreateChromeWindow(parent_hwnd, gfx::Rect(),
this)->Show();
}
virtual ~ResetDefaultsConfirmBox() { }
@@ -152,9 +152,9 @@ void AdvancedPageView::ResetToDefaults() {
}
///////////////////////////////////////////////////////////////////////////////
-// AdvancedPageView, ChromeViews::NativeButton::Listener implementation:
+// AdvancedPageView, views::NativeButton::Listener implementation:
-void AdvancedPageView::ButtonPressed(ChromeViews::NativeButton* sender) {
+void AdvancedPageView::ButtonPressed(views::NativeButton* sender) {
if (sender == reset_to_default_button_) {
UserMetricsRecordAction(L"Options_ResetToDefaults", NULL);
ResetDefaultsConfirmBox::ShowConfirmBox(GetRootWindow(), this);
@@ -165,13 +165,13 @@ void AdvancedPageView::ButtonPressed(ChromeViews::NativeButton* sender) {
// AdvancedPageView, OptionsPageView implementation:
void AdvancedPageView::InitControlLayout() {
- reset_to_default_button_ = new ChromeViews::NativeButton(
+ reset_to_default_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_RESET));
reset_to_default_button_->SetListener(this);
advanced_scroll_view_ = new AdvancedScrollViewContainer(profile());
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = CreatePanelGridLayout(this);
SetLayoutManager(layout);
diff --git a/chrome/browser/views/options/advanced_page_view.h b/chrome/browser/views/options/advanced_page_view.h
index a1313ff..75a7ee2 100644
--- a/chrome/browser/views/options/advanced_page_view.h
+++ b/chrome/browser/views/options/advanced_page_view.h
@@ -16,7 +16,7 @@ class PrefService;
// AdvancedPageView
class AdvancedPageView : public OptionsPageView,
- public ChromeViews::NativeButton::Listener {
+ public views::NativeButton::Listener {
public:
explicit AdvancedPageView(Profile* profile);
virtual ~AdvancedPageView();
@@ -24,8 +24,8 @@ class AdvancedPageView : public OptionsPageView,
// Resets all prefs to their default values.
void ResetToDefaults();
- // ChromeViews::NativeButton::Listener implementation:
- virtual void ButtonPressed(ChromeViews::NativeButton* sender);
+ // views::NativeButton::Listener implementation:
+ virtual void ButtonPressed(views::NativeButton* sender);
protected:
// OptionsPageView implementation:
@@ -34,7 +34,7 @@ class AdvancedPageView : public OptionsPageView,
private:
// Controls for the Advanced page
AdvancedScrollViewContainer* advanced_scroll_view_;
- ChromeViews::NativeButton* reset_to_default_button_;
+ views::NativeButton* reset_to_default_button_;
DISALLOW_EVIL_CONSTRUCTORS(AdvancedPageView);
};
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index 52911a4..36304e7 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -46,28 +46,28 @@ static const int kFileIconTextFieldSpacing = 3;
////////////////////////////////////////////////////////////////////////////////
// FileDisplayArea
-class FileDisplayArea : public ChromeViews::View {
+class FileDisplayArea : public views::View {
public:
FileDisplayArea();
virtual ~FileDisplayArea();
void SetFile(const std::wstring& file_path);
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void Paint(ChromeCanvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
protected:
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child);
+ views::View* parent,
+ views::View* child);
private:
void Init();
- ChromeViews::TextField* text_field_;
+ views::TextField* text_field_;
SkColor text_field_background_color_;
gfx::Rect icon_bounds_;
@@ -84,7 +84,7 @@ class FileDisplayArea : public ChromeViews::View {
SkBitmap FileDisplayArea::default_folder_icon_;
FileDisplayArea::FileDisplayArea()
- : text_field_(new ChromeViews::TextField),
+ : text_field_(new views::TextField),
text_field_background_color_(0),
initialized_(false) {
InitClass();
@@ -125,8 +125,8 @@ gfx::Size FileDisplayArea::GetPreferredSize() {
}
void FileDisplayArea::ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child) {
+ views::View* parent,
+ views::View* child) {
if (!initialized_ && is_add && GetContainer())
Init();
}
@@ -189,9 +189,9 @@ void ContentPageView::FileSelected(const std::wstring& path, void* params) {
}
///////////////////////////////////////////////////////////////////////////////
-// ContentPageView, ChromeViews::NativeButton::Listener implementation:
+// ContentPageView, views::NativeButton::Listener implementation:
-void ContentPageView::ButtonPressed(ChromeViews::NativeButton* sender) {
+void ContentPageView::ButtonPressed(views::NativeButton* sender) {
if (sender == download_browse_button_) {
const std::wstring dialog_title =
l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE);
@@ -222,7 +222,7 @@ void ContentPageView::ButtonPressed(ChromeViews::NativeButton* sender) {
UserMetricsRecordAction(L"Options_ShowPasswordManager", NULL);
PasswordManagerView::Show(profile());
} else if (sender == change_content_fonts_button_) {
- ChromeViews::Window::CreateChromeWindow(
+ views::Window::CreateChromeWindow(
GetRootWindow(),
gfx::Rect(),
new FontsLanguagesWindowView(profile()))->Show();
@@ -237,8 +237,8 @@ bool ContentPageView::CanClose() const {
}
void ContentPageView::InitControlLayout() {
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = new GridLayout(this);
layout->SetInsets(5, 5, 5, 5);
@@ -290,7 +290,7 @@ void ContentPageView::NotifyPrefChanged(const std::wstring* pref_name) {
}
///////////////////////////////////////////////////////////////////////////////
-// ContentsPageView, ChromeViews::View overrides:
+// ContentsPageView, views::View overrides:
void ContentPageView::Layout() {
// We need to Layout twice - once to get the width of the contents box...
@@ -312,19 +312,19 @@ void ContentPageView::Layout() {
void ContentPageView::InitDownloadLocation() {
download_default_download_location_display_ = new FileDisplayArea;
- download_browse_button_ = new ChromeViews::NativeButton(
+ download_browse_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_BUTTON));
download_browse_button_->SetListener(this);
- download_ask_for_save_location_checkbox_ = new ChromeViews::CheckBox(
+ download_ask_for_save_location_checkbox_ = new views::CheckBox(
l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_ASKFORSAVELOCATION));
download_ask_for_save_location_checkbox_->SetListener(this);
download_ask_for_save_location_checkbox_->SetMultiLine(true);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
- ChromeViews::View* contents = new ChromeViews::View;
+ views::View* contents = new views::View;
GridLayout* layout = new GridLayout(contents);
contents->SetLayoutManager(layout);
@@ -359,24 +359,24 @@ void ContentPageView::InitDownloadLocation() {
}
void ContentPageView::InitPasswordSavingGroup() {
- passwords_asktosave_radio_ = new ChromeViews::RadioButton(
+ passwords_asktosave_radio_ = new views::RadioButton(
l10n_util::GetString(IDS_OPTIONS_PASSWORDS_ASKTOSAVE),
kPasswordSavingRadioGroup);
passwords_asktosave_radio_->SetListener(this);
passwords_asktosave_radio_->SetMultiLine(true);
- passwords_neversave_radio_ = new ChromeViews::RadioButton(
+ passwords_neversave_radio_ = new views::RadioButton(
l10n_util::GetString(IDS_OPTIONS_PASSWORDS_NEVERSAVE),
kPasswordSavingRadioGroup);
passwords_neversave_radio_->SetListener(this);
passwords_neversave_radio_->SetMultiLine(true);
- passwords_show_passwords_button_ = new ChromeViews::NativeButton(
+ passwords_show_passwords_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_PASSWORDS_SHOWPASSWORDS));
passwords_show_passwords_button_->SetListener(this);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
- ChromeViews::View* contents = new ChromeViews::View;
+ views::View* contents = new views::View;
GridLayout* layout = new GridLayout(contents);
contents->SetLayoutManager(layout);
@@ -400,19 +400,18 @@ void ContentPageView::InitPasswordSavingGroup() {
}
void ContentPageView::InitFontsLangGroup() {
- fonts_and_languages_label_ = new ChromeViews::Label(
+ fonts_and_languages_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_FONTSETTINGS_INFO));
- fonts_and_languages_label_->SetHorizontalAlignment(
- ChromeViews::Label::ALIGN_LEFT);
+ fonts_and_languages_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
fonts_and_languages_label_->SetMultiLine(true);
- change_content_fonts_button_ = new ChromeViews::NativeButton(
+ change_content_fonts_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_FONTSETTINGS_CONFIGUREFONTS_BUTTON));
change_content_fonts_button_->SetListener(this);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
- ChromeViews::View* contents = new ChromeViews::View;
+ views::View* contents = new views::View;
GridLayout* layout = new GridLayout(contents);
contents->SetLayoutManager(layout);
diff --git a/chrome/browser/views/options/content_page_view.h b/chrome/browser/views/options/content_page_view.h
index 0c3f5736..1363bb9 100644
--- a/chrome/browser/views/options/content_page_view.h
+++ b/chrome/browser/views/options/content_page_view.h
@@ -11,7 +11,7 @@
#include "chrome/views/native_button.h"
#include "chrome/views/view.h"
-namespace ChromeViews {
+namespace views {
class CheckBox;
class RadioButton;
}
@@ -23,14 +23,14 @@ class PrefService;
// ContentPageView
class ContentPageView : public OptionsPageView,
- public ChromeViews::NativeButton::Listener,
+ public views::NativeButton::Listener,
public SelectFileDialog::Listener {
public:
explicit ContentPageView(Profile* profile);
virtual ~ContentPageView();
- // ChromeViews::NativeButton::Listener implementation:
- virtual void ButtonPressed(ChromeViews::NativeButton* sender);
+ // views::NativeButton::Listener implementation:
+ virtual void ButtonPressed(views::NativeButton* sender);
// SelectFileDialog::Listener implementation:
virtual void FileSelected(const std::wstring& path, void* params);
@@ -43,7 +43,7 @@ class ContentPageView : public OptionsPageView,
virtual void InitControlLayout();
virtual void NotifyPrefChanged(const std::wstring* pref_name);
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void Layout();
private:
@@ -59,25 +59,25 @@ class ContentPageView : public OptionsPageView,
// Controls for the Download Location group.
OptionsGroupView* download_location_group_;
FileDisplayArea* download_default_download_location_display_;
- ChromeViews::NativeButton* download_browse_button_;
- ChromeViews::CheckBox* download_ask_for_save_location_checkbox_;
+ views::NativeButton* download_browse_button_;
+ views::CheckBox* download_ask_for_save_location_checkbox_;
scoped_refptr<SelectFileDialog> select_file_dialog_;
// Controls for the Password Saving group
OptionsGroupView* passwords_group_;
- ChromeViews::RadioButton* passwords_asktosave_radio_;
- ChromeViews::RadioButton* passwords_neversave_radio_;
- ChromeViews::NativeButton* passwords_show_passwords_button_;
+ views::RadioButton* passwords_asktosave_radio_;
+ views::RadioButton* passwords_neversave_radio_;
+ views::NativeButton* passwords_show_passwords_button_;
// Controls for the Popup Blocking group.
OptionsGroupView* popups_group_;
- ChromeViews::RadioButton* popups_show_minimized_radio_;
- ChromeViews::RadioButton* popups_block_all_radio_;
+ views::RadioButton* popups_show_minimized_radio_;
+ views::RadioButton* popups_block_all_radio_;
// Controls for the Fonts and Languages group.
OptionsGroupView* fonts_lang_group_;
- ChromeViews::Label* fonts_and_languages_label_;
- ChromeViews::NativeButton* change_content_fonts_button_;
+ views::Label* fonts_and_languages_label_;
+ views::NativeButton* change_content_fonts_button_;
StringPrefMember default_download_location_;
BooleanPrefMember ask_for_save_location_;
diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc
index 41a8968..c70d5b3 100644
--- a/chrome/browser/views/options/cookies_view.cc
+++ b/chrome/browser/views/options/cookies_view.cc
@@ -26,7 +26,7 @@
#include "net/url_request/url_request_context.h"
// static
-ChromeViews::Window* CookiesView::instance_ = NULL;
+views::Window* CookiesView::instance_ = NULL;
static const int kCookieInfoViewBorderSize = 1;
static const int kCookieInfoViewInsetSize = 3;
static const int kSearchFilterDelayMs = 500;
@@ -34,7 +34,7 @@ static const int kSearchFilterDelayMs = 500;
///////////////////////////////////////////////////////////////////////////////
// CookiesTableModel
-class CookiesTableModel : public ChromeViews::TableModel {
+class CookiesTableModel : public views::TableModel {
public:
explicit CookiesTableModel(Profile* profile);
virtual ~CookiesTableModel() {}
@@ -47,11 +47,11 @@ class CookiesTableModel : public ChromeViews::TableModel {
void RemoveCookies(int start_index, int remove_count);
void RemoveAllShownCookies();
- // ChromeViews::TableModel implementation:
+ // views::TableModel implementation:
virtual int RowCount();
virtual std::wstring GetText(int row, int column_id);
virtual SkBitmap GetIcon(int row);
- virtual void SetObserver(ChromeViews::TableModelObserver* observer);
+ virtual void SetObserver(views::TableModelObserver* observer);
virtual int CompareValues(int row1, int row2, int column_id);
// Filter the cookies to only display matched results.
@@ -71,7 +71,7 @@ class CookiesTableModel : public ChromeViews::TableModel {
CookieList all_cookies_;
CookiePtrList shown_cookies_;
- ChromeViews::TableModelObserver* observer_;
+ views::TableModelObserver* observer_;
DISALLOW_EVIL_CONSTRUCTORS(CookiesTableModel);
};
@@ -135,7 +135,7 @@ void CookiesTableModel::RemoveAllShownCookies() {
}
///////////////////////////////////////////////////////////////////////////////
-// CookiesTableModel, ChromeViews::TableModel implementation:
+// CookiesTableModel, views::TableModel implementation:
int CookiesTableModel::RowCount() {
return static_cast<int>(shown_cookies_.size());
@@ -168,7 +168,7 @@ SkBitmap CookiesTableModel::GetIcon(int row) {
return *icon;
}
-void CookiesTableModel::SetObserver(ChromeViews::TableModelObserver* observer) {
+void CookiesTableModel::SetObserver(views::TableModelObserver* observer) {
observer_ = observer;
}
@@ -240,17 +240,17 @@ void CookiesTableModel::UpdateSearchResults(const std::wstring& filter) {
// CookiesTableView
// Overridden to handle Delete key presses
-class CookiesTableView : public ChromeViews::TableView {
+class CookiesTableView : public views::TableView {
public:
CookiesTableView(CookiesTableModel* cookies_model,
- std::vector<ChromeViews::TableColumn> columns);
+ std::vector<views::TableColumn> columns);
virtual ~CookiesTableView() {}
// Removes the cookies associated with the selected rows in the TableView.
void RemoveSelectedCookies();
protected:
- // ChromeViews::TableView implementation:
+ // views::TableView implementation:
virtual void OnKeyDown(unsigned short virtual_keycode);
private:
@@ -262,9 +262,9 @@ class CookiesTableView : public ChromeViews::TableView {
CookiesTableView::CookiesTableView(
CookiesTableModel* cookies_model,
- std::vector<ChromeViews::TableColumn> columns)
- : ChromeViews::TableView(cookies_model, columns,
- ChromeViews::ICON_AND_TEXT, false, true, true),
+ std::vector<views::TableColumn> columns)
+ : views::TableView(cookies_model, columns, views::ICON_AND_TEXT, false,
+ true, true),
cookies_model_(cookies_model) {
}
@@ -281,7 +281,7 @@ void CookiesTableView::RemoveSelectedCookies() {
// Remove the selected cookies. This iterates over the rows backwards, which
// is required when calling RemoveCookies, see bug 2994.
int first_selected_row = -1;
- for (ChromeViews::TableView::iterator i = SelectionBegin();
+ for (views::TableView::iterator i = SelectionBegin();
i != SelectionEnd(); ++i) {
int selected_row = *i;
if (first_selected_row == -1)
@@ -302,7 +302,7 @@ void CookiesTableView::OnKeyDown(unsigned short virtual_keycode) {
// CookieInfoView
//
// Responsible for displaying a tabular grid of Cookie information.
-class CookieInfoView : public ChromeViews::View {
+class CookieInfoView : public views::View {
public:
CookieInfoView();
virtual ~CookieInfoView();
@@ -319,30 +319,30 @@ class CookieInfoView : public ChromeViews::View {
void EnableCookieDisplay(bool enabled);
protected:
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child);
+ views::View* parent,
+ views::View* child);
private:
// Set up the view layout
void Init();
// Individual property labels
- ChromeViews::Label* name_label_;
- ChromeViews::TextField* name_value_field_;
- ChromeViews::Label* content_label_;
- ChromeViews::TextField* content_value_field_;
- ChromeViews::Label* domain_label_;
- ChromeViews::TextField* domain_value_field_;
- ChromeViews::Label* path_label_;
- ChromeViews::TextField* path_value_field_;
- ChromeViews::Label* send_for_label_;
- ChromeViews::TextField* send_for_value_field_;
- ChromeViews::Label* created_label_;
- ChromeViews::TextField* created_value_field_;
- ChromeViews::Label* expires_label_;
- ChromeViews::TextField* expires_value_field_;
+ views::Label* name_label_;
+ views::TextField* name_value_field_;
+ views::Label* content_label_;
+ views::TextField* content_value_field_;
+ views::Label* domain_label_;
+ views::TextField* domain_value_field_;
+ views::Label* path_label_;
+ views::TextField* path_value_field_;
+ views::Label* send_for_label_;
+ views::TextField* send_for_value_field_;
+ views::Label* created_label_;
+ views::TextField* created_value_field_;
+ views::Label* expires_label_;
+ views::TextField* expires_value_field_;
DISALLOW_EVIL_CONSTRUCTORS(CookieInfoView);
};
@@ -424,11 +424,11 @@ void CookieInfoView::ClearCookieDisplay() {
}
///////////////////////////////////////////////////////////////////////////////
-// CookieInfoView, ChromeViews::View overrides:
+// CookieInfoView, views::View overrides:
void CookieInfoView::ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child) {
+ views::View* parent,
+ views::View* child) {
if (is_add && child == this)
Init();
}
@@ -438,34 +438,34 @@ void CookieInfoView::ViewHierarchyChanged(bool is_add,
void CookieInfoView::Init() {
SkColor border_color = color_utils::GetSysSkColor(COLOR_3DSHADOW);
- ChromeViews::Border* border = ChromeViews::Border::CreateSolidBorder(
+ views::Border* border = views::Border::CreateSolidBorder(
kCookieInfoViewBorderSize, border_color);
SetBorder(border);
- name_label_ = new ChromeViews::Label(
+ name_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_NAME_LABEL));
- name_value_field_ = new ChromeViews::TextField;
- content_label_ = new ChromeViews::Label(
+ name_value_field_ = new views::TextField;
+ content_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_CONTENT_LABEL));
- content_value_field_ = new ChromeViews::TextField;
- domain_label_ = new ChromeViews::Label(
+ content_value_field_ = new views::TextField;
+ domain_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_DOMAIN_LABEL));
- domain_value_field_ = new ChromeViews::TextField;
- path_label_ = new ChromeViews::Label(
+ domain_value_field_ = new views::TextField;
+ path_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_PATH_LABEL));
- path_value_field_ = new ChromeViews::TextField;
- send_for_label_ = new ChromeViews::Label(
+ 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 ChromeViews::TextField;
- created_label_ = new ChromeViews::Label(
+ send_for_value_field_ = new views::TextField;
+ created_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_CREATED_LABEL));
- created_value_field_ = new ChromeViews::TextField;
- expires_label_ = new ChromeViews::Label(
+ created_value_field_ = new views::TextField;
+ expires_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_COOKIE_EXPIRES_LABEL));
- expires_value_field_ = new ChromeViews::TextField;
+ expires_value_field_ = new views::TextField;
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = new GridLayout(this);
layout->SetInsets(kCookieInfoViewInsetSize,
@@ -543,7 +543,7 @@ void CookieInfoView::Init() {
void CookiesView::ShowCookiesWindow(Profile* profile) {
if (!instance_) {
CookiesView* cookies_view = new CookiesView(profile);
- instance_ = ChromeViews::Window::CreateChromeWindow(
+ instance_ = views::Window::CreateChromeWindow(
NULL, gfx::Rect(), cookies_view);
}
if (!instance_->IsVisible()) {
@@ -563,9 +563,9 @@ void CookiesView::UpdateSearchResults() {
}
///////////////////////////////////////////////////////////////////////////////
-// CookiesView, ChromeViews::NativeButton::listener implementation:
+// CookiesView, views::NativeButton::listener implementation:
-void CookiesView::ButtonPressed(ChromeViews::NativeButton* sender) {
+void CookiesView::ButtonPressed(views::NativeButton* sender) {
if (sender == remove_button_) {
cookies_table_->RemoveSelectedCookies();
} else if (sender == remove_all_button_) {
@@ -578,7 +578,7 @@ void CookiesView::ButtonPressed(ChromeViews::NativeButton* sender) {
}
///////////////////////////////////////////////////////////////////////////////
-// CookiesView, ChromeViews::TableViewObserver implementation:
+// CookiesView, views::TableViewObserver implementation:
void CookiesView::OnSelectionChanged() {
int selected_row_count = cookies_table_->SelectedRowCount();
if (selected_row_count == 1) {
@@ -597,9 +597,9 @@ void CookiesView::OnSelectionChanged() {
}
///////////////////////////////////////////////////////////////////////////////
-// CookiesView, ChromeViews::TextField::Controller implementation:
+// CookiesView, views::TextField::Controller implementation:
-void CookiesView::ContentsChanged(ChromeViews::TextField* sender,
+void CookiesView::ContentsChanged(views::TextField* sender,
const std::wstring& new_contents) {
search_update_factory_.RevokeAll();
MessageLoop::current()->PostDelayedTask(FROM_HERE,
@@ -607,9 +607,8 @@ void CookiesView::ContentsChanged(ChromeViews::TextField* sender,
&CookiesView::UpdateSearchResults), kSearchFilterDelayMs);
}
-void CookiesView::HandleKeystroke(ChromeViews::TextField* sender,
- UINT message, TCHAR key, UINT repeat_count,
- UINT flags) {
+void CookiesView::HandleKeystroke(views::TextField* sender, UINT message,
+ TCHAR key, UINT repeat_count, UINT flags) {
switch (key) {
case VK_ESCAPE:
ResetSearchQuery();
@@ -622,7 +621,7 @@ void CookiesView::HandleKeystroke(ChromeViews::TextField* sender,
}
///////////////////////////////////////////////////////////////////////////////
-// CookiesView, ChromeViews::DialogDelegate implementation:
+// CookiesView, views::DialogDelegate implementation:
std::wstring CookiesView::GetWindowTitle() const {
return l10n_util::GetString(IDS_COOKIES_WINDOW_TITLE);
@@ -632,12 +631,12 @@ void CookiesView::WindowClosing() {
instance_ = NULL;
}
-ChromeViews::View* CookiesView::GetContentsView() {
+views::View* CookiesView::GetContentsView() {
return this;
}
///////////////////////////////////////////////////////////////////////////////
-// CookiesView, ChromeViews::View overrides:
+// CookiesView, views::View overrides:
void CookiesView::Layout() {
// Lay out the Remove/Remove All buttons in the parent view.
@@ -659,14 +658,14 @@ void CookiesView::Layout() {
}
gfx::Size CookiesView::GetPreferredSize() {
- return gfx::Size(ChromeViews::Window::GetLocalizedContentsSize(
+ return gfx::Size(views::Window::GetLocalizedContentsSize(
IDS_COOKIES_DIALOG_WIDTH_CHARS,
IDS_COOKIES_DIALOG_HEIGHT_LINES));
}
void CookiesView::ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child) {
+ views::View* parent,
+ views::View* child) {
if (is_add && child == this)
Init();
}
@@ -688,45 +687,43 @@ CookiesView::CookiesView(Profile* profile)
}
void CookiesView::Init() {
- search_label_ = new ChromeViews::Label(
+ search_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_SEARCH_LABEL));
- search_field_ = new ChromeViews::TextField;
+ search_field_ = new views::TextField;
search_field_->SetController(this);
- clear_search_button_ = new ChromeViews::NativeButton(
+ clear_search_button_ = new views::NativeButton(
l10n_util::GetString(IDS_COOKIES_CLEAR_SEARCH_LABEL));
clear_search_button_->SetListener(this);
- description_label_ = new ChromeViews::Label(
+ description_label_ = new views::Label(
l10n_util::GetString(IDS_COOKIES_INFO_LABEL));
- description_label_->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT);
+ description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
cookies_table_model_.reset(new CookiesTableModel(profile_));
info_view_ = new CookieInfoView;
- std::vector<ChromeViews::TableColumn> columns;
- columns.push_back(ChromeViews::TableColumn(IDS_COOKIES_DOMAIN_COLUMN_HEADER,
- ChromeViews::TableColumn::LEFT,
- 200, 0.5f));
+ std::vector<views::TableColumn> columns;
+ columns.push_back(views::TableColumn(IDS_COOKIES_DOMAIN_COLUMN_HEADER,
+ views::TableColumn::LEFT, 200, 0.5f));
columns.back().sortable = true;
- columns.push_back(ChromeViews::TableColumn(IDS_COOKIES_NAME_COLUMN_HEADER,
- ChromeViews::TableColumn::LEFT,
- 150, 0.5f));
+ columns.push_back(views::TableColumn(IDS_COOKIES_NAME_COLUMN_HEADER,
+ views::TableColumn::LEFT, 150, 0.5f));
columns.back().sortable = true;
cookies_table_ = new CookiesTableView(cookies_table_model_.get(), columns);
cookies_table_->SetObserver(this);
// Make the table initially sorted by domain.
- ChromeViews::TableView::SortDescriptors sort;
+ views::TableView::SortDescriptors sort;
sort.push_back(
- ChromeViews::TableView::SortDescriptor(
- IDS_COOKIES_DOMAIN_COLUMN_HEADER, true));
+ views::TableView::SortDescriptor(IDS_COOKIES_DOMAIN_COLUMN_HEADER,
+ true));
cookies_table_->SetSortDescriptors(sort);
- remove_button_ = new ChromeViews::NativeButton(
+ remove_button_ = new views::NativeButton(
l10n_util::GetString(IDS_COOKIES_REMOVE_LABEL));
remove_button_->SetListener(this);
- remove_all_button_ = new ChromeViews::NativeButton(
+ remove_all_button_ = new views::NativeButton(
l10n_util::GetString(IDS_COOKIES_REMOVE_ALL_LABEL));
remove_all_button_->SetListener(this);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = CreatePanelGridLayout(this);
SetLayoutManager(layout);
diff --git a/chrome/browser/views/options/cookies_view.h b/chrome/browser/views/options/cookies_view.h
index 4121c25..946382b 100644
--- a/chrome/browser/views/options/cookies_view.h
+++ b/chrome/browser/views/options/cookies_view.h
@@ -12,7 +12,7 @@
#include "chrome/views/view.h"
#include "chrome/views/window.h"
-namespace ChromeViews {
+namespace views {
class Label;
}
class CookieInfoView;
@@ -21,11 +21,11 @@ class CookiesTableView;
class Profile;
class Timer;
-class CookiesView : public ChromeViews::View,
- public ChromeViews::DialogDelegate,
- public ChromeViews::NativeButton::Listener,
- public ChromeViews::TableViewObserver,
- public ChromeViews::TextField::Controller {
+class CookiesView : public views::View,
+ public views::DialogDelegate,
+ public views::NativeButton::Listener,
+ public views::TableViewObserver,
+ public views::TextField::Controller {
public:
// Show the Cookies Window, creating one if necessary.
static void ShowCookiesWindow(Profile* profile);
@@ -35,38 +35,38 @@ class CookiesView : public ChromeViews::View,
// Updates the display to show only the search results.
void UpdateSearchResults();
- // ChromeViews::NativeButton::Listener implementation:
- virtual void ButtonPressed(ChromeViews::NativeButton* sender);
+ // views::NativeButton::Listener implementation:
+ virtual void ButtonPressed(views::NativeButton* sender);
- // ChromeViews::TableViewObserver implementation:
+ // views::TableViewObserver implementation:
virtual void OnSelectionChanged();
- // ChromeViews::TextField::Controller implementation:
- virtual void ContentsChanged(ChromeViews::TextField* sender,
+ // views::TextField::Controller implementation:
+ virtual void ContentsChanged(views::TextField* sender,
const std::wstring& new_contents);
- virtual void HandleKeystroke(ChromeViews::TextField* sender,
+ virtual void HandleKeystroke(views::TextField* sender,
UINT message, TCHAR key, UINT repeat_count,
UINT flags);
- // ChromeViews::WindowDelegate implementation:
+ // views::WindowDelegate implementation:
virtual int GetDialogButtons() const { return DIALOGBUTTON_CANCEL; }
- virtual ChromeViews::View* GetInitiallyFocusedView() const {
+ virtual views::View* GetInitiallyFocusedView() const {
return search_field_;
}
virtual bool CanResize() const { return true; }
virtual std::wstring GetWindowTitle() const;
virtual void WindowClosing();
- virtual ChromeViews::View* GetContentsView();
+ virtual views::View* GetContentsView();
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void Layout();
virtual gfx::Size GetPreferredSize();
protected:
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child);
+ views::View* parent,
+ views::View* child);
private:
// Use the static factory method to show.
@@ -82,14 +82,14 @@ class CookiesView : public ChromeViews::View,
void UpdateForEmptyState();
// Assorted dialog controls
- ChromeViews::Label* search_label_;
- ChromeViews::TextField* search_field_;
- ChromeViews::NativeButton* clear_search_button_;
- ChromeViews::Label* description_label_;
+ views::Label* search_label_;
+ views::TextField* search_field_;
+ views::NativeButton* clear_search_button_;
+ views::Label* description_label_;
CookiesTableView* cookies_table_;
CookieInfoView* info_view_;
- ChromeViews::NativeButton* remove_button_;
- ChromeViews::NativeButton* remove_all_button_;
+ views::NativeButton* remove_button_;
+ views::NativeButton* remove_all_button_;
// The Cookies Table model
scoped_ptr<CookiesTableModel> cookies_table_model_;
@@ -104,7 +104,7 @@ class CookiesView : public ChromeViews::View,
// Our containing window. If this is non-NULL there is a visible Cookies
// window somewhere.
- static ChromeViews::Window* instance_;
+ static views::Window* instance_;
DISALLOW_EVIL_CONSTRUCTORS(CookiesView);
};
diff --git a/chrome/browser/views/options/fonts_languages_window_view.cc b/chrome/browser/views/options/fonts_languages_window_view.cc
index b147d4e..89115c8 100644
--- a/chrome/browser/views/options/fonts_languages_window_view.cc
+++ b/chrome/browser/views/options/fonts_languages_window_view.cc
@@ -38,7 +38,7 @@ FontsLanguagesWindowView::~FontsLanguagesWindowView() {
}
///////////////////////////////////////////////////////////////////////////////
-// FontsLanguagesWindowView, ChromeViews::DialogDelegate implementation:
+// FontsLanguagesWindowView, views::DialogDelegate implementation:
bool FontsLanguagesWindowView::Accept() {
fonts_page_->SaveChanges();
@@ -47,19 +47,19 @@ bool FontsLanguagesWindowView::Accept() {
}
///////////////////////////////////////////////////////////////////////////////
-// FontsLanguagesWindowView, ChromeViews::WindowDelegate implementation:
+// FontsLanguagesWindowView, views::WindowDelegate implementation:
std::wstring FontsLanguagesWindowView::GetWindowTitle() const {
return l10n_util::GetStringF(IDS_FONT_LANGUAGE_SETTING_WINDOWS_TITLE,
l10n_util::GetString(IDS_PRODUCT_NAME));
}
-ChromeViews::View* FontsLanguagesWindowView::GetContentsView() {
+views::View* FontsLanguagesWindowView::GetContentsView() {
return this;
}
///////////////////////////////////////////////////////////////////////////////
-// FontsLanguagesWindowView, ChromeViews::View overrides:
+// FontsLanguagesWindowView, views::View overrides:
void FontsLanguagesWindowView::Layout() {
tabs_->SetBounds(kDialogPadding, kDialogPadding,
@@ -68,13 +68,13 @@ void FontsLanguagesWindowView::Layout() {
}
gfx::Size FontsLanguagesWindowView::GetPreferredSize() {
- return gfx::Size(ChromeViews::Window::GetLocalizedContentsSize(
+ return gfx::Size(views::Window::GetLocalizedContentsSize(
IDS_FONTSLANG_DIALOG_WIDTH_CHARS,
IDS_FONTSLANG_DIALOG_HEIGHT_LINES));
}
void FontsLanguagesWindowView::ViewHierarchyChanged(
- bool is_add, ChromeViews::View* parent, ChromeViews::View* child) {
+ bool is_add, views::View* parent, views::View* child) {
// Can't init before we're inserted into a Container, because we require
// a HWND to parent native child controls to.
if (is_add && child == this)
@@ -85,7 +85,7 @@ void FontsLanguagesWindowView::ViewHierarchyChanged(
// FontsLanguagesWindowView, private:
void FontsLanguagesWindowView::Init() {
- tabs_ = new ChromeViews::TabbedPane;
+ tabs_ = new views::TabbedPane;
AddChildView(tabs_);
fonts_page_ = new FontsPageView(profile_);
diff --git a/chrome/browser/views/options/fonts_languages_window_view.h b/chrome/browser/views/options/fonts_languages_window_view.h
index e30f7f0..9c2f77e 100644
--- a/chrome/browser/views/options/fonts_languages_window_view.h
+++ b/chrome/browser/views/options/fonts_languages_window_view.h
@@ -19,35 +19,35 @@ class LanguagesPageView;
//
// The contents of the "Fonts and Languages Preferences" dialog window.
//
-class FontsLanguagesWindowView : public ChromeViews::View,
- public ChromeViews::DialogDelegate {
+class FontsLanguagesWindowView : public views::View,
+ public views::DialogDelegate {
public:
explicit FontsLanguagesWindowView(Profile* profile);
virtual ~FontsLanguagesWindowView();
- // ChromeViews::DialogDelegate implementation:
+ // views::DialogDelegate implementation:
virtual bool Accept();
- // ChromeViews::WindowDelegate Methods:
+ // views::WindowDelegate Methods:
virtual bool IsModal() const { return true; }
virtual std::wstring GetWindowTitle() const;
- virtual ChromeViews::View* GetContentsView();
+ virtual views::View* GetContentsView();
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void Layout();
virtual gfx::Size GetPreferredSize();
protected:
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child);
+ views::View* parent,
+ views::View* child);
private:
// Init the assorted Tabbed pages
void Init();
// The Tab view that contains all of the options pages.
- ChromeViews::TabbedPane* tabs_;
+ views::TabbedPane* tabs_;
// Fonts Page View handle remembered so that prefs is updated only when
// OK is pressed.
diff --git a/chrome/browser/views/options/fonts_page_view.cc b/chrome/browser/views/options/fonts_page_view.cc
index 7bd8836..3d94245 100644
--- a/chrome/browser/views/options/fonts_page_view.cc
+++ b/chrome/browser/views/options/fonts_page_view.cc
@@ -34,7 +34,7 @@
#include "generated_resources.h"
#include "skia/include/SkBitmap.h"
-class DefaultEncodingComboboxModel : public ChromeViews::ComboBox::Model {
+class DefaultEncodingComboboxModel : public views::ComboBox::Model {
public:
DefaultEncodingComboboxModel() {
canonical_encoding_names_length_ =
@@ -43,12 +43,12 @@ class DefaultEncodingComboboxModel : public ChromeViews::ComboBox::Model {
virtual ~DefaultEncodingComboboxModel() {}
- // Overridden from ChromeViews::Combobox::Model.
- virtual int GetItemCount(ChromeViews::ComboBox* source) {
+ // Overridden from views::Combobox::Model.
+ virtual int GetItemCount(views::ComboBox* source) {
return canonical_encoding_names_length_;
}
- virtual std::wstring GetItemAt(ChromeViews::ComboBox* source, int index) {
+ virtual std::wstring GetItemAt(views::ComboBox* source, int index) {
DCHECK(index >= 0 && canonical_encoding_names_length_ > index);
return CharacterEncoding::GetCanonicalEncodingDisplayNameByIndex(index);
}
@@ -81,7 +81,7 @@ class DefaultEncodingComboboxModel : public ChromeViews::ComboBox::Model {
////////////////////////////////////////////////////////////////////////////////
// FontDisplayView
-class FontDisplayView : public ChromeViews::View {
+class FontDisplayView : public views::View {
public:
FontDisplayView();
virtual ~FontDisplayView();
@@ -94,13 +94,13 @@ class FontDisplayView : public ChromeViews::View {
std::wstring font_name() { return font_name_; }
int font_size() { return font_size_; }
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void Paint(ChromeCanvas* canvas);
virtual void Layout();
virtual gfx::Size GetPreferredSize();
private:
- ChromeViews::Label* font_text_label_;
+ views::Label* font_text_label_;
std::wstring font_name_;
int font_size_;
std::wstring font_text_label_string_;
@@ -113,7 +113,7 @@ class FontDisplayView : public ChromeViews::View {
};
FontDisplayView::FontDisplayView()
- : font_text_label_(new ChromeViews::Label) {
+ : font_text_label_(new views::Label) {
AddChildView(font_text_label_);
}
@@ -177,7 +177,7 @@ gfx::Size FontDisplayView::GetPreferredSize() {
+ 2 * kFontDisplayLabelPadding);
}
-void EmbellishTitle(ChromeViews::Label* title_label) {
+void EmbellishTitle(views::Label* title_label) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
ChromeFont title_font =
rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, ChromeFont::BOLD);
@@ -227,7 +227,7 @@ FontsPageView::FontsPageView(Profile* profile)
FontsPageView::~FontsPageView() {
}
-void FontsPageView::ButtonPressed(ChromeViews::NativeButton* sender) {
+void FontsPageView::ButtonPressed(views::NativeButton* sender) {
HWND owning_hwnd = GetAncestor(GetContainer()->GetHWND(), GA_ROOT);
std::wstring font_name;
int font_size = 0;
@@ -251,7 +251,7 @@ void FontsPageView::ButtonPressed(ChromeViews::NativeButton* sender) {
select_font_dialog_->SelectFont(owning_hwnd, NULL, font_name, font_size);
}
-void FontsPageView::ItemChanged(ChromeViews::ComboBox* combo_box,
+void FontsPageView::ItemChanged(views::ComboBox* combo_box,
int prev_index, int new_index) {
if (combo_box == default_encoding_combobox_) {
if (prev_index != new_index) { // Default-Encoding has been changed.
@@ -297,8 +297,8 @@ void FontsPageView::SaveChanges() {
}
void FontsPageView::InitControlLayout() {
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = CreatePanelGridLayout(this);
SetLayoutManager(layout);
@@ -309,11 +309,11 @@ void FontsPageView::InitControlLayout() {
// Fonts group.
column_set->AddColumn(GridLayout::FILL, GridLayout::LEADING, 1,
GridLayout::USE_PREF, 0, 0);
- fonts_group_title_ = new ChromeViews::Label(
+ fonts_group_title_ = new views::Label(
l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_FONT_SUB_DIALOG_FONT_TITLE));
EmbellishTitle(fonts_group_title_);
- fonts_group_title_->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT);
+ fonts_group_title_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
layout->StartRow(0, single_column_view_set_id);
layout->AddView(fonts_group_title_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
@@ -323,11 +323,11 @@ void FontsPageView::InitControlLayout() {
layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing);
// Encoding group.
- encoding_group_title_ = new ChromeViews::Label(
+ encoding_group_title_ = new views::Label(
l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_FONT_SUB_DIALOG_ENCODING_TITLE));
EmbellishTitle(encoding_group_title_);
- encoding_group_title_->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT);
+ encoding_group_title_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
layout->StartRow(0, single_column_view_set_id);
layout->AddView(encoding_group_title_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
@@ -357,50 +357,48 @@ void FontsPageView::NotifyPrefChanged(const std::wstring* pref_name) {
void FontsPageView::InitFontLayout() {
// Fixed width.
fixed_width_font_display_view_ = new FontDisplayView;
- fixed_width_font_change_page_button_ = new ChromeViews::NativeButton(
+ fixed_width_font_change_page_button_ = new views::NativeButton(
l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_BUTTON_LABEL));
fixed_width_font_change_page_button_->SetListener(this);
- fixed_width_font_label_ = new ChromeViews::Label(
+ fixed_width_font_label_ = new views::Label(
l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_FIXED_WIDTH_LABEL));
- fixed_width_font_label_->SetHorizontalAlignment(ChromeViews::Label::
- ALIGN_LEFT);
+ fixed_width_font_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
fixed_width_font_label_->SetMultiLine(true);
// Serif font.
serif_font_display_view_ = new FontDisplayView;
- serif_font_change_page_button_ = new ChromeViews::NativeButton(
+ serif_font_change_page_button_ = new views::NativeButton(
l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_BUTTON_LABEL));
serif_font_change_page_button_->SetListener(this);
- serif_font_label_ = new ChromeViews::Label(
+ serif_font_label_ = new views::Label(
l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_SERIF_LABEL));
- serif_font_label_->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT);
+ serif_font_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
serif_font_label_->SetMultiLine(true);
// Sans Serif font.
sans_serif_font_display_view_ = new FontDisplayView;
- sans_serif_font_change_page_button_ = new ChromeViews::NativeButton(
+ sans_serif_font_change_page_button_ = new views::NativeButton(
l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_BUTTON_LABEL));
sans_serif_font_change_page_button_->SetListener(this);
- sans_serif_font_label_ = new ChromeViews::Label(
+ sans_serif_font_label_ = new views::Label(
l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_SANS_SERIF_LABEL));
- sans_serif_font_label_->SetHorizontalAlignment(ChromeViews::Label::
- ALIGN_LEFT);
+ sans_serif_font_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
sans_serif_font_label_->SetMultiLine(true);
// Now add the views.
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
- fonts_contents_ = new ChromeViews::View;
+ fonts_contents_ = new views::View;
GridLayout* layout = new GridLayout(fonts_contents_);
fonts_contents_->SetLayoutManager(layout);
@@ -445,11 +443,11 @@ void FontsPageView::InitFontLayout() {
}
void FontsPageView::InitEncodingLayout() {
- default_encoding_combobox_label_ = new ChromeViews::Label(
+ default_encoding_combobox_label_ = new views::Label(
l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_FONT_DEFAULT_ENCODING_SELECTOR_LABEL));
default_encoding_combobox_model_.reset(new DefaultEncodingComboboxModel);
- default_encoding_combobox_ = new ChromeViews::ComboBox(
+ default_encoding_combobox_ = new views::ComboBox(
default_encoding_combobox_model_.get());
int selected_encoding_index = default_encoding_combobox_model_->
GetSelectedEncodingIndex(profile());
@@ -459,10 +457,10 @@ void FontsPageView::InitEncodingLayout() {
default_encoding_combobox_->SetListener(this);
// Now add the views.
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
- encoding_contents_ = new ChromeViews::View;
+ encoding_contents_ = new views::View;
GridLayout* layout = new GridLayout(encoding_contents_);
encoding_contents_->SetLayoutManager(layout);
diff --git a/chrome/browser/views/options/fonts_page_view.h b/chrome/browser/views/options/fonts_page_view.h
index 1a64a91..21bd2a1 100644
--- a/chrome/browser/views/options/fonts_page_view.h
+++ b/chrome/browser/views/options/fonts_page_view.h
@@ -13,7 +13,7 @@
#include "chrome/views/view.h"
-namespace ChromeViews {
+namespace views {
class GroupboxView;
class Label;
class TableModel;
@@ -27,18 +27,18 @@ class DefaultEncodingComboboxModel;
// FontsPageView
class FontsPageView : public OptionsPageView,
- public ChromeViews::ComboBox::Listener,
+ public views::ComboBox::Listener,
public SelectFontDialog::Listener,
- public ChromeViews::NativeButton::Listener {
+ public views::NativeButton::Listener {
public:
explicit FontsPageView(Profile* profile);
virtual ~FontsPageView();
- // ChromeViews::NativeButton::Listener implementation:
- virtual void ButtonPressed(ChromeViews::NativeButton* sender);
+ // views::NativeButton::Listener implementation:
+ virtual void ButtonPressed(views::NativeButton* sender);
- // ChromeViews::ComboBox::Listener implementation:
- virtual void ItemChanged(ChromeViews::ComboBox* combo_box,
+ // views::ComboBox::Listener implementation:
+ virtual void ItemChanged(views::ComboBox* combo_box,
int prev_index,
int new_index);
@@ -72,20 +72,20 @@ class FontsPageView : public OptionsPageView,
bool fixed_width_button_pressed_;
bool encoding_dropdown_clicked_;
- ChromeViews::Label* fonts_group_title_;
- ChromeViews::Label* encoding_group_title_;
+ views::Label* fonts_group_title_;
+ views::Label* encoding_group_title_;
- ChromeViews::View* fonts_contents_;
- ChromeViews::View* encoding_contents_;
+ views::View* fonts_contents_;
+ views::View* encoding_contents_;
// Fonts settings.
// Select Font dialogs.
scoped_refptr<SelectFontDialog> select_font_dialog_;
// Buttons.
- ChromeViews::NativeButton* fixed_width_font_change_page_button_;
- ChromeViews::NativeButton* serif_font_change_page_button_;
- ChromeViews::NativeButton* sans_serif_font_change_page_button_;
+ views::NativeButton* fixed_width_font_change_page_button_;
+ views::NativeButton* serif_font_change_page_button_;
+ views::NativeButton* sans_serif_font_change_page_button_;
// FontDisplayView objects to display selected font.
FontDisplayView* fixed_width_font_display_view_;
@@ -93,9 +93,9 @@ class FontsPageView : public OptionsPageView,
FontDisplayView* sans_serif_font_display_view_;
// Labels to describe what is to be changed.
- ChromeViews::Label* fixed_width_font_label_;
- ChromeViews::Label* serif_font_label_;
- ChromeViews::Label* sans_serif_font_label_;
+ views::Label* fixed_width_font_label_;
+ views::Label* serif_font_label_;
+ views::Label* sans_serif_font_label_;
// Advanced Font names and sizes as PrefMembers.
StringPrefMember serif_name_;
@@ -112,8 +112,8 @@ class FontsPageView : public OptionsPageView,
// Default Encoding.
scoped_ptr<DefaultEncodingComboboxModel> default_encoding_combobox_model_;
- ChromeViews::Label* default_encoding_combobox_label_;
- ChromeViews::ComboBox* default_encoding_combobox_;
+ views::Label* default_encoding_combobox_label_;
+ views::ComboBox* default_encoding_combobox_;
std::wstring default_encoding_selected_;
bool default_encoding_changed_;
diff --git a/chrome/browser/views/options/general_page_view.cc b/chrome/browser/views/options/general_page_view.cc
index 6f178ef..d506fdc 100644
--- a/chrome/browser/views/options/general_page_view.cc
+++ b/chrome/browser/views/options/general_page_view.cc
@@ -168,7 +168,7 @@ void GeneralPageView::DefaultBrowserWorker::UpdateUI(bool is_default) {
// CustomHomePagesTableModel is the model for the TableView showing the list
// of pages the user wants opened on startup.
-class CustomHomePagesTableModel : public ChromeViews::TableModel {
+class CustomHomePagesTableModel : public views::TableModel {
public:
explicit CustomHomePagesTableModel(Profile* profile);
virtual ~CustomHomePagesTableModel() {}
@@ -185,11 +185,11 @@ class CustomHomePagesTableModel : public ChromeViews::TableModel {
// Returns the set of urls this model contains.
std::vector<GURL> GetURLs();
- // ChromeViews::TableModel overrides:
+ // views::TableModel overrides:
virtual int RowCount();
virtual std::wstring GetText(int row, int column_id);
virtual SkBitmap GetIcon(int row);
- virtual void SetObserver(ChromeViews::TableModelObserver* observer);
+ virtual void SetObserver(views::TableModelObserver* observer);
private:
// Each item in the model is represented as an Entry. Entry stores the URL
@@ -233,7 +233,7 @@ class CustomHomePagesTableModel : public ChromeViews::TableModel {
// Profile used to load icons.
Profile* profile_;
- ChromeViews::TableModelObserver* observer_;
+ views::TableModelObserver* observer_;
// Used in loading favicons.
CancelableRequestConsumer fav_icon_consumer_;
@@ -311,7 +311,7 @@ SkBitmap CustomHomePagesTableModel::GetIcon(int row) {
}
void CustomHomePagesTableModel::SetObserver(
- ChromeViews::TableModelObserver* observer) {
+ views::TableModelObserver* observer) {
observer_ = observer;
}
@@ -376,7 +376,7 @@ CustomHomePagesTableModel::Entry*
///////////////////////////////////////////////////////////////////////////////
// SearchEngineListModel
-class SearchEngineListModel : public ChromeViews::ComboBox::Model,
+class SearchEngineListModel : public views::ComboBox::Model,
public TemplateURLModelObserver {
public:
explicit SearchEngineListModel(Profile* profile);
@@ -384,11 +384,11 @@ class SearchEngineListModel : public ChromeViews::ComboBox::Model,
// Sets the ComboBox. SearchEngineListModel needs a handle to the ComboBox
// so that when the TemplateURLModel changes the combobox can be updated.
- void SetComboBox(ChromeViews::ComboBox* combo_box);
+ void SetComboBox(views::ComboBox* combo_box);
- // ChromeViews::ComboBox::Model overrides:
- virtual int GetItemCount(ChromeViews::ComboBox* source);
- virtual std::wstring GetItemAt(ChromeViews::ComboBox* source, int index);
+ // views::ComboBox::Model overrides:
+ virtual int GetItemCount(views::ComboBox* source);
+ virtual std::wstring GetItemAt(views::ComboBox* source, int index);
// Returns the TemplateURL at the specified index.
const TemplateURL* GetTemplateURLAt(int index);
@@ -409,7 +409,7 @@ class SearchEngineListModel : public ChromeViews::ComboBox::Model,
TemplateURLModel* template_url_model_;
// The combobox hosting us.
- ChromeViews::ComboBox* combo_box_;
+ views::ComboBox* combo_box_;
// The TemplateURLs we're showing.
typedef std::vector<const TemplateURL*> TemplateURLs;
@@ -433,7 +433,7 @@ SearchEngineListModel::~SearchEngineListModel() {
template_url_model_->RemoveObserver(this);
}
-void SearchEngineListModel::SetComboBox(ChromeViews::ComboBox* combo_box) {
+void SearchEngineListModel::SetComboBox(views::ComboBox* combo_box) {
combo_box_ = combo_box;
if (template_url_model_ && template_url_model_->loaded())
ChangeComboBoxSelection();
@@ -441,11 +441,11 @@ void SearchEngineListModel::SetComboBox(ChromeViews::ComboBox* combo_box) {
combo_box_->SetEnabled(false);
}
-int SearchEngineListModel::GetItemCount(ChromeViews::ComboBox* source) {
+int SearchEngineListModel::GetItemCount(views::ComboBox* source) {
return static_cast<int>(template_urls_.size());
}
-std::wstring SearchEngineListModel::GetItemAt(ChromeViews::ComboBox* source,
+std::wstring SearchEngineListModel::GetItemAt(views::ComboBox* source,
int index) {
DCHECK(index < GetItemCount(combo_box_));
return template_urls_[index]->short_name();
@@ -532,9 +532,9 @@ GeneralPageView::~GeneralPageView() {
}
///////////////////////////////////////////////////////////////////////////////
-// GeneralPageView, ChromeViews::NativeButton::Listener implementation:
+// GeneralPageView, views::NativeButton::Listener implementation:
-void GeneralPageView::ButtonPressed(ChromeViews::NativeButton* sender) {
+void GeneralPageView::ButtonPressed(views::NativeButton* sender) {
if (sender == startup_homepage_radio_ ||
sender == startup_last_session_radio_ ||
sender == startup_custom_radio_) {
@@ -585,9 +585,9 @@ void GeneralPageView::ButtonPressed(ChromeViews::NativeButton* sender) {
}
///////////////////////////////////////////////////////////////////////////////
-// GeneralPageView, ChromeViews::ComboBox::Listener implementation:
+// GeneralPageView, views::ComboBox::Listener implementation:
-void GeneralPageView::ItemChanged(ChromeViews::ComboBox* combo_box,
+void GeneralPageView::ItemChanged(views::ComboBox* combo_box,
int prev_index, int new_index) {
if (combo_box == default_search_engine_combobox_) {
SetDefaultSearchProvider();
@@ -596,9 +596,9 @@ void GeneralPageView::ItemChanged(ChromeViews::ComboBox* combo_box,
}
///////////////////////////////////////////////////////////////////////////////
-// GeneralPageView, ChromeViews::TextField::Controller implementation:
+// GeneralPageView, views::TextField::Controller implementation:
-void GeneralPageView::ContentsChanged(ChromeViews::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
@@ -611,7 +611,7 @@ void GeneralPageView::ContentsChanged(ChromeViews::TextField* sender,
}
}
-void GeneralPageView::HandleKeystroke(ChromeViews::TextField* sender,
+void GeneralPageView::HandleKeystroke(views::TextField* sender,
UINT message, TCHAR key,
UINT repeat_count, UINT flags) {
// Not necessary.
@@ -621,8 +621,8 @@ void GeneralPageView::HandleKeystroke(ChromeViews::TextField* sender,
// GeneralPageView, OptionsPageView implementation:
void GeneralPageView::InitControlLayout() {
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = new GridLayout(this);
layout->SetInsets(5, 5, 5, 5);
@@ -726,7 +726,7 @@ void GeneralPageView::HighlightGroup(OptionsGroup highlight_group) {
}
///////////////////////////////////////////////////////////////////////////////
-// GeneralPageView, ChromeViews::View overrides:
+// GeneralPageView, views::View overrides:
void GeneralPageView::Layout() {
// We need to Layout twice - once to get the width of the contents box...
@@ -765,45 +765,45 @@ void GeneralPageView::SetDefaultBrowserUIState(DefaultBrowserUIState state) {
}
void GeneralPageView::InitStartupGroup() {
- startup_homepage_radio_ = new ChromeViews::RadioButton(
+ startup_homepage_radio_ = new views::RadioButton(
l10n_util::GetString(IDS_OPTIONS_STARTUP_SHOW_DEFAULT_AND_NEWTAB),
kStartupRadioGroup);
startup_homepage_radio_->SetListener(this);
- startup_last_session_radio_ = new ChromeViews::RadioButton(
+ startup_last_session_radio_ = new views::RadioButton(
l10n_util::GetString(IDS_OPTIONS_STARTUP_SHOW_LAST_SESSION),
kStartupRadioGroup);
startup_last_session_radio_->SetListener(this);
startup_last_session_radio_->SetMultiLine(true);
- startup_custom_radio_ = new ChromeViews::RadioButton(
+ startup_custom_radio_ = new views::RadioButton(
l10n_util::GetString(IDS_OPTIONS_STARTUP_SHOW_PAGES),
kStartupRadioGroup);
startup_custom_radio_->SetListener(this);
- startup_add_custom_page_button_ = new ChromeViews::NativeButton(
+ startup_add_custom_page_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_STARTUP_ADD_BUTTON));
startup_add_custom_page_button_->SetListener(this);
- startup_remove_custom_page_button_ = new ChromeViews::NativeButton(
+ startup_remove_custom_page_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_STARTUP_REMOVE_BUTTON));
startup_remove_custom_page_button_->SetEnabled(false);
startup_remove_custom_page_button_->SetListener(this);
- startup_use_current_page_button_ = new ChromeViews::NativeButton(
+ startup_use_current_page_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_STARTUP_USE_CURRENT));
startup_use_current_page_button_->SetListener(this);
startup_custom_pages_table_model_.reset(
new CustomHomePagesTableModel(profile()));
- std::vector<ChromeViews::TableColumn> columns;
- columns.push_back(ChromeViews::TableColumn());
- startup_custom_pages_table_ = new ChromeViews::TableView(
+ std::vector<views::TableColumn> columns;
+ columns.push_back(views::TableColumn());
+ startup_custom_pages_table_ = new views::TableView(
startup_custom_pages_table_model_.get(), columns,
- ChromeViews::ICON_AND_TEXT, true, false, true);
+ views::ICON_AND_TEXT, true, false, true);
// URLs are inherently left-to-right, so do not mirror the table.
startup_custom_pages_table_->EnableUIMirroringForRTLLanguages(false);
startup_custom_pages_table_->SetObserver(this);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
- ChromeViews::View* contents = new ChromeViews::View;
+ views::View* contents = new views::View;
GridLayout* layout = new GridLayout(contents);
contents->SetLayoutManager(layout);
@@ -833,7 +833,7 @@ void GeneralPageView::InitStartupGroup() {
layout->StartRow(0, double_column_view_set_id);
layout->AddView(startup_custom_pages_table_);
- ChromeViews::View* button_stack = new ChromeViews::View;
+ views::View* button_stack = new views::View;
GridLayout* button_stack_layout = new GridLayout(button_stack);
button_stack->SetLayoutManager(button_stack_layout);
@@ -859,26 +859,26 @@ void GeneralPageView::InitStartupGroup() {
}
void GeneralPageView::InitHomepageGroup() {
- homepage_use_newtab_radio_ = new ChromeViews::RadioButton(
+ homepage_use_newtab_radio_ = new views::RadioButton(
l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_USE_NEWTAB),
kHomePageRadioGroup);
homepage_use_newtab_radio_->SetListener(this);
homepage_use_newtab_radio_->SetMultiLine(true);
- homepage_use_url_radio_ = new ChromeViews::RadioButton(
+ homepage_use_url_radio_ = new views::RadioButton(
l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_USE_URL),
kHomePageRadioGroup);
homepage_use_url_radio_->SetListener(this);
- homepage_use_url_textfield_ = new ChromeViews::TextField;
+ homepage_use_url_textfield_ = new views::TextField;
homepage_use_url_textfield_->SetController(this);
- homepage_show_home_button_checkbox_ = new ChromeViews::CheckBox(
+ homepage_show_home_button_checkbox_ = new views::CheckBox(
l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_SHOW_BUTTON));
homepage_show_home_button_checkbox_->SetListener(this);
homepage_show_home_button_checkbox_->SetMultiLine(true);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
- ChromeViews::View* contents = new ChromeViews::View;
+ views::View* contents = new views::View;
GridLayout* layout = new GridLayout(contents);
contents->SetLayoutManager(layout);
@@ -914,18 +914,18 @@ void GeneralPageView::InitHomepageGroup() {
void GeneralPageView::InitDefaultSearchGroup() {
default_search_engines_model_.reset(new SearchEngineListModel(profile()));
default_search_engine_combobox_ =
- new ChromeViews::ComboBox(default_search_engines_model_.get());
+ new views::ComboBox(default_search_engines_model_.get());
default_search_engines_model_->SetComboBox(default_search_engine_combobox_);
default_search_engine_combobox_->SetListener(this);
- default_search_manage_engines_button_ = new ChromeViews::NativeButton(
+ default_search_manage_engines_button_ = new views::NativeButton(
l10n_util::GetString(IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES_LINK));
default_search_manage_engines_button_->SetListener(this);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
- ChromeViews::View* contents = new ChromeViews::View;
+ views::View* contents = new views::View;
GridLayout* layout = new GridLayout(contents);
contents->SetLayoutManager(layout);
@@ -947,19 +947,19 @@ void GeneralPageView::InitDefaultSearchGroup() {
}
void GeneralPageView::InitDefaultBrowserGroup() {
- default_browser_status_label_ = new ChromeViews::Label;
+ default_browser_status_label_ = new views::Label;
default_browser_status_label_->SetMultiLine(true);
default_browser_status_label_->SetHorizontalAlignment(
- ChromeViews::Label::ALIGN_LEFT);
- default_browser_use_as_default_button_ = new ChromeViews::NativeButton(
+ views::Label::ALIGN_LEFT);
+ default_browser_use_as_default_button_ = new views::NativeButton(
l10n_util::GetStringF(IDS_OPTIONS_DEFAULTBROWSER_USEASDEFAULT,
l10n_util::GetString(IDS_PRODUCT_NAME)));
default_browser_use_as_default_button_->SetListener(this);
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
- ChromeViews::View* contents = new ChromeViews::View;
+ views::View* contents = new views::View;
GridLayout* layout = new GridLayout(contents);
contents->SetLayoutManager(layout);
@@ -1001,7 +1001,7 @@ void GeneralPageView::AddURLToStartupURLs() {
}
void GeneralPageView::RemoveURLsFromStartupURLs() {
- for (ChromeViews::TableView::iterator i =
+ for (views::TableView::iterator i =
startup_custom_pages_table_->SelectionBegin();
i != startup_custom_pages_table_->SelectionEnd(); ++i) {
startup_custom_pages_table_model_->Remove(*i);
diff --git a/chrome/browser/views/options/general_page_view.h b/chrome/browser/views/options/general_page_view.h
index 8ec6e39..7860cff 100644
--- a/chrome/browser/views/options/general_page_view.h
+++ b/chrome/browser/views/options/general_page_view.h
@@ -12,7 +12,7 @@
#include "chrome/views/native_button.h"
#include "chrome/views/view.h"
-namespace ChromeViews {
+namespace views {
class CheckBox;
class GroupboxView;
class Label;
@@ -29,28 +29,28 @@ class SearchEngineListModel;
// GeneralPageView
class GeneralPageView : public OptionsPageView,
- public ChromeViews::ComboBox::Listener,
- public ChromeViews::NativeButton::Listener,
- public ChromeViews::TextField::Controller,
+ public views::ComboBox::Listener,
+ public views::NativeButton::Listener,
+ public views::TextField::Controller,
public ShelfItemDialogDelegate,
- public ChromeViews::TableViewObserver {
+ public views::TableViewObserver {
public:
explicit GeneralPageView(Profile* profile);
virtual ~GeneralPageView();
protected:
- // ChromeViews::NativeButton::Listener implementation:
- virtual void ButtonPressed(ChromeViews::NativeButton* sender);
+ // views::NativeButton::Listener implementation:
+ virtual void ButtonPressed(views::NativeButton* sender);
- // ChromeViews::ComboBox::Listener implementation:
- virtual void ItemChanged(ChromeViews::ComboBox* combo_box,
+ // views::ComboBox::Listener implementation:
+ virtual void ItemChanged(views::ComboBox* combo_box,
int prev_index,
int new_index);
- // ChromeViews::TextField::Controller implementation:
- virtual void ContentsChanged(ChromeViews::TextField* sender,
+ // views::TextField::Controller implementation:
+ virtual void ContentsChanged(views::TextField* sender,
const std::wstring& new_contents);
- virtual void HandleKeystroke(ChromeViews::TextField* sender,
+ virtual void HandleKeystroke(views::TextField* sender,
UINT message, TCHAR key, UINT repeat_count,
UINT flags);
@@ -59,7 +59,7 @@ class GeneralPageView : public OptionsPageView,
virtual void NotifyPrefChanged(const std::wstring* pref_name);
virtual void HighlightGroup(OptionsGroup highlight_group);
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void Layout();
private:
@@ -119,35 +119,35 @@ class GeneralPageView : public OptionsPageView,
// Controls for the Startup group
OptionsGroupView* startup_group_;
- ChromeViews::RadioButton* startup_homepage_radio_;
- ChromeViews::RadioButton* startup_last_session_radio_;
- ChromeViews::RadioButton* startup_custom_radio_;
- ChromeViews::NativeButton* startup_add_custom_page_button_;
- ChromeViews::NativeButton* startup_remove_custom_page_button_;
- ChromeViews::NativeButton* startup_use_current_page_button_;
- ChromeViews::TableView* startup_custom_pages_table_;
+ views::RadioButton* startup_homepage_radio_;
+ views::RadioButton* startup_last_session_radio_;
+ views::RadioButton* startup_custom_radio_;
+ views::NativeButton* startup_add_custom_page_button_;
+ views::NativeButton* startup_remove_custom_page_button_;
+ views::NativeButton* startup_use_current_page_button_;
+ views::TableView* startup_custom_pages_table_;
scoped_ptr<CustomHomePagesTableModel> startup_custom_pages_table_model_;
// Controls for the Home Page group
OptionsGroupView* homepage_group_;
- ChromeViews::RadioButton* homepage_use_newtab_radio_;
- ChromeViews::RadioButton* homepage_use_url_radio_;
- ChromeViews::TextField* homepage_use_url_textfield_;
- ChromeViews::CheckBox* homepage_show_home_button_checkbox_;
+ views::RadioButton* homepage_use_newtab_radio_;
+ views::RadioButton* homepage_use_url_radio_;
+ views::TextField* homepage_use_url_textfield_;
+ views::CheckBox* homepage_show_home_button_checkbox_;
BooleanPrefMember new_tab_page_is_home_page_;
StringPrefMember homepage_;
BooleanPrefMember show_home_button_;
// Controls for the Default Search group
OptionsGroupView* default_search_group_;
- ChromeViews::ComboBox* default_search_engine_combobox_;
- ChromeViews::NativeButton* default_search_manage_engines_button_;
+ views::ComboBox* default_search_engine_combobox_;
+ views::NativeButton* default_search_manage_engines_button_;
scoped_ptr<SearchEngineListModel> default_search_engines_model_;
// Controls for the Default Browser group
OptionsGroupView* default_browser_group_;
- ChromeViews::Label* default_browser_status_label_;
- ChromeViews::NativeButton* default_browser_use_as_default_button_;
+ views::Label* default_browser_status_label_;
+ views::NativeButton* default_browser_use_as_default_button_;
// The helper object that performs default browser set/check tasks.
class DefaultBrowserWorker;
diff --git a/chrome/browser/views/options/language_combobox_model.cc b/chrome/browser/views/options/language_combobox_model.cc
index 46fafe2..44c1f0c 100644
--- a/chrome/browser/views/options/language_combobox_model.cc
+++ b/chrome/browser/views/options/language_combobox_model.cc
@@ -73,12 +73,12 @@ void LanguageComboboxModel::InitNativeNames(const std::vector<std::wstring>&
&locale_names_);
}
-// Overridden from ChromeViews::Combobox::Model:
-int LanguageComboboxModel::GetItemCount(ChromeViews::ComboBox* source) {
+// Overridden from views::Combobox::Model:
+int LanguageComboboxModel::GetItemCount(views::ComboBox* source) {
return static_cast<int>(locale_names_.size());
}
-std::wstring LanguageComboboxModel::GetItemAt(ChromeViews::ComboBox* source,
+std::wstring LanguageComboboxModel::GetItemAt(views::ComboBox* source,
int index) {
DCHECK(static_cast<int>(locale_names_.size()) > index);
LocaleDataMap::const_iterator it =
diff --git a/chrome/browser/views/options/language_combobox_model.h b/chrome/browser/views/options/language_combobox_model.h
index 657fa76..9922fe8 100644
--- a/chrome/browser/views/options/language_combobox_model.h
+++ b/chrome/browser/views/options/language_combobox_model.h
@@ -11,7 +11,7 @@
///////////////////////////////////////////////////////////////////////////////
// LanguageComboboxModel
// The model that fills the dropdown of valid UI languages.
-class LanguageComboboxModel : public ChromeViews::ComboBox::Model {
+class LanguageComboboxModel : public views::ComboBox::Model {
public:
struct LocaleData {
LocaleData() { }
@@ -33,10 +33,10 @@ class LanguageComboboxModel : public ChromeViews::ComboBox::Model {
void InitNativeNames(const std::vector<std::wstring>& locale_codes);
- // Overridden from ChromeViews::Combobox::Model:
- virtual int GetItemCount(ChromeViews::ComboBox* source);
+ // Overridden from views::Combobox::Model:
+ virtual int GetItemCount(views::ComboBox* source);
- virtual std::wstring GetItemAt(ChromeViews::ComboBox* source, int index);
+ virtual std::wstring GetItemAt(views::ComboBox* source, int index);
// Return the locale for the given index. E.g., may return pt-BR.
std::wstring GetLocaleFromIndex(int index);
diff --git a/chrome/browser/views/options/languages_page_view.cc b/chrome/browser/views/options/languages_page_view.cc
index 240bbe3..fc8398e 100644
--- a/chrome/browser/views/options/languages_page_view.cc
+++ b/chrome/browser/views/options/languages_page_view.cc
@@ -204,42 +204,42 @@ static const wchar_t* const accept_language_list[] = {
//
// This opens another window from where a new accept language can be selected.
//
-class AddLanguageWindowView : public ChromeViews::View,
- public ChromeViews::ComboBox::Listener,
- public ChromeViews::DialogDelegate {
+class AddLanguageWindowView : public views::View,
+ public views::ComboBox::Listener,
+ public views::DialogDelegate {
public:
AddLanguageWindowView(LanguagesPageView* language_delegate, Profile* profile);
- ChromeViews::Window* container() const { return container_; }
- void set_container(ChromeViews::Window* container) {
+ views::Window* container() const { return container_; }
+ void set_container(views::Window* container) {
container_ = container;
}
- // ChromeViews::DialogDelegate methods.
+ // views::DialogDelegate methods.
virtual bool Accept();
virtual std::wstring GetWindowTitle() const;
- // ChromeViews::WindowDelegate method.
+ // views::WindowDelegate method.
virtual bool IsModal() const { return true; }
- virtual ChromeViews::View* GetContentsView() { return this; }
+ virtual views::View* GetContentsView() { return this; }
- // ChromeViews::ComboBox::Listener implementation:
- virtual void ItemChanged(ChromeViews::ComboBox* combo_box,
+ // views::ComboBox::Listener implementation:
+ virtual void ItemChanged(views::ComboBox* combo_box,
int prev_index,
int new_index);
- // ChromeViews::View overrides.
+ // views::View overrides.
virtual void Layout();
virtual gfx::Size GetPreferredSize();
protected:
- virtual void ViewHierarchyChanged(bool is_add, ChromeViews::View* parent,
- ChromeViews::View* child);
+ virtual void ViewHierarchyChanged(bool is_add, views::View* parent,
+ views::View* child);
private:
void Init();
// The Options dialog window.
- ChromeViews::Window* container_;
+ views::Window* container_;
// Used for Call back to LanguagePageView that language has been selected.
LanguagesPageView* language_delegate_;
@@ -247,7 +247,7 @@ class AddLanguageWindowView : public ChromeViews::View,
// Combobox and its corresponding model.
scoped_ptr<LanguageComboboxModel> accept_language_combobox_model_;
- ChromeViews::ComboBox* accept_language_combobox_;
+ views::ComboBox* accept_language_combobox_;
// The Profile associated with this window.
Profile* profile_;
@@ -282,7 +282,7 @@ bool AddLanguageWindowView::Accept() {
return true;
}
-void AddLanguageWindowView::ItemChanged(ChromeViews::ComboBox* combo_box,
+void AddLanguageWindowView::ItemChanged(views::ComboBox* combo_box,
int prev_index,
int new_index) {
accept_language_selected_ = accept_language_combobox_model_->
@@ -303,8 +303,9 @@ gfx::Size AddLanguageWindowView::GetPreferredSize() {
font.height() * kDefaultWindowHeightLines);
}
-void AddLanguageWindowView::ViewHierarchyChanged(
- bool is_add, ChromeViews::View* parent, ChromeViews::View* child) {
+void AddLanguageWindowView::ViewHierarchyChanged(bool is_add,
+ views::View* parent,
+ views::View* child) {
// Can't init before we're inserted into a Container, because we require
// a HWND to parent native child controls to.
if (is_add && child == this)
@@ -328,14 +329,14 @@ void AddLanguageWindowView::Init() {
}
accept_language_combobox_model_.reset(new LanguageComboboxModel(
profile_, locale_codes));
- accept_language_combobox_ = new ChromeViews::ComboBox(
+ accept_language_combobox_ = new views::ComboBox(
accept_language_combobox_model_.get());
accept_language_combobox_->SetSelectedItem(0);
accept_language_combobox_->SetListener(this);
AddChildView(accept_language_combobox_);
}
-class LanguageOrderTableModel : public ChromeViews::TableModel {
+class LanguageOrderTableModel : public views::TableModel {
public:
LanguageOrderTableModel();
@@ -357,10 +358,10 @@ class LanguageOrderTableModel : public ChromeViews::TableModel {
// Returns the set of languagess this model contains.
std::wstring GetLanguageList() { return VectorToList(languages_); }
- // ChromeViews::TableModel overrides:
+ // views::TableModel overrides:
virtual int RowCount();
virtual std::wstring GetText(int row, int column_id);
- virtual void SetObserver(ChromeViews::TableModelObserver* observer);
+ virtual void SetObserver(views::TableModelObserver* observer);
private:
// This method converts a comma separated list to a vector of strings.
@@ -374,7 +375,7 @@ class LanguageOrderTableModel : public ChromeViews::TableModel {
std::vector<std::wstring> languages_;
std::wstring comma_separated_language_list_;
- ChromeViews::TableModelObserver* observer_;
+ views::TableModelObserver* observer_;
DISALLOW_EVIL_CONSTRUCTORS(LanguageOrderTableModel);
};
@@ -393,7 +394,7 @@ void LanguageOrderTableModel::SetAcceptLanguagesString(
}
void LanguageOrderTableModel::SetObserver(
- ChromeViews::TableModelObserver* observer) {
+ views::TableModelObserver* observer) {
observer_ = observer;
}
@@ -491,7 +492,7 @@ LanguagesPageView::~LanguagesPageView() {
language_order_table_->SetModel(NULL);
}
-void LanguagesPageView::ButtonPressed(ChromeViews::NativeButton* sender) {
+void LanguagesPageView::ButtonPressed(views::NativeButton* sender) {
if (sender == move_up_button_) {
OnMoveUpLanguage();
language_table_edited_ = true;
@@ -502,7 +503,7 @@ void LanguagesPageView::ButtonPressed(ChromeViews::NativeButton* sender) {
OnRemoveLanguage();
language_table_edited_ = true;
} else if (sender == add_button_) {
- ChromeViews::Window::CreateChromeWindow(
+ views::Window::CreateChromeWindow(
GetContainer()->GetHWND(),
gfx::Rect(),
new AddLanguageWindowView(this, profile()))->Show();
@@ -518,25 +519,25 @@ void LanguagesPageView::OnAddLanguage(const std::wstring& new_language) {
void LanguagesPageView::InitControlLayout() {
// Define the buttons.
- add_button_ = new ChromeViews::NativeButton(l10n_util::GetString(
+ add_button_ = new views::NativeButton(l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_ADD_BUTTON_LABEL));
add_button_->SetListener(this);
- remove_button_ = new ChromeViews::NativeButton(l10n_util::GetString(
+ remove_button_ = new views::NativeButton(l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_REMOVE_BUTTON_LABEL));
remove_button_->SetEnabled(false);
remove_button_->SetListener(this);
- move_up_button_ = new ChromeViews::NativeButton(l10n_util::GetString(
+ move_up_button_ = new views::NativeButton(l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_MOVEUP_BUTTON_LABEL));
move_up_button_->SetEnabled(false);
move_up_button_->SetListener(this);
- move_down_button_ = new ChromeViews::NativeButton(l10n_util::GetString(
+ move_down_button_ = new views::NativeButton(l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_MOVEDOWN_BUTTON_LABEL));
move_down_button_->SetEnabled(false);
move_down_button_->SetListener(this);
- languages_contents_ = new ChromeViews::View;
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ languages_contents_ = new views::View;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = CreatePanelGridLayout(this);
SetLayoutManager(layout);
@@ -547,23 +548,23 @@ void LanguagesPageView::InitControlLayout() {
// Add the instructions label.
column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
GridLayout::USE_PREF, 0, 0);
- languages_instructions_ = new ChromeViews::Label(
+ languages_instructions_ = new views::Label(
l10n_util::GetString(
IDS_FONT_LANGUAGE_SETTING_LANGUAGES_INSTRUCTIONS));
languages_instructions_->SetMultiLine(true);
languages_instructions_->SetHorizontalAlignment(
- ChromeViews::Label::ALIGN_LEFT);
+ views::Label::ALIGN_LEFT);
layout->StartRow(0, single_column_view_set_id);
layout->AddView(languages_instructions_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
// Add two columns - for table, and for button stack.
- std::vector<ChromeViews::TableColumn> columns;
- columns.push_back(ChromeViews::TableColumn());
+ std::vector<views::TableColumn> columns;
+ columns.push_back(views::TableColumn());
language_order_table_model_.reset(new LanguageOrderTableModel);
- language_order_table_ = new ChromeViews::TableView(
+ language_order_table_ = new views::TableView(
language_order_table_model_.get(), columns,
- ChromeViews::TEXT_ONLY, false, true, true);
+ views::TEXT_ONLY, false, true, true);
language_order_table_->SetObserver(this);
const int double_column_view_set_id = 1;
@@ -580,7 +581,7 @@ void LanguagesPageView::InitControlLayout() {
layout->AddView(language_order_table_);
// Now add the four buttons to the second column.
- button_stack_ = new ChromeViews::View;
+ button_stack_ = new views::View;
GridLayout* button_stack_layout = new GridLayout(button_stack_);
button_stack_->SetLayoutManager(button_stack_layout);
@@ -607,20 +608,20 @@ void LanguagesPageView::InitControlLayout() {
layout->AddPaddingRow(0, kUnrelatedControlLargeVerticalSpacing);
- language_info_label_ = new ChromeViews::Label(
+ language_info_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_CHROME_LANGUAGE_INFO));
- language_info_label_->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT);
- ui_language_label_ = new ChromeViews::Label(
+ language_info_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
+ ui_language_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_CHROME_UI_LANGUAGE));
- ui_language_label_->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT);
+ ui_language_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
ui_language_model_.reset(new LanguageComboboxModel);
change_ui_language_combobox_ =
- new ChromeViews::ComboBox(ui_language_model_.get());
+ new views::ComboBox(ui_language_model_.get());
change_ui_language_combobox_->SetListener(this);
- dictionary_language_label_ = new ChromeViews::Label(
+ dictionary_language_label_ = new views::Label(
l10n_util::GetString(IDS_OPTIONS_CHROME_DICTIONARY_LANGUAGE));
dictionary_language_label_->SetHorizontalAlignment(
- ChromeViews::Label::ALIGN_LEFT);
+ views::Label::ALIGN_LEFT);
layout->StartRow(0, single_column_view_set_id);
layout->AddView(language_info_label_);
@@ -641,7 +642,7 @@ void LanguagesPageView::InitControlLayout() {
dictionary_language_model_.reset(new LanguageComboboxModel(profile(),
locale_codes));
change_dictionary_language_combobox_ =
- new ChromeViews::ComboBox(dictionary_language_model_.get());
+ new views::ComboBox(dictionary_language_model_.get());
change_dictionary_language_combobox_->SetListener(this);
layout->StartRow(0, double_column_view_set_2_id);
@@ -685,7 +686,7 @@ void LanguagesPageView::NotifyPrefChanged(const std::wstring* pref_name) {
}
}
-void LanguagesPageView::ItemChanged(ChromeViews::ComboBox* sender,
+void LanguagesPageView::ItemChanged(views::ComboBox* sender,
int prev_index,
int new_index) {
if (sender == change_ui_language_combobox_) {
@@ -711,7 +712,7 @@ void LanguagesPageView::OnSelectionChanged() {
void LanguagesPageView::OnRemoveLanguage() {
int item_selected = 0;
- for (ChromeViews::TableView::iterator i =
+ for (views::TableView::iterator i =
language_order_table_->SelectionBegin();
i != language_order_table_->SelectionEnd(); ++i) {
language_order_table_model_->Remove(*i);
diff --git a/chrome/browser/views/options/languages_page_view.h b/chrome/browser/views/options/languages_page_view.h
index fc7d0b0..1cd9552 100644
--- a/chrome/browser/views/options/languages_page_view.h
+++ b/chrome/browser/views/options/languages_page_view.h
@@ -12,7 +12,7 @@
#include "chrome/views/table_view.h"
#include "chrome/views/view.h"
-namespace ChromeViews {
+namespace views {
class Label;
class TableModel;
class TableView;
@@ -26,15 +26,15 @@ class AddLanguageView;
// LanguagesPageView
class LanguagesPageView : public OptionsPageView,
- public ChromeViews::NativeButton::Listener,
- public ChromeViews::TableViewObserver,
- public ChromeViews::ComboBox::Listener {
+ public views::NativeButton::Listener,
+ public views::TableViewObserver,
+ public views::ComboBox::Listener {
public:
explicit LanguagesPageView(Profile* profile);
virtual ~LanguagesPageView();
- // ChromeViews::NativeButton::Listener implementation:
- virtual void ButtonPressed(ChromeViews::NativeButton* sender);
+ // views::NativeButton::Listener implementation:
+ virtual void ButtonPressed(views::NativeButton* sender);
// Save Changes made to relevant pref members associated with this tab.
// This is public since it is called by FontsLanguageWindowView in its
@@ -51,8 +51,8 @@ class LanguagesPageView : public OptionsPageView,
virtual void InitControlLayout();
virtual void NotifyPrefChanged(const std::wstring* pref_name);
- // ChromeViews::ComboBox::Listener implementation:
- virtual void ItemChanged(ChromeViews::ComboBox* sender,
+ // views::ComboBox::Listener implementation:
+ virtual void ItemChanged(views::ComboBox* sender,
int prev_index,
int new_index);
@@ -64,19 +64,19 @@ class LanguagesPageView : public OptionsPageView,
void OnMoveDownLanguage();
void OnMoveUpLanguage();
- ChromeViews::Label* languages_instructions_;
- ChromeViews::View* languages_contents_;
- ChromeViews::View* button_stack_;
- ChromeViews::TableView* language_order_table_;
- ChromeViews::NativeButton* move_up_button_;
- ChromeViews::NativeButton* move_down_button_;
- ChromeViews::NativeButton* add_button_;
- ChromeViews::NativeButton* remove_button_;
- ChromeViews::Label* language_info_label_;
- ChromeViews::Label* ui_language_label_;
- ChromeViews::ComboBox* change_ui_language_combobox_;
- ChromeViews::ComboBox* change_dictionary_language_combobox_;
- ChromeViews::Label* dictionary_language_label_;
+ views::Label* languages_instructions_;
+ views::View* languages_contents_;
+ views::View* button_stack_;
+ views::TableView* language_order_table_;
+ views::NativeButton* move_up_button_;
+ views::NativeButton* move_down_button_;
+ views::NativeButton* add_button_;
+ views::NativeButton* remove_button_;
+ views::Label* language_info_label_;
+ views::Label* ui_language_label_;
+ views::ComboBox* change_ui_language_combobox_;
+ views::ComboBox* change_dictionary_language_combobox_;
+ views::Label* dictionary_language_label_;
scoped_ptr<LanguageOrderTableModel> language_order_table_model_;
AddLanguageView* add_language_instance_;
diff --git a/chrome/browser/views/options/options_group_view.cc b/chrome/browser/views/options/options_group_view.cc
index 5dbe96a..3fbbe08 100644
--- a/chrome/browser/views/options/options_group_view.cc
+++ b/chrome/browser/views/options/options_group_view.cc
@@ -26,13 +26,13 @@ static const int kOptionsGroupViewColumnSpacing = 30;
///////////////////////////////////////////////////////////////////////////////
// OptionsGroupView, public:
-OptionsGroupView::OptionsGroupView(ChromeViews::View* contents,
+OptionsGroupView::OptionsGroupView(views::View* contents,
const std::wstring& title,
const std::wstring& description,
bool show_separator)
: contents_(contents),
- title_label_(new ChromeViews::Label(title)),
- description_label_(new ChromeViews::Label(description)),
+ title_label_(new views::Label(title)),
+ description_label_(new views::Label(description)),
separator_(NULL),
show_separator_(show_separator),
highlighted_(false) {
@@ -44,10 +44,10 @@ OptionsGroupView::OptionsGroupView(ChromeViews::View* contents,
gfx::NativeTheme::BUTTON, BP_GROUPBOX, GBS_NORMAL, TMT_TEXTCOLOR, COLOR_WINDOWTEXT);
title_label_->SetColor(title_color);
title_label_->SetMultiLine(true);
- title_label_->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT);
+ title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
description_label_->SetMultiLine(true);
- description_label_->SetHorizontalAlignment(ChromeViews::Label::ALIGN_LEFT);
+ description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
}
void OptionsGroupView::SetHighlighted(bool highlighted) {
@@ -60,7 +60,7 @@ int OptionsGroupView::GetContentsWidth() const {
}
///////////////////////////////////////////////////////////////////////////////
-// OptionsGroupView, ChromeViews::View overrides:
+// OptionsGroupView, views::View overrides:
void OptionsGroupView::Paint(ChromeCanvas* canvas) {
if (highlighted_) {
@@ -75,8 +75,8 @@ void OptionsGroupView::Paint(ChromeCanvas* canvas) {
}
void OptionsGroupView::ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child) {
+ views::View* parent,
+ views::View* child) {
if (is_add && child == this)
Init();
}
@@ -85,8 +85,8 @@ void OptionsGroupView::ViewHierarchyChanged(bool is_add,
// OptionsGroupView, private:
void OptionsGroupView::Init() {
- using ChromeViews::GridLayout;
- using ChromeViews::ColumnSet;
+ using views::GridLayout;
+ using views::ColumnSet;
GridLayout* layout = new GridLayout(this);
SetLayoutManager(layout);
@@ -129,7 +129,7 @@ void OptionsGroupView::Init() {
column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
GridLayout::USE_PREF, 0, 0);
- separator_ = new ChromeViews::Separator;
+ separator_ = new views::Separator;
layout->StartRow(0, single_column_layout_id);
layout->AddView(separator_);
}
diff --git a/chrome/browser/views/options/options_group_view.h b/chrome/browser/views/options/options_group_view.h
index e1d98d1..f4050d9 100644
--- a/chrome/browser/views/options/options_group_view.h
+++ b/chrome/browser/views/options/options_group_view.h
@@ -7,7 +7,7 @@
#include "chrome/views/view.h"
-namespace ChromeViews {
+namespace views {
class Label;
class Separator;
};
@@ -18,9 +18,9 @@ class Separator;
// A helper View that gathers related options into groups with a title and
// optional description.
//
-class OptionsGroupView : public ChromeViews::View {
+class OptionsGroupView : public views::View {
public:
- OptionsGroupView(ChromeViews::View* contents,
+ OptionsGroupView(views::View* contents,
const std::wstring& title,
const std::wstring& description,
bool show_separator);
@@ -33,19 +33,19 @@ class OptionsGroupView : public ChromeViews::View {
int GetContentsWidth() const;
protected:
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void Paint(ChromeCanvas* canvas);
virtual void ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child);
+ views::View* parent,
+ views::View* child);
private:
void Init();
- ChromeViews::View* contents_;
- ChromeViews::Label* title_label_;
- ChromeViews::Label* description_label_;
- ChromeViews::Separator* separator_;
+ views::View* contents_;
+ views::Label* title_label_;
+ views::Label* description_label_;
+ views::Separator* separator_;
// True if we should show a separator line below the contents of this
// section.
diff --git a/chrome/browser/views/options/options_page_view.cc b/chrome/browser/views/options/options_page_view.cc
index 5672397..bf16a17 100644
--- a/chrome/browser/views/options/options_page_view.cc
+++ b/chrome/browser/views/options/options_page_view.cc
@@ -38,11 +38,11 @@ void OptionsPageView::Observe(NotificationType type,
}
///////////////////////////////////////////////////////////////////////////////
-// OptionsPageView, ChromeViews::View overrides:
+// OptionsPageView, views::View overrides:
void OptionsPageView::ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child) {
+ views::View* parent,
+ views::View* child) {
if (!initialized_ && is_add && GetContainer()) {
// It is important that this only get done _once_ otherwise we end up
// duplicating the view hierarchy when tabs are switched.
diff --git a/chrome/browser/views/options/options_page_view.h b/chrome/browser/views/options/options_page_view.h
index aff4191..d60b0d4 100644
--- a/chrome/browser/views/options/options_page_view.h
+++ b/chrome/browser/views/options/options_page_view.h
@@ -19,7 +19,7 @@ class PrefService;
// A base class for Options dialog pages that handles ensuring control
// initialization is done just once.
//
-class OptionsPageView : public ChromeViews::View,
+class OptionsPageView : public views::View,
public NotificationObserver {
public:
virtual ~OptionsPageView();
@@ -58,10 +58,10 @@ class OptionsPageView : public ChromeViews::View,
// set.
virtual void NotifyPrefChanged(const std::wstring* pref_name) { }
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child);
+ views::View* parent,
+ views::View* child);
// Returns the HWND on which created windows should be parented.
HWND GetRootWindow() const;
diff --git a/chrome/browser/views/options/options_window_view.cc b/chrome/browser/views/options/options_window_view.cc
index 4393a7e..ebc1bcf 100644
--- a/chrome/browser/views/options/options_window_view.cc
+++ b/chrome/browser/views/options/options_window_view.cc
@@ -31,9 +31,9 @@ static const int kDefaultWindowHeightLines = 29;
//
// The contents of the Options dialog window.
//
-class OptionsWindowView : public ChromeViews::View,
- public ChromeViews::DialogDelegate,
- public ChromeViews::TabbedPane::Listener {
+class OptionsWindowView : public views::View,
+ public views::DialogDelegate,
+ public views::TabbedPane::Listener {
public:
explicit OptionsWindowView(Profile* profile);
virtual ~OptionsWindowView();
@@ -41,25 +41,25 @@ class OptionsWindowView : public ChromeViews::View,
// Shows the Tab corresponding to the specified OptionsPage.
void ShowOptionsPage(OptionsPage page, OptionsGroup highlight_group);
- // ChromeViews::DialogDelegate implementation:
+ // views::DialogDelegate implementation:
virtual int GetDialogButtons() const { return DIALOGBUTTON_CANCEL; }
virtual std::wstring GetWindowTitle() const;
virtual void WindowClosing();
virtual bool Cancel();
- virtual ChromeViews::View* GetContentsView();
+ virtual views::View* GetContentsView();
- // ChromeViews::TabbedPane::Listener implementation:
+ // views::TabbedPane::Listener implementation:
virtual void TabSelectedAt(int index);
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void Layout();
virtual gfx::Size GetPreferredSize();
protected:
- // ChromeViews::View overrides:
+ // views::View overrides:
virtual void ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child);
+ views::View* parent,
+ views::View* child);
private:
// Init the assorted Tabbed pages
void Init();
@@ -68,7 +68,7 @@ class OptionsWindowView : public ChromeViews::View,
OptionsPageView* GetCurrentOptionsPageView() const;
// The Tab view that contains all of the options pages.
- ChromeViews::TabbedPane* tabs_;
+ views::TabbedPane* tabs_;
// The Profile associated with these options.
Profile* profile_;
@@ -125,7 +125,7 @@ void OptionsWindowView::ShowOptionsPage(OptionsPage page,
}
///////////////////////////////////////////////////////////////////////////////
-// OptionsWindowView, ChromeViews::DialogDelegate implementation:
+// OptionsWindowView, views::DialogDelegate implementation:
std::wstring OptionsWindowView::GetWindowTitle() const {
return l10n_util::GetStringF(IDS_OPTIONS_DIALOG_TITLE,
@@ -142,12 +142,12 @@ bool OptionsWindowView::Cancel() {
return GetCurrentOptionsPageView()->CanClose();
}
-ChromeViews::View* OptionsWindowView::GetContentsView() {
+views::View* OptionsWindowView::GetContentsView() {
return this;
}
///////////////////////////////////////////////////////////////////////////////
-// OptionsWindowView, ChromeViews::TabbedPane::Listener implementation:
+// OptionsWindowView, views::TabbedPane::Listener implementation:
void OptionsWindowView::TabSelectedAt(int index) {
DCHECK(index > OPTIONS_PAGE_DEFAULT && index < OPTIONS_PAGE_COUNT);
@@ -155,7 +155,7 @@ void OptionsWindowView::TabSelectedAt(int index) {
}
///////////////////////////////////////////////////////////////////////////////
-// OptionsWindowView, ChromeViews::View overrides:
+// OptionsWindowView, views::View overrides:
void OptionsWindowView::Layout() {
tabs_->SetBounds(kDialogPadding, kDialogPadding,
@@ -164,14 +164,14 @@ void OptionsWindowView::Layout() {
}
gfx::Size OptionsWindowView::GetPreferredSize() {
- return gfx::Size(ChromeViews::Window::GetLocalizedContentsSize(
+ return gfx::Size(views::Window::GetLocalizedContentsSize(
IDS_OPTIONS_DIALOG_WIDTH_CHARS,
IDS_OPTIONS_DIALOG_HEIGHT_LINES));
}
void OptionsWindowView::ViewHierarchyChanged(bool is_add,
- ChromeViews::View* parent,
- ChromeViews::View* child) {
+ views::View* parent,
+ views::View* child) {
// Can't init before we're inserted into a Container, because we require a
// HWND to parent native child controls to.
if (is_add && child == this)
@@ -182,7 +182,7 @@ void OptionsWindowView::ViewHierarchyChanged(bool is_add,
// OptionsWindowView, private:
void OptionsWindowView::Init() {
- tabs_ = new ChromeViews::TabbedPane;
+ tabs_ = new views::TabbedPane;
tabs_->SetListener(this);
AddChildView(tabs_);
@@ -202,7 +202,7 @@ void OptionsWindowView::Init() {
}
OptionsPageView* OptionsWindowView::GetCurrentOptionsPageView() const {
- ChromeViews::RootView* contents_root_view = tabs_->GetContentsRootView();
+ views::RootView* contents_root_view = tabs_->GetContentsRootView();
DCHECK(contents_root_view->GetChildViewCount() == 1);
return static_cast<OptionsPageView*>(contents_root_view->GetChildViewAt(0));
}
@@ -220,7 +220,7 @@ void ShowOptionsWindow(OptionsPage page,
// about this case this will have to be fixed.
if (!instance_) {
instance_ = new OptionsWindowView(profile);
- ChromeViews::Window::CreateChromeWindow(NULL, gfx::Rect(), instance_);
+ views::Window::CreateChromeWindow(NULL, gfx::Rect(), instance_);
// The window is alive by itself now...
}
instance_->ShowOptionsPage(page, highlight_group);