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

Issue 10218002: ash: Make the buttons in the tray-popup headers accessible from keyboard. (Closed)

Created:
8 years, 8 months ago by sadrul
Modified:
8 years, 8 months ago
CC:
chromium-reviews, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

ash: Make the buttons in the tray-popup headers accessible from keyboard. BUG=124864 TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=133780

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -0 lines) Patch
M ash/system/tray/tray_views.h View 1 chunk +1 line, -0 lines 0 comments Download
M ash/system/tray/tray_views.cc View 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sadrul
8 years, 8 months ago (2012-04-24 20:08:32 UTC) #1
Ben Goodger (Google)
8 years, 8 months ago (2012-04-24 21:18:08 UTC) #2
LGTM

On Tue, Apr 24, 2012 at 1:08 PM, <sadrul@chromium.org> wrote:

> Reviewers: Ben Goodger (Google),
>
> Description:
> ash: Make the buttons in the tray-popup headers accessible from keyboard.
>
> BUG=124864
> TEST=none
>
>
> Please review this at
http://codereview.chromium.**org/10218002/<http://codereview.chromium.org/102...
>
> SVN Base:
svn://svn.chromium.org/chrome/**trunk/src<http://svn.chromium.org/chrome/trunk/src>
>
> Affected files:
>  M ash/system/tray/tray_views.h
>  M ash/system/tray/tray_views.cc
>
>
> Index: ash/system/tray/tray_views.cc
> diff --git a/ash/system/tray/tray_views.**cc b/ash/system/tray/tray_views.
> **cc
> index e27814016483dc7d01477bded2d944**5318bc496e..**
> 99efb4e6971bbe001f90ce83dddbe9**30b5765730 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 :
> Index: ash/system/tray/tray_views.h
> diff --git a/ash/system/tray/tray_views.h b/ash/system/tray/tray_views.h
> index 96e476c22d11651edbc2578f2e41dc**ca30ccc442..**
> fe733bf45e4793b76af19dec76b349**5ce8a0b631 100644
> --- a/ash/system/tray/tray_views.h
> +++ b/ash/system/tray/tray_views.h
> @@ -191,6 +191,7 @@ class TrayPopupHeaderButton : public
> views::ToggleImageButton {
>   // Overridden from views::View.
>   virtual gfx::Size GetPreferredSize() OVERRIDE;
>   virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE;
> +  virtual void OnPaintFocusBorder(gfx::**Canvas* canvas) OVERRIDE;
>
>   // Overridden from views::CustomButton.
>   virtual void StateChanged() OVERRIDE;
>
>
>

Powered by Google App Engine
This is Rietveld 408576698