| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 Foo foo() { return Blah; } | 186 Foo foo() { return Blah; } |
| 187 const Bar& bar() const { return m_bar; } | 187 const Bar& bar() const { return m_bar; } |
| 188 MyRefPtr<Baz> baz() { return MyRefPtr<Baz>(); } | 188 MyRefPtr<Baz> baz() { return MyRefPtr<Baz>(); } |
| 189 const MyRefPtr<FooBar>& fooBar() { return foobar_; } | 189 const MyRefPtr<FooBar>& fooBar() { return foobar_; } |
| 190 | 190 |
| 191 private: | 191 private: |
| 192 Bar m_bar; | 192 Bar m_bar; |
| 193 MyRefPtr<FooBar> foobar_; | 193 MyRefPtr<FooBar> foobar_; |
| 194 }; | 194 }; |
| 195 | 195 |
| 196 namespace get_prefix_vs_inheritance { |
| 197 |
| 198 // Regression test for https://crbug.com/673031: |
| 199 // 1. |frame| accessor/method should be renamed in the same way for |
| 200 // WebFrameImplBase and WebLocalFrameImpl. |
| 201 // 2. Need to rename |frame| to |GetFrame| (not to |Frame|) to avoid |
| 202 // a conflict with the Frame type. |
| 203 |
| 204 class Frame {}; |
| 205 class LocalFrame : public Frame {}; |
| 206 |
| 207 class WebFrameImplBase { |
| 208 public: |
| 209 virtual Frame* frame() const = 0; |
| 210 }; |
| 211 |
| 212 class WebLocalFrameImpl : public WebFrameImplBase { |
| 213 public: |
| 214 LocalFrame* frame() const override { return nullptr; } |
| 215 }; |
| 216 |
| 217 // This is also a regression test for https://crbug.com/673031 |
| 218 // (which can happen in a non-virtual-method case): |
| 219 class LayoutObject {}; |
| 220 class LayoutBoxModelObject : public LayoutObject {}; |
| 221 class PaintLayerStackingNode { |
| 222 public: |
| 223 // |layoutObject| should be renamed to |GetLayoutObject|. |
| 224 LayoutBoxModelObject* layoutObject() { return nullptr; } |
| 225 }; |
| 226 |
| 227 } // namespace get_prefix_vs_inheritance |
| 228 |
| 196 } // namespace blink | 229 } // namespace blink |
| 197 | 230 |
| 198 namespace WTF { | 231 namespace WTF { |
| 199 | 232 |
| 200 struct StructInWTF { | 233 struct StructInWTF { |
| 201 // Structs in WTF should rename their methods to capitals. | 234 // Structs in WTF should rename their methods to capitals. |
| 202 bool function() { return true; } | 235 bool function() { return true; } |
| 203 }; | 236 }; |
| 204 | 237 |
| 205 } // namespace WTF | 238 } // namespace WTF |
| (...skipping 19 matching lines...) Expand all Loading... |
| 225 static void method(); | 258 static void method(); |
| 226 }; | 259 }; |
| 227 | 260 |
| 228 } // namespace internal | 261 } // namespace internal |
| 229 | 262 |
| 230 } // namespace blink | 263 } // namespace blink |
| 231 | 264 |
| 232 // https://crbug.com/640688 - need to rewrite method name below. | 265 // https://crbug.com/640688 - need to rewrite method name below. |
| 233 void blink::ClassDeclaredInsideBlink::methodDefinedOutsideBlink() {} | 266 void blink::ClassDeclaredInsideBlink::methodDefinedOutsideBlink() {} |
| 234 void blink::internal::InternalClass::method() {} | 267 void blink::internal::InternalClass::method() {} |
| OLD | NEW |