OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ | 5 #ifndef ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ |
6 #define ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ | 6 #define ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/launcher/background_animator.h" | 9 #include "ash/launcher/background_animator.h" |
10 #include "ash/system/tray/tray_views.h" | 10 #include "ash/system/tray/tray_views.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 virtual ~TrayBackgroundView(); | 60 virtual ~TrayBackgroundView(); |
61 | 61 |
62 // Called after the tray has been added to the widget containing it. | 62 // Called after the tray has been added to the widget containing it. |
63 virtual void Initialize(); | 63 virtual void Initialize(); |
64 | 64 |
65 // Overridden from views::View. | 65 // Overridden from views::View. |
66 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; | 66 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; |
67 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 67 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
68 virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE; | 68 virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE; |
69 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 69 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
70 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | |
71 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 70 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
72 | 71 |
73 // Overridden from internal::ActionableView. | 72 // Overridden from internal::ActionableView. |
74 virtual bool PerformAction(const ui::Event& event) OVERRIDE; | 73 virtual bool PerformAction(const ui::Event& event) OVERRIDE; |
75 | 74 |
76 // Overridden from internal::BackgroundAnimatorDelegate. | 75 // Overridden from internal::BackgroundAnimatorDelegate. |
77 virtual void UpdateBackground(int alpha) OVERRIDE; | 76 virtual void UpdateBackground(int alpha) OVERRIDE; |
78 | 77 |
79 // Called whenever the shelf alignment changes. | 78 // Called whenever the shelf alignment changes. |
80 virtual void SetShelfAlignment(ShelfAlignment alignment); | 79 virtual void SetShelfAlignment(ShelfAlignment alignment); |
81 | 80 |
82 // Called when the anchor (tray or bubble) may have moved or changed. | 81 // Called when the anchor (tray or bubble) may have moved or changed. |
83 virtual void AnchorUpdated() {} | 82 virtual void AnchorUpdated() {} |
84 | 83 |
85 virtual string16 GetAccessibleName() = 0; | |
86 | |
87 // Sets |contents| as a child and sets its background to |background_|. | 84 // Sets |contents| as a child and sets its background to |background_|. |
88 void SetContents(views::View* contents); | 85 void SetContents(views::View* contents); |
89 | 86 |
90 // Sets whether the tray paints a background. Default is true, but is set to | 87 // Sets whether the tray paints a background. Default is true, but is set to |
91 // false if a window overlaps the shelf. | 88 // false if a window overlaps the shelf. |
92 void SetPaintsBackground( | 89 void SetPaintsBackground( |
93 bool value, | 90 bool value, |
94 internal::BackgroundAnimator::ChangeType change_type); | 91 internal::BackgroundAnimator::ChangeType change_type); |
95 | 92 |
96 // Convenience function to call same function in status_area_widget_. | 93 // Convenience function to call same function in status_area_widget_. |
(...skipping 29 matching lines...) Expand all Loading... |
126 scoped_ptr<internal::TrayLayerAnimationObserver> | 123 scoped_ptr<internal::TrayLayerAnimationObserver> |
127 layer_animation_observer_; | 124 layer_animation_observer_; |
128 | 125 |
129 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); | 126 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); |
130 }; | 127 }; |
131 | 128 |
132 } // namespace internal | 129 } // namespace internal |
133 } // namespace ash | 130 } // namespace ash |
134 | 131 |
135 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ | 132 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ |
OLD | NEW |