OLD | NEW |
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 #include "gen/thing.h" | 5 #include "gen/thing.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 | 8 |
9 class InterfaceOutsideOfBlink { | 9 class InterfaceOutsideOfBlink { |
10 public: | 10 public: |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 struct StructInBlink { | 170 struct StructInBlink { |
171 // Structs in blink should rename their methods to capitals. | 171 // Structs in blink should rename their methods to capitals. |
172 bool Function() { return true; } | 172 bool Function() { return true; } |
173 }; | 173 }; |
174 | 174 |
175 class BitVector { | 175 class BitVector { |
176 public: | 176 public: |
177 class OutOfLineBits {}; | 177 class OutOfLineBits {}; |
178 enum Foo { kBlah }; | 178 enum Foo { kBlah }; |
179 struct Bar {}; | 179 struct Bar {}; |
| 180 class Baz {}; |
| 181 class FooBar {}; |
| 182 |
| 183 template <typename T> |
| 184 class MyRefPtr {}; |
180 | 185 |
181 // Naive renaming will break the build, by leaving return type the same | 186 // Naive renaming will break the build, by leaving return type the same |
182 // as method the name - to avoid this "Get" prefix needs to be prepended | 187 // as the method name - to avoid this "Get" prefix needs to be prepended |
183 // as suggested in https://crbug.com/582312#c17. | 188 // as suggested in https://crbug.com/582312#c17. |
184 const OutOfLineBits* GetOutOfLineBits() const { return nullptr; } | 189 const OutOfLineBits* GetOutOfLineBits() const { return nullptr; } |
185 Foo GetFoo() { return kBlah; } | 190 Foo GetFoo() { return kBlah; } |
186 const Bar& GetBar() const { return bar_; } | 191 const Bar& GetBar() const { return bar_; } |
| 192 MyRefPtr<Baz> GetBaz() { return MyRefPtr<Baz>(); } |
| 193 const MyRefPtr<FooBar>& GetFooBar() { return foobar_; } |
187 | 194 |
188 private: | 195 private: |
189 Bar bar_; | 196 Bar bar_; |
| 197 MyRefPtr<FooBar> foobar_; |
190 }; | 198 }; |
191 | 199 |
192 } // namespace blink | 200 } // namespace blink |
193 | 201 |
194 namespace WTF { | 202 namespace WTF { |
195 | 203 |
196 struct StructInWTF { | 204 struct StructInWTF { |
197 // Structs in WTF should rename their methods to capitals. | 205 // Structs in WTF should rename their methods to capitals. |
198 bool Function() { return true; } | 206 bool Function() { return true; } |
199 }; | 207 }; |
(...skipping 21 matching lines...) Expand all Loading... |
221 static void Method(); | 229 static void Method(); |
222 }; | 230 }; |
223 | 231 |
224 } // namespace internal | 232 } // namespace internal |
225 | 233 |
226 } // namespace blink | 234 } // namespace blink |
227 | 235 |
228 // https://crbug.com/640688 - need to rewrite method name below. | 236 // https://crbug.com/640688 - need to rewrite method name below. |
229 void blink::ClassDeclaredInsideBlink::MethodDefinedOutsideBlink() {} | 237 void blink::ClassDeclaredInsideBlink::MethodDefinedOutsideBlink() {} |
230 void blink::internal::InternalClass::Method() {} | 238 void blink::internal::InternalClass::Method() {} |
OLD | NEW |