| Index: chrome/browser/ui/views/recovery_component_bubble_view.h
|
| diff --git a/chrome/browser/ui/views/recovery_component_bubble_view.h b/chrome/browser/ui/views/recovery_component_bubble_view.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9a08a6f932ace1a7c6970d1c1bf35b37c379b643
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/views/recovery_component_bubble_view.h
|
| @@ -0,0 +1,69 @@
|
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_UI_VIEWS_RECOVERY_COMPONENT_BUBBLE_VIEW_H_
|
| +#define CHROME_BROWSER_UI_VIEWS_RECOVERY_COMPONENT_BUBBLE_VIEW_H_
|
| +
|
| +#include "ui/views/bubble/bubble_delegate.h"
|
| +#include "ui/views/controls/button/button.h"
|
| +
|
| +class ElevationIconSetter;
|
| +
|
| +namespace views {
|
| +class LabelButton;
|
| +}
|
| +
|
| +// RecoveryComponentBubbleView warns the user that elevation is needed to
|
| +// recovery Chrome upgrade channel (Omaha). It is intended to be used as the
|
| +// content of a bubble anchored off of the Chrome toolbar. Don't create an
|
| +// RecoveryComponentBubbleView directly, instead use the static ShowBubble
|
| +// method.
|
| +class RecoveryComponentBubbleView : public views::BubbleDelegateView,
|
| + public views::ButtonListener {
|
| + public:
|
| + static void ShowBubble(views::View* anchor_view);
|
| +
|
| + // Identifies if we are running a build that supports the
|
| + // outdated upgrade bubble view.
|
| + static bool IsAvailable();
|
| +
|
| + // views::BubbleDelegateView method.
|
| + virtual views::View* GetInitiallyFocusedView() OVERRIDE;
|
| +
|
| + // views::WidgetDelegate method.
|
| + virtual void WindowClosing() OVERRIDE;
|
| +
|
| + private:
|
| + explicit RecoveryComponentBubbleView(views::View* anchor_view);
|
| + virtual ~RecoveryComponentBubbleView();
|
| +
|
| + static bool IsShowing() { return recovery_component_bubble_ != NULL; }
|
| +
|
| + // views::BubbleDelegateView method.
|
| + virtual void Init() OVERRIDE;
|
| +
|
| + // views::ButtonListener method.
|
| + virtual void ButtonPressed(views::Button* sender,
|
| + const ui::Event& event) OVERRIDE;
|
| +
|
| + // Handle the message when the user presses a button.
|
| + void HandleButtonPressed(views::Button* sender);
|
| +
|
| + // The upgrade bubble, if we're showing one.
|
| + static RecoveryComponentBubbleView* recovery_component_bubble_;
|
| +
|
| + // Button that lets the user accept the proposal, which is to install
|
| + // recovery component as an elevated admin.
|
| + views::LabelButton* accept_button_;
|
| +
|
| + // Button that lets the user deny the proposal, which is to install
|
| + // recovery component as an elevated admin.
|
| + views::LabelButton* decline_button_;
|
| +
|
| + scoped_ptr<ElevationIconSetter> elevation_icon_setter_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(RecoveryComponentBubbleView);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_UI_VIEWS_RECOVERY_COMPONENT_BUBBLE_VIEW_H_
|
|
|