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

Side by Side Diff: ppapi/thunk/ppb_instance_api.h

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try again Created 8 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 #ifndef PPAPI_THUNK_INSTANCE_API_H_ 5 #ifndef PPAPI_THUNK_INSTANCE_API_H_
6 #define PPAPI_THUNK_INSTANCE_API_H_ 6 #define PPAPI_THUNK_INSTANCE_API_H_
7 7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
8 #include "ppapi/c/dev/ppb_console_dev.h" 10 #include "ppapi/c/dev/ppb_console_dev.h"
9 #include "ppapi/c/dev/ppb_text_input_dev.h" 11 #include "ppapi/c/dev/ppb_text_input_dev.h"
10 #include "ppapi/c/dev/ppb_url_util_dev.h" 12 #include "ppapi/c/dev/ppb_url_util_dev.h"
11 #include "ppapi/c/pp_bool.h" 13 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_completion_callback.h" 14 #include "ppapi/c/pp_completion_callback.h"
13 #include "ppapi/c/pp_size.h" 15 #include "ppapi/c/pp_size.h"
14 #include "ppapi/c/pp_time.h" 16 #include "ppapi/c/pp_time.h"
15 #include "ppapi/c/ppb_audio_config.h" 17 #include "ppapi/c/ppb_audio_config.h"
16 #include "ppapi/c/ppb_gamepad.h" 18 #include "ppapi/c/ppb_gamepad.h"
17 #include "ppapi/c/ppb_instance.h" 19 #include "ppapi/c/ppb_instance.h"
18 #include "ppapi/c/ppb_mouse_cursor.h" 20 #include "ppapi/c/ppb_mouse_cursor.h"
19 #include "ppapi/c/private/ppb_instance_private.h" 21 #include "ppapi/c/private/ppb_instance_private.h"
20 #include "ppapi/shared_impl/api_id.h" 22 #include "ppapi/shared_impl/api_id.h"
21 23
22 // Windows headers interfere with this file. 24 // Windows headers interfere with this file.
23 #ifdef PostMessage 25 #ifdef PostMessage
24 #undef PostMessage 26 #undef PostMessage
25 #endif 27 #endif
26 28
27 namespace ppapi { 29 namespace ppapi {
28 30
31 class TrackedCallback;
29 struct ViewData; 32 struct ViewData;
30 33
31 namespace thunk { 34 namespace thunk {
32 35
33 class PPB_Flash_API; 36 class PPB_Flash_API;
34 37
35 class PPB_Instance_API { 38 class PPB_Instance_API {
36 public: 39 public:
37 virtual ~PPB_Instance_API() {} 40 virtual ~PPB_Instance_API() {}
38 41
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 virtual void PostMessage(PP_Instance instance, PP_Var message) = 0; 104 virtual void PostMessage(PP_Instance instance, PP_Var message) = 0;
102 105
103 // Mouse cursor. 106 // Mouse cursor.
104 virtual PP_Bool SetCursor(PP_Instance instance, 107 virtual PP_Bool SetCursor(PP_Instance instance,
105 PP_MouseCursor_Type type, 108 PP_MouseCursor_Type type,
106 PP_Resource image, 109 PP_Resource image,
107 const PP_Point* hot_spot) = 0; 110 const PP_Point* hot_spot) = 0;
108 111
109 // MouseLock. 112 // MouseLock.
110 virtual int32_t LockMouse(PP_Instance instance, 113 virtual int32_t LockMouse(PP_Instance instance,
111 PP_CompletionCallback callback) = 0; 114 scoped_refptr<TrackedCallback> callback) = 0;
112 virtual void UnlockMouse(PP_Instance instance) = 0; 115 virtual void UnlockMouse(PP_Instance instance) = 0;
113 116
114 // TextInput. 117 // TextInput.
115 virtual void SetTextInputType(PP_Instance instance, 118 virtual void SetTextInputType(PP_Instance instance,
116 PP_TextInput_Type type) = 0; 119 PP_TextInput_Type type) = 0;
117 virtual void UpdateCaretPosition(PP_Instance instance, 120 virtual void UpdateCaretPosition(PP_Instance instance,
118 const PP_Rect& caret, 121 const PP_Rect& caret,
119 const PP_Rect& bounding_box) = 0; 122 const PP_Rect& bounding_box) = 0;
120 virtual void CancelCompositionText(PP_Instance instance) = 0; 123 virtual void CancelCompositionText(PP_Instance instance) = 0;
121 virtual void SelectionChanged(PP_Instance instance) = 0; 124 virtual void SelectionChanged(PP_Instance instance) = 0;
(...skipping 22 matching lines...) Expand all
144 PP_URLComponents_Dev* components) = 0; 147 PP_URLComponents_Dev* components) = 0;
145 #endif // !defined(OS_NACL) 148 #endif // !defined(OS_NACL)
146 149
147 static const ApiID kApiID = API_ID_PPB_INSTANCE; 150 static const ApiID kApiID = API_ID_PPB_INSTANCE;
148 }; 151 };
149 152
150 } // namespace thunk 153 } // namespace thunk
151 } // namespace ppapi 154 } // namespace ppapi
152 155
153 #endif // PPAPI_THUNK_INSTANCE_API_H_ 156 #endif // PPAPI_THUNK_INSTANCE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698