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 // MemoryState represents status of a process. | |
|
dcheng
2016/09/15 00:19:19
Btw, not sure if you want to update these comments
bashi
2016/09/15 00:28:13
Yeah, I'll update the comments to refer .mojom
bashi
2016/09/15 00:39:39
Moved comments from components/memory_coordinator/
| |
| 13 enum class MemoryState { | |
| 14 // The state is unknown. | |
| 15 UNKNOWN = -1, | |
| 16 // Not encountering memory constrains. | |
| 17 NORMAL = 0, | |
| 18 // Running and interactive but allocations may be limited. | |
| 19 THROTTLED = 1, | |
| 20 // Still in resident memory but its core processing logic has been suspended. | |
| 21 SUSPENDED = 2, | |
| 22 }; | |
| 23 | |
| 24 // This is an interface for components which can respond to memory status | |
| 25 // changes. | |
| 26 class BASE_EXPORT MemoryCoordinatorClient { | |
| 27 public: | |
| 28 virtual ~MemoryCoordinatorClient() {} | |
| 29 | |
| 30 // Called when memory state has changed. | |
| 31 virtual void OnMemoryStateChange(MemoryState state) = 0; | |
| 32 }; | |
| 33 | |
| 34 } // namespace base | |
| 35 | |
| 36 #endif // BASE_MEMORY_MEMORY_COORDINATOR_CLIENT_H_ | |
| OLD | NEW |