- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / install_observer.h
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.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_
6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_
7
8 #include <string>
9
10 namespace gfx {
11 class ImageSkia;
12 }
13
14 namespace extensions {
15
16 class Extension;
17
18 class InstallObserver {
19  public:
20   virtual void OnBeginExtensionInstall(
21       const std::string& extension_id,
22       const std::string& extension_name,
23       const gfx::ImageSkia& installing_icon,
24       bool is_app,
25       bool is_platform_app) = 0;
26
27   virtual void OnDownloadProgress(const std::string& extension_id,
28                                   int percent_downloaded) = 0;
29
30   virtual void OnInstallFailure(const std::string& extension_id) = 0;
31
32   virtual void OnExtensionInstalled(const Extension* extension) = 0;
33   virtual void OnExtensionLoaded(const Extension* extension) = 0;
34   virtual void OnExtensionUnloaded(const Extension* extension) = 0;
35   virtual void OnExtensionUninstalled(const Extension* extension) = 0;
36   virtual void OnAppsReordered() = 0;
37   virtual void OnAppInstalledToAppList(const std::string& extension_id) = 0;
38
39   // Notifies observers that the observed object is going away.
40   virtual void OnShutdown() = 0;
41
42  protected:
43   virtual ~InstallObserver() {}
44 };
45
46 }  // namespace extensions
47
48 #endif  // CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_