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

Side by Side Diff: gin/arguments.h

Issue 62333018: Implement Asynchronous Module Definition API for Mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar testing Created 7 years, 1 month 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 | « no previous file | gin/arguments.cc » ('j') | gin/modules/module_registry.h » ('J')
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 #ifndef GIN_ARGUMENTS_H_ 5 #ifndef GIN_ARGUMENTS_H_
6 #define GIN_ARGUMENTS_H_ 6 #define GIN_ARGUMENTS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "gin/converter.h" 9 #include "gin/converter.h"
10 10
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 v8::Handle<v8::Value> val = info_[next_++]; 29 v8::Handle<v8::Value> val = info_[next_++];
30 return ConvertFromV8(val, out); 30 return ConvertFromV8(val, out);
31 } 31 }
32 32
33 template<typename T> 33 template<typename T>
34 void Return(T val) { 34 void Return(T val) {
35 info_.GetReturnValue().Set(ConvertToV8(isolate_, val)); 35 info_.GetReturnValue().Set(ConvertToV8(isolate_, val));
36 } 36 }
37 37
38 v8::Handle<v8::Value> PeekNext();
39
38 void ThrowError(); 40 void ThrowError();
39 void ThrowTypeError(const std::string& message); 41 void ThrowTypeError(const std::string& message);
40 42
41 v8::Isolate* isolate() const { return isolate_; } 43 v8::Isolate* isolate() const { return isolate_; }
42 44
43 private: 45 private:
44 v8::Isolate* isolate_; 46 v8::Isolate* isolate_;
45 const v8::FunctionCallbackInfo<v8::Value>& info_; 47 const v8::FunctionCallbackInfo<v8::Value>& info_;
46 int next_; 48 int next_;
47 bool insufficient_arguments_; 49 bool insufficient_arguments_;
48 50
49 DISALLOW_COPY_AND_ASSIGN(Arguments); 51 DISALLOW_COPY_AND_ASSIGN(Arguments);
50 }; 52 };
51 53
52 } // namespace gin 54 } // namespace gin
53 55
54 #endif // GIN_ARGUMENTS_H_ 56 #endif // GIN_ARGUMENTS_H_
OLDNEW
« no previous file with comments | « no previous file | gin/arguments.cc » ('j') | gin/modules/module_registry.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698