summaryrefslogtreecommitdiff
path: root/chromium/third_party/WebKit/Source/core/timing/ConsoleMemory.h
blob: ad7c0dbadad1df730d5515a06be00645b67d34ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// 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 ConsoleMemory_h
#define ConsoleMemory_h

#include "platform/Supplementable.h"

namespace blink {

class Console;
class MemoryInfo;

class ConsoleMemory final : public GarbageCollected<ConsoleMemory>, public HeapSupplement<Console> {
    USING_GARBAGE_COLLECTED_MIXIN(ConsoleMemory);
public:
    static ConsoleMemory& from(Console&);
    static MemoryInfo* memory(Console&);
    static void setMemory(Console&, MemoryInfo*) { }

    DEFINE_INLINE_VIRTUAL_TRACE() { HeapSupplement<Console>::trace(visitor); }

private:
    static const char* supplementName() { return "ConsoleMemory"; }
    MemoryInfo* memory();
};

} // namespace blink

#endif // ConsoleMemory_h