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 29 matching lines...) Expand all Loading... |
40 #include "modules/webmidi/MIDIAccessInitializer.h" | 40 #include "modules/webmidi/MIDIAccessInitializer.h" |
41 #include "modules/webmidi/MIDIOptions.h" | 41 #include "modules/webmidi/MIDIOptions.h" |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
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 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(NavigatorWebMIDI); |
| 51 |
| 52 void NavigatorWebMIDI::trace(Visitor* visitor) |
51 { | 53 { |
| 54 WillBeHeapSupplement<Navigator>::trace(visitor); |
| 55 DOMWindowProperty::trace(visitor); |
52 } | 56 } |
53 | 57 |
54 const char* NavigatorWebMIDI::supplementName() | 58 const char* NavigatorWebMIDI::supplementName() |
55 { | 59 { |
56 return "NavigatorWebMIDI"; | 60 return "NavigatorWebMIDI"; |
57 } | 61 } |
58 | 62 |
59 NavigatorWebMIDI& NavigatorWebMIDI::from(Navigator& navigator) | 63 NavigatorWebMIDI& NavigatorWebMIDI::from(Navigator& navigator) |
60 { | 64 { |
61 NavigatorWebMIDI* supplement = static_cast<NavigatorWebMIDI*>(WillBeHeapSupp
lement<Navigator>::from(navigator, supplementName())); | 65 NavigatorWebMIDI* supplement = static_cast<NavigatorWebMIDI*>(WillBeHeapSupp
lement<Navigator>::from(navigator, supplementName())); |
(...skipping 16 matching lines...) Expand all Loading... |
78 ScriptPromise promise = resolver->promise(); | 82 ScriptPromise promise = resolver->promise(); |
79 // FIXME: Currently this rejection does not work because the context is
stopped. | 83 // FIXME: Currently this rejection does not work because the context is
stopped. |
80 resolver->reject(DOMError::create("AbortError")); | 84 resolver->reject(DOMError::create("AbortError")); |
81 return promise; | 85 return promise; |
82 } | 86 } |
83 | 87 |
84 return MIDIAccessInitializer::start(scriptState, MIDIOptions(options)); | 88 return MIDIAccessInitializer::start(scriptState, MIDIOptions(options)); |
85 } | 89 } |
86 | 90 |
87 } // namespace blink | 91 } // namespace blink |
OLD | NEW |