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

Unified Diff: ui/message_center/quiet_mode_bubble.h

Issue 11417103: Add quiet mode settings bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « ui/message_center/notification_list.h ('k') | ui/message_center/quiet_mode_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/quiet_mode_bubble.h
diff --git a/ui/message_center/quiet_mode_bubble.h b/ui/message_center/quiet_mode_bubble.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef5a568f7a74117cf95a89f21397e8d8cc61f75b
--- /dev/null
+++ b/ui/message_center/quiet_mode_bubble.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2012 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_QUIET_MODE_BUBBLE_H_
+#define UI_MESSAGE_CENTER_QUIET_MODE_BUBBLE_H_
+
+#include "base/string16.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/message_center/message_center_export.h"
+#include "ui/views/controls/button/button.h"
+
+namespace views {
+class BubbleDelegateView;
+class View;
+}
+
+namespace message_center {
+class NotificationList;
+
+// The bubble for the quiet mode selection. Note that this isn't TrayBubbleView
+// or MessageBubbleBase because its UI is slightly different.
+class MESSAGE_CENTER_EXPORT QuietModeBubble : public views::ButtonListener {
+ public:
+ QuietModeBubble(views::View* anchor_view,
+ gfx::NativeView parent_window,
+ NotificationList* notification_list);
+ virtual ~QuietModeBubble();
+
+ // Close the quiet mode bubble.
+ void Close();
+
+ views::BubbleDelegateView* bubble() { return bubble_; }
+
+ private:
+ // Initialize the contents of the bubble.
+ void InitializeBubbleContents();
+
+ // views::ButtonListener overrides:
+ virtual void ButtonPressed(views::Button* sender,
+ const ui::Event& event) OVERRIDE;
+
+ NotificationList* notification_list_;
+ views::BubbleDelegateView* bubble_;
+
+ // Buttons. Used in ButtonPressed() to check which button is pressed.
+ views::Button* quiet_mode_;
+ views::Button* quiet_mode_1hour_;
+ views::Button* quiet_mode_1day_;
+
+ DISALLOW_COPY_AND_ASSIGN(QuietModeBubble);
+};
+
+} // namespace messge_center
+
+#endif // UI_MESSAGE_CENTER_QUIET_MODE_BUBBLE_H_
« no previous file with comments | « ui/message_center/notification_list.h ('k') | ui/message_center/quiet_mode_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698