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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/gpu_benchmarking_extension.h
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.h b/content/renderer/gpu/gpu_benchmarking_extension.h
index d2fe38cc3dc11683f162cd140604e28afdfe4ea1..d657e91a1422df183865bc131654df330ef90322 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.h
+++ b/content/renderer/gpu/gpu_benchmarking_extension.h
@@ -5,16 +5,58 @@
#ifndef CONTENT_RENDERER_GPU_GPU_BENCHMARKING_EXTENSION_H_
#define CONTENT_RENDERER_GPU_GPU_BENCHMARKING_EXTENSION_H_
+#include "base/basictypes.h"
+#include "gin/wrappable.h"
+
+namespace blink {
+class WebFrame;
+}
+
+namespace gin {
+class Arguments;
+}
+
namespace v8 {
-class Extension;
+class Function;
+class Isolate;
+class Object;
+template <typename T> class Handle;
}
namespace content {
-// V8 extension for gpu benchmarking
-class GpuBenchmarkingExtension {
+// gin class for gpu benchmarking
+class GpuBenchmarking : public gin::Wrappable<GpuBenchmarking> {
public:
- static v8::Extension* Get();
+ static gin::WrapperInfo kWrapperInfo;
+ static void Install(blink::WebFrame* frame);
+
+ private:
+ GpuBenchmarking();
+ virtual ~GpuBenchmarking();
+
+ // gin::Wrappable.
+ virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
+ v8::Isolate* isolate) override;
+
+ // JavaScript handlers.
+ void SetNeedsDisplayOnAllLayers();
+ void SetRasterizeOnlyVisibleContent();
+ void PrintToSkPicture(v8::Isolate* isolate, const std::string& dirname);
+ bool GestureSourceTypeSupported(int gesture_source_type);
+ bool SmoothScrollBy(gin::Arguments* args);
+ bool Swipe(gin::Arguments* args);
+ bool ScrollBounce(gin::Arguments* args);
+ bool PinchBy(gin::Arguments* args);
+ bool Tap(gin::Arguments* args);
+ void BeginWindowSnapshotPNG(v8::Isolate* isolate,
+ v8::Handle<v8::Function> callback);
+ void ClearImageCache();
+ int RunMicroBenchmark(gin::Arguments* args);
+ bool SendMessageToMicroBenchmark(int id, v8::Handle<v8::Object> message);
+ bool HasGpuProcess();
+
+ DISALLOW_COPY_AND_ASSIGN(GpuBenchmarking);
};
} // namespace content
« 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