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 #include <cmath> | 5 #include <cmath> |
6 | 6 |
7 #include "ppapi/c/ppb_fullscreen.h" | 7 #include "ppapi/c/ppb_fullscreen.h" |
8 #include "ppapi/c/ppb_input_event.h" | 8 #include "ppapi/c/ppb_input_event.h" |
9 #include "ppapi/cpp/completion_callback.h" | 9 #include "ppapi/cpp/completion_callback.h" |
10 #include "ppapi/cpp/fullscreen.h" | 10 #include "ppapi/cpp/fullscreen.h" |
11 #include "ppapi/cpp/mouse_lock.h" | 11 #include "ppapi/cpp/mouse_lock.h" |
12 #include "ppapi/cpp/graphics_2d.h" | 12 #include "ppapi/cpp/graphics_2d.h" |
13 #include "ppapi/cpp/image_data.h" | 13 #include "ppapi/cpp/image_data.h" |
14 #include "ppapi/cpp/input_event.h" | 14 #include "ppapi/cpp/input_event.h" |
15 #include "ppapi/cpp/instance.h" | 15 #include "ppapi/cpp/instance.h" |
16 #include "ppapi/cpp/module.h" | 16 #include "ppapi/cpp/module.h" |
17 #include "ppapi/cpp/rect.h" | 17 #include "ppapi/cpp/rect.h" |
18 #include "ppapi/cpp/size.h" | 18 #include "ppapi/cpp/size.h" |
19 #include "ppapi/cpp/var.h" | 19 #include "ppapi/cpp/var.h" |
20 #include "ppapi/utility/completion_callback_factory.h" | 20 #include "ppapi/utility/completion_callback_factory.h" |
21 | 21 |
| 22 #ifdef _MSC_VER |
| 23 // Allow 'this' in initializer list |
| 24 #pragma warning(disable : 4355) |
| 25 #endif |
| 26 |
22 namespace mouselock { | 27 namespace mouselock { |
23 | 28 |
24 class MouseLockInstance : public pp::Instance, public pp::MouseLock { | 29 class MouseLockInstance : public pp::Instance, public pp::MouseLock { |
25 public: | 30 public: |
26 explicit MouseLockInstance(PP_Instance instance) | 31 explicit MouseLockInstance(PP_Instance instance) |
27 : pp::Instance(instance), | 32 : pp::Instance(instance), |
28 pp::MouseLock(this), | 33 pp::MouseLock(this), |
29 mouse_locked_(false), | 34 mouse_locked_(false), |
30 waiting_for_flush_completion_(false), | 35 waiting_for_flush_completion_(false), |
31 callback_factory_(this), | 36 callback_factory_(this), |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 bool waiting_for_flush_completion_; | 97 bool waiting_for_flush_completion_; |
93 pp::CompletionCallbackFactory<MouseLockInstance> callback_factory_; | 98 pp::CompletionCallbackFactory<MouseLockInstance> callback_factory_; |
94 | 99 |
95 pp::Fullscreen fullscreen_; | 100 pp::Fullscreen fullscreen_; |
96 pp::Graphics2D device_context_; | 101 pp::Graphics2D device_context_; |
97 bool is_context_bound_; | 102 bool is_context_bound_; |
98 uint32_t* background_scanline_; | 103 uint32_t* background_scanline_; |
99 }; | 104 }; |
100 | 105 |
101 } // namespace mouselock | 106 } // namespace mouselock |
OLD | NEW |