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

Side by Side Diff: content/renderer/gpu/gpu_benchmarking_extension.h

Issue 647433003: Convert GpuBenchmarkingExtension to a gin::Wrappable class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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
« no previous file with comments | « no previous file | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GPU_GPU_BENCHMARKING_EXTENSION_H_ 5 #ifndef CONTENT_RENDERER_GPU_GPU_BENCHMARKING_EXTENSION_H_
6 #define CONTENT_RENDERER_GPU_GPU_BENCHMARKING_EXTENSION_H_ 6 #define CONTENT_RENDERER_GPU_GPU_BENCHMARKING_EXTENSION_H_
7 7
8 #include "base/basictypes.h"
9 #include "gin/wrappable.h"
10
11 namespace blink {
12 class WebFrame;
13 }
14
15 namespace gin {
16 class Arguments;
17 }
18
8 namespace v8 { 19 namespace v8 {
9 class Extension; 20 class Function;
21 class Isolate;
22 class Object;
23 template <typename T> class Handle;
10 } 24 }
11 25
12 namespace content { 26 namespace content {
13 27
14 // V8 extension for gpu benchmarking 28 // gin class for gpu benchmarking
15 class GpuBenchmarkingExtension { 29 class GpuBenchmarking : public gin::Wrappable<GpuBenchmarking> {
16 public: 30 public:
17 static v8::Extension* Get(); 31 static gin::WrapperInfo kWrapperInfo;
32 static void Install(blink::WebFrame* frame);
33
34 private:
35 GpuBenchmarking();
36 virtual ~GpuBenchmarking();
37
38 // gin::Wrappable.
39 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
40 v8::Isolate* isolate) override;
41
42 // JavaScript handlers.
43 void SetNeedsDisplayOnAllLayers();
44 void SetRasterizeOnlyVisibleContent();
45 void PrintToSkPicture(v8::Isolate* isolate, const std::string& dirname);
46 bool GestureSourceTypeSupported(int gesture_source_type);
47 bool SmoothScrollBy(gin::Arguments* args);
48 bool Swipe(gin::Arguments* args);
49 bool ScrollBounce(gin::Arguments* args);
50 bool PinchBy(gin::Arguments* args);
51 bool Tap(gin::Arguments* args);
52 void BeginWindowSnapshotPNG(v8::Isolate* isolate,
53 v8::Handle<v8::Function> callback);
54 void ClearImageCache();
55 int RunMicroBenchmark(gin::Arguments* args);
56 bool SendMessageToMicroBenchmark(int id, v8::Handle<v8::Object> message);
57 bool HasGpuProcess();
58
59 DISALLOW_COPY_AND_ASSIGN(GpuBenchmarking);
18 }; 60 };
19 61
20 } // namespace content 62 } // namespace content
21 63
22 #endif // CONTENT_RENDERER_GPU_GPU_BENCHMARKING_EXTENSION_H_ 64 #endif // CONTENT_RENDERER_GPU_GPU_BENCHMARKING_EXTENSION_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698