[Autofill] Remove hide_called_ from AutofillPopupView
[chromium-blink-merge.git] / cc / debug / devtools_instrumentation.h
blob7b2ea1a97afd0ae5b913ad7877fee08a0675ce17
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_DEVTOOLS_INSTRUMENTATION_H_
6 #define CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_
8 #include "base/debug/trace_event.h"
10 namespace cc {
11 namespace devtools_instrumentation {
13 namespace internal {
14 const char kCategory[] = "cc,devtools";
15 const char kLayerId[] = "layerId";
18 const char kPaintLayer[] = "PaintLayer";
19 const char kRasterTask[] = "RasterTask";
20 const char kImageDecodeTask[] = "ImageDecodeTask";
21 const char kPaintSetup[] = "PaintSetup";
23 class ScopedLayerTask {
24 public:
25 explicit ScopedLayerTask(const char* event_name, int layer_id)
26 : event_name_(event_name) {
27 TRACE_EVENT_BEGIN1(internal::kCategory, event_name_,
28 internal::kLayerId, layer_id);
30 ~ScopedLayerTask() {
31 TRACE_EVENT_END0(internal::kCategory, event_name_);
33 private:
34 const char* event_name_;
37 struct ScopedLayerObjectTracker
38 : public base::debug::TraceScopedTrackableObject<int> {
39 explicit ScopedLayerObjectTracker(int layer_id)
40 : base::debug::TraceScopedTrackableObject<int>(
41 internal::kCategory,
42 internal::kLayerId,
43 layer_id) {
46 DISALLOW_COPY_AND_ASSIGN(ScopedLayerObjectTracker);
49 } // namespace devtools_instrumentation
50 } // namespace cc
52 #endif // CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_