OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_DLEGATE_H_ | 5 #ifndef ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_DLEGATE_H_ |
6 #define ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_DLEGATE_H_ | 6 #define ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_DLEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "athena/athena_export.h" |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 | 12 |
12 namespace athena { | 13 namespace athena { |
13 | 14 |
14 // The resource manager delegate which abstracts system function calls to allow | 15 // The resource manager delegate which abstracts system function calls to allow |
15 // unit tests to override them. | 16 // unit tests to override them. |
16 class ResourceManagerDelegate { | 17 class ATHENA_EXPORT ResourceManagerDelegate { |
17 public: | 18 public: |
18 static ResourceManagerDelegate* CreateResourceManagerDelegate(); | 19 static ResourceManagerDelegate* CreateResourceManagerDelegate(); |
19 | 20 |
20 ResourceManagerDelegate() {} | 21 ResourceManagerDelegate() {} |
21 virtual ~ResourceManagerDelegate() {} | 22 virtual ~ResourceManagerDelegate() {} |
22 | 23 |
23 // Returns the percentage of memory used in the system. | 24 // Returns the percentage of memory used in the system. |
24 virtual int GetUsedMemoryInPercent() = 0; | 25 virtual int GetUsedMemoryInPercent() = 0; |
25 | 26 |
26 // Returns the time memory pressure interval time in ms to be used by the | 27 // Returns the time memory pressure interval time in ms to be used by the |
27 // memory pressure monitoring system. | 28 // memory pressure monitoring system. |
28 virtual int MemoryPressureIntervalInMS() = 0; | 29 virtual int MemoryPressureIntervalInMS() = 0; |
29 }; | 30 }; |
30 | 31 |
31 } // namespace athena | 32 } // namespace athena |
32 | 33 |
33 #endif // ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_DLEGATE_H_ | 34 #endif // ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_DLEGATE_H_ |
OLD | NEW |