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

Side by Side Diff: ui/arc/notification/arc_custom_notification_view.h

Issue 2800373002: Remove hack for handling accessibility action on ARC notifications. (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "ui/arc/notification/arc_custom_notification_item.h" 12 #include "ui/arc/notification/arc_custom_notification_item.h"
13 #include "ui/arc/notification/arc_notification_surface_manager.h" 13 #include "ui/arc/notification/arc_notification_surface_manager.h"
14 #include "ui/aura/window_observer.h" 14 #include "ui/aura/window_observer.h"
15 #include "ui/gfx/animation/animation_delegate.h" 15 #include "ui/gfx/animation/animation_delegate.h"
16 #include "ui/message_center/views/custom_notification_content_view_delegate.h" 16 #include "ui/message_center/views/custom_notification_content_view_delegate.h"
17 #include "ui/message_center/views/padded_button.h" 17 #include "ui/message_center/views/padded_button.h"
18 #include "ui/views/controls/button/button.h" 18 #include "ui/views/controls/button/button.h"
19 #include "ui/views/controls/native/native_view_host.h" 19 #include "ui/views/controls/native/native_view_host.h"
20 20
21 namespace exo { 21 namespace exo {
22 class NotificationSurface; 22 class NotificationSurface;
23 } 23 }
24 24
25 namespace gfx { 25 namespace gfx {
26 class LinearAnimation; 26 class LinearAnimation;
27 } 27 }
28 28
29 namespace ui {
30 struct AXActionData;
31 }
32
29 namespace views { 33 namespace views {
30 class FocusTraversable; 34 class FocusTraversable;
31 class Widget; 35 class Widget;
32 } 36 }
33 37
34 namespace arc { 38 namespace arc {
35 39
36 class ArcCustomNotificationView 40 class ArcCustomNotificationView
37 : public views::NativeViewHost, 41 : public views::NativeViewHost,
38 public views::ButtonListener, 42 public views::ButtonListener,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 const ViewHierarchyChangedDetails& details) override; 90 const ViewHierarchyChangedDetails& details) override;
87 void Layout() override; 91 void Layout() override;
88 void OnPaint(gfx::Canvas* canvas) override; 92 void OnPaint(gfx::Canvas* canvas) override;
89 void OnKeyEvent(ui::KeyEvent* event) override; 93 void OnKeyEvent(ui::KeyEvent* event) override;
90 void OnGestureEvent(ui::GestureEvent* event) override; 94 void OnGestureEvent(ui::GestureEvent* event) override;
91 void OnMouseEntered(const ui::MouseEvent& event) override; 95 void OnMouseEntered(const ui::MouseEvent& event) override;
92 void OnMouseExited(const ui::MouseEvent& event) override; 96 void OnMouseExited(const ui::MouseEvent& event) override;
93 void OnFocus() override; 97 void OnFocus() override;
94 void OnBlur() override; 98 void OnBlur() override;
95 views::FocusTraversable* GetFocusTraversable() override; 99 views::FocusTraversable* GetFocusTraversable() override;
96 bool OnMousePressed(const ui::MouseEvent& event) override; 100 bool HandleAccessibleAction(const ui::AXActionData& action) override;
97 101
98 // views::ButtonListener 102 // views::ButtonListener
99 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 103 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
100 104
101 // aura::WindowObserver 105 // aura::WindowObserver
102 void OnWindowBoundsChanged(aura::Window* window, 106 void OnWindowBoundsChanged(aura::Window* window,
103 const gfx::Rect& old_bounds, 107 const gfx::Rect& old_bounds,
104 const gfx::Rect& new_bounds) override; 108 const gfx::Rect& new_bounds) override;
105 void OnWindowDestroying(aura::Window* window) override; 109 void OnWindowDestroying(aura::Window* window) override;
106 110
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 bool in_layout_ = false; 152 bool in_layout_ = false;
149 153
150 std::unique_ptr<gfx::LinearAnimation> control_button_color_animation_; 154 std::unique_ptr<gfx::LinearAnimation> control_button_color_animation_;
151 155
152 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView); 156 DISALLOW_COPY_AND_ASSIGN(ArcCustomNotificationView);
153 }; 157 };
154 158
155 } // namespace arc 159 } // namespace arc
156 160
157 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_ 161 #endif // UI_ARC_NOTIFICATION_ARC_CUSTOM_NOTIFICATION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698