| 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" |
| 6 |
| 5 namespace v8 { | 7 namespace v8 { |
| 6 | 8 |
| 7 class InterfaceOutsideOfBlink { | 9 class InterfaceOutsideOfBlink { |
| 8 public: | 10 public: |
| 9 virtual void nonBlinkVirtual() = 0; | 11 virtual void nonBlinkVirtual() = 0; |
| 10 }; | 12 }; |
| 11 | 13 |
| 12 } // namespace v8 | 14 } // namespace v8 |
| 13 | 15 |
| 14 namespace blink { | 16 namespace blink { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 public: | 88 public: |
| 87 typedef T Testable::*UnspecifiedBoolType; | 89 typedef T Testable::*UnspecifiedBoolType; |
| 88 // This method has a reference to a member in a "member context" and a | 90 // This method has a reference to a member in a "member context" and a |
| 89 // "non-member context" to verify both are rewritten. | 91 // "non-member context" to verify both are rewritten. |
| 90 operator UnspecifiedBoolType() { return ptr_ ? &Testable::ptr_ : 0; } | 92 operator UnspecifiedBoolType() { return ptr_ ? &Testable::ptr_ : 0; } |
| 91 | 93 |
| 92 private: | 94 private: |
| 93 int ptr_; | 95 int ptr_; |
| 94 }; | 96 }; |
| 95 | 97 |
| 98 namespace subname { |
| 99 |
| 100 class SubnameParent { |
| 101 virtual void SubnameMethod() {} |
| 102 }; |
| 103 |
| 104 } // namespace subname |
| 105 |
| 106 class SubnameChild : public subname::SubnameParent { |
| 107 // This subclasses from blink::subname::SubnameParent and should be renamed. |
| 108 void SubnameMethod() override {} |
| 109 }; |
| 110 |
| 111 class GenChild : public blink::GenClass { |
| 112 // This subclasses from the blink namespace but in the gen directory so it |
| 113 // should not be renamed. |
| 114 void genMethod() override {} |
| 115 }; |
| 116 |
| 96 } // namespace blink | 117 } // namespace blink |
| 97 | 118 |
| 98 // Test that overrides from outside the Blink namespace are also updated. | 119 // Test that overrides from outside the Blink namespace are also updated. |
| 99 class BovineTask : public blink::Task { | 120 class BovineTask : public blink::Task { |
| 100 public: | 121 public: |
| 101 using Task::DoTheWork; | 122 using Task::DoTheWork; |
| 102 void ReallyDoTheWork() override; | 123 void ReallyDoTheWork() override; |
| 103 }; | 124 }; |
| 104 | 125 |
| 105 class SuperBovineTask : public BovineTask { | 126 class SuperBovineTask : public BovineTask { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 }; | 182 }; |
| 162 | 183 |
| 163 } // namespace WTF | 184 } // namespace WTF |
| 164 | 185 |
| 165 void F2() { | 186 void F2() { |
| 166 blink::StructInBlink b; | 187 blink::StructInBlink b; |
| 167 b.Function(); | 188 b.Function(); |
| 168 WTF::StructInWTF w; | 189 WTF::StructInWTF w; |
| 169 w.Function(); | 190 w.Function(); |
| 170 } | 191 } |
| OLD | NEW |