Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef ASH_COMMON_SYSTEM_UPDATE_UPDATE_OBSERVER_H_ | 5 #ifndef ASH_COMMON_SYSTEM_UPDATE_UPDATE_OBSERVER_H_ |
| 6 #define ASH_COMMON_SYSTEM_UPDATE_UPDATE_OBSERVER_H_ | 6 #define ASH_COMMON_SYSTEM_UPDATE_UPDATE_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 | 9 |
| 10 namespace ash { | 10 namespace ash { |
| 11 | 11 |
| 12 struct UpdateInfo; | 12 namespace mojom { |
| 13 enum class UpdateSeverity; | |
| 14 } | |
| 13 | 15 |
| 14 class ASH_EXPORT UpdateObserver { | 16 class ASH_EXPORT UpdateObserver { |
| 15 public: | 17 public: |
| 18 virtual void ShowUpdateIcon(mojom::UpdateSeverity severity, | |
|
msw
2016/12/09 23:41:51
It's somewhat odd that we have an observer pattern
James Cook
2016/12/12 18:15:12
I removed the observer. This revealed a problem --
| |
| 19 bool factory_reset_required) = 0; | |
| 20 | |
| 21 protected: | |
| 16 virtual ~UpdateObserver() {} | 22 virtual ~UpdateObserver() {} |
| 17 | |
| 18 virtual void OnUpdateRecommended(const UpdateInfo& info) = 0; | |
| 19 }; | 23 }; |
| 20 | 24 |
| 21 } // namespace ash | 25 } // namespace ash |
| 22 | 26 |
| 23 #endif // ASH_COMMON_SYSTEM_UPDATE_UPDATE_OBSERVER_H_ | 27 #endif // ASH_COMMON_SYSTEM_UPDATE_UPDATE_OBSERVER_H_ |
| OLD | NEW |