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

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

Issue 2577053002: ActiveScriptWrappable: GC wrappers in detached ExecutionContexts. (Closed)
Patch Set: component build fix(msvc) Created 4 years 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 /* 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 28 matching lines...) Expand all
39 39
40 namespace blink { 40 namespace blink {
41 41
42 MIDIPort::MIDIPort(MIDIAccess* access, 42 MIDIPort::MIDIPort(MIDIAccess* access,
43 const String& id, 43 const String& id,
44 const String& manufacturer, 44 const String& manufacturer,
45 const String& name, 45 const String& name,
46 TypeCode type, 46 TypeCode type,
47 const String& version, 47 const String& version,
48 PortState state) 48 PortState state)
49 : ActiveScriptWrappable(this), 49 : ActiveScriptWrappable<MIDIPort>(this),
50 SuspendableObject(access->getExecutionContext()), 50 SuspendableObject(access->getExecutionContext()),
51 m_id(id), 51 m_id(id),
52 m_manufacturer(manufacturer), 52 m_manufacturer(manufacturer),
53 m_name(name), 53 m_name(name),
54 m_type(type), 54 m_type(type),
55 m_version(version), 55 m_version(version),
56 m_access(this, access), 56 m_access(this, access),
57 m_connection(ConnectionStateClosed) { 57 m_connection(ConnectionStateClosed) {
58 DCHECK(access); 58 DCHECK(access);
59 DCHECK(type == TypeInput || type == TypeOutput); 59 DCHECK(type == TypeInput || type == TypeOutput);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 DCHECK(state != PortState::DISCONNECTED || connection != ConnectionStateOpen); 205 DCHECK(state != PortState::DISCONNECTED || connection != ConnectionStateOpen);
206 if (m_state == state && m_connection == connection) 206 if (m_state == state && m_connection == connection)
207 return; 207 return;
208 m_state = state; 208 m_state = state;
209 m_connection = connection; 209 m_connection = connection;
210 dispatchEvent(MIDIConnectionEvent::create(this)); 210 dispatchEvent(MIDIConnectionEvent::create(this));
211 m_access->dispatchEvent(MIDIConnectionEvent::create(this)); 211 m_access->dispatchEvent(MIDIConnectionEvent::create(this));
212 } 212 }
213 213
214 } // namespace blink 214 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIPort.h ('k') | third_party/WebKit/Source/modules/websockets/DOMWebSocket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698