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

Side by Side Diff: third_party/WebKit/Source/platform/inspector_protocol/Backend_h.template

Issue 2004313003: DevTools: migrate from OwnPtr to std::unique_ptr for inspector protocol classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 6 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
OLDNEW
1 // This file is generated 1 // This file is generated
2 2
3 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 3 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style license that can be 4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file. 5 // found in the LICENSE file.
6 6
7 #ifndef {{class_name}}_h 7 #ifndef {{class_name}}_h
8 #define {{class_name}}_h 8 #define {{class_name}}_h
9 9
10 #include "platform/inspector_protocol/TypeBuilder.h" 10 #include "platform/inspector_protocol/TypeBuilder.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 {% endif %} 46 {% endif %}
47 virtual void {{command.name}}(ErrorString* 47 virtual void {{command.name}}(ErrorString*
48 {%- for parameter in command.parameters -%} 48 {%- for parameter in command.parameters -%}
49 {%- if "optional" in parameter -%} 49 {%- if "optional" in parameter -%}
50 , const Maybe<{{resolve_type(parameter).raw_type}}>& in_{{parameter. name}} 50 , const Maybe<{{resolve_type(parameter).raw_type}}>& in_{{parameter. name}}
51 {%- else -%} 51 {%- else -%}
52 , {{resolve_type(parameter).pass_type}} in_{{parameter.name}} 52 , {{resolve_type(parameter).pass_type}} in_{{parameter.name}}
53 {%- endif -%} 53 {%- endif -%}
54 {%- endfor -%} 54 {%- endfor -%}
55 {%- if "async" in command -%} 55 {%- if "async" in command -%}
56 , PassOwnPtr<{{command.name | to_title_case}}Callback> callback 56 , std::unique_ptr<{{command.name | to_title_case}}Callback> callback
57 {%- else -%} 57 {%- else -%}
58 {%- for parameter in command.returns -%} 58 {%- for parameter in command.returns -%}
59 {%- if "optional" in parameter -%} 59 {%- if "optional" in parameter -%}
60 , Maybe<{{resolve_type(parameter).raw_type}}>* out_{{parameter.name} } 60 , Maybe<{{resolve_type(parameter).raw_type}}>* out_{{parameter.name} }
61 {%- else -%} 61 {%- else -%}
62 , {{resolve_type(parameter).type}}* out_{{parameter.name}} 62 , {{resolve_type(parameter).type}}* out_{{parameter.name}}
63 {%- endif -%} 63 {%- endif -%}
64 {%- endfor -%} 64 {%- endfor -%}
65 {%- endif -%} 65 {%- endif -%}
66 ) = 0; 66 ) = 0;
67 {% endfor %} 67 {% endfor %}
68 68
69 protected: 69 protected:
70 virtual ~{{domain.domain}}() { } 70 virtual ~{{domain.domain}}() { }
71 }; 71 };
72 {% endfor %} 72 {% endfor %}
73 }; 73 };
74 74
75 } // namespace protocol 75 } // namespace protocol
76 } // namespace blink 76 } // namespace blink
77 77
78 #endif // !defined({{class_name}}_h) 78 #endif // !defined({{class_name}}_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698