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

Unified Diff: ash/system/tray/tray_views.cc

Issue 10218002: ash: Make the buttons in the tray-popup headers accessible from keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/tray_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_views.cc
diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc
index e27814016483dc7d01477bded2d9445318bc496e..99efb4e6971bbe001f90ce83dddbe930b5765730 100644
--- a/ash/system/tray/tray_views.cc
+++ b/ash/system/tray/tray_views.cc
@@ -292,6 +292,7 @@ TrayPopupHeaderButton::TrayPopupHeaderButton(views::ButtonListener* listener,
views::ImageButton::ALIGN_MIDDLE);
set_background(views::Background::CreateSolidBackground(
ash::kHeaderBackgroundColor));
+ set_focusable(true);
}
TrayPopupHeaderButton::~TrayPopupHeaderButton() {}
@@ -305,6 +306,13 @@ void TrayPopupHeaderButton::OnPaintBorder(gfx::Canvas* canvas) {
canvas->FillRect(gfx::Rect(0, 0, 1, height()), ash::kBorderDarkColor);
}
+void TrayPopupHeaderButton::OnPaintFocusBorder(gfx::Canvas* canvas) {
+ if (HasFocus() && (focusable() || IsAccessibilityFocusable())) {
+ canvas->DrawRect(gfx::Rect(2, 1, width() - 4, height() - 3),
+ kFocusBorderColor);
+ }
+}
+
void TrayPopupHeaderButton::StateChanged() {
set_background(views::Background::CreateSolidBackground(
IsHotTracked() ? ash::kHeaderHoverBackgroundColor :
« no previous file with comments | « ash/system/tray/tray_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698