chrome.windows.create should return new window id in Guest mode
[chromium-blink-merge.git] / cc / debug / micro_benchmark.h
blob92c9b7501573973fcc4c2fa4d02e72676b12e80a
1 // Copyright 2013 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 CC_DEBUG_MICRO_BENCHMARK_H_
6 #define CC_DEBUG_MICRO_BENCHMARK_H_
8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h"
11 namespace base {
12 class Value;
13 } // namespace base
15 namespace cc {
17 class LayerTreeHost;
18 class Layer;
19 class PictureLayer;
20 class MicroBenchmark {
21 public:
22 typedef base::Callback<void(scoped_ptr<base::Value>)> DoneCallback;
24 explicit MicroBenchmark(const DoneCallback& callback);
25 virtual ~MicroBenchmark();
27 bool IsDone() const;
28 virtual void DidUpdateLayers(LayerTreeHost* host);
30 virtual void RunOnLayer(Layer* layer);
31 virtual void RunOnLayer(PictureLayer* layer);
33 protected:
34 void NotifyDone(scoped_ptr<base::Value> result);
36 private:
37 DoneCallback callback_;
38 bool is_done_;
41 } // namespace cc
43 #endif // CC_DEBUG_MICRO_BENCHMARK_H_