Roll WebRTC 9846:9854, Libjingle 9845:9853
[chromium-blink-merge.git] / skia / ext / skia_memory_dump_provider.h
blobe98ea2f1c196056291f23e512d3c96d0c44f234f
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
3 // found in the LICENSE file.
5 #ifndef SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_
6 #define SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_
8 #include "base/memory/singleton.h"
9 #include "base/trace_event/memory_dump_provider.h"
10 #include "third_party/skia/include/core/SkTypes.h"
12 namespace skia {
14 class SK_API SkiaMemoryDumpProvider
15 : public base::trace_event::MemoryDumpProvider {
16 public:
17 static SkiaMemoryDumpProvider* GetInstance();
19 // base::trace_event::MemoryDumpProvider implementation:
20 bool OnMemoryDump(
21 const base::trace_event::MemoryDumpArgs& args,
22 base::trace_event::ProcessMemoryDump* process_memory_dump) override;
24 private:
25 friend struct DefaultSingletonTraits<SkiaMemoryDumpProvider>;
27 SkiaMemoryDumpProvider();
28 ~SkiaMemoryDumpProvider() override;
30 DISALLOW_COPY_AND_ASSIGN(SkiaMemoryDumpProvider);
33 } // namespace skia
35 #endif // SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_