Index: content/public/renderer/rendering_benchmark.h |
diff --git a/content/public/renderer/rendering_benchmark.h b/content/public/renderer/rendering_benchmark.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9382d38e845ec4ce6c0fa7b5795d9f781c8dc7a7 |
--- /dev/null |
+++ b/content/public/renderer/rendering_benchmark.h |
@@ -0,0 +1,44 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_PUBLIC_RENDERER_RENDERING_BENCHMARK_H_ |
+#define CONTENT_PUBLIC_RENDERER_RENDERING_BENCHMARK_H_ |
nduca
2012/07/18 06:06:17
Why is all of this public? Its only used by conten
dmurph
2012/07/18 16:31:41
Addessed in other comment
|
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "content/common/content_export.h" |
+#include "content/public/renderer/rendering_benchmark_results.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewBenchmarkSupport.h" |
nduca
2012/07/18 06:06:17
Dont include until you use.
namespace WebKit {
cla
dmurph
2012/07/18 20:01:57
Done.
|
+ |
+namespace content { |
+class CONTENT_EXPORT RenderingBenchmark { |
nduca
2012/07/18 06:06:17
Dont need CONTENT_EXPORT
dmurph
2012/07/18 20:01:57
Done.
|
+ public: |
+ RenderingBenchmark(const std::string& name, |
+ RenderingBenchmarkResults* results); |
+ virtual ~RenderingBenchmark(); |
+ |
+ virtual void SetUp( |
+ WebKit::WebViewBenchmarkSupport* benchmarkController) {} |
nduca
2012/07/18 06:06:17
naming
dmurph
2012/07/18 20:01:57
Done.
|
+ |
+ virtual void Run(WebKit::WebViewBenchmarkSupport*) = 0; |
+ |
+ virtual void TearDown( |
+ WebKit::WebViewBenchmarkSupport* benchmarkController) {} |
+ |
+ const std::string& name() { return name_; } |
+ |
+ protected: |
+ void RecordResult(const std::string& result_name, |
nduca
2012/07/18 06:06:17
Why does this have a member variable that is the r
dmurph
2012/07/18 16:31:41
We talked about this earlier, it's to remove the a
dmurph
2012/07/18 20:01:57
Removing :)
|
+ const std::string& time_unit, |
+ double time); |
+ |
+ private: |
+ const std::string name_; |
+ RenderingBenchmarkResults* results_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(RenderingBenchmark); |
+}; |
+} // namespace content |
+#endif // CONTENT_PUBLIC_RENDERER_RENDERING_BENCHMARK_H_ |