OLD | NEW |
---|---|
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 if (enable) | 75 if (enable) |
76 m_accessor->startSession(); | 76 m_accessor->startSession(); |
77 else | 77 else |
78 permissionDenied(); | 78 permissionDenied(); |
79 } | 79 } |
80 | 80 |
81 void MIDIAccess::didAddInputPort(const String& id, const String& manufacturer, c onst String& name, const String& version) | 81 void MIDIAccess::didAddInputPort(const String& id, const String& manufacturer, c onst String& name, const String& version) |
82 { | 82 { |
83 ASSERT(isMainThread()); | 83 ASSERT(isMainThread()); |
84 | 84 |
85 // FIXME: Pass in |this| to create() method so we can filter system exclusiv e messages correctly. | 85 // FIXME: Pass in |this| to create() method so we can filter system exclusiv e messages correctly. |
kouhei (in TOK)
2013/09/09 00:46:52
Should this comment be deleted?
Takashi Toyoshima
2013/09/12 05:02:44
Done in another CL.
| |
86 m_inputs.append(MIDIInput::create(scriptExecutionContext(), id, manufacturer , name, version)); | 86 m_inputs.append(MIDIInput::create(this, scriptExecutionContext(), id, manufa cturer, name, version)); |
87 } | 87 } |
88 | 88 |
89 void MIDIAccess::didAddOutputPort(const String& id, const String& manufacturer, const String& name, const String& version) | 89 void MIDIAccess::didAddOutputPort(const String& id, const String& manufacturer, const String& name, const String& version) |
90 { | 90 { |
91 ASSERT(isMainThread()); | 91 ASSERT(isMainThread()); |
92 | 92 |
93 unsigned portIndex = m_outputs.size(); | 93 unsigned portIndex = m_outputs.size(); |
94 m_outputs.append(MIDIOutput::create(this, portIndex, scriptExecutionContext( ), id, manufacturer, name, version)); | 94 m_outputs.append(MIDIOutput::create(this, portIndex, scriptExecutionContext( ), id, manufacturer, name, version)); |
95 } | 95 } |
96 | 96 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 | 178 |
179 void MIDIAccess::permissionDenied() | 179 void MIDIAccess::permissionDenied() |
180 { | 180 { |
181 ASSERT(isMainThread()); | 181 ASSERT(isMainThread()); |
182 | 182 |
183 m_hasAccess = false; | 183 m_hasAccess = false; |
184 m_promise->reject(DOMError::create("SecurityError")); | 184 m_promise->reject(DOMError::create("SecurityError")); |
185 } | 185 } |
186 | 186 |
187 } // namespace WebCore | 187 } // namespace WebCore |
OLD | NEW |