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

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

Issue 943173002: Web MIDI: dispatch MIDIConnectionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review #3 Created 5 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 | « Source/modules/webmidi/MIDIMessageEvent.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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 virtual ~MIDIPort() { } 50 virtual ~MIDIPort() { }
51 51
52 String id() const { return m_id; } 52 String id() const { return m_id; }
53 String manufacturer() const { return m_manufacturer; } 53 String manufacturer() const { return m_manufacturer; }
54 String name() const { return m_name; } 54 String name() const { return m_name; }
55 String type() const; 55 String type() const;
56 String version() const { return m_version; } 56 String version() const { return m_version; }
57 57
58 MIDIAccess* midiAccess() const { return m_access; } 58 MIDIAccess* midiAccess() const { return m_access; }
59 bool isActive() const { return m_isActive; } 59 bool isActive() const { return m_isActive; }
60 void setActiveState(bool isActive) { m_isActive = isActive; } 60 void setActiveState(bool isActive);
61 61
62 DECLARE_VIRTUAL_TRACE(); 62 DECLARE_VIRTUAL_TRACE();
63 63
64 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); 64 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
65 65
66 // EventTarget 66 // EventTarget
67 virtual const AtomicString& interfaceName() const override { return EventTar getNames::MIDIPort; } 67 virtual const AtomicString& interfaceName() const override { return EventTar getNames::MIDIPort; }
68 virtual ExecutionContext* executionContext() const override final; 68 virtual ExecutionContext* executionContext() const override final;
69 69
70 protected: 70 protected:
71 MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const St ring& name, MIDIPortTypeCode, const String& version, bool isActive); 71 MIDIPort(MIDIAccess*, const String& id, const String& manufacturer, const St ring& name, MIDIPortTypeCode, const String& version, bool isActive);
72 72
73 private: 73 private:
74 String m_id; 74 String m_id;
75 String m_manufacturer; 75 String m_manufacturer;
76 String m_name; 76 String m_name;
77 MIDIPortTypeCode m_type; 77 MIDIPortTypeCode m_type;
78 String m_version; 78 String m_version;
79 Member<MIDIAccess> m_access; 79 Member<MIDIAccess> m_access;
80 bool m_isActive; 80 bool m_isActive;
81 }; 81 };
82 82
83 } // namespace blink 83 } // namespace blink
84 84
85 #endif // MIDIPort_h 85 #endif // MIDIPort_h
OLDNEW
« no previous file with comments | « Source/modules/webmidi/MIDIMessageEvent.cpp ('k') | Source/modules/webmidi/MIDIPort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698