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

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

Issue 208243014: Add sysexEnabled readonly attribute to MIDIAccess (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: kouhei review Created 6 years, 9 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 | « LayoutTests/webmidi/send_messages-expected.txt ('k') | Source/modules/webmidi/MIDIAccess.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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 virtual ~MIDIAccess(); 57 virtual ~MIDIAccess();
58 // Returns a promise object that will be resolved with this MIDIAccess. 58 // Returns a promise object that will be resolved with this MIDIAccess.
59 static ScriptPromise request(const MIDIOptions&, ExecutionContext*); 59 static ScriptPromise request(const MIDIOptions&, ExecutionContext*);
60 60
61 MIDIInputVector inputs() const { return m_inputs; } 61 MIDIInputVector inputs() const { return m_inputs; }
62 MIDIOutputVector outputs() const { return m_outputs; } 62 MIDIOutputVector outputs() const { return m_outputs; }
63 63
64 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); 64 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect);
65 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); 65 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect);
66 66
67 void setSysExEnabled(bool); 67 void setSysexEnabled(bool);
68 bool sysExEnabled() const { return m_sysExEnabled; } 68 bool sysexEnabled() const { return m_sysexEnabled; }
69 69
70 // EventTarget 70 // EventTarget
71 virtual const AtomicString& interfaceName() const OVERRIDE { return EventTar getNames::MIDIAccess; } 71 virtual const AtomicString& interfaceName() const OVERRIDE { return EventTar getNames::MIDIAccess; }
72 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); } 72 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); }
73 73
74 // ActiveDOMObject 74 // ActiveDOMObject
75 virtual void suspend() OVERRIDE; 75 virtual void suspend() OVERRIDE;
76 virtual void resume() OVERRIDE; 76 virtual void resume() OVERRIDE;
77 virtual void stop() OVERRIDE; 77 virtual void stop() OVERRIDE;
78 virtual bool hasPendingActivity() const OVERRIDE; 78 virtual bool hasPendingActivity() const OVERRIDE;
(...skipping 29 matching lines...) Expand all
108 // Called when the promise is resolved or rejected. 108 // Called when the promise is resolved or rejected.
109 void doPostAction(State); 109 void doPostAction(State);
110 110
111 State m_state; 111 State m_state;
112 WeakPtrFactory<MIDIAccess> m_weakPtrFactory; 112 WeakPtrFactory<MIDIAccess> m_weakPtrFactory;
113 MIDIInputVector m_inputs; 113 MIDIInputVector m_inputs;
114 MIDIOutputVector m_outputs; 114 MIDIOutputVector m_outputs;
115 OwnPtr<MIDIAccessor> m_accessor; 115 OwnPtr<MIDIAccessor> m_accessor;
116 OwnPtr<MIDIAccessResolver> m_resolver; 116 OwnPtr<MIDIAccessResolver> m_resolver;
117 MIDIOptions m_options; 117 MIDIOptions m_options;
118 bool m_sysExEnabled; 118 bool m_sysexEnabled;
119 AsyncMethodRunner<MIDIAccess> m_asyncResolveRunner; 119 AsyncMethodRunner<MIDIAccess> m_asyncResolveRunner;
120 AsyncMethodRunner<MIDIAccess> m_asyncRejectRunner; 120 AsyncMethodRunner<MIDIAccess> m_asyncRejectRunner;
121 RefPtrWillBeMember<DOMError> m_error; 121 RefPtrWillBeMember<DOMError> m_error;
122 }; 122 };
123 123
124 } // namespace WebCore 124 } // namespace WebCore
125 125
126 #endif // MIDIAccess_h 126 #endif // MIDIAccess_h
OLDNEW
« no previous file with comments | « LayoutTests/webmidi/send_messages-expected.txt ('k') | Source/modules/webmidi/MIDIAccess.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698