| OLD | NEW |
| 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 #include "gin/gin_export.h" | 10 #include "gin/gin_export.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 info_->GetReturnValue().Set(ConvertToV8(isolate_, val)); | 72 info_->GetReturnValue().Set(ConvertToV8(isolate_, val)); |
| 73 } | 73 } |
| 74 | 74 |
| 75 v8::Handle<v8::Value> PeekNext() const; | 75 v8::Handle<v8::Value> PeekNext() const; |
| 76 | 76 |
| 77 void ThrowError() const; | 77 void ThrowError() const; |
| 78 void ThrowTypeError(const std::string& message) const; | 78 void ThrowTypeError(const std::string& message) const; |
| 79 | 79 |
| 80 v8::Isolate* isolate() const { return isolate_; } | 80 v8::Isolate* isolate() const { return isolate_; } |
| 81 | 81 |
| 82 // Allows the function handler to distinguish between normal invocation |
| 83 // and object construction. |
| 84 bool IsConstructCall() const; |
| 85 |
| 82 private: | 86 private: |
| 83 v8::Isolate* isolate_; | 87 v8::Isolate* isolate_; |
| 84 const v8::FunctionCallbackInfo<v8::Value>* info_; | 88 const v8::FunctionCallbackInfo<v8::Value>* info_; |
| 85 int next_; | 89 int next_; |
| 86 bool insufficient_arguments_; | 90 bool insufficient_arguments_; |
| 87 }; | 91 }; |
| 88 | 92 |
| 89 } // namespace gin | 93 } // namespace gin |
| 90 | 94 |
| 91 #endif // GIN_ARGUMENTS_H_ | 95 #endif // GIN_ARGUMENTS_H_ |
| OLD | NEW |