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

Side by Side Diff: cc/debug/traced_display_item_list.h

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « cc/debug/rendering_stats_unittest.cc ('k') | cc/debug/traced_display_item_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_ 5 #ifndef CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_
6 #define CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_ 6 #define CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/trace_event/trace_event.h" 13 #include "base/trace_event/trace_event.h"
14 #include "cc/debug/traced_value.h" 14 #include "cc/debug/traced_value.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class DisplayItemList; 18 class DisplayItemList;
19 19
20 class TracedDisplayItemList 20 class TracedDisplayItemList
21 : public base::trace_event::ConvertableToTraceFormat { 21 : public base::trace_event::ConvertableToTraceFormat {
22 public: 22 public:
23 static scoped_ptr<ConvertableToTraceFormat> AsTraceableDisplayItemList( 23 static std::unique_ptr<ConvertableToTraceFormat> AsTraceableDisplayItemList(
24 scoped_refptr<const DisplayItemList> list, 24 scoped_refptr<const DisplayItemList> list,
25 bool include_items) { 25 bool include_items) {
26 return scoped_ptr<ConvertableToTraceFormat>( 26 return std::unique_ptr<ConvertableToTraceFormat>(
27 new TracedDisplayItemList(list, include_items)); 27 new TracedDisplayItemList(list, include_items));
28 } 28 }
29 void AppendAsTraceFormat(std::string* out) const override; 29 void AppendAsTraceFormat(std::string* out) const override;
30 30
31 private: 31 private:
32 explicit TracedDisplayItemList(scoped_refptr<const DisplayItemList> list, 32 explicit TracedDisplayItemList(scoped_refptr<const DisplayItemList> list,
33 bool include_items); 33 bool include_items);
34 ~TracedDisplayItemList() override; 34 ~TracedDisplayItemList() override;
35 35
36 scoped_refptr<const DisplayItemList> display_item_list_; 36 scoped_refptr<const DisplayItemList> display_item_list_;
37 bool include_items_; 37 bool include_items_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(TracedDisplayItemList); 39 DISALLOW_COPY_AND_ASSIGN(TracedDisplayItemList);
40 }; 40 };
41 41
42 } // namespace cc 42 } // namespace cc
43 43
44 #endif // CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_ 44 #endif // CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats_unittest.cc ('k') | cc/debug/traced_display_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698