Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 BASE_MEMORY_MEMORY_COORDINATOR_CLIENT_H_ | |
| 6 #define BASE_MEMORY_MEMORY_COORDINATOR_CLIENT_H_ | |
| 7 | |
| 8 #include "base/base_export.h" | |
| 9 | |
| 10 namespace base { | |
| 11 | |
| 12 enum class MemoryState { | |
| 13 UNKNOWN = -1, | |
| 14 NORMAL = 0, | |
| 15 THROTTLED = 1, | |
|
dcheng
2016/09/09 03:02:04
Please add some comments to these enums (I'm not s
bashi
2016/09/09 03:21:43
Done.
| |
| 16 SUSPENDED = 2, | |
| 17 }; | |
| 18 | |
| 19 // This is an interface for components which can respond to memory status | |
| 20 // changes. | |
| 21 class BASE_EXPORT MemoryCoordinatorClient { | |
| 22 public: | |
| 23 virtual ~MemoryCoordinatorClient() {} | |
| 24 | |
| 25 // Called when memory state has changed. | |
| 26 virtual void OnMemoryStateChange(MemoryState state) = 0; | |
| 27 }; | |
| 28 | |
| 29 } // namespace base | |
| 30 | |
| 31 #endif // BASE_MEMORY_MEMORY_COORDINATOR_CLIENT_H_ | |
| OLD | NEW |