1// Copyright (c) 2013 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.
4
5#ifndef CONTENT_RENDERER_MEMORY_BENCHMARKING_EXTENSION_H_
6#define CONTENT_RENDERER_MEMORY_BENCHMARKING_EXTENSION_H_
7
8#include "base/basictypes.h"
9#include "gin/wrappable.h"
10
11namespace blink {
12class WebFrame;
13}
14
15namespace gin {
16class Arguments;
17}
18
19namespace content {
20
21class MemoryBenchmarkingExtension
22    : public gin::Wrappable<MemoryBenchmarkingExtension> {
23 public:
24  static gin::WrapperInfo kWrapperInfo;
25
26  static void Install(blink::WebFrame* frame);
27
28 private:
29  MemoryBenchmarkingExtension();
30  virtual ~MemoryBenchmarkingExtension();
31
32  // gin::Wrappable.
33  virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
34      v8::Isolate* isolate) OVERRIDE;
35
36  bool IsHeapProfilerRunning();
37
38  void HeapProfilerDump(gin::Arguments* args);
39
40  DISALLOW_COPY_AND_ASSIGN(MemoryBenchmarkingExtension);
41};
42
43}  // namespace content
44
45#endif  // CONTENT_RENDERER_MEMORY_BENCHMARKING_EXTENSION_H_
46