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

Unified Diff: ui/message_center/views/notification_header_view.h

Issue 2925263003: Notification: Implement two-leveled notification. (Closed)
Patch Set: Remove an unused function. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/message_center/views/notification_header_view.h
diff --git a/ui/message_center/views/notification_header_view.h b/ui/message_center/views/notification_header_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..b5fbbc0aa3f3f142394766ade6e3d18d8236918c
--- /dev/null
+++ b/ui/message_center/views/notification_header_view.h
@@ -0,0 +1,57 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_
+#define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_
+
+#include "base/macros.h"
+#include "ui/message_center/views/padded_button.h"
+#include "ui/views/controls/button/custom_button.h"
+
+namespace views {
+class ImageButton;
+class ImageView;
+class Label;
+}
+
+namespace message_center {
+
+class NotificationHeaderView : public views::CustomButton {
+ public:
+ NotificationHeaderView(views::ButtonListener* listener);
+ void SetAppIcon(const gfx::ImageSkia& img);
+ void SetAppName(const base::string16& name);
+ void SetExpandButtonEnabled(bool enabled);
+ void SetExpanded(bool expanded);
+ void SetSettingsButtonEnabled(bool enabled);
+ void SetCloseButtonEnabled(bool enabled);
+ void SetControlButtonsVisible(bool visible);
+ bool IsExpandButtonEnabled();
+ bool IsSettingsButtonEnabled();
+ bool IsCloseButtonEnabled();
+ bool IsCloseButtonFocused();
+
+ views::ImageButton* expand_button() { return expand_button_; }
+ views::ImageButton* settings_button() { return settings_button_; }
+ views::ImageButton* close_button() { return close_button_; }
+
+ private:
+ void UpdateControlButtonsVisibility();
+
+ views::Label* app_name_view_ = nullptr;
+ views::ImageView* app_icon_view_ = nullptr;
+ views::ImageButton* expand_button_ = nullptr;
+ PaddedButton* settings_button_ = nullptr;
+ PaddedButton* close_button_ = nullptr;
+
+ bool settings_button_enabled_ = false;
+ bool close_button_enabled_ = false;
+ bool is_control_buttons_visible_ = false;
+
+ DISALLOW_COPY_AND_ASSIGN(NotificationHeaderView);
+};
+
+} // namespace message_center
+
+#endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_
« no previous file with comments | « ui/message_center/vector_icons/notification_expand_more.icon ('k') | ui/message_center/views/notification_header_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698