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/edk/js/drain_data.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/drain_data.h ('k') | mojo/edk/js/handle.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/edk/js/drain_data.h" 5 #include "mojo/edk/js/drain_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "gin/array_buffer.h" 10 #include "gin/array_buffer.h"
11 #include "gin/converter.h" 11 #include "gin/converter.h"
12 #include "gin/dictionary.h" 12 #include "gin/dictionary.h"
13 #include "gin/per_context_data.h" 13 #include "gin/per_context_data.h"
14 #include "gin/per_isolate_data.h" 14 #include "gin/per_isolate_data.h"
15 #include "mojo/public/cpp/environment/environment.h" 15 #include "mojo/public/cpp/environment/environment.h"
16 #include "mojo/public/cpp/system/core.h" 16 #include "mojo/public/cpp/system/core.h"
17 17
18 namespace mojo { 18 namespace mojo {
19 namespace edk { 19 namespace edk {
20 namespace js {
20 21
21 DrainData::DrainData(v8::Isolate* isolate, mojo::Handle handle) 22 DrainData::DrainData(v8::Isolate* isolate, mojo::Handle handle)
22 : isolate_(isolate), 23 : isolate_(isolate),
23 handle_(DataPipeConsumerHandle(handle.value())), 24 handle_(DataPipeConsumerHandle(handle.value())),
24 wait_id_(0) { 25 wait_id_(0) {
25 26
26 v8::Handle<v8::Context> context(isolate_->GetCurrentContext()); 27 v8::Handle<v8::Context> context(isolate_->GetCurrentContext());
27 runner_ = gin::PerContextData::From(context)->runner()->GetWeakPtr(); 28 runner_ = gin::PerContextData::From(context)->runner()->GetWeakPtr();
28 29
29 WaitForData(); 30 WaitForData();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 v8::Handle<v8::Value> settled_value(ConvertToV8(isolate_, dictionary)); 124 v8::Handle<v8::Value> settled_value(ConvertToV8(isolate_, dictionary));
124 125
125 if (result == MOJO_RESULT_FAILED_PRECONDITION) 126 if (result == MOJO_RESULT_FAILED_PRECONDITION)
126 resolver->Resolve(settled_value); 127 resolver->Resolve(settled_value);
127 else 128 else
128 resolver->Reject(settled_value); 129 resolver->Reject(settled_value);
129 130
130 delete this; 131 delete this;
131 } 132 }
132 133
134 } // namespace js
133 } // namespace edk 135 } // namespace edk
134 } // namespace mojo 136 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/js/drain_data.h ('k') | mojo/edk/js/handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698