| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 PPAPI_SIMPLE_PS_INSTANCE_H_ | 5 #ifndef PPAPI_SIMPLE_PS_INSTANCE_H_ |
| 6 #define PPAPI_SIMPLE_PS_INSTANCE_H_ | 6 #define PPAPI_SIMPLE_PS_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <stdarg.h> | 8 #include <stdarg.h> |
| 9 | 9 |
| 10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 // Called by Init to processes default and embed tag arguments prior to | 148 // Called by Init to processes default and embed tag arguments prior to |
| 149 // launching the 'ppapi_main' thread. | 149 // launching the 'ppapi_main' thread. |
| 150 virtual bool ProcessProperties(); | 150 virtual bool ProcessProperties(); |
| 151 | 151 |
| 152 private: | 152 private: |
| 153 static void* MainThreadThunk(void *start_info); | 153 static void* MainThreadThunk(void *start_info); |
| 154 ssize_t TtyOutputHandler(const char* buf, size_t count); | 154 ssize_t TtyOutputHandler(const char* buf, size_t count); |
| 155 void MessageHandlerInput(const pp::Var& message); | 155 void MessageHandlerInput(const pp::Var& message); |
| 156 void MessageHandlerResize(const pp::Var& message); | 156 void MessageHandlerResize(const pp::Var& message); |
| 157 void HandleResize(int width, int height); |
| 157 | 158 |
| 158 static ssize_t TtyOutputHandlerStatic(const char* buf, size_t count, | 159 static ssize_t TtyOutputHandlerStatic(const char* buf, size_t count, |
| 159 void* user_data); | 160 void* user_data); |
| 160 | 161 |
| 161 /// Handle input message from JavaScript. The value is | 162 /// Handle input message from JavaScript. The value is |
| 162 /// expected to be of type string. | 163 /// expected to be of type string. |
| 163 static void MessageHandlerInputStatic(const pp::Var& key, | 164 static void MessageHandlerInputStatic(const pp::Var& key, |
| 164 const pp::Var& value, | 165 const pp::Var& value, |
| 165 void* user_data); | 166 void* user_data); |
| 166 | 167 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 189 char* exit_message_; | 190 char* exit_message_; |
| 190 | 191 |
| 191 PSMainFunc_t main_cb_; | 192 PSMainFunc_t main_cb_; |
| 192 | 193 |
| 193 const PPB_Core* ppb_core_; | 194 const PPB_Core* ppb_core_; |
| 194 const PPB_Var* ppb_var_; | 195 const PPB_Var* ppb_var_; |
| 195 const PPB_View* ppb_view_; | 196 const PPB_View* ppb_view_; |
| 196 }; | 197 }; |
| 197 | 198 |
| 198 #endif // PPAPI_MAIN_PS_INSTANCE_H_ | 199 #endif // PPAPI_MAIN_PS_INSTANCE_H_ |
| OLD | NEW |