OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_ | 5 #ifndef SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_ |
6 #define SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_ | 6 #define SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "base/trace_event/memory_dump_provider.h" | 9 #include "base/trace_event/memory_dump_provider.h" |
10 #include "third_party/skia/include/core/SkTypes.h" | 10 #include "third_party/skia/include/core/SkTypes.h" |
11 | 11 |
12 namespace skia { | 12 namespace skia { |
13 | 13 |
14 class SK_API SkiaMemoryDumpProvider | 14 class SK_API SkiaMemoryDumpProvider |
15 : public base::trace_event::MemoryDumpProvider { | 15 : public base::trace_event::MemoryDumpProvider { |
16 public: | 16 public: |
17 static SkiaMemoryDumpProvider* GetInstance(); | 17 static SkiaMemoryDumpProvider* GetInstance(); |
18 | 18 |
19 // base::trace_event::MemoryDumpProvider implementation: | 19 // base::trace_event::MemoryDumpProvider implementation: |
20 bool OnMemoryDump( | 20 bool OnMemoryDump( |
| 21 const base::trace_event::MemoryDumpArgs& args, |
21 base::trace_event::ProcessMemoryDump* process_memory_dump) override; | 22 base::trace_event::ProcessMemoryDump* process_memory_dump) override; |
22 | 23 |
23 private: | 24 private: |
24 friend struct DefaultSingletonTraits<SkiaMemoryDumpProvider>; | 25 friend struct DefaultSingletonTraits<SkiaMemoryDumpProvider>; |
25 | 26 |
26 SkiaMemoryDumpProvider(); | 27 SkiaMemoryDumpProvider(); |
27 ~SkiaMemoryDumpProvider() override; | 28 ~SkiaMemoryDumpProvider() override; |
28 | 29 |
29 DISALLOW_COPY_AND_ASSIGN(SkiaMemoryDumpProvider); | 30 DISALLOW_COPY_AND_ASSIGN(SkiaMemoryDumpProvider); |
30 }; | 31 }; |
31 | 32 |
32 } // namespace skia | 33 } // namespace skia |
33 | 34 |
34 #endif // SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_ | 35 #endif // SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_ |
OLD | NEW |