Chromium Code Reviews| Index: third_party/WebKit/public/platform/WebMemoryPressureLevel.h |
| diff --git a/third_party/WebKit/public/platform/WebMemoryPressureLevel.h b/third_party/WebKit/public/platform/WebMemoryPressureLevel.h |
| index 7247eb4070c23f0a0084e02489b0bed11422f928..6911f856b9795f49cff60da1cc1d88644985e486 100644 |
| --- a/third_party/WebKit/public/platform/WebMemoryPressureLevel.h |
| +++ b/third_party/WebKit/public/platform/WebMemoryPressureLevel.h |
| @@ -5,16 +5,28 @@ |
| #ifndef WebMemoryPressureLevel_h |
| #define WebMemoryPressureLevel_h |
| +#include "base/memory/memory_pressure_listener.h" |
| + |
| namespace blink { |
| // These number must correspond to |
| // base::MemoryPressureListener::MemoryPressureLevel. |
| enum WebMemoryPressureLevel { |
| - WebMemoryPressureLevelNone = -1, |
| - WebMemoryPressureLevelModerate = 0, |
| - WebMemoryPressureLevelCritical = 2, |
| + WebMemoryPressureLevelNone, |
| + WebMemoryPressureLevelModerate, |
| + WebMemoryPressureLevelCritical, |
| }; |
| +static_assert(static_cast<WebMemoryPressureLevel>( |
|
bashi
2016/06/23 05:07:37
Can you put these static aseerts in RenderThreadIm
|
| + base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE) == |
| + WebMemoryPressureLevelNone, "none level not align"); |
| +static_assert(static_cast<WebMemoryPressureLevel>( |
| + base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE) == |
| + WebMemoryPressureLevelModerate, "moderate level not align"); |
| +static_assert(static_cast<WebMemoryPressureLevel>( |
| + base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL) == |
| + WebMemoryPressureLevelCritical, "critical level not align"); |
| + |
| } // namespace blink |
| #endif |