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

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

Issue 10832389: Revert 152135 - Fix accessability for web notification tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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_background_view.h ('k') | ash/system/tray/tray_bubble_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_background_view.cc
===================================================================
--- ash/system/tray/tray_background_view.cc (revision 152315)
+++ ash/system/tray/tray_background_view.cc (working copy)
@@ -11,7 +11,6 @@
#include "ash/system/status_area_widget_delegate.h"
#include "ash/system/tray/tray_constants.h"
#include "ui/aura/window.h"
-#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/compositor/layer_animation_observer.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/skia_util.h"
@@ -207,15 +206,10 @@
// The tray itself expands to the right and bottom edge of the screen to make
// sure clicking on the edges brings up the popup. However, the focus border
// should be only around the container.
- if (HasFocus() && (focusable() || IsAccessibilityFocusable()))
+ if (GetWidget() && GetWidget()->IsActive())
DrawBorder(canvas, GetContentsBounds());
}
-void TrayBackgroundView::GetAccessibleState(ui::AccessibleViewState* state) {
- state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
- state->name = GetAccessibleName();
-}
-
void TrayBackgroundView::AboutToRequestFocusFromTabTraversal(bool reverse) {
// Return focus to the login view. See crbug.com/120500.
views::View* v = GetNextFocusableView();
@@ -257,8 +251,9 @@
void TrayBackgroundView::SetBorder() {
views::View* parent = status_area_widget_->status_area_widget_delegate();
- // Tray views are laid out right-to-left or bottom-to-top
- int on_edge = (this == parent->child_at(0));
+ int child_count = parent->child_count();
+ DCHECK(child_count > 0);
+ int on_edge = (this == parent->child_at(child_count-1));
// Change the border padding for different shelf alignment.
if (shelf_alignment() == SHELF_ALIGNMENT_BOTTOM) {
set_border(views::Border::CreateEmptyBorder(
« no previous file with comments | « ash/system/tray/tray_background_view.h ('k') | ash/system/tray/tray_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698