OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 { | 47 { |
48 return adoptRefWillBeNoop(new InstallEvent(type, initializer, observer)); | 48 return adoptRefWillBeNoop(new InstallEvent(type, initializer, observer)); |
49 } | 49 } |
50 | 50 |
51 void InstallEvent::replace() | 51 void InstallEvent::replace() |
52 { | 52 { |
53 // FIXME: implement. | 53 // FIXME: implement. |
54 notImplemented(); | 54 notImplemented(); |
55 } | 55 } |
56 | 56 |
57 ScriptPromise InstallEvent::reloadAll(ExecutionContext* context) | 57 ScriptPromise InstallEvent::reloadAll(ScriptState* scriptState) |
58 { | 58 { |
59 // FIXME: implement. | 59 // FIXME: implement. |
60 notImplemented(); | 60 notImplemented(); |
61 | 61 |
62 // For now this just returns a promise which is already rejected. | 62 // For now this just returns a promise which is already rejected. |
63 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(conte
xt); | 63 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip
tState); |
64 ScriptPromise promise = resolver->promise(); | 64 ScriptPromise promise = resolver->promise(); |
65 resolver->reject(ScriptValue(v8::Null(toIsolate(context)), toIsolate(context
))); | 65 resolver->reject(ScriptValue(v8::Null(scriptState->isolate()), scriptState->
isolate())); |
66 return promise; | 66 return promise; |
67 } | 67 } |
68 | 68 |
69 const AtomicString& InstallEvent::interfaceName() const | 69 const AtomicString& InstallEvent::interfaceName() const |
70 { | 70 { |
71 return EventNames::InstallEvent; | 71 return EventNames::InstallEvent; |
72 } | 72 } |
73 | 73 |
74 InstallEvent::InstallEvent() | 74 InstallEvent::InstallEvent() |
75 { | 75 { |
76 ScriptWrappable::init(this); | 76 ScriptWrappable::init(this); |
77 } | 77 } |
78 | 78 |
79 InstallEvent::InstallEvent(const AtomicString& type, const EventInit& initialize
r, PassRefPtr<WaitUntilObserver> observer) | 79 InstallEvent::InstallEvent(const AtomicString& type, const EventInit& initialize
r, PassRefPtr<WaitUntilObserver> observer) |
80 : InstallPhaseEvent(type, initializer, observer) | 80 : InstallPhaseEvent(type, initializer, observer) |
81 { | 81 { |
82 ScriptWrappable::init(this); | 82 ScriptWrappable::init(this); |
83 } | 83 } |
84 | 84 |
85 void InstallEvent::trace(Visitor* visitor) | 85 void InstallEvent::trace(Visitor* visitor) |
86 { | 86 { |
87 InstallPhaseEvent::trace(visitor); | 87 InstallPhaseEvent::trace(visitor); |
88 } | 88 } |
89 | 89 |
90 } // namespace WebCore | 90 } // namespace WebCore |
OLD | NEW |