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

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: Addressed CR comments... Created 7 years, 11 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) 2012 The Chromium Authors. All rights reserved.
Finnur 2013/01/23 10:39:17 Happy new year! :)
MAD 2013/01/23 20:57:59 Hamingjusamur Nýtt Ár :-)
Finnur 2013/01/24 10:13:32 nit: It's Gleðilegt nýtt ár! :) On 2013/01/23 20
MAD 2013/01/24 17:29:35 :-)
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 is a view that warns the user that an upgrade is
Finnur 2013/01/23 10:39:17 nit: 'is a view that' is redundant.
MAD 2013/01/23 20:57:59 Done.
18 // long overdue. It is intended to be used as the content of a bubble anchored
19 // off of the Chrome toolbar. Don't create a OutdatedUpgradeBubbleView directly,
20 // instead use the static Show method.
21 class OutdatedUpgradeBubbleView : public views::BubbleDelegateView,
22 public views::ButtonListener {
23 public:
24 static void ShowBubble(views::View* anchor_view, Browser* browser);
25 static bool IsShowing();
26
27 // views::BubbleDelegateView method.
28 virtual views::View* GetInitiallyFocusedView() OVERRIDE;
29
30 // views::WidgetDelegate method.
31 virtual void WindowClosing() OVERRIDE;
32
33 private:
34 OutdatedUpgradeBubbleView(views::View* anchor_view, Browser* browser);
35 virtual ~OutdatedUpgradeBubbleView();
36
37 // views::BubbleDelegateView method.
38 virtual void Init() OVERRIDE;
39
40 // views::ButtonListener method.
41 // Closes the bubble or opens the download Chrome URL.
Finnur 2013/01/23 10:39:17 nit: I'd probably drop this comment (line 41).
MAD 2013/01/23 20:57:59 Done.
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 for the user to reinstall Chrome now, by navigating to the
Finnur 2013/01/23 10:39:17 nit: More concise and to the point: // Button that
MAD 2013/01/23 20:57:59 Done.
52 // Download Chrome URL.
53 views::TextButton* reinstall_button_;
54
55 // Button for the user to be reminded later about the outdated upgrade.
56 views::TextButton* later_button_;
57
58 // The browser to use for opening the Download Chrome URL.
59 Browser* browser_;
60
61 DISALLOW_COPY_AND_ASSIGN(OutdatedUpgradeBubbleView);
62 };
63
64 #endif // CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698