| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_OUTDATED_UPGRADE_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "ui/views/bubble/bubble_delegate.h" | 8 #include "ui/views/bubble/bubble_delegate.h" |
| 9 #include "ui/views/controls/button/button.h" | 9 #include "ui/views/controls/button/button.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 public: | 27 public: |
| 28 static void ShowBubble(views::View* anchor_view, | 28 static void ShowBubble(views::View* anchor_view, |
| 29 content::PageNavigator* navigator, | 29 content::PageNavigator* navigator, |
| 30 bool auto_update_enabled); | 30 bool auto_update_enabled); |
| 31 | 31 |
| 32 // Identifies if we are running a build that supports the | 32 // Identifies if we are running a build that supports the |
| 33 // outdated upgrade bubble view. | 33 // outdated upgrade bubble view. |
| 34 static bool IsAvailable(); | 34 static bool IsAvailable(); |
| 35 | 35 |
| 36 // views::BubbleDelegateView method. | 36 // views::BubbleDelegateView method. |
| 37 virtual views::View* GetInitiallyFocusedView() override; | 37 views::View* GetInitiallyFocusedView() override; |
| 38 | 38 |
| 39 // views::WidgetDelegate method. | 39 // views::WidgetDelegate method. |
| 40 virtual void WindowClosing() override; | 40 void WindowClosing() override; |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 OutdatedUpgradeBubbleView(views::View* anchor_view, | 43 OutdatedUpgradeBubbleView(views::View* anchor_view, |
| 44 content::PageNavigator* navigator, | 44 content::PageNavigator* navigator, |
| 45 bool auto_update_enabled); | 45 bool auto_update_enabled); |
| 46 virtual ~OutdatedUpgradeBubbleView(); | 46 ~OutdatedUpgradeBubbleView() override; |
| 47 | 47 |
| 48 static bool IsShowing() { return upgrade_bubble_ != NULL; } | 48 static bool IsShowing() { return upgrade_bubble_ != NULL; } |
| 49 | 49 |
| 50 // views::BubbleDelegateView method. | 50 // views::BubbleDelegateView method. |
| 51 virtual void Init() override; | 51 void Init() override; |
| 52 | 52 |
| 53 // views::ButtonListener method. | 53 // views::ButtonListener method. |
| 54 virtual void ButtonPressed(views::Button* sender, | 54 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 55 const ui::Event& event) override; | |
| 56 | 55 |
| 57 // Handle the message when the user presses a button. | 56 // Handle the message when the user presses a button. |
| 58 void HandleButtonPressed(views::Button* sender); | 57 void HandleButtonPressed(views::Button* sender); |
| 59 | 58 |
| 60 // The upgrade bubble, if we're showing one. | 59 // The upgrade bubble, if we're showing one. |
| 61 static OutdatedUpgradeBubbleView* upgrade_bubble_; | 60 static OutdatedUpgradeBubbleView* upgrade_bubble_; |
| 62 | 61 |
| 63 // The numer of times the user ignored the bubble before finally choosing to | 62 // The numer of times the user ignored the bubble before finally choosing to |
| 64 // reinstall. | 63 // reinstall. |
| 65 static int num_ignored_bubbles_; | 64 static int num_ignored_bubbles_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 80 | 79 |
| 81 // The PageNavigator to use for opening the Download Chrome URL. | 80 // The PageNavigator to use for opening the Download Chrome URL. |
| 82 content::PageNavigator* navigator_; | 81 content::PageNavigator* navigator_; |
| 83 | 82 |
| 84 scoped_ptr<ElevationIconSetter> elevation_icon_setter_; | 83 scoped_ptr<ElevationIconSetter> elevation_icon_setter_; |
| 85 | 84 |
| 86 DISALLOW_COPY_AND_ASSIGN(OutdatedUpgradeBubbleView); | 85 DISALLOW_COPY_AND_ASSIGN(OutdatedUpgradeBubbleView); |
| 87 }; | 86 }; |
| 88 | 87 |
| 89 #endif // CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_ | 88 #endif // CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_ |
| OLD | NEW |