| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/timer.h" | 9 #include "base/timer.h" |
| 10 #include "views/controls/button/button.h" | 10 #include "views/controls/button/button.h" |
| 11 #include "views/bubble/bubble_delegate.h" | 11 #include "views/bubble/bubble_delegate.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 class Label; | 14 class Label; |
| 15 class NativeTextButton; | 15 class NativeTextButton; |
| 16 } | 16 } |
| 17 | 17 |
| 18 class CriticalNotificationBubbleView : public views::BubbleDelegateView, | 18 class CriticalNotificationBubbleView : public views::BubbleDelegateView, |
| 19 public views::ButtonListener { | 19 public views::ButtonListener { |
| 20 public: | 20 public: |
| 21 explicit CriticalNotificationBubbleView(const gfx::Point& anchor_point); | 21 explicit CriticalNotificationBubbleView(views::View* anchor_view); |
| 22 virtual ~CriticalNotificationBubbleView(); | 22 virtual ~CriticalNotificationBubbleView(); |
| 23 | 23 |
| 24 // views::ButtonListener overrides: | 24 // views::ButtonListener overrides: |
| 25 virtual void ButtonPressed(views::Button* sender, | 25 virtual void ButtonPressed(views::Button* sender, |
| 26 const views::Event& event) OVERRIDE; | 26 const views::Event& event) OVERRIDE; |
| 27 | 27 |
| 28 // views::WidgetDelegate overrides: | 28 // views::WidgetDelegate overrides: |
| 29 virtual void WindowClosing() OVERRIDE; | 29 virtual void WindowClosing() OVERRIDE; |
| 30 | 30 |
| 31 protected: | 31 protected: |
| (...skipping 21 matching lines...) Expand all Loading... |
| 53 // A timer to refresh the bubble to show new countdown value. | 53 // A timer to refresh the bubble to show new countdown value. |
| 54 base::RepeatingTimer<CriticalNotificationBubbleView> refresh_timer_; | 54 base::RepeatingTimer<CriticalNotificationBubbleView> refresh_timer_; |
| 55 | 55 |
| 56 // When the bubble was created. | 56 // When the bubble was created. |
| 57 base::Time bubble_created_; | 57 base::Time bubble_created_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(CriticalNotificationBubbleView); | 59 DISALLOW_COPY_AND_ASSIGN(CriticalNotificationBubbleView); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 #endif // CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_ | 62 #endif // CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_ |
| OLD | NEW |