| OLD | NEW |
| 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 #include "chrome/browser/extensions/install_tracker.h" | 5 #include "chrome/browser/extensions/install_tracker.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/extensions/install_tracker_factory.h" | 9 #include "chrome/browser/extensions/install_tracker_factory.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 *content::Details<const std::string>(details).ptr()); | 121 *content::Details<const std::string>(details).ptr()); |
| 122 FOR_EACH_OBSERVER(InstallObserver, observers_, | 122 FOR_EACH_OBSERVER(InstallObserver, observers_, |
| 123 OnAppInstalledToAppList(extension_id)); | 123 OnAppInstalledToAppList(extension_id)); |
| 124 break; | 124 break; |
| 125 } | 125 } |
| 126 default: | 126 default: |
| 127 NOTREACHED(); | 127 NOTREACHED(); |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 void InstallTracker::OnExtensionLoaded(content::BrowserContext* browser_context, | |
| 132 const Extension* extension) { | |
| 133 FOR_EACH_OBSERVER(InstallObserver, observers_, OnExtensionLoaded(extension)); | |
| 134 } | |
| 135 | |
| 136 void InstallTracker::OnExtensionUnloaded( | |
| 137 content::BrowserContext* browser_context, | |
| 138 const Extension* extension, | |
| 139 UnloadedExtensionInfo::Reason reason) { | |
| 140 FOR_EACH_OBSERVER( | |
| 141 InstallObserver, observers_, OnExtensionUnloaded(extension)); | |
| 142 } | |
| 143 | |
| 144 void InstallTracker::OnExtensionWillBeInstalled( | 131 void InstallTracker::OnExtensionWillBeInstalled( |
| 145 content::BrowserContext* browser_context, | 132 content::BrowserContext* browser_context, |
| 146 const Extension* extension, | 133 const Extension* extension, |
| 147 bool is_update, | 134 bool is_update, |
| 148 bool from_ephemeral, | 135 bool from_ephemeral, |
| 149 const std::string& old_name) { | 136 const std::string& old_name) { |
| 150 FOR_EACH_OBSERVER( | 137 FOR_EACH_OBSERVER( |
| 151 InstallObserver, observers_, OnExtensionInstalled(extension)); | 138 InstallObserver, observers_, OnExtensionInstalled(extension)); |
| 152 } | 139 } |
| 153 | 140 |
| 154 void InstallTracker::OnAppsReordered() { | 141 void InstallTracker::OnAppsReordered() { |
| 155 FOR_EACH_OBSERVER(InstallObserver, observers_, OnAppsReordered()); | 142 FOR_EACH_OBSERVER(InstallObserver, observers_, OnAppsReordered()); |
| 156 } | 143 } |
| 157 | 144 |
| 158 } // namespace extensions | 145 } // namespace extensions |
| OLD | NEW |