1 // Copyright 2013 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_INSTALL_OBSERVER_H_
6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_
10 #include "ui/gfx/image/image_skia.h"
12 namespace extensions
{
16 class InstallObserver
{
18 struct ExtensionInstallParams
{
19 ExtensionInstallParams(
20 std::string extension_id
,
21 std::string extension_name
,
22 gfx::ImageSkia installing_icon
,
24 bool is_platform_app
);
26 std::string extension_id
;
27 std::string extension_name
;
28 gfx::ImageSkia installing_icon
;
34 virtual void OnBeginExtensionInstall(
35 const ExtensionInstallParams
& params
) = 0;
37 virtual void OnDownloadProgress(const std::string
& extension_id
,
38 int percent_downloaded
) = 0;
40 virtual void OnInstallFailure(const std::string
& extension_id
) = 0;
42 virtual void OnExtensionInstalled(const Extension
* extension
) = 0;
43 virtual void OnExtensionLoaded(const Extension
* extension
) = 0;
44 virtual void OnExtensionUnloaded(const Extension
* extension
) = 0;
45 virtual void OnExtensionUninstalled(const Extension
* extension
) = 0;
46 virtual void OnAppsReordered() = 0;
47 virtual void OnAppInstalledToAppList(const std::string
& extension_id
) = 0;
49 // Notifies observers that the observed object is going away.
50 virtual void OnShutdown() = 0;
53 virtual ~InstallObserver() {}
56 } // namespace extensions
58 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_