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

Side by Side Diff: mojo/edk/js/waiting_callback.cc

Issue 1676913002: [mojo] Delete third_party/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: let's try that again Created 4 years, 10 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 | « mojo/edk/js/waiting_callback.h ('k') | mojo/edk/system/BUILD.gn » ('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/edk/js/waiting_callback.h" 5 #include "mojo/edk/js/waiting_callback.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "gin/per_context_data.h" 9 #include "gin/per_context_data.h"
10 #include "mojo/public/cpp/environment/environment.h" 10 #include "mojo/public/cpp/environment/environment.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 namespace edk { 13 namespace edk {
14 namespace js {
14 15
15 namespace { 16 namespace {
16 17
17 v8::Handle<v8::Private> GetHiddenPropertyName(v8::Isolate* isolate) { 18 v8::Handle<v8::Private> GetHiddenPropertyName(v8::Isolate* isolate) {
18 return v8::Private::ForApi( 19 return v8::Private::ForApi(
19 isolate, gin::StringToV8(isolate, "::mojo::js::WaitingCallback")); 20 isolate, gin::StringToV8(isolate, "::mojo::js::WaitingCallback"));
20 } 21 }
21 22
22 } // namespace 23 } // namespace
23 24
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 111
111 // This may be called from GC, so we can't execute Javascript now, call 112 // This may be called from GC, so we can't execute Javascript now, call
112 // ClearWaitId explicitly, and CallCallback asynchronously. 113 // ClearWaitId explicitly, and CallCallback asynchronously.
113 ClearWaitId(); 114 ClearWaitId();
114 base::MessageLoop::current()->PostTask( 115 base::MessageLoop::current()->PostTask(
115 FROM_HERE, 116 FROM_HERE,
116 base::Bind(&WaitingCallback::CallCallback, weak_factory_.GetWeakPtr(), 117 base::Bind(&WaitingCallback::CallCallback, weak_factory_.GetWeakPtr(),
117 MOJO_RESULT_INVALID_ARGUMENT)); 118 MOJO_RESULT_INVALID_ARGUMENT));
118 } 119 }
119 120
121 } // namespace js
120 } // namespace edk 122 } // namespace edk
121 } // namespace mojo 123 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/js/waiting_callback.h ('k') | mojo/edk/system/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698