Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: native_client_sdk/src/examples/api/mouse_lock/mouse_lock.h

Issue 14607005: [NaCl SDK] Cleanup examples. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
12 #include "ppapi/cpp/graphics_2d.h" 11 #include "ppapi/cpp/graphics_2d.h"
13 #include "ppapi/cpp/image_data.h" 12 #include "ppapi/cpp/image_data.h"
14 #include "ppapi/cpp/input_event.h" 13 #include "ppapi/cpp/input_event.h"
15 #include "ppapi/cpp/instance.h" 14 #include "ppapi/cpp/instance.h"
16 #include "ppapi/cpp/module.h" 15 #include "ppapi/cpp/module.h"
16 #include "ppapi/cpp/mouse_lock.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 22 #ifdef _MSC_VER
23 // Allow 'this' in initializer list 23 // Allow 'this' in initializer list
24 #pragma warning(disable : 4355) 24 #pragma warning(disable : 4355)
25 #endif 25 #endif
26 26
27 namespace mouselock {
28
29 class MouseLockInstance : public pp::Instance, public pp::MouseLock { 27 class MouseLockInstance : public pp::Instance, public pp::MouseLock {
30 public: 28 public:
31 explicit MouseLockInstance(PP_Instance instance) 29 explicit MouseLockInstance(PP_Instance instance)
32 : pp::Instance(instance), 30 : pp::Instance(instance),
33 pp::MouseLock(this), 31 pp::MouseLock(this),
34 mouse_locked_(false), 32 mouse_locked_(false),
35 waiting_for_flush_completion_(false), 33 waiting_for_flush_completion_(false),
36 callback_factory_(this), 34 callback_factory_(this),
37 fullscreen_(this), 35 fullscreen_(this),
38 is_context_bound_(false), 36 is_context_bound_(false),
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 pp::Point mouse_movement_; 93 pp::Point mouse_movement_;
96 bool waiting_for_flush_completion_; 94 bool waiting_for_flush_completion_;
97 pp::CompletionCallbackFactory<MouseLockInstance> callback_factory_; 95 pp::CompletionCallbackFactory<MouseLockInstance> callback_factory_;
98 96
99 pp::Fullscreen fullscreen_; 97 pp::Fullscreen fullscreen_;
100 pp::Graphics2D device_context_; 98 pp::Graphics2D device_context_;
101 bool is_context_bound_; 99 bool is_context_bound_;
102 bool was_fullscreen_; 100 bool was_fullscreen_;
103 uint32_t* background_scanline_; 101 uint32_t* background_scanline_;
104 }; 102 };
105
106 } // namespace mouselock
OLDNEW
« no previous file with comments | « native_client_sdk/src/examples/api/mouse_lock/example.dsc ('k') | native_client_sdk/src/examples/api/mouse_lock/mouse_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698