| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 #endif // V8_SHARED | 116 #endif // V8_SHARED |
| 117 | 117 |
| 118 | 118 |
| 119 class LineEditor { | 119 class LineEditor { |
| 120 public: | 120 public: |
| 121 enum Type { DUMB = 0, READLINE = 1 }; | 121 enum Type { DUMB = 0, READLINE = 1 }; |
| 122 LineEditor(Type type, const char* name); | 122 LineEditor(Type type, const char* name); |
| 123 virtual ~LineEditor() { } | 123 virtual ~LineEditor() { } |
| 124 | 124 |
| 125 virtual Handle<String> Prompt(const char* prompt) = 0; | 125 virtual Handle<String> Prompt(const char* prompt) = 0; |
| 126 virtual bool Open() { return true; } | 126 virtual bool Open(Isolate* isolate) { return true; } |
| 127 virtual bool Close() { return true; } | 127 virtual bool Close() { return true; } |
| 128 virtual void AddHistory(const char* str) { } | 128 virtual void AddHistory(const char* str) { } |
| 129 | 129 |
| 130 const char* name() { return name_; } | 130 const char* name() { return name_; } |
| 131 static LineEditor* Get() { return current_; } | 131 static LineEditor* Get() { return current_; } |
| 132 private: | 132 private: |
| 133 Type type_; | 133 Type type_; |
| 134 const char* name_; | 134 const char* name_; |
| 135 static LineEditor* current_; | 135 static LineEditor* current_; |
| 136 }; | 136 }; |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 static void ExternalArrayWeakCallback(Isolate* isolate, | 406 static void ExternalArrayWeakCallback(Isolate* isolate, |
| 407 Persistent<Value> object, | 407 Persistent<Value> object, |
| 408 void* data); | 408 void* data); |
| 409 }; | 409 }; |
| 410 | 410 |
| 411 | 411 |
| 412 } // namespace v8 | 412 } // namespace v8 |
| 413 | 413 |
| 414 | 414 |
| 415 #endif // V8_D8_H_ | 415 #endif // V8_D8_H_ |
| OLD | NEW |