blob: 5295726d5b3c7455494dbb4c4e648c7f6b98b32f [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2012 The Chromium Authors
[email protected]c82da8c42012-06-08 19:49:112// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]dc63aab2013-02-12 06:15:105#ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_
6#define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_
[email protected]c82da8c42012-06-08 19:49:117
Keishi Hattori0e45c022021-11-27 09:25:528#include "base/memory/raw_ptr.h"
pkotwicza57a1f322014-10-21 00:24:309#include "extensions/browser/install/extension_install_ui.h"
10
11namespace content {
12class BrowserContext;
13}
[email protected]c82da8c42012-06-08 19:49:1114
Elly Fong-Jones7c3ab032020-03-12 23:02:1915class Browser;
[email protected]32fc4ff72012-06-15 21:50:0116class Profile;
[email protected]591a59f2012-10-11 01:16:2317
pkotwicza57a1f322014-10-21 00:24:3018class ExtensionInstallUIDefault : public extensions::ExtensionInstallUI {
[email protected]c82da8c42012-06-08 19:49:1119 public:
pkotwicza57a1f322014-10-21 00:24:3020 explicit ExtensionInstallUIDefault(content::BrowserContext* context);
Peter Boström53c6c5952021-09-17 09:41:2621
22 ExtensionInstallUIDefault(const ExtensionInstallUIDefault&) = delete;
23 ExtensionInstallUIDefault& operator=(const ExtensionInstallUIDefault&) =
24 delete;
25
dcheng5dd5ff62014-10-21 12:42:3826 ~ExtensionInstallUIDefault() override;
[email protected]c82da8c42012-06-08 19:49:1127
[email protected]b55b2f22013-08-22 07:54:1128 // ExtensionInstallUI:
Dana Friedc3c30222018-12-11 23:34:5629 void OnInstallSuccess(scoped_refptr<const extensions::Extension> extension,
dcheng5dd5ff62014-10-21 12:42:3830 const SkBitmap* icon) override;
ginkage47e603e2015-02-27 08:42:4131 void OnInstallFailure(const extensions::CrxInstallError& error) override;
dcheng5dd5ff62014-10-21 12:42:3832 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]c82da8c42012-06-08 19:49:1136
Elly Fong-Jones7c3ab032020-03-12 23:02:1937 // 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]c82da8c42012-06-08 19:49:1144 private:
Keishi Hattori0e45c022021-11-27 09:25:5245 raw_ptr<Profile> profile_;
pkotwicza57a1f322014-10-21 00:24:3046
47 // Whether or not to show the default UI after completing the installation.
48 bool skip_post_install_ui_;
49
[email protected]c82da8c42012-06-08 19:49:1150 // 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]c82da8c42012-06-08 19:49:1153};
54
[email protected]dc63aab2013-02-12 06:15:1055#endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_