Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / content / renderer / gpu / gpu_benchmarking_extension.h
blobf2ff89d044a7b2ead90854d882954fb9636942b0
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_GPU_GPU_BENCHMARKING_EXTENSION_H_
6 #define CONTENT_RENDERER_GPU_GPU_BENCHMARKING_EXTENSION_H_
8 #include "base/basictypes.h"
9 #include "gin/wrappable.h"
11 namespace blink {
12 class WebFrame;
15 namespace gin {
16 class Arguments;
19 namespace v8 {
20 class Function;
21 class Isolate;
22 class Object;
25 namespace content {
27 // gin class for gpu benchmarking
28 class GpuBenchmarking : public gin::Wrappable<GpuBenchmarking> {
29 public:
30 static gin::WrapperInfo kWrapperInfo;
31 static void Install(blink::WebFrame* frame);
33 private:
34 GpuBenchmarking();
35 ~GpuBenchmarking() override;
37 // gin::Wrappable.
38 gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
39 v8::Isolate* isolate) override;
41 // JavaScript handlers.
42 void SetNeedsDisplayOnAllLayers();
43 void SetRasterizeOnlyVisibleContent();
44 void PrintToSkPicture(v8::Isolate* isolate, const std::string& dirname);
45 bool GestureSourceTypeSupported(int gesture_source_type);
46 bool SmoothScrollBy(gin::Arguments* args);
47 bool SmoothDrag(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 ClearImageCache();
53 int RunMicroBenchmark(gin::Arguments* args);
54 bool SendMessageToMicroBenchmark(int id, v8::Local<v8::Object> message);
55 bool HasGpuProcess();
57 DISALLOW_COPY_AND_ASSIGN(GpuBenchmarking);
60 } // namespace content
62 #endif // CONTENT_RENDERER_GPU_GPU_BENCHMARKING_EXTENSION_H_