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

Side by Side Diff: Source/bindings/v8/MIDIAccessResolver.h

Issue 218493013: Use NewScriptState in MIDIAccessResolver, CustomElementLifecycleCallbacks and V8MutationCallbacks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 | « no previous file | Source/bindings/v8/MIDIAccessResolver.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MIDIAccessResolver_h 5 #ifndef MIDIAccessResolver_h
6 #define MIDIAccessResolver_h 6 #define MIDIAccessResolver_h
7 7
8 #include "bindings/v8/ScriptPromiseResolver.h" 8 #include "bindings/v8/ScriptPromiseResolver.h"
9 #include "wtf/OwnPtr.h" 9 #include "wtf/OwnPtr.h"
10 #include "wtf/RefCounted.h" 10 #include "wtf/RefCounted.h"
11 11
12 namespace WebCore { 12 namespace WebCore {
13 13
14 class DOMError; 14 class DOMError;
15 class DOMWrapperWorld;
16 class ExecutionContext; 15 class ExecutionContext;
17 class MIDIAccess; 16 class MIDIAccess;
18 17
19 class MIDIAccessResolver { 18 class MIDIAccessResolver {
20 WTF_MAKE_NONCOPYABLE(MIDIAccessResolver); 19 WTF_MAKE_NONCOPYABLE(MIDIAccessResolver);
21 public: 20 public:
22 static PassOwnPtr<MIDIAccessResolver> create(PassRefPtr<ScriptPromiseResolve r> resolver, v8::Isolate* isolate) 21 static PassOwnPtr<MIDIAccessResolver> create(PassRefPtr<ScriptPromiseResolve r> resolver, v8::Isolate* isolate)
23 { 22 {
24 return adoptPtr(new MIDIAccessResolver(resolver, isolate)); 23 return adoptPtr(new MIDIAccessResolver(resolver, isolate));
25 } 24 }
26 ~MIDIAccessResolver(); 25 ~MIDIAccessResolver();
27 26
28 ScriptPromise promise() { return m_resolver->promise(); } 27 ScriptPromise promise() { return m_resolver->promise(); }
29 28
30 void resolve(MIDIAccess*, ExecutionContext*); 29 void resolve(MIDIAccess*, ExecutionContext*);
31 void reject(DOMError*, ExecutionContext*); 30 void reject(DOMError*, ExecutionContext*);
32 31
33 private: 32 private:
34 MIDIAccessResolver(PassRefPtr<ScriptPromiseResolver>, v8::Isolate*); 33 MIDIAccessResolver(PassRefPtr<ScriptPromiseResolver>, v8::Isolate*);
35 34
36 RefPtr<ScriptPromiseResolver> m_resolver; 35 RefPtr<ScriptPromiseResolver> m_resolver;
37 RefPtr<DOMWrapperWorld> m_world; 36 RefPtr<NewScriptState> m_scriptState;
38 }; 37 };
39 38
40 } // namespace WebCore 39 } // namespace WebCore
41 40
42 #endif // #ifndef MIDIAccessResolver_h 41 #endif // #ifndef MIDIAccessResolver_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/v8/MIDIAccessResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698