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

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

Issue 207583005: Revert of Make WebMIDI use blink Promise. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/bindings/v8/MIDIAccessResolver.h ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "bindings/v8/MIDIAccessResolver.h"
7
8 #include "bindings/v8/ScriptPromiseResolver.h"
9 #include "bindings/v8/V8Binding.h"
10 #include <v8.h>
11
12 namespace WebCore {
13
14 MIDIAccessResolver::MIDIAccessResolver(PassRefPtr<ScriptPromiseResolver> resolve r, v8::Isolate* isolate)
15 : m_resolver(resolver)
16 , m_world(DOMWrapperWorld::current(isolate))
17 {
18 }
19
20 MIDIAccessResolver::~MIDIAccessResolver()
21 {
22 }
23
24 void MIDIAccessResolver::resolve(MIDIAccess* access, ExecutionContext* execution Context)
25 {
26 v8::HandleScope handleScope(toIsolate(executionContext));
27 v8::Context::Scope contextScope(toV8Context(executionContext, m_world.get()) );
28
29 m_resolver->resolve(access, executionContext);
30 }
31
32 void MIDIAccessResolver::reject(DOMError* error, ExecutionContext* executionCont ext)
33 {
34 v8::HandleScope handleScope(toIsolate(executionContext));
35 v8::Context::Scope contextScope(toV8Context(executionContext, m_world.get()) );
36
37 m_resolver->reject(error, executionContext);
38 }
39
40 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/MIDIAccessResolver.h ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698