OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 class ExtensionInstallUI { | 25 class ExtensionInstallUI { |
26 public: | 26 public: |
27 static ExtensionInstallUI* Create(Browser* browser); | 27 static ExtensionInstallUI* Create(Browser* browser); |
28 | 28 |
29 virtual ~ExtensionInstallUI(); | 29 virtual ~ExtensionInstallUI(); |
30 | 30 |
31 // Called when an extension was installed. | 31 // Called when an extension was installed. |
32 virtual void OnInstallSuccess(const extensions::Extension* extension, | 32 virtual void OnInstallSuccess(const extensions::Extension* extension, |
33 SkBitmap* icon) = 0; | 33 SkBitmap* icon) = 0; |
34 // Called when an extension failed to install. | 34 // Called when an extension failed to install. |
35 virtual void OnInstallFailure(const CrxInstallerError& error) = 0; | 35 virtual void OnInstallFailure(const extensions::CrxInstallerError& error) = 0; |
36 | 36 |
37 // Whether or not to show the default UI after completing the installation. | 37 // Whether or not to show the default UI after completing the installation. |
38 virtual void SetSkipPostInstallUI(bool skip_ui) = 0; | 38 virtual void SetSkipPostInstallUI(bool skip_ui) = 0; |
39 | 39 |
40 // TODO(asargent) Normally we navigate to the new tab page when an app is | 40 // TODO(asargent) Normally we navigate to the new tab page when an app is |
41 // installed, but we're experimenting with instead showing a bubble when | 41 // installed, but we're experimenting with instead showing a bubble when |
42 // an app is installed which points to the new tab button. This may become | 42 // an app is installed which points to the new tab button. This may become |
43 // the default behavior in the future. | 43 // the default behavior in the future. |
44 virtual void SetUseAppInstalledBubble(bool use_bubble) = 0; | 44 virtual void SetUseAppInstalledBubble(bool use_bubble) = 0; |
45 | 45 |
46 // Opens apps UI and animates the app icon for the app with id |app_id|. | 46 // Opens apps UI and animates the app icon for the app with id |app_id|. |
47 static void OpenAppInstalledUI(Browser* browser, const std::string& app_id); | 47 static void OpenAppInstalledUI(Browser* browser, const std::string& app_id); |
48 | 48 |
49 // Disables showing UI (ErrorBox, etc.) for install failures. To be used only | 49 // Disables showing UI (ErrorBox, etc.) for install failures. To be used only |
50 // in tests. | 50 // in tests. |
51 static void DisableFailureUIForTests(); | 51 static void DisableFailureUIForTests(); |
52 | 52 |
53 Browser* browser() { return browser_; } | 53 Browser* browser() { return browser_; } |
54 | 54 |
55 protected: | 55 protected: |
56 ExtensionInstallUI(); | 56 ExtensionInstallUI(); |
57 | 57 |
58 Browser* browser_; | 58 Browser* browser_; |
59 }; | 59 }; |
60 | 60 |
61 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ | 61 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_H_ |
OLD | NEW |