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

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

Issue 2959363002: Add ripple effect to new-style notification header. (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_NOTIFICATION_HEADER_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/message_center/views/padded_button.h" 9 #include "ui/message_center/views/padded_button.h"
10 #include "ui/views/controls/button/custom_button.h" 10 #include "ui/views/controls/button/custom_button.h"
(...skipping 14 matching lines...) Expand all
25 void SetExpandButtonEnabled(bool enabled); 25 void SetExpandButtonEnabled(bool enabled);
26 void SetExpanded(bool expanded); 26 void SetExpanded(bool expanded);
27 void SetSettingsButtonEnabled(bool enabled); 27 void SetSettingsButtonEnabled(bool enabled);
28 void SetCloseButtonEnabled(bool enabled); 28 void SetCloseButtonEnabled(bool enabled);
29 void SetControlButtonsVisible(bool visible); 29 void SetControlButtonsVisible(bool visible);
30 bool IsExpandButtonEnabled(); 30 bool IsExpandButtonEnabled();
31 bool IsSettingsButtonEnabled(); 31 bool IsSettingsButtonEnabled();
32 bool IsCloseButtonEnabled(); 32 bool IsCloseButtonEnabled();
33 bool IsCloseButtonFocused(); 33 bool IsCloseButtonFocused();
34 34
35 std::unique_ptr<views::InkDrop> CreateInkDrop() override;
36 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
37 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
38 const override;
39
40 void OnMouseEvent(ui::MouseEvent* event) override;
41
35 views::ImageButton* expand_button() { return expand_button_; } 42 views::ImageButton* expand_button() { return expand_button_; }
36 views::ImageButton* settings_button() { return settings_button_; } 43 views::ImageButton* settings_button() { return settings_button_; }
37 views::ImageButton* close_button() { return close_button_; } 44 views::ImageButton* close_button() { return close_button_; }
38 45
39 private: 46 private:
40 void UpdateControlButtonsVisibility(); 47 void UpdateControlButtonsVisibility();
41 48
42 views::Label* app_name_view_ = nullptr; 49 views::Label* app_name_view_ = nullptr;
43 views::ImageView* app_icon_view_ = nullptr; 50 views::ImageView* app_icon_view_ = nullptr;
44 views::ImageButton* expand_button_ = nullptr; 51 views::ImageButton* expand_button_ = nullptr;
45 PaddedButton* settings_button_ = nullptr; 52 PaddedButton* settings_button_ = nullptr;
46 PaddedButton* close_button_ = nullptr; 53 PaddedButton* close_button_ = nullptr;
47 54
48 bool settings_button_enabled_ = false; 55 bool settings_button_enabled_ = false;
49 bool close_button_enabled_ = false; 56 bool close_button_enabled_ = false;
50 bool is_control_buttons_visible_ = false; 57 bool is_control_buttons_visible_ = false;
51 58
52 DISALLOW_COPY_AND_ASSIGN(NotificationHeaderView); 59 DISALLOW_COPY_AND_ASSIGN(NotificationHeaderView);
53 }; 60 };
54 61
55 } // namespace message_center 62 } // namespace message_center
56 63
57 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_ 64 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698