| OLD | NEW |
| 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 #ifndef LIBRARIES_NACL_IO_DEVFS_JSPIPE_NODE_H_ | 5 #ifndef LIBRARIES_NACL_IO_DEVFS_JSPIPE_NODE_H_ |
| 6 #define LIBRARIES_NACL_IO_DEVFS_JSPIPE_NODE_H_ | 6 #define LIBRARIES_NACL_IO_DEVFS_JSPIPE_NODE_H_ |
| 7 | 7 |
| 8 #include <ppapi/c/pp_var.h> | 8 #include <ppapi/c/pp_var.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "nacl_io/devfs/jspipe_event_emitter.h" | 11 #include "nacl_io/devfs/jspipe_event_emitter.h" |
| 12 #include "nacl_io/stream/stream_node.h" | 12 #include "nacl_io/stream/stream_node.h" |
| 13 | 13 |
| 14 namespace nacl_io { | 14 namespace nacl_io { |
| 15 | 15 |
| 16 class MessagingInterface; | |
| 17 class VarInterface; | |
| 18 class VarArrayInterface; | |
| 19 class VarArrayBufferInterface; | |
| 20 class VarDictionaryInterface; | |
| 21 | |
| 22 /** | 16 /** |
| 23 * JSPipeNode represents a two-way channel for communicating with JavaScript | 17 * JSPipeNode represents a two-way channel for communicating with JavaScript |
| 24 * via calls to PostMessage. In order to use these some amount of logic on | 18 * via calls to PostMessage. In order to use these some amount of logic on |
| 25 * the JavaScript side is also required. The protocol to the communication | 19 * the JavaScript side is also required. The protocol to the communication |
| 26 * looks the same in both directions and consists of two message types: | 20 * looks the same in both directions and consists of two message types: |
| 27 * 'write' and 'ack'. | 21 * 'write' and 'ack'. |
| 28 * The messages are formated as JavaScript dictionary objects and take the | 22 * The messages are formated as JavaScript dictionary objects and take the |
| 29 * following form: | 23 * following form: |
| 30 * { | 24 * { |
| 31 * pipe: <pipe_name>, | 25 * pipe: <pipe_name>, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 57 |
| 64 protected: | 58 protected: |
| 65 Error SendAck(); | 59 Error SendAck(); |
| 66 | 60 |
| 67 ScopedJSPipeEventEmitter pipe_; | 61 ScopedJSPipeEventEmitter pipe_; |
| 68 }; | 62 }; |
| 69 | 63 |
| 70 } // namespace nacl_io | 64 } // namespace nacl_io |
| 71 | 65 |
| 72 #endif // LIBRARIES_NACL_IO_DEVFS_JSPIPE_NODE_H_ | 66 #endif // LIBRARIES_NACL_IO_DEVFS_JSPIPE_NODE_H_ |
| OLD | NEW |