Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Side by Side Diff: content/renderer/skia_benchmarking_extension.h

Issue 142143005: Convert the SkiaBenchmarkingExtension to a gin::Wrappable class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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 CONTENT_RENDERER_SKIA_BENCHMARKING_EXTENSION_H_ 5 #ifndef CONTENT_RENDERER_SKIA_BENCHMARKING_EXTENSION_H_
6 #define CONTENT_RENDERER_SKIA_BENCHMARKING_EXTENSION_H_ 6 #define CONTENT_RENDERER_SKIA_BENCHMARKING_EXTENSION_H_
7 7
8 namespace v8 { 8 #include "base/basictypes.h"
9 class Extension; 9 #include "gin/wrappable.h"
10
11 namespace blink {
12 class WebFrame;
13 }
14
15 namespace gin {
16 class Arguments;
10 } 17 }
11 18
12 namespace content { 19 namespace content {
13 20
14 // V8 extension for Skia benchmarking 21 class SkiaBenchmarking : public gin::Wrappable<SkiaBenchmarking> {
15 class SkiaBenchmarkingExtension {
16 public: 22 public:
17 static v8::Extension* Get(); 23 static gin::WrapperInfo kWrapperInfo;
18 static void InitSkGraphics(); 24 static void Install(blink::WebFrame* frame);
25
26 // Wrapper around SkGraphics::Init that can be invoked multiple times.
27 static void Initialize();
28
29 private:
30 SkiaBenchmarking();
31 virtual ~SkiaBenchmarking();
32
33 // gin::Wrappable.
34 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
35 v8::Isolate* isolate) OVERRIDE;
36
37 // Rasterizes a Picture JSON-encoded by cc::Picture::AsValue().
38 void Rasterize(gin::Arguments* args);
39
40 // Extracts the Skia draw commands from a JSON-encoded cc::Picture.
41 void GetOps(gin::Arguments* args);
42
43 // Returns timing information for the given picture.
44 void GetOpTimings(gin::Arguments* args);
45
46 // Returns meta information for the given picture.
47 void GetInfo(gin::Arguments* args);
48
49 DISALLOW_COPY_AND_ASSIGN(SkiaBenchmarking);
19 }; 50 };
20 51
21 } // namespace content 52 } // namespace content
22 53
23 #endif // CONTENT_RENDERER_SKIA_BENCHMARKING_EXTENSION_H_ 54 #endif // CONTENT_RENDERER_SKIA_BENCHMARKING_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698