OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 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 #include "chrome/browser/extensions/install_tracker.h" |
| 6 |
| 7 namespace extensions { |
| 8 |
| 9 InstallTracker::InstallTracker() { |
| 10 } |
| 11 |
| 12 InstallTracker::~InstallTracker() { |
| 13 } |
| 14 |
| 15 void InstallTracker::OnBeginExtensionInstall( |
| 16 const std::string& extension_id, |
| 17 const std::string& extension_name, |
| 18 const gfx::ImageSkia& installing_icon, |
| 19 bool is_app) { |
| 20 FOR_EACH_OBSERVER(InstallObserver, observers_, |
| 21 OnBeginExtensionInstall(extension_id, |
| 22 extension_name, |
| 23 installing_icon, |
| 24 is_app)); |
| 25 } |
| 26 |
| 27 void InstallTracker::OnDownloadProgress(const std::string& extension_id, |
| 28 int percent_downloaded) { |
| 29 FOR_EACH_OBSERVER(InstallObserver, observers_, |
| 30 OnDownloadProgress(extension_id, percent_downloaded)); |
| 31 } |
| 32 |
| 33 void InstallTracker::OnInstallFailure( |
| 34 const std::string& extension_id) { |
| 35 FOR_EACH_OBSERVER(InstallObserver, observers_, |
| 36 OnInstallFailure(extension_id)); |
| 37 } |
| 38 |
| 39 void InstallTracker::AddObserver(InstallObserver* observer) { |
| 40 observers_.AddObserver(observer); |
| 41 } |
| 42 |
| 43 void InstallTracker::RemoveObserver(InstallObserver* observer) { |
| 44 observers_.RemoveObserver(observer); |
| 45 } |
| 46 |
| 47 } // namespace extensions |
OLD | NEW |