| Index: third_party/WebKit/Source/core/dom/MemoryCoordinator.h
|
| diff --git a/third_party/WebKit/Source/core/dom/MemoryCoordinator.h b/third_party/WebKit/Source/core/dom/MemoryCoordinator.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..104a54cd3913334723ec80256847ee6b322f3e54
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/dom/MemoryCoordinator.h
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef MemoryCoordinator_h
|
| +#define MemoryCoordinator_h
|
| +
|
| +#include "core/CoreExport.h"
|
| +#include "public/platform/WebMemoryPressureLevel.h"
|
| +#include "wtf/Noncopyable.h"
|
| +
|
| +namespace blink {
|
| +
|
| +// MemoryCoordinator listens to some events which could be opportunities
|
| +// for reducing memory consumption and notifies its clients.
|
| +class CORE_EXPORT MemoryCoordinator final {
|
| + WTF_MAKE_NONCOPYABLE(MemoryCoordinator);
|
| +public:
|
| + static MemoryCoordinator& instance();
|
| +
|
| + void onMemoryPressure(WebMemoryPressureLevel);
|
| +
|
| +private:
|
| + MemoryCoordinator();
|
| + ~MemoryCoordinator();
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // MemoryCoordinator_h
|
|
|