Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / extensions / extension_error_ui_default.h
blobd6b01d6fdd8681824d064358d149fef760467614
1 // Copyright (c) 2012 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_EXTENSIONS_EXTENSION_ERROR_UI_DEFAULT_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_UI_DEFAULT_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/extensions/extension_error_ui.h"
11 #include "chrome/browser/ui/global_error/global_error.h"
12 #include "extensions/common/extension.h"
14 class Browser;
15 class Profile;
17 namespace extensions {
19 class ExtensionErrorUIDefault : public ExtensionErrorUI {
20 public:
21 explicit ExtensionErrorUIDefault(ExtensionErrorUI::Delegate* delegate);
22 ~ExtensionErrorUIDefault() override;
24 // ExtensionErrorUI implementation:
25 bool ShowErrorInBubbleView() override;
26 void ShowExtensions() override;
27 void Close() override;
29 private:
30 class ExtensionGlobalError : public GlobalErrorWithStandardBubble {
31 public:
32 explicit ExtensionGlobalError(ExtensionErrorUIDefault* error_ui);
34 private:
35 // GlobalError methods.
36 bool HasMenuItem() override;
37 int MenuItemCommandID() override;
38 base::string16 MenuItemLabel() override;
39 void ExecuteMenuItem(Browser* browser) override;
40 base::string16 GetBubbleViewTitle() override;
41 std::vector<base::string16> GetBubbleViewMessages() override;
42 base::string16 GetBubbleViewAcceptButtonLabel() override;
43 base::string16 GetBubbleViewCancelButtonLabel() override;
44 void OnBubbleViewDidClose(Browser* browser) override;
45 void BubbleViewAcceptButtonPressed(Browser* browser) override;
46 void BubbleViewCancelButtonPressed(Browser* browser) override;
48 // The ExtensionErrorUIDefault who owns us.
49 ExtensionErrorUIDefault* error_ui_;
51 DISALLOW_COPY_AND_ASSIGN(ExtensionGlobalError);
54 // The profile associated with this error.
55 Profile* profile_;
57 // The browser the bubble view was shown into.
58 Browser* browser_;
60 scoped_ptr<ExtensionGlobalError> global_error_;
62 DISALLOW_COPY_AND_ASSIGN(ExtensionErrorUIDefault);
65 } // namespace extensions
67 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_UI_DEFAULT_H_