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