Chromium Code Reviews| 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 the browser when the 3D context is lost. | 148 // Called by the browser when the 3D context is lost. |
| 149 virtual void Graphics3DContextLost(); | 149 virtual void Graphics3DContextLost(); |
| 150 | 150 |
| 151 // Called by the browser when the mouselock is lost. | 151 // Called by the browser when the mouselock is lost. |
| 152 virtual void MouseLockLost(); | 152 virtual void MouseLockLost(); |
| 153 | 153 |
| 154 // Called by Init to processes default and embed tag arguments prior to | 154 // Called by Init to processes default and embed tag arguments prior to |
| 155 // launching the 'ppapi_main' thread. | 155 // launching the 'ppapi_main' thread. |
| 156 virtual bool ProcessProperties(); | 156 virtual bool ProcessProperties(); |
| 157 | |
| 157 private: | 158 private: |
| 158 static void* MainThreadThunk(void *start_info); | 159 static void* MainThreadThunk(void *start_info); |
| 159 ssize_t TtyOutputHandler(const char* buf, size_t count); | 160 ssize_t TtyOutputHandler(const char* buf, size_t count); |
| 160 void MessageHandlerExit(const pp::Var& message); | 161 void MessageHandlerExit(const pp::Var& message); |
| 161 void MessageHandlerInput(const pp::Var& message); | 162 void MessageHandlerInput(const pp::Var& target, const pp::Var& message); |
|
binji
2014/05/01 20:22:31
"target" is called "key" in the definition below
Sam Clegg
2014/05/01 22:16:55
Done.
| |
| 162 void MessageHandlerResize(const pp::Var& message); | 163 void MessageHandlerResize(const pp::Var& message); |
| 163 void HandleResize(int width, int height); | 164 void HandleResize(int width, int height); |
| 164 | 165 |
| 165 static void HandleExitStatic(int status, void* user_data); | 166 static void HandleExitStatic(int status, void* user_data); |
| 166 | 167 |
| 167 static ssize_t TtyOutputHandlerStatic(const char* buf, size_t count, | 168 static ssize_t TtyOutputHandlerStatic(const char* buf, size_t count, |
| 168 void* user_data); | 169 void* user_data); |
| 169 | 170 |
| 170 /// Handle exit confirmation message from JavaScript. | 171 /// Handle exit confirmation message from JavaScript. |
| 171 static void MessageHandlerExitStatic(const pp::Var& key, | 172 static void MessageHandlerExitStatic(const pp::Var& key, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 // JavaScript. | 209 // JavaScript. |
| 209 pthread_cond_t exit_cond_; | 210 pthread_cond_t exit_cond_; |
| 210 pthread_mutex_t exit_lock_; | 211 pthread_mutex_t exit_lock_; |
| 211 | 212 |
| 212 // A message to Post to JavaScript instead of exiting, or NULL if exit() | 213 // A message to Post to JavaScript instead of exiting, or NULL if exit() |
| 213 // should be called instead. | 214 // should be called instead. |
| 214 char* exit_message_; | 215 char* exit_message_; |
| 215 }; | 216 }; |
| 216 | 217 |
| 217 #endif // PPAPI_MAIN_PS_INSTANCE_H_ | 218 #endif // PPAPI_MAIN_PS_INSTANCE_H_ |
| OLD | NEW |