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

Side by Side Diff: Source/modules/webmidi/MIDIPort.h

Issue 307433003: Oilpan: Allocate all EventTarget derived types on the manged heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/webmidi/MIDIAccess.cpp ('k') | Source/modules/webmidi/MIDIPort.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
37 #include "wtf/RefCounted.h" 37 #include "wtf/RefCounted.h"
38 #include "wtf/RefPtr.h" 38 #include "wtf/RefPtr.h"
39 #include "wtf/Vector.h" 39 #include "wtf/Vector.h"
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 class MIDIAccess; 43 class MIDIAccess;
44 44
45 class MIDIPort : public RefCountedWillBeRefCountedGarbageCollected<MIDIPort>, pu blic ScriptWrappable, public EventTargetWithInlineData { 45 class MIDIPort : public RefCountedWillBeRefCountedGarbageCollected<MIDIPort>, pu blic ScriptWrappable, public EventTargetWithInlineData {
46 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<M IDIPort>); 46 REFCOUNTED_EVENT_TARGET(MIDIPort);
47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MIDIPort);
47 public: 48 public:
48 enum MIDIPortTypeCode { 49 enum MIDIPortTypeCode {
49 MIDIPortTypeInput, 50 MIDIPortTypeInput,
50 MIDIPortTypeOutput 51 MIDIPortTypeOutput
51 }; 52 };
52 53
53 virtual ~MIDIPort() { } 54 virtual ~MIDIPort() { }
54 55
55 String id() const { return m_id; } 56 String id() const { return m_id; }
56 String manufacturer() const { return m_manufacturer; } 57 String manufacturer() const { return m_manufacturer; }
57 String name() const { return m_name; } 58 String name() const { return m_name; }
58 String type() const; 59 String type() const;
59 String version() const { return m_version; } 60 String version() const { return m_version; }
60 61
61 MIDIAccess* midiAccess() const { return m_access; } 62 MIDIAccess* midiAccess() const { return m_access; }
62 63
63 virtual void trace(Visitor*); 64 virtual void trace(Visitor*) OVERRIDE;
64 65
65 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); 66 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect);
66 67
67 // EventTarget 68 // EventTarget
68 virtual const AtomicString& interfaceName() const OVERRIDE { return EventTar getNames::MIDIPort; } 69 virtual const AtomicString& interfaceName() const OVERRIDE { return EventTar getNames::MIDIPort; }
69 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; 70 virtual ExecutionContext* executionContext() const OVERRIDE FINAL;
70 71
71 protected: 72 protected:
72 MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const St ring& name, MIDIPortTypeCode, const String& version); 73 MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const St ring& name, MIDIPortTypeCode, const String& version);
73 74
74 private: 75 private:
75 String m_id; 76 String m_id;
76 String m_manufacturer; 77 String m_manufacturer;
77 String m_name; 78 String m_name;
78 MIDIPortTypeCode m_type; 79 MIDIPortTypeCode m_type;
79 String m_version; 80 String m_version;
80 RawPtrWillBeMember<MIDIAccess> m_access; 81 RawPtrWillBeMember<MIDIAccess> m_access;
81 }; 82 };
82 83
83 } // namespace WebCore 84 } // namespace WebCore
84 85
85 #endif // MIDIPort_h 86 #endif // MIDIPort_h
OLDNEW
« no previous file with comments | « Source/modules/webmidi/MIDIAccess.cpp ('k') | Source/modules/webmidi/MIDIPort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698