Update {virtual,override,final} for chrome/browser/recovery to follow C++11 style.
[chromium-blink-merge.git] / chrome / browser / recovery / recovery_install_global_error.h
blob7b02ca7edc9afd91b182c17d2dcacb3771631520
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.
5 #ifndef CHROME_BROWSER_RECOVERY_RECOVERY_INSTALL_GLOBAL_ERROR_H_
6 #define CHROME_BROWSER_RECOVERY_RECOVERY_INSTALL_GLOBAL_ERROR_H_
8 #include "base/prefs/pref_change_registrar.h"
9 #include "chrome/browser/ui/global_error/global_error.h"
10 #include "components/keyed_service/core/keyed_service.h"
12 class Profile;
14 // Shows elevation needed for recovery component install on the wrench menu
15 // using a bubble view and a menu item.
16 class RecoveryInstallGlobalError : public GlobalErrorWithStandardBubble,
17 public KeyedService {
18 public:
19 explicit RecoveryInstallGlobalError(Profile* profile);
20 ~RecoveryInstallGlobalError() override;
22 private:
23 // KeyedService:
24 void Shutdown() override;
26 // GlobalErrorWithStandardBubble:
27 Severity GetSeverity() override;
28 bool HasMenuItem() override;
29 int MenuItemCommandID() override;
30 base::string16 MenuItemLabel() override;
31 int MenuItemIconResourceID() override;
32 void ExecuteMenuItem(Browser* browser) override;
33 bool HasBubbleView() override;
34 bool HasShownBubbleView() override;
35 void ShowBubbleView(Browser* browser) override;
36 gfx::Image GetBubbleViewIcon() override;
37 base::string16 GetBubbleViewTitle() override;
38 std::vector<base::string16> GetBubbleViewMessages() override;
39 base::string16 GetBubbleViewAcceptButtonLabel() override;
40 bool ShouldAddElevationIconToAcceptButton() override;
41 base::string16 GetBubbleViewCancelButtonLabel() override;
42 void OnBubbleViewDidClose(Browser* browser) override;
43 void BubbleViewAcceptButtonPressed(Browser* browser) override;
44 void BubbleViewCancelButtonPressed(Browser* browser) override;
46 bool HasElevationNotification() const;
47 void OnElevationRequirementChanged();
49 bool elevation_needed_;
51 // The Profile this service belongs to.
52 Profile* profile_;
54 // Monitors registry change for recovery component install.
55 PrefChangeRegistrar pref_registrar_;
57 bool has_shown_bubble_view_;
59 DISALLOW_COPY_AND_ASSIGN(RecoveryInstallGlobalError);
62 #endif // CHROME_BROWSER_RECOVERY_RECOVERY_INSTALL_GLOBAL_ERROR_H_