// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef TRACEIMPL_OVERLOADED_H_ #define TRACEIMPL_OVERLOADED_H_ #include "heap/stubs.h" namespace blink { class X : public GarbageCollected { public: void Trace(Visitor*) {} }; class InlinedBase : public GarbageCollected { public: virtual void Trace(Visitor* visitor) { visitor->Trace(x_base_); } private: Member x_base_; }; class InlinedDerived : public InlinedBase { public: void Trace(Visitor* visitor) override { visitor->Trace(x_derived_); InlinedBase::Trace(visitor); } Member x_derived_; }; class ExternBase : public GarbageCollected { public: virtual void Trace(Visitor*); private: Member x_base_; }; class ExternDerived : public ExternBase { public: void Trace(Visitor*) override; private: Member x_derived_; }; } #endif // TRACEIMPL_OVERLOADED_H_