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

Side by Side Diff: chrome/browser/ui/views/outdated_upgrade_bubble_view.h

Issue 11440020: Add an outdated upgrade bubble view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only check for policy on CHROME_BUILD. Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_
7
8 #include "ui/views/bubble/bubble_delegate.h"
9 #include "ui/views/controls/button/button.h"
10
11 namespace views {
12 class TextButton;
13 }
14
15 class Browser;
16
17 // OutdatedUpgradeBubbleView warns the user that an upgrade is long overdue.
18 // It is intended to be used as the content of a bubble anchored off of the
19 // Chrome toolbar. Don't create a OutdatedUpgradeBubbleView directly,
Finnur 2013/01/30 15:50:48 nit: s/ a / an /
MAD 2013/01/31 21:31:42 Done.
20 // instead use the static Show method.
Finnur 2013/01/30 15:50:48 Do you mean ShowBubble?
MAD 2013/01/31 21:31:42 Done.
21 class OutdatedUpgradeBubbleView : public views::BubbleDelegateView,
22 public views::ButtonListener {
23 public:
24 static void ShowBubble(views::View* anchor_view, Browser* browser);
25
26 // views::BubbleDelegateView method.
27 virtual views::View* GetInitiallyFocusedView() OVERRIDE;
28
29 // views::WidgetDelegate method.
30 virtual void WindowClosing() OVERRIDE;
31
32 private:
33 OutdatedUpgradeBubbleView(views::View* anchor_view, Browser* browser);
34 virtual ~OutdatedUpgradeBubbleView();
35
36 static bool IsShowing() { return upgrade_bubble_ != NULL; }
37
38 // views::BubbleDelegateView method.
39 virtual void Init() OVERRIDE;
40
41 // views::ButtonListener method.
42 virtual void ButtonPressed(views::Button* sender,
43 const ui::Event& event) OVERRIDE;
44
45 // Handle the message when the user presses a button.
46 void HandleButtonPressed(views::Button* sender);
47
48 // The upgrade bubble, if we're showing one.
49 static OutdatedUpgradeBubbleView* upgrade_bubble_;
50
51 // Button that takes the user to the Chrome download page.
52 views::TextButton* reinstall_button_;
53
54 // Button for the user to be reminded later about the outdated upgrade.
55 views::TextButton* later_button_;
56
57 // The browser to use for opening the Download Chrome URL.
58 Browser* browser_;
59
60 DISALLOW_COPY_AND_ASSIGN(OutdatedUpgradeBubbleView);
61 };
62
63 #endif // CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698