| 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 MemoryPurgeController_h | 5 #ifndef MemoryPurgeController_h |
| 6 #define MemoryPurgeController_h | 6 #define MemoryPurgeController_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/Timer.h" | 9 #include "platform/Timer.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 #include "public/platform/WebMemoryPressureLevel.h" | 11 #include "public/platform/WebMemoryPressureLevel.h" |
| 12 #include "wtf/MainThread.h" | |
| 13 | 12 |
| 14 namespace blink { | 13 namespace blink { |
| 15 | 14 |
| 16 enum class DeviceKind { | 15 enum class DeviceKind { |
| 17 NotSpecified, | 16 NotSpecified, |
| 18 LowEnd, | 17 LowEnd, |
| 19 }; | 18 }; |
| 20 | 19 |
| 21 // Classes which have discardable/reducible memory can implement this | 20 // Classes which have discardable/reducible memory can implement this |
| 22 // interface to be informed when they should reduce memory consumption. | 21 // interface to be informed when they should reduce memory consumption. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 private: | 71 private: |
| 73 MemoryPurgeController(); | 72 MemoryPurgeController(); |
| 74 | 73 |
| 75 WillBeHeapHashSet<RawPtrWillBeWeakMember<MemoryPurgeClient>> m_clients; | 74 WillBeHeapHashSet<RawPtrWillBeWeakMember<MemoryPurgeClient>> m_clients; |
| 76 DeviceKind m_deviceKind; | 75 DeviceKind m_deviceKind; |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 } // namespace blink | 78 } // namespace blink |
| 80 | 79 |
| 81 #endif // MemoryPurgeController_h | 80 #endif // MemoryPurgeController_h |
| OLD | NEW |