diff options
author | dewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-15 20:39:32 +0000 |
---|---|---|
committer | dewittj@chromium.org <dewittj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-15 20:39:32 +0000 |
commit | da2f3f678be1a7d7b9835475d1032739e5d5a62f (patch) | |
tree | 7675aaf181600746eeae972b91c92abd687dd04c /ui | |
parent | ff4fc24213ada675a72f2abb79932e0c5fbfa00b (diff) | |
download | chromium_src-da2f3f678be1a7d7b9835475d1032739e5d5a62f.zip chromium_src-da2f3f678be1a7d7b9835475d1032739e5d5a62f.tar.gz chromium_src-da2f3f678be1a7d7b9835475d1032739e5d5a62f.tar.bz2 |
Add initial tabbing support to message center.
This patch adds focusability to all the buttons on a notification:
"X", "...", button1/2, Settings, and Clear All.
BUG=179431
Review URL: https://chromiumcodereview.appspot.com/12545045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188466 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/message_center/views/message_center_bubble.cc | 3 | ||||
-rw-r--r-- | ui/message_center/views/message_simple_view.cc | 1 | ||||
-rw-r--r-- | ui/message_center/views/message_view.cc | 1 | ||||
-rw-r--r-- | ui/message_center/views/notification_view.cc | 1 | ||||
-rw-r--r-- | ui/message_center/views/notifier_settings_view.cc | 1 |
5 files changed, 6 insertions, 1 deletions
diff --git a/ui/message_center/views/message_center_bubble.cc b/ui/message_center/views/message_center_bubble.cc index e925a14..f3d1c40 100644 --- a/ui/message_center/views/message_center_bubble.cc +++ b/ui/message_center/views/message_center_bubble.cc @@ -103,7 +103,6 @@ class WebNotificationButtonView : public WebNotificationButtonViewBase, views::TextButton* close_all_button = new views::TextButton( this, rb.GetLocalizedString(IDS_MESSAGE_CENTER_CLEAR_ALL)); close_all_button->set_alignment(views::TextButton::ALIGN_CENTER); - close_all_button->set_focusable(true); close_all_button->set_request_focus_on_press(false); layout->AddPaddingRow(0, 4); @@ -184,9 +183,11 @@ class WebNotificationButtonView2 : public WebNotificationButtonViewBase, settings_button_ = new WebNotificationButton( this, l10n_util::GetStringUTF16( IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL)); + settings_button_->set_focusable(true); AddChildView(settings_button_); WebNotificationButton* close_all_button = new WebNotificationButton( this, l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_CLEAR_ALL)); + close_all_button->set_focusable(true); AddChildView(close_all_button); views::GridLayout* layout = new views::GridLayout(this); diff --git a/ui/message_center/views/message_simple_view.cc b/ui/message_center/views/message_simple_view.cc index 9402eee..700ed26 100644 --- a/ui/message_center/views/message_simple_view.cc +++ b/ui/message_center/views/message_simple_view.cc @@ -22,6 +22,7 @@ const SkColor kNotificationReadColor = SkColorSetRGB(0xfa, 0xfa, 0xfa); MessageSimpleView::MessageSimpleView(const Notification& notification, NotificationChangeObserver* observer) : MessageView(notification, observer, false) { + set_focusable(true); views::ImageButton* close = new views::ImageButton(this); close->SetImage( views::CustomButton::STATE_NORMAL, diff --git a/ui/message_center/views/message_view.cc b/ui/message_center/views/message_view.cc index 8e61164..5c1d867 100644 --- a/ui/message_center/views/message_view.cc +++ b/ui/message_center/views/message_view.cc @@ -77,6 +77,7 @@ class ControlButton : public views::ImageButton { ControlButton::ControlButton(views::ButtonListener* listener) : views::ImageButton(listener) { + set_focusable(true); } ControlButton::~ControlButton() { diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc index 6a123ec68e..22ef717 100644 --- a/ui/message_center/views/notification_view.cc +++ b/ui/message_center/views/notification_view.cc @@ -244,6 +244,7 @@ NotificationButton::NotificationButton(views::ButtonListener* listener) : views::CustomButton(listener), icon_(NULL), title_(NULL) { + set_focusable(true); SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, kButtonHorizontalPadding, kButtonVecticalPadding, diff --git a/ui/message_center/views/notifier_settings_view.cc b/ui/message_center/views/notifier_settings_view.cc index 5d7db52..176d015 100644 --- a/ui/message_center/views/notifier_settings_view.cc +++ b/ui/message_center/views/notifier_settings_view.cc @@ -137,6 +137,7 @@ class NotifierSettingsView::NotifierButton : public views::CustomButton, views::BoxLayout::kHorizontal, 0, 0, kSpaceInButtonComponents)); checkbox_->SetChecked(notifier_->enabled); checkbox_->set_listener(this); + checkbox_->set_focusable(true); AddChildView(checkbox_); UpdateIconImage(notifier_->icon); AddChildView(new views::Label(notifier_->name)); |