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

Side by Side Diff: ppapi/cpp/mouse_lock.h

Issue 9481015: Make the PPP wrappers take an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH DESCRIPTION Created 8 years, 10 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
« no previous file with comments | « ppapi/cpp/instance.cc ('k') | ppapi/cpp/mouse_lock.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef PPAPI_CPP_MOUSE_LOCK_H_ 5 #ifndef PPAPI_CPP_MOUSE_LOCK_H_
6 #define PPAPI_CPP_MOUSE_LOCK_H_ 6 #define PPAPI_CPP_MOUSE_LOCK_H_
7 7
8 #include "ppapi/c/pp_stdint.h" 8 #include "ppapi/c/pp_stdint.h"
9 #include "ppapi/cpp/instance_handle.h" 9 #include "ppapi/cpp/instance_handle.h"
10 10
11 /// @file 11 /// @file
12 /// This file defines the API for locking the target of mouse events to a 12 /// This file defines the API for locking the target of mouse events to a
13 /// specific module instance. 13 /// specific module instance.
14 14
15 namespace pp { 15 namespace pp {
16 16
17 class CompletionCallback; 17 class CompletionCallback;
18 class Instance;
18 19
19 /// This class allows you to associate the <code>PPP_MouseLock</code> and 20 /// This class allows you to associate the <code>PPP_MouseLock</code> and
20 /// <code>PPB_MouseLock</code> C-based interfaces with an object. It associates 21 /// <code>PPB_MouseLock</code> C-based interfaces with an object. It associates
21 /// itself with the given instance, and registers as the global handler for 22 /// itself with the given instance, and registers as the global handler for
22 /// handling the <code>PPP_MouseLock</code> interface that the browser calls. 23 /// handling the <code>PPP_MouseLock</code> interface that the browser calls.
23 /// 24 ///
24 /// You would typically use this class by inheritance on your instance or by 25 /// You would typically use this class by inheritance on your instance or by
25 /// composition. 26 /// composition.
26 /// 27 ///
27 /// <strong>Example (inheritance):</strong> 28 /// <strong>Example (inheritance):</strong>
(...skipping 17 matching lines...) Expand all
45 /// 46 ///
46 /// MyMouseLock mouse_lock_; 47 /// MyMouseLock mouse_lock_;
47 /// }; 48 /// };
48 /// </code> 49 /// </code>
49 class MouseLock { 50 class MouseLock {
50 public: 51 public:
51 /// A constructor for creating a <code>MouseLock</code>. 52 /// A constructor for creating a <code>MouseLock</code>.
52 /// 53 ///
53 /// @param[in] instance The instance with which this resource will be 54 /// @param[in] instance The instance with which this resource will be
54 /// associated. 55 /// associated.
55 explicit MouseLock(const InstanceHandle& instance); 56 explicit MouseLock(Instance* instance);
56 57
57 /// Destructor. 58 /// Destructor.
58 virtual ~MouseLock(); 59 virtual ~MouseLock();
59 60
60 /// PPP_MouseLock functions exposed as virtual functions for you to override. 61 /// PPP_MouseLock functions exposed as virtual functions for you to override.
61 virtual void MouseLockLost() = 0; 62 virtual void MouseLockLost() = 0;
62 63
63 /// LockMouse() requests the mouse to be locked. The browser will permit 64 /// LockMouse() requests the mouse to be locked. The browser will permit
64 /// mouse lock only while the tab is in fullscreen mode. 65 /// mouse lock only while the tab is in fullscreen mode.
65 /// 66 ///
(...skipping 23 matching lines...) Expand all
89 /// has lost the mouse lock. 90 /// has lost the mouse lock.
90 void UnlockMouse(); 91 void UnlockMouse();
91 92
92 private: 93 private:
93 InstanceHandle associated_instance_; 94 InstanceHandle associated_instance_;
94 }; 95 };
95 96
96 } // namespace pp 97 } // namespace pp
97 98
98 #endif // PPAPI_CPP_MOUSE_LOCK_H_ 99 #endif // PPAPI_CPP_MOUSE_LOCK_H_
OLDNEW
« no previous file with comments | « ppapi/cpp/instance.cc ('k') | ppapi/cpp/mouse_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698