OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include <cmath> | 5 #include <cmath> |
6 #include <stdarg.h> | 6 #include <stdarg.h> |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "ppapi/c/dev/ppb_console_dev.h" | 9 #include "ppapi/c/dev/ppb_console_dev.h" |
10 #include "ppapi/c/ppb_input_event.h" | 10 #include "ppapi/c/ppb_input_event.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 if (mouse_locked_) { | 102 if (mouse_locked_) { |
103 mouse_locked_ = false; | 103 mouse_locked_ = false; |
104 Paint(); | 104 Paint(); |
105 } else { | 105 } else { |
106 PP_NOTREACHED(); | 106 PP_NOTREACHED(); |
107 } | 107 } |
108 } | 108 } |
109 | 109 |
110 private: | 110 private: |
111 void DidLockMouse(int32_t result) { | 111 void DidLockMouse(int32_t result) { |
| 112 fprintf(stderr, "DidLockMouse(result= %d) mouse_locked_==%d\n", result, resu
lt == PP_OK); |
112 mouse_locked_ = result == PP_OK; | 113 mouse_locked_ = result == PP_OK; |
113 mouse_movement_.set_x(0); | 114 mouse_movement_.set_x(0); |
114 mouse_movement_.set_y(0); | 115 mouse_movement_.set_y(0); |
115 Paint(); | 116 Paint(); |
116 } | 117 } |
117 | 118 |
118 void DidFlush(int32_t result) { | 119 void DidFlush(int32_t result) { |
119 waiting_for_flush_completion_ = false; | 120 waiting_for_flush_completion_ = false; |
120 if (pending_paint_) { | 121 if (pending_paint_) { |
121 pending_paint_ = false; | 122 pending_paint_ = false; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 265 |
265 namespace pp { | 266 namespace pp { |
266 | 267 |
267 // Factory function for your specialization of the Module object. | 268 // Factory function for your specialization of the Module object. |
268 Module* CreateModule() { | 269 Module* CreateModule() { |
269 return new MyModule(); | 270 return new MyModule(); |
270 } | 271 } |
271 | 272 |
272 } // namespace pp | 273 } // namespace pp |
273 | 274 |
OLD | NEW |