| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 | 5 |
| 6 // This project demonstrates how to migrate a Windows desktop app to Native | 6 // This project demonstrates how to migrate a Windows desktop app to Native |
| 7 // Client, running first as a Win32 application (define STEP1), then as a PPAPI | 7 // Client, running first as a Win32 application (define STEP1), then as a PPAPI |
| 8 // plugin (define STEP2 through STEP6), and finally as a Native Client module. | 8 // plugin (define STEP2 through STEP6), and finally as a Native Client module. |
| 9 | 9 |
| 10 // Start with STEP1 defined and the defines for STEP2 through STEP6 commented | 10 // Start with STEP1 defined and the defines for STEP2 through STEP6 commented |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // *** RUN YOUR MODULE IN THE WILD *** | 58 // *** RUN YOUR MODULE IN THE WILD *** |
| 59 // You can run your nexe outside of Visual Studio, directly from Chrome by | 59 // You can run your nexe outside of Visual Studio, directly from Chrome by |
| 60 // following these steps: | 60 // following these steps: |
| 61 // - Build STEP6 and verify the file | 61 // - Build STEP6 and verify the file |
| 62 // <project directory>/NaCl64/newlib/Debug/hello_nacl_64.nexe exists | 62 // <project directory>/NaCl64/newlib/Debug/hello_nacl_64.nexe exists |
| 63 // - Copy the folder <project directory> into your NaCl SDK's example | 63 // - Copy the folder <project directory> into your NaCl SDK's example |
| 64 // directory. | 64 // directory. |
| 65 // - Go to the NaCl SDK directory and launch the httpd.py server. | 65 // - Go to the NaCl SDK directory and launch the httpd.py server. |
| 66 // - Launch Chrome, go to about:flags and enable the Native Client flag and | 66 // - Launch Chrome, go to about:flags and enable the Native Client flag and |
| 67 // relaunch Chrome | 67 // relaunch Chrome |
| 68 // - Point Chrome at localhost:5103/hello_nacl | 68 // - Point Chrome at http://localhost:5103/hello_nacl |
| 69 | 69 |
| 70 | 70 |
| 71 #ifdef STEP6 | 71 #ifdef STEP6 |
| 72 // remove Windows-dependent code. | 72 // remove Windows-dependent code. |
| 73 #undef STEP1 | 73 #undef STEP1 |
| 74 #undef STEP3 | 74 #undef STEP3 |
| 75 #undef STEP4 | 75 #undef STEP4 |
| 76 #define NULL 0 | 76 #define NULL 0 |
| 77 #else | 77 #else |
| 78 // includes for Windows APIs. | 78 // includes for Windows APIs. |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 if (PeekMessage(&uMsg, NULL, 0, 0, PM_REMOVE)) { | 396 if (PeekMessage(&uMsg, NULL, 0, 0, PM_REMOVE)) { |
| 397 TranslateMessage( &uMsg ); | 397 TranslateMessage( &uMsg ); |
| 398 DispatchMessage( &uMsg ); | 398 DispatchMessage( &uMsg ); |
| 399 } | 399 } |
| 400 } | 400 } |
| 401 return uMsg.wParam; | 401 return uMsg.wParam; |
| 402 #endif | 402 #endif |
| 403 | 403 |
| 404 } | 404 } |
| 405 #endif | 405 #endif |
| OLD | NEW |