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

Side by Side Diff: ppapi/cpp/dev/mouse_lock_dev.h

Issue 8295023: Move PPB/PPP_MouseLock out of dev/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and resolve conflicts. Created 9 years, 2 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/c/ppp_mouse_lock.h ('k') | ppapi/cpp/dev/mouse_lock_dev.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_CPP_DEV_MOUSE_LOCK_DEV_H_
6 #define PPAPI_CPP_DEV_MOUSE_LOCK_DEV_H_
7
8 #include "ppapi/c/pp_stdint.h"
9
10 namespace pp {
11
12 class CompletionCallback;
13 class Instance;
14
15 // This class allows you to associate the PPP_MouseLock_Dev and
16 // PPB_MouseLock_Dev C-based interfaces with an object. It associates itself
17 // with the given instance, and registers as the global handler for handling the
18 // PPP_MouseLock_Dev interface that the browser calls.
19 //
20 // You would typically use this either via inheritance on your instance:
21 // class MyInstance : public pp::Instance, public pp::MouseLock_Dev {
22 // class MyInstance() : pp::MouseLock_Dev(this) {
23 // }
24 // ...
25 // };
26 //
27 // or by composition:
28 // class MyMouseLock : public pp::MouseLock_Dev {
29 // ...
30 // };
31 //
32 // class MyInstance : public pp::Instance {
33 // MyInstance() : mouse_lock_(this) {
34 // }
35 //
36 // MyMouseLock mouse_lock_;
37 // };
38 class MouseLock_Dev {
39 public:
40 explicit MouseLock_Dev(Instance* instance);
41 virtual ~MouseLock_Dev();
42
43 // PPP_MouseLock_Dev functions exposed as virtual functions for you to
44 // override.
45 virtual void MouseLockLost() = 0;
46
47 // PPB_MouseLock_Dev functions for you to call.
48 int32_t LockMouse(const CompletionCallback& cc);
49 void UnlockMouse();
50
51 private:
52 Instance* associated_instance_;
53 };
54
55 } // namespace pp
56
57 #endif // PPAPI_CPP_DEV_MOUSE_LOCK_DEV_H_
OLDNEW
« no previous file with comments | « ppapi/c/ppp_mouse_lock.h ('k') | ppapi/cpp/dev/mouse_lock_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698