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

Unified Diff: content/public/renderer/rendering_benchmark.h

Issue 10537036: Added rendering benchmark javascript hook (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: renaming Created 8 years, 5 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
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_

Powered by Google App Engine
This is Rietveld 408576698