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

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

Issue 2676663006: Remove SetWrapperReferenceTo and SetWrapperReferenceFrom (Closed)
Patch Set: Rebase on master Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl ('k') | no next file » | 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 String id() const { return m_id; } 66 String id() const { return m_id; }
67 String manufacturer() const { return m_manufacturer; } 67 String manufacturer() const { return m_manufacturer; }
68 String name() const { return m_name; } 68 String name() const { return m_name; }
69 String state() const; 69 String state() const;
70 String type() const; 70 String type() const;
71 String version() const { return m_version; } 71 String version() const { return m_version; }
72 72
73 ScriptPromise open(ScriptState*); 73 ScriptPromise open(ScriptState*);
74 ScriptPromise close(ScriptState*); 74 ScriptPromise close(ScriptState*);
75 75
76 MIDIAccess* midiAccess() const { return m_access; }
77 midi::mojom::PortState getState() const { return m_state; } 76 midi::mojom::PortState getState() const { return m_state; }
78 void setState(midi::mojom::PortState); 77 void setState(midi::mojom::PortState);
79 ConnectionState getConnection() const { return m_connection; } 78 ConnectionState getConnection() const { return m_connection; }
80 79
81 DECLARE_VIRTUAL_TRACE(); 80 DECLARE_VIRTUAL_TRACE();
82 81
83 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 82 DECLARE_VIRTUAL_TRACE_WRAPPERS();
84 83
85 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); 84 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
86 85
(...skipping 12 matching lines...) Expand all
99 protected: 98 protected:
100 MIDIPort(MIDIAccess*, 99 MIDIPort(MIDIAccess*,
101 const String& id, 100 const String& id,
102 const String& manufacturer, 101 const String& manufacturer,
103 const String& name, 102 const String& name,
104 TypeCode, 103 TypeCode,
105 const String& version, 104 const String& version,
106 midi::mojom::PortState); 105 midi::mojom::PortState);
107 106
108 void open(); 107 void open();
108 MIDIAccess* midiAccess() const { return m_access; }
109 109
110 private: 110 private:
111 ScriptPromise accept(ScriptState*); 111 ScriptPromise accept(ScriptState*);
112 ScriptPromise reject(ScriptState*, ExceptionCode, const String& message); 112 ScriptPromise reject(ScriptState*, ExceptionCode, const String& message);
113 113
114 void setStates(midi::mojom::PortState, ConnectionState); 114 void setStates(midi::mojom::PortState, ConnectionState);
115 115
116 String m_id; 116 String m_id;
117 String m_manufacturer; 117 String m_manufacturer;
118 String m_name; 118 String m_name;
119 TypeCode m_type; 119 TypeCode m_type;
120 String m_version; 120 String m_version;
121 TraceWrapperMember<MIDIAccess> m_access; 121 TraceWrapperMember<MIDIAccess> m_access;
122 midi::mojom::PortState m_state; 122 midi::mojom::PortState m_state;
123 ConnectionState m_connection; 123 ConnectionState m_connection;
124 }; 124 };
125 125
126 } // namespace blink 126 } // namespace blink
127 127
128 #endif // MIDIPort_h 128 #endif // MIDIPort_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698