| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 NavigatorWebMIDI::NavigatorWebMIDI(LocalFrame* frame) | 45 NavigatorWebMIDI::NavigatorWebMIDI(LocalFrame* frame) |
| 46 : DOMWindowProperty(frame) | 46 : DOMWindowProperty(frame) |
| 47 { | 47 { |
| 48 } | 48 } |
| 49 | 49 |
| 50 NavigatorWebMIDI::~NavigatorWebMIDI() | 50 NavigatorWebMIDI::~NavigatorWebMIDI() |
| 51 { | 51 { |
| 52 } | 52 } |
| 53 | 53 |
| 54 void NavigatorWebMIDI::trace(Visitor* visitor) |
| 55 { |
| 56 WillBeHeapSupplement<Navigator>::trace(visitor); |
| 57 DOMWindowProperty::trace(visitor); |
| 58 } |
| 59 |
| 54 const char* NavigatorWebMIDI::supplementName() | 60 const char* NavigatorWebMIDI::supplementName() |
| 55 { | 61 { |
| 56 return "NavigatorWebMIDI"; | 62 return "NavigatorWebMIDI"; |
| 57 } | 63 } |
| 58 | 64 |
| 59 NavigatorWebMIDI& NavigatorWebMIDI::from(Navigator& navigator) | 65 NavigatorWebMIDI& NavigatorWebMIDI::from(Navigator& navigator) |
| 60 { | 66 { |
| 61 NavigatorWebMIDI* supplement = static_cast<NavigatorWebMIDI*>(WillBeHeapSupp
lement<Navigator>::from(navigator, supplementName())); | 67 NavigatorWebMIDI* supplement = static_cast<NavigatorWebMIDI*>(WillBeHeapSupp
lement<Navigator>::from(navigator, supplementName())); |
| 62 if (!supplement) { | 68 if (!supplement) { |
| 63 supplement = new NavigatorWebMIDI(navigator.frame()); | 69 supplement = new NavigatorWebMIDI(navigator.frame()); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 78 ScriptPromise promise = resolver->promise(); | 84 ScriptPromise promise = resolver->promise(); |
| 79 // FIXME: Currently this rejection does not work because the context is
stopped. | 85 // FIXME: Currently this rejection does not work because the context is
stopped. |
| 80 resolver->reject(DOMError::create("AbortError")); | 86 resolver->reject(DOMError::create("AbortError")); |
| 81 return promise; | 87 return promise; |
| 82 } | 88 } |
| 83 | 89 |
| 84 return MIDIAccessInitializer::start(scriptState, MIDIOptions(options)); | 90 return MIDIAccessInitializer::start(scriptState, MIDIOptions(options)); |
| 85 } | 91 } |
| 86 | 92 |
| 87 } // namespace blink | 93 } // namespace blink |
| OLD | NEW |