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_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |
6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "extensions/browser/install/extension_install_ui.h" | 10 #include "extensions/browser/install/extension_install_ui.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class BrowserContext; | 13 class BrowserContext; |
14 } | 14 } |
15 | 15 |
16 class Profile; | 16 class Profile; |
17 | 17 |
18 class ExtensionInstallUIDefault : public extensions::ExtensionInstallUI { | 18 class ExtensionInstallUIDefault : public extensions::ExtensionInstallUI { |
19 public: | 19 public: |
20 explicit ExtensionInstallUIDefault(content::BrowserContext* context); | 20 explicit ExtensionInstallUIDefault(content::BrowserContext* context); |
21 virtual ~ExtensionInstallUIDefault(); | 21 ~ExtensionInstallUIDefault() override; |
22 | 22 |
23 // ExtensionInstallUI: | 23 // ExtensionInstallUI: |
24 virtual void OnInstallSuccess(const extensions::Extension* extension, | 24 void OnInstallSuccess(const extensions::Extension* extension, |
25 const SkBitmap* icon) override; | 25 const SkBitmap* icon) override; |
26 virtual void OnInstallFailure( | 26 void OnInstallFailure(const extensions::CrxInstallerError& error) override; |
27 const extensions::CrxInstallerError& error) override; | 27 void SetUseAppInstalledBubble(bool use_bubble) override; |
28 virtual void SetUseAppInstalledBubble(bool use_bubble) override; | 28 void OpenAppInstalledUI(const std::string& app_id) override; |
29 virtual void OpenAppInstalledUI(const std::string& app_id) override; | 29 void SetSkipPostInstallUI(bool skip_ui) override; |
30 virtual void SetSkipPostInstallUI(bool skip_ui) override; | 30 gfx::NativeWindow GetDefaultInstallDialogParent() override; |
31 virtual gfx::NativeWindow GetDefaultInstallDialogParent() override; | |
32 | 31 |
33 private: | 32 private: |
34 Profile* profile_; | 33 Profile* profile_; |
35 | 34 |
36 // Whether or not to show the default UI after completing the installation. | 35 // Whether or not to show the default UI after completing the installation. |
37 bool skip_post_install_ui_; | 36 bool skip_post_install_ui_; |
38 | 37 |
39 // Used to undo theme installation. | 38 // Used to undo theme installation. |
40 std::string previous_theme_id_; | 39 std::string previous_theme_id_; |
41 bool previous_using_system_theme_; | 40 bool previous_using_system_theme_; |
42 | 41 |
43 // Whether to show an installed bubble on app install, or use the default | 42 // Whether to show an installed bubble on app install, or use the default |
44 // action of opening a new tab page. | 43 // action of opening a new tab page. |
45 bool use_app_installed_bubble_; | 44 bool use_app_installed_bubble_; |
46 | 45 |
47 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallUIDefault); | 46 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallUIDefault); |
48 }; | 47 }; |
49 | 48 |
50 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ | 49 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |
OLD | NEW |