Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Side by Side Diff: chrome/browser/extensions/install_observer.h

Issue 176883003: Make InstallObserver methods not pure-virtual (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_
6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ui/gfx/image/image_skia.h" 10 #include "ui/gfx/image/image_skia.h"
(...skipping 13 matching lines...) Expand all
24 bool is_platform_app); 24 bool is_platform_app);
25 25
26 std::string extension_id; 26 std::string extension_id;
27 std::string extension_name; 27 std::string extension_name;
28 gfx::ImageSkia installing_icon; 28 gfx::ImageSkia installing_icon;
29 bool is_app; 29 bool is_app;
30 bool is_platform_app; 30 bool is_platform_app;
31 bool is_ephemeral; 31 bool is_ephemeral;
32 }; 32 };
33 33
34 virtual void OnBeginExtensionInstall( 34 // Called at the beginning of the complete installation process, i.e., this
35 const ExtensionInstallParams& params) = 0; 35 // is called before the extension download begins.
36 virtual void OnBeginExtensionInstall(const ExtensionInstallParams& params);
36 37
38 // Called whenever the extension download is updated.
39 // Note: Some extensions have multiple modules, so the percent included here
40 // is a simple calculation of:
41 // (finished_files * 100 + current_file_progress) / (total files * 100).
37 virtual void OnDownloadProgress(const std::string& extension_id, 42 virtual void OnDownloadProgress(const std::string& extension_id,
38 int percent_downloaded) = 0; 43 int percent_downloaded);
39 44
40 virtual void OnInstallFailure(const std::string& extension_id) = 0; 45 // Called if the extension fails to install.
46 virtual void OnInstallFailure(const std::string& extension_id);
41 47
42 virtual void OnExtensionInstalled(const Extension* extension) = 0; 48 // Called if the installation succeeds.
43 virtual void OnExtensionLoaded(const Extension* extension) = 0; 49 virtual void OnExtensionInstalled(const Extension* extension);
44 virtual void OnExtensionUnloaded(const Extension* extension) = 0; 50
45 virtual void OnExtensionUninstalled(const Extension* extension) = 0; 51 // Called when an extension is [Loaded, Unloaded, Uninstalled] or an app is
46 virtual void OnAppsReordered() = 0; 52 // installed to the app list. These are simply forwarded from the
47 virtual void OnAppInstalledToAppList(const std::string& extension_id) = 0; 53 // chrome::NOTIFICATIONs.
54 virtual void OnExtensionLoaded(const Extension* extension);
55 virtual void OnExtensionUnloaded(const Extension* extension);
56 virtual void OnExtensionUninstalled(const Extension* extension);
57 virtual void OnAppInstalledToAppList(const std::string& extension_id);
58
59 // Called when the app list is reordered.
60 virtual void OnAppsReordered();
48 61
49 // Notifies observers that the observed object is going away. 62 // Notifies observers that the observed object is going away.
50 virtual void OnShutdown() = 0; 63 virtual void OnShutdown();
51 64
52 protected: 65 protected:
53 virtual ~InstallObserver() {} 66 virtual ~InstallObserver() {}
54 }; 67 };
55 68
56 } // namespace extensions 69 } // namespace extensions
57 70
58 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_ 71 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/install_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698