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

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: More CR comments addressed and now a testable version without current time test yet. 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) 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,
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
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 // views::BubbleDelegateView method.
37 virtual void Init() OVERRIDE;
38
39 // views::ButtonListener method.
40 virtual void ButtonPressed(views::Button* sender,
41 const ui::Event& event) OVERRIDE;
42
43 // Handle the message when the user presses a button.
44 void HandleButtonPressed(views::Button* sender);
45
46 // The upgrade bubble, if we're showing one.
47 static OutdatedUpgradeBubbleView* upgrade_bubble_;
48
49 // Button that takes the user to the Chrome download page.
50 views::TextButton* reinstall_button_;
51
52 // Button for the user to be reminded later about the outdated upgrade.
53 views::TextButton* later_button_;
54
55 // The browser to use for opening the Download Chrome URL.
56 Browser* browser_;
57
58 DISALLOW_COPY_AND_ASSIGN(OutdatedUpgradeBubbleView);
59 };
60
61 #endif // CHROME_BROWSER_UI_VIEWS_OUTDATED_UPGRADE_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698