[blink-in-js] Migrate resources required for blink-in-js to grd - part 2
[chromium-blink-merge.git] / athena / resource_manager / public / resource_manager_delegate.h
blobecc2836944aba9dd5ff8165674a7597ab58339f9
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
3 // found in the LICENSE file.
5 #ifndef ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_DLEGATE_H_
6 #define ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_DLEGATE_H_
8 #include <string>
10 #include "athena/athena_export.h"
11 #include "base/macros.h"
13 namespace athena {
15 // The resource manager delegate which abstracts system function calls to allow
16 // unit tests to override them.
17 class ATHENA_EXPORT ResourceManagerDelegate {
18 public:
19 static ResourceManagerDelegate* CreateResourceManagerDelegate();
21 ResourceManagerDelegate() {}
22 virtual ~ResourceManagerDelegate() {}
24 // Returns the percentage of memory used in the system.
25 virtual int GetUsedMemoryInPercent() = 0;
27 // Returns the time memory pressure interval time in ms to be used by the
28 // memory pressure monitoring system.
29 virtual int MemoryPressureIntervalInMS() = 0;
32 } // namespace athena
34 #endif // ATHENA_RESOURCE_MANAGER_PUBLIC_RESOURCE_MANAGER_DLEGATE_H_