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

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

Issue 325433002: Elevated install of recovery component (UI part). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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) 2014 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_RECOVERY_COMPONENT_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_RECOVERY_COMPONENT_BUBBLE_VIEW_H_
7
8 #include "ui/views/bubble/bubble_delegate.h"
9 #include "ui/views/controls/button/button.h"
10
11 class ElevationIconSetter;
12
13 namespace views {
14 class LabelButton;
15 }
16
17 // RecoveryComponentBubbleView warns the user that elevation is needed to
18 // recovery Chrome upgrade channel (Omaha). It is intended to be used as the
19 // content of a bubble anchored off of the Chrome toolbar. Don't create an
20 // RecoveryComponentBubbleView directly, instead use the static ShowBubble
21 // method.
22 class RecoveryComponentBubbleView : public views::BubbleDelegateView,
23 public views::ButtonListener {
24 public:
25 static void ShowBubble(views::View* anchor_view);
26
27 // Identifies if we are running a build that supports the
28 // outdated upgrade bubble view.
29 static bool IsAvailable();
30
31 // views::BubbleDelegateView method.
32 virtual views::View* GetInitiallyFocusedView() OVERRIDE;
33
34 // views::WidgetDelegate method.
35 virtual void WindowClosing() OVERRIDE;
36
37 private:
38 explicit RecoveryComponentBubbleView(views::View* anchor_view);
39 virtual ~RecoveryComponentBubbleView();
40
41 static bool IsShowing() { return recovery_component_bubble_ != NULL; }
42
43 // views::BubbleDelegateView method.
44 virtual void Init() OVERRIDE;
45
46 // views::ButtonListener method.
47 virtual void ButtonPressed(views::Button* sender,
48 const ui::Event& event) OVERRIDE;
49
50 // Handle the message when the user presses a button.
51 void HandleButtonPressed(views::Button* sender);
52
53 // The upgrade bubble, if we're showing one.
54 static RecoveryComponentBubbleView* recovery_component_bubble_;
55
56 // Button that lets the user accept the proposal, which is to install
57 // recovery component as an elevated admin.
58 views::LabelButton* accept_button_;
59
60 // Button that lets the user deny the proposal, which is to install
61 // recovery component as an elevated admin.
62 views::LabelButton* decline_button_;
63
64 scoped_ptr<ElevationIconSetter> elevation_icon_setter_;
65
66 DISALLOW_COPY_AND_ASSIGN(RecoveryComponentBubbleView);
67 };
68
69 #endif // CHROME_BROWSER_UI_VIEWS_RECOVERY_COMPONENT_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/views/recovery_component_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698