Implement manifest icon downloader
[chromium-blink-merge.git] / cc / debug / traced_display_item_list.h
blobf7caa04b49e34d32b2f0a5effde07e9535af0088
1 // Copyright 2015 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_TRACED_DISPLAY_ITEM_LIST_H_
6 #define CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_
8 #include <string>
10 #include "base/memory/ref_counted.h"
11 #include "base/trace_event/trace_event.h"
12 #include "cc/debug/traced_value.h"
14 namespace cc {
16 class DisplayItemList;
18 class TracedDisplayItemList
19 : public base::trace_event::ConvertableToTraceFormat {
20 public:
21 static scoped_refptr<ConvertableToTraceFormat> AsTraceableDisplayItemList(
22 scoped_refptr<const DisplayItemList> list,
23 bool include_items) {
24 return scoped_refptr<ConvertableToTraceFormat>(
25 new TracedDisplayItemList(list, include_items));
27 void AppendAsTraceFormat(std::string* out) const override;
29 private:
30 explicit TracedDisplayItemList(scoped_refptr<const DisplayItemList> list,
31 bool include_items);
32 ~TracedDisplayItemList() override;
34 scoped_refptr<const DisplayItemList> display_item_list_;
35 bool include_items_;
37 DISALLOW_COPY_AND_ASSIGN(TracedDisplayItemList);
40 } // namespace cc
42 #endif // CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_