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

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

Issue 10836227: Fix status area accessability issues. (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
Index: ash/system/tray/tray_background_view.h
diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h
index 15f20a96ea7277e036c5bfc32db2c2634ff1691b..0241cb6e71394a89c66d44392e8bee10597acad1 100644
--- a/ash/system/tray/tray_background_view.h
+++ b/ash/system/tray/tray_background_view.h
@@ -15,6 +15,7 @@ namespace internal {
class StatusAreaWidget;
class TrayBackground;
+class TrayLayerAnimationObserver;
// Base class for children of StatusAreaWidget: SystemTray, WebNotificationTray.
// This class handles setting and animating the background when the Launcher
@@ -58,10 +59,16 @@ class ASH_EXPORT TrayBackgroundView : public internal::ActionableView,
explicit TrayBackgroundView(internal::StatusAreaWidget* status_area_widget);
virtual ~TrayBackgroundView();
+ // Called after the tray has been added to the widget containing it.
+ void Initialize();
+
// Overridden from views::View.
virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE;
virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE;
virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
+ virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE;
+ virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
+ virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE;
// Overridden from internal::ActionableView.
virtual bool PerformAction(const ui::Event& event) OVERRIDE;
@@ -72,6 +79,11 @@ class ASH_EXPORT TrayBackgroundView : public internal::ActionableView,
// Called whenever the shelf alignment changes.
virtual void SetShelfAlignment(ShelfAlignment alignment);
+ // Called when the anchor (tray or bubble) may have moved or changed.
+ virtual void AnchorUpdated() {}
+
+ virtual string16 GetAccessibleName() = 0;
+
// Sets |contents| as a child and sets its background to |background_|.
void SetContents(views::View* contents);
@@ -81,9 +93,8 @@ class ASH_EXPORT TrayBackgroundView : public internal::ActionableView,
bool value,
internal::BackgroundAnimator::ChangeType change_type);
- // Called after all status area trays have been created. Sets the border
- // based on the position of the view.
- void SetBorder();
+ // Called whenever the launcher auto-hide behavior may need updating.
+ void UpdateShouldShowLauncher();
StatusAreaWidget* status_area_widget() {
return status_area_widget_;
@@ -92,6 +103,12 @@ class ASH_EXPORT TrayBackgroundView : public internal::ActionableView,
ShelfAlignment shelf_alignment() const { return shelf_alignment_; }
private:
+ friend class TrayLayerAnimationObserver;
+
+ // Called from Initialize after all status area trays have been created.
+ // Sets the border based on the position of the view.
+ void SetBorder();
+
// Unowned pointer to parent widget.
StatusAreaWidget* status_area_widget_;
@@ -106,6 +123,8 @@ class ASH_EXPORT TrayBackgroundView : public internal::ActionableView,
internal::BackgroundAnimator hide_background_animator_;
internal::BackgroundAnimator hover_background_animator_;
+ scoped_ptr<internal::TrayLayerAnimationObserver>
+ layer_animation_observer_;
DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView);
};

Powered by Google App Engine
This is Rietveld 408576698