[email protected] | c82da8c4 | 2012-06-08 19:49:11 | [diff] [blame] | 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. | ||||
4 | |||||
[email protected] | dc63aab | 2013-02-12 06:15:10 | [diff] [blame] | 5 | #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |
6 | #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ | ||||
[email protected] | c82da8c4 | 2012-06-08 19:49:11 | [diff] [blame] | 7 | |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame^] | 8 | #include "base/memory/raw_ptr.h" |
pkotwicz | a57a1f32 | 2014-10-21 00:24:30 | [diff] [blame] | 9 | #include "extensions/browser/install/extension_install_ui.h" |
10 | |||||
11 | namespace content { | ||||
12 | class BrowserContext; | ||||
13 | } | ||||
[email protected] | c82da8c4 | 2012-06-08 19:49:11 | [diff] [blame] | 14 | |
Elly Fong-Jones | 7c3ab03 | 2020-03-12 23:02:19 | [diff] [blame] | 15 | class Browser; |
[email protected] | 32fc4ff7 | 2012-06-15 21:50:01 | [diff] [blame] | 16 | class Profile; |
[email protected] | 591a59f | 2012-10-11 01:16:23 | [diff] [blame] | 17 | |
pkotwicz | a57a1f32 | 2014-10-21 00:24:30 | [diff] [blame] | 18 | class ExtensionInstallUIDefault : public extensions::ExtensionInstallUI { |
[email protected] | c82da8c4 | 2012-06-08 19:49:11 | [diff] [blame] | 19 | public: |
pkotwicz | a57a1f32 | 2014-10-21 00:24:30 | [diff] [blame] | 20 | explicit ExtensionInstallUIDefault(content::BrowserContext* context); |
Peter Boström | 53c6c595 | 2021-09-17 09:41:26 | [diff] [blame] | 21 | |
22 | ExtensionInstallUIDefault(const ExtensionInstallUIDefault&) = delete; | ||||
23 | ExtensionInstallUIDefault& operator=(const ExtensionInstallUIDefault&) = | ||||
24 | delete; | ||||
25 | |||||
dcheng | 5dd5ff6 | 2014-10-21 12:42:38 | [diff] [blame] | 26 | ~ExtensionInstallUIDefault() override; |
[email protected] | c82da8c4 | 2012-06-08 19:49:11 | [diff] [blame] | 27 | |
[email protected] | b55b2f2 | 2013-08-22 07:54:11 | [diff] [blame] | 28 | // ExtensionInstallUI: |
Dana Fried | c3c3022 | 2018-12-11 23:34:56 | [diff] [blame] | 29 | void OnInstallSuccess(scoped_refptr<const extensions::Extension> extension, |
dcheng | 5dd5ff6 | 2014-10-21 12:42:38 | [diff] [blame] | 30 | const SkBitmap* icon) override; |
ginkage | 47e603e | 2015-02-27 08:42:41 | [diff] [blame] | 31 | void OnInstallFailure(const extensions::CrxInstallError& error) override; |
dcheng | 5dd5ff6 | 2014-10-21 12:42:38 | [diff] [blame] | 32 | void SetUseAppInstalledBubble(bool use_bubble) override; |
33 | void OpenAppInstalledUI(const std::string& app_id) override; | ||||
34 | void SetSkipPostInstallUI(bool skip_ui) override; | ||||
35 | gfx::NativeWindow GetDefaultInstallDialogParent() override; | ||||
[email protected] | c82da8c4 | 2012-06-08 19:49:11 | [diff] [blame] | 36 | |
Elly Fong-Jones | 7c3ab03 | 2020-03-12 23:02:19 | [diff] [blame] | 37 | // Show the platform-specific bubble UI. This method has different |
38 | // implementations on different platforms, controlled by build flags. | ||||
39 | static void ShowPlatformBubble( | ||||
40 | scoped_refptr<const extensions::Extension> extension, | ||||
41 | Browser* browser, | ||||
42 | const SkBitmap& icon); | ||||
43 | |||||
[email protected] | c82da8c4 | 2012-06-08 19:49:11 | [diff] [blame] | 44 | private: |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame^] | 45 | raw_ptr<Profile> profile_; |
pkotwicz | a57a1f32 | 2014-10-21 00:24:30 | [diff] [blame] | 46 | |
47 | // Whether or not to show the default UI after completing the installation. | ||||
48 | bool skip_post_install_ui_; | ||||
49 | |||||
[email protected] | c82da8c4 | 2012-06-08 19:49:11 | [diff] [blame] | 50 | // Whether to show an installed bubble on app install, or use the default |
51 | // action of opening a new tab page. | ||||
52 | bool use_app_installed_bubble_; | ||||
[email protected] | c82da8c4 | 2012-06-08 19:49:11 | [diff] [blame] | 53 | }; |
54 | |||||
[email protected] | dc63aab | 2013-02-12 06:15:10 | [diff] [blame] | 55 | #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ |