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

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

Issue 105423003: gin::Wrappable shouldn't inherit from base::RefCounted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win Created 7 years 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 | « gin/wrappable_unittest.cc ('k') | mojo/apps/js/bindings/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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/apps/js/bindings/support.h" 5 #include "mojo/apps/js/bindings/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/apps/js/bindings/handle.h" 15 #include "mojo/apps/js/bindings/handle.h"
16 #include "mojo/apps/js/bindings/waiting_callback.h" 16 #include "mojo/apps/js/bindings/waiting_callback.h"
17 #include "mojo/public/bindings/lib/bindings_support.h" 17 #include "mojo/public/bindings/lib/bindings_support.h"
18 18
19 namespace mojo { 19 namespace mojo {
20 namespace js { 20 namespace js {
21 21
22 namespace { 22 namespace {
23 23
24 WaitingCallback* AsyncWait(const gin::Arguments& args, mojo::Handle handle, 24 WaitingCallback* AsyncWait(const gin::Arguments& args, mojo::Handle handle,
25 MojoWaitFlags flags, 25 MojoWaitFlags flags,
26 v8::Handle<v8::Function> callback) { 26 v8::Handle<v8::Function> callback) {
27 scoped_refptr<WaitingCallback> waiting_callback = 27 gin::Handle<WaitingCallback> waiting_callback =
28 WaitingCallback::Create(args.isolate(), callback); 28 WaitingCallback::Create(args.isolate(), callback);
29 29
30 BindingsSupport::AsyncWaitID wait_id = BindingsSupport::Get()->AsyncWait( 30 BindingsSupport::AsyncWaitID wait_id = BindingsSupport::Get()->AsyncWait(
31 handle, flags, waiting_callback.get()); 31 handle, flags, waiting_callback.get());
32 32
33 waiting_callback->set_wait_id(wait_id); 33 waiting_callback->set_wait_id(wait_id);
34 34
35 return waiting_callback.get(); 35 return waiting_callback.get();
36 } 36 }
37 37
(...skipping 24 matching lines...) Expand all
62 .Build(); 62 .Build();
63 63
64 data->SetObjectTemplate(&g_wrapper_info, templ); 64 data->SetObjectTemplate(&g_wrapper_info, templ);
65 } 65 }
66 66
67 return templ; 67 return templ;
68 } 68 }
69 69
70 } // namespace js 70 } // namespace js
71 } // namespace mojo 71 } // namespace mojo
OLDNEW
« no previous file with comments | « gin/wrappable_unittest.cc ('k') | mojo/apps/js/bindings/waiting_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698