| OLD | NEW | 
|   1 // Copyright 2016 The Chromium Authors. All rights reserved. |   1 // Copyright 2016 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 WebMemoryPressureLevel_h |   5 #include "modules/compositorworker/AnimationWorkletGlobalScopeProxy.h" | 
|   6 #define WebMemoryPressureLevel_h |   6  | 
 |   7 #include "core/workers/ThreadedWorkletMessagingProxy.h" | 
 |   8 #include "core/workers/ThreadedWorkletObjectProxy.h" | 
 |   9 #include "modules/compositorworker/AnimationWorkletThread.h" | 
|   7  |  10  | 
|   8 namespace blink { |  11 namespace blink { | 
|   9  |  12  | 
|  10 // These number must correspond to |  13 AnimationWorkletGlobalScopeProxy::AnimationWorkletGlobalScopeProxy(LocalFrame* f
    rame) | 
|  11 // base::MemoryPressureListener::MemoryPressureLevel. |  14     : ThreadedWorkletMessagingProxy(frame) | 
|  12 enum WebMemoryPressureLevel { |  15 { | 
|  13     WebMemoryPressureLevelNone, |  16 } | 
|  14     WebMemoryPressureLevelModerate, |  17  | 
|  15     WebMemoryPressureLevelCritical, |  18 AnimationWorkletGlobalScopeProxy::~AnimationWorkletGlobalScopeProxy() | 
|  16 }; |  19 { | 
 |  20 } | 
 |  21  | 
 |  22 std::unique_ptr<WorkerThread> AnimationWorkletGlobalScopeProxy::createWorkerThre
    ad() | 
 |  23 { | 
 |  24     return AnimationWorkletThread::create(loaderProxy(), workerObjectProxy()); | 
 |  25 } | 
|  17  |  26  | 
|  18 } // namespace blink |  27 } // namespace blink | 
|  19  |  | 
|  20 #endif |  | 
| OLD | NEW |