OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ | 5 #ifndef UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ |
6 #define UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ | 6 #define UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 void MaybeCreateFloatingControlButtons(); | 80 void MaybeCreateFloatingControlButtons(); |
81 void SetSurface(exo::NotificationSurface* surface); | 81 void SetSurface(exo::NotificationSurface* surface); |
82 void UpdatePreferredSize(); | 82 void UpdatePreferredSize(); |
83 void UpdateControlButtonsVisibility(); | 83 void UpdateControlButtonsVisibility(); |
84 void UpdatePinnedState(); | 84 void UpdatePinnedState(); |
85 void UpdateSnapshot(); | 85 void UpdateSnapshot(); |
86 void AttachSurface(); | 86 void AttachSurface(); |
87 void ActivateToast(); | 87 void ActivateToast(); |
88 void StartControlButtonsColorAnimation(); | 88 void StartControlButtonsColorAnimation(); |
89 bool ShouldUpdateControlButtonsColor() const; | 89 bool ShouldUpdateControlButtonsColor() const; |
| 90 void UpdateAccessibleName(); |
90 | 91 |
91 // views::NativeViewHost | 92 // views::NativeViewHost |
92 void ViewHierarchyChanged( | 93 void ViewHierarchyChanged( |
93 const ViewHierarchyChangedDetails& details) override; | 94 const ViewHierarchyChangedDetails& details) override; |
94 void Layout() override; | 95 void Layout() override; |
95 void OnPaint(gfx::Canvas* canvas) override; | 96 void OnPaint(gfx::Canvas* canvas) override; |
96 void OnMouseEntered(const ui::MouseEvent& event) override; | 97 void OnMouseEntered(const ui::MouseEvent& event) override; |
97 void OnMouseExited(const ui::MouseEvent& event) override; | 98 void OnMouseExited(const ui::MouseEvent& event) override; |
98 void OnFocus() override; | 99 void OnFocus() override; |
99 void OnBlur() override; | 100 void OnBlur() override; |
100 views::FocusTraversable* GetFocusTraversable() override; | 101 views::FocusTraversable* GetFocusTraversable() override; |
101 bool HandleAccessibleAction(const ui::AXActionData& action) override; | 102 bool HandleAccessibleAction(const ui::AXActionData& action) override; |
| 103 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
102 | 104 |
103 // views::ButtonListener | 105 // views::ButtonListener |
104 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 106 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
105 | 107 |
106 // aura::WindowObserver | 108 // aura::WindowObserver |
107 void OnWindowBoundsChanged(aura::Window* window, | 109 void OnWindowBoundsChanged(aura::Window* window, |
108 const gfx::Rect& old_bounds, | 110 const gfx::Rect& old_bounds, |
109 const gfx::Rect& new_bounds) override; | 111 const gfx::Rect& new_bounds) override; |
110 void OnWindowDestroying(aura::Window* window) override; | 112 void OnWindowDestroying(aura::Window* window) override; |
111 | 113 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 149 |
148 views::View* control_buttons_view_ = nullptr; | 150 views::View* control_buttons_view_ = nullptr; |
149 std::unique_ptr<ControlButton> close_button_; | 151 std::unique_ptr<ControlButton> close_button_; |
150 ControlButton* settings_button_ = nullptr; | 152 ControlButton* settings_button_ = nullptr; |
151 | 153 |
152 // Protects from call loops between Layout and OnWindowBoundsChanged. | 154 // Protects from call loops between Layout and OnWindowBoundsChanged. |
153 bool in_layout_ = false; | 155 bool in_layout_ = false; |
154 | 156 |
155 std::unique_ptr<gfx::LinearAnimation> control_button_color_animation_; | 157 std::unique_ptr<gfx::LinearAnimation> control_button_color_animation_; |
156 | 158 |
| 159 base::string16 accessible_name_; |
| 160 |
157 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView); | 161 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView); |
158 }; | 162 }; |
159 | 163 |
160 } // namespace arc | 164 } // namespace arc |
161 | 165 |
162 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ | 166 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ |
OLD | NEW |