Chromium Code Reviews| 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..b54ee53a2685c4de167dbaadc9d47b63944a799a |
| --- /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 |
| +// nor MessageBubbleBase because it's UI is slightly different. |
|
miket_OOO
2012/11/21 01:18:21
or ("neither...nor" or "is not A or B")
its (no a
Jun Mukai
2012/11/21 19:33:06
Done.
|
| +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. |
|
miket_OOO
2012/11/21 01:18:21
One space after period. Capitalize "used."
Jun Mukai
2012/11/21 19:33:06
Done.
|
| + 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_ |