Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / extensions / install_observer.h
blobfe4b7dc57706f31f5693efb624fd650644b39c20
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_
8 #include <string>
10 #include "ui/gfx/image/image_skia.h"
12 namespace extensions {
14 class Extension;
16 class InstallObserver {
17 public:
18 struct ExtensionInstallParams {
19 ExtensionInstallParams(
20 std::string extension_id,
21 std::string extension_name,
22 gfx::ImageSkia installing_icon,
23 bool is_app,
24 bool is_platform_app);
26 std::string extension_id;
27 std::string extension_name;
28 gfx::ImageSkia installing_icon;
29 bool is_app;
30 bool is_platform_app;
31 bool is_ephemeral;
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;
52 protected:
53 virtual ~InstallObserver() {}
56 } // namespace extensions
58 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_