OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MemoryCoordinator_h | 5 #ifndef MemoryCoordinator_h |
6 #define MemoryCoordinator_h | 6 #define MemoryCoordinator_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "platform/wtf/Noncopyable.h" |
10 #include "public/platform/WebMemoryPressureLevel.h" | 11 #include "public/platform/WebMemoryPressureLevel.h" |
11 #include "public/platform/WebMemoryState.h" | 12 #include "public/platform/WebMemoryState.h" |
12 #include "wtf/Noncopyable.h" | |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class PLATFORM_EXPORT MemoryCoordinatorClient : public GarbageCollectedMixin { | 16 class PLATFORM_EXPORT MemoryCoordinatorClient : public GarbageCollectedMixin { |
17 public: | 17 public: |
18 virtual ~MemoryCoordinatorClient() {} | 18 virtual ~MemoryCoordinatorClient() {} |
19 | 19 |
20 // TODO(bashi): Deprecating. Remove this when MemoryPressureListener is | 20 // TODO(bashi): Deprecating. Remove this when MemoryPressureListener is |
21 // gone. | 21 // gone. |
22 virtual void OnMemoryPressure(WebMemoryPressureLevel) {} | 22 virtual void OnMemoryPressure(WebMemoryPressureLevel) {} |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void ClearMemory(); | 67 void ClearMemory(); |
68 | 68 |
69 static bool is_low_end_device_; | 69 static bool is_low_end_device_; |
70 | 70 |
71 HeapHashSet<WeakMember<MemoryCoordinatorClient>> clients_; | 71 HeapHashSet<WeakMember<MemoryCoordinatorClient>> clients_; |
72 }; | 72 }; |
73 | 73 |
74 } // namespace blink | 74 } // namespace blink |
75 | 75 |
76 #endif // MemoryCoordinator_h | 76 #endif // MemoryCoordinator_h |
OLD | NEW |