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

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

Issue 2960333003: Extract the view of control buttons on notification into a separated class (Closed)
Patch Set: addressed comments Created 3 years, 5 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
« no previous file with comments | « ui/message_center/BUILD.gn ('k') | ui/message_center/views/message_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 static gfx::Insets GetShadowInsets(); 53 static gfx::Insets GetShadowInsets();
54 54
55 // Creates a shadow around the notification and changes slide-out behavior. 55 // Creates a shadow around the notification and changes slide-out behavior.
56 void SetIsNested(); 56 void SetIsNested();
57 57
58 virtual bool IsCloseButtonFocused() const = 0; 58 virtual bool IsCloseButtonFocused() const = 0;
59 virtual void RequestFocusOnCloseButton() = 0; 59 virtual void RequestFocusOnCloseButton() = 0;
60 virtual void UpdateControlButtonsVisibility() = 0; 60 virtual void UpdateControlButtonsVisibility() = 0;
61 61
62 void OnCloseButtonPressed(); 62 void OnCloseButtonPressed();
63 void OnSettingsButtonPressed();
63 64
64 // views::View 65 // views::View
65 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; 66 void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
66 bool OnMousePressed(const ui::MouseEvent& event) override; 67 bool OnMousePressed(const ui::MouseEvent& event) override;
67 bool OnKeyPressed(const ui::KeyEvent& event) override; 68 bool OnKeyPressed(const ui::KeyEvent& event) override;
68 bool OnKeyReleased(const ui::KeyEvent& event) override; 69 bool OnKeyReleased(const ui::KeyEvent& event) override;
69 void OnPaint(gfx::Canvas* canvas) override; 70 void OnPaint(gfx::Canvas* canvas) override;
70 void OnFocus() override; 71 void OnFocus() override;
71 void OnBlur() override; 72 void OnBlur() override;
72 void Layout() override; 73 void Layout() override;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // True if |this| is embedded in another view. Equivalent to |!top_level| in 121 // True if |this| is embedded in another view. Equivalent to |!top_level| in
121 // MessageViewFactory parlance. 122 // MessageViewFactory parlance.
122 bool is_nested_ = false; 123 bool is_nested_ = false;
123 124
124 DISALLOW_COPY_AND_ASSIGN(MessageView); 125 DISALLOW_COPY_AND_ASSIGN(MessageView);
125 }; 126 };
126 127
127 } // namespace message_center 128 } // namespace message_center
128 129
129 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_ 130 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_VIEW_H_
OLDNEW
« no previous file with comments | « ui/message_center/BUILD.gn ('k') | ui/message_center/views/message_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698