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

Side by Side Diff: tools/clang/blink_gc_plugin/tests/trace_templated_super.h

Issue 2578103003: Add use-chromium-style-naming option to Blink GC plugin. (Closed)
Patch Set: Rebase Created 3 years, 12 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef TRACE_TEMPLATED_SUPER_H_ 5 #ifndef TRACE_TEMPLATED_SUPER_H_
6 #define TRACE_TEMPLATED_SUPER_H_ 6 #define TRACE_TEMPLATED_SUPER_H_
7 7
8 #include "heap/stubs.h" 8 #include "heap/stubs.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class HeapObject; 12 class HeapObject;
13 13
14 class Mixin : public GarbageCollectedMixin { 14 class Mixin : public GarbageCollectedMixin {
15 public: 15 public:
16 virtual void trace(Visitor*) override { } 16 virtual void Trace(Visitor*) override { }
17 }; 17 };
18 18
19 template<typename T> 19 template<typename T>
20 class Super : public GarbageCollected<Super<T> >, public Mixin { 20 class Super : public GarbageCollected<Super<T> >, public Mixin {
21 USING_GARBAGE_COLLECTED_MIXIN(Super); 21 USING_GARBAGE_COLLECTED_MIXIN(Super);
22 public: 22 public:
23 virtual void trace(Visitor*) override; 23 virtual void Trace(Visitor*) override;
24 void clearWeakMembers(Visitor*); 24 void clearWeakMembers(Visitor*);
25 private: 25 private:
26 Member<HeapObject> m_obj; 26 Member<HeapObject> m_obj;
27 WeakMember<HeapObject> m_weak; 27 WeakMember<HeapObject> m_weak;
28 }; 28 };
29 29
30 template<typename T> 30 template<typename T>
31 class Sub : public Super<T> { 31 class Sub : public Super<T> {
32 public: 32 public:
33 virtual void trace(Visitor* visitor) override; 33 virtual void Trace(Visitor* visitor) override;
34 private: 34 private:
35 Member<HeapObject> m_obj; 35 Member<HeapObject> m_obj;
36 }; 36 };
37 37
38 class HeapObject : public Sub<HeapObject> { 38 class HeapObject : public Sub<HeapObject> {
39 public: 39 public:
40 virtual void trace(Visitor*) override; 40 virtual void Trace(Visitor*) override;
41 private: 41 private:
42 Member<HeapObject> m_obj; 42 Member<HeapObject> m_obj;
43 }; 43 };
44 44
45 } 45 }
46 46
47 #endif 47 #endif
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/tests/trace_if_needed.cpp ('k') | tools/clang/blink_gc_plugin/tests/trace_templated_super.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698