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

Side by Side Diff: mojo/bindings/js/support.cc

Issue 345463003: Mojo: MojoWaitFlags -> MojoHandleSignals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « mojo/bindings/js/core.cc ('k') | mojo/bindings/js/waiting_callback.h » ('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 #include "mojo/bindings/js/support.h" 5 #include "mojo/bindings/js/support.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "gin/arguments.h" 8 #include "gin/arguments.h"
9 #include "gin/converter.h" 9 #include "gin/converter.h"
10 #include "gin/function_template.h" 10 #include "gin/function_template.h"
11 #include "gin/object_template_builder.h" 11 #include "gin/object_template_builder.h"
12 #include "gin/per_isolate_data.h" 12 #include "gin/per_isolate_data.h"
13 #include "gin/public/wrapper_info.h" 13 #include "gin/public/wrapper_info.h"
14 #include "gin/wrappable.h" 14 #include "gin/wrappable.h"
15 #include "mojo/bindings/js/handle.h" 15 #include "mojo/bindings/js/handle.h"
16 #include "mojo/bindings/js/waiting_callback.h" 16 #include "mojo/bindings/js/waiting_callback.h"
17 #include "mojo/public/cpp/environment/default_async_waiter.h" 17 #include "mojo/public/cpp/environment/default_async_waiter.h"
18 #include "mojo/public/cpp/system/core.h" 18 #include "mojo/public/cpp/system/core.h"
19 19
20 namespace mojo { 20 namespace mojo {
21 namespace js { 21 namespace js {
22 22
23 namespace { 23 namespace {
24 24
25 WaitingCallback* AsyncWait(const gin::Arguments& args, mojo::Handle handle, 25 WaitingCallback* AsyncWait(const gin::Arguments& args, mojo::Handle handle,
26 MojoWaitFlags flags, 26 MojoHandleSignals signals,
27 v8::Handle<v8::Function> callback) { 27 v8::Handle<v8::Function> callback) {
28 return WaitingCallback::Create(args.isolate(), callback, handle, flags).get(); 28 return WaitingCallback::Create(args.isolate(), callback, handle, signals)
29 .get();
29 } 30 }
30 31
31 void CancelWait(WaitingCallback* waiting_callback) { 32 void CancelWait(WaitingCallback* waiting_callback) {
32 waiting_callback->Cancel(); 33 waiting_callback->Cancel();
33 } 34 }
34 35
35 gin::WrapperInfo g_wrapper_info = { gin::kEmbedderNativeGin }; 36 gin::WrapperInfo g_wrapper_info = { gin::kEmbedderNativeGin };
36 37
37 } // namespace 38 } // namespace
38 39
(...skipping 11 matching lines...) Expand all
50 .Build(); 51 .Build();
51 52
52 data->SetObjectTemplate(&g_wrapper_info, templ); 53 data->SetObjectTemplate(&g_wrapper_info, templ);
53 } 54 }
54 55
55 return templ->NewInstance(); 56 return templ->NewInstance();
56 } 57 }
57 58
58 } // namespace js 59 } // namespace js
59 } // namespace mojo 60 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/bindings/js/core.cc ('k') | mojo/bindings/js/waiting_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698