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

Side by Side Diff: ui/message_center/views/custom_notification_view.h

Issue 2800373002: Remove hack for handling accessibility action on ARC notifications. (Closed)
Patch Set: "ui/accessibility:accessibility" -> "ui/accessibility" 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_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/message_center/message_center_export.h" 9 #include "ui/message_center/message_center_export.h"
10 #include "ui/message_center/views/message_view.h" 10 #include "ui/message_center/views/message_view.h"
11 11
12 namespace ui {
13 struct AXActionData;
14 }
15
12 namespace views { 16 namespace views {
13 class Painter; 17 class Painter;
14 } 18 }
15 19
16 namespace message_center { 20 namespace message_center {
17 21
18 // View for notification with NOTIFICATION_TYPE_CUSTOM that hosts the custom 22 // View for notification with NOTIFICATION_TYPE_CUSTOM that hosts the custom
19 // content of the notification. 23 // content of the notification.
20 class MESSAGE_CENTER_EXPORT CustomNotificationView : public MessageView { 24 class MESSAGE_CENTER_EXPORT CustomNotificationView : public MessageView {
21 public: 25 public:
(...skipping 17 matching lines...) Expand all
39 43
40 // Overridden from views::View: 44 // Overridden from views::View:
41 const char* GetClassName() const override; 45 const char* GetClassName() const override;
42 gfx::Size GetPreferredSize() const override; 46 gfx::Size GetPreferredSize() const override;
43 void Layout() override; 47 void Layout() override;
44 bool HasFocus() const override; 48 bool HasFocus() const override;
45 void RequestFocus() override; 49 void RequestFocus() override;
46 void OnPaint(gfx::Canvas* canvas) override; 50 void OnPaint(gfx::Canvas* canvas) override;
47 bool OnKeyPressed(const ui::KeyEvent& event) override; 51 bool OnKeyPressed(const ui::KeyEvent& event) override;
48 void ChildPreferredSizeChanged(View* child) override; 52 void ChildPreferredSizeChanged(View* child) override;
49 bool OnMousePressed(const ui::MouseEvent& event) override; 53 bool HandleAccessibleAction(const ui::AXActionData& action) override;
50 54
51 private: 55 private:
52 friend class CustomNotificationViewTest; 56 friend class CustomNotificationViewTest;
53 57
54 // The view for the custom content. Owned by view hierarchy. 58 // The view for the custom content. Owned by view hierarchy.
55 views::View* contents_view_ = nullptr; 59 views::View* contents_view_ = nullptr;
56 std::unique_ptr<CustomNotificationContentViewDelegate> 60 std::unique_ptr<CustomNotificationContentViewDelegate>
57 contents_view_delegate_; 61 contents_view_delegate_;
58 62
59 std::unique_ptr<views::Painter> focus_painter_; 63 std::unique_ptr<views::Painter> focus_painter_;
60 64
61 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView); 65 DISALLOW_COPY_AND_ASSIGN(CustomNotificationView);
62 }; 66 };
63 67
64 } // namespace message_center 68 } // namespace message_center
65 69
66 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_ 70 #endif // UI_MESSAGE_CENTER_VIEWS_CUSTOM_NOTIFICATION_VIEW_H_
OLDNEW
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | ui/message_center/views/custom_notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698