| 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 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_UPDATER_OBSERVER_H_ | |
| 6 #define CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_UPDATER_OBSERVER_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "chrome/browser/component_updater/component_updater_service.h" | |
| 10 | |
| 11 class PnaclComponentInstaller; | |
| 12 | |
| 13 // Monitors the component updater service, so that the callbacks registered | |
| 14 // against the PnaclComponentInstaller can be notified of events. | |
| 15 class PnaclUpdaterObserver : public ComponentObserver { | |
| 16 public: | |
| 17 explicit PnaclUpdaterObserver(PnaclComponentInstaller* pci); | |
| 18 virtual ~PnaclUpdaterObserver(); | |
| 19 | |
| 20 virtual void OnEvent(Events event, int extra) OVERRIDE; | |
| 21 | |
| 22 void EnsureObserving(); | |
| 23 void StopObserving(); | |
| 24 | |
| 25 private: | |
| 26 bool must_observe_; | |
| 27 PnaclComponentInstaller* pnacl_installer_; | |
| 28 DISALLOW_COPY_AND_ASSIGN(PnaclUpdaterObserver); | |
| 29 }; | |
| 30 | |
| 31 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_UPDATER_OBSERVER_H_ | |
| OLD | NEW |