Chromium Code Reviews| Index: components/power/origin_power_map_observer.h |
| diff --git a/components/power/origin_power_map_observer.h b/components/power/origin_power_map_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..dd896fc6ba53a30f045ee96624df1c4723f9ebcd |
| --- /dev/null |
| +++ b/components/power/origin_power_map_observer.h |
| @@ -0,0 +1,18 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_POWER_ORIGIN_POWER_MAP_OBSERVER_H_ |
| +#define COMPONENTS_POWER_ORIGIN_POWER_MAP_OBSERVER_H_ |
| + |
| +namespace power { |
| + |
| +class OriginPowerMapObserver { |
| + public: |
| + // Called when the origin power map is finished updating. |
| + virtual void OnPowerConsumptionUpdated() = 0; |
|
Bernhard Bauer
2014/08/29 19:16:31
An alternative to a one-method interface is to use
Daniel Nishi
2014/09/02 16:30:30
Would this require weak ptr factories for everyone
Bernhard Bauer
2014/09/02 16:39:57
No, because the observer would destroy its Subscri
Daniel Nishi
2014/09/02 17:10:08
Ah, I understand.
I've updated the implementation
|
| +}; |
| + |
| +} // namespace power |
| + |
| +#endif // COMPONENTS_POWER_ORIGIN_POWER_MAP_OBSERVER_H_ |