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

Side by Side Diff: ppapi/proxy/ppb_instance_proxy.h

Issue 10170014: Move text input API to Instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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_PROXY_PPB_INSTANCE_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_INSTANCE_PROXY_H_
6 #define PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ 6 #define PPAPI_PROXY_PPB_INSTANCE_PROXY_H_
7 7
8 #include "ppapi/c/pp_instance.h" 8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/c/pp_resource.h" 9 #include "ppapi/c/pp_resource.h"
10 #include "ppapi/c/pp_time.h" 10 #include "ppapi/c/pp_time.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 double minimum_factor, 84 double minimum_factor,
85 double maximium_factor) OVERRIDE; 85 double maximium_factor) OVERRIDE;
86 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; 86 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE;
87 virtual PP_Bool SetCursor(PP_Instance instance, 87 virtual PP_Bool SetCursor(PP_Instance instance,
88 PP_MouseCursor_Type type, 88 PP_MouseCursor_Type type,
89 PP_Resource image, 89 PP_Resource image,
90 const PP_Point* hot_spot) OVERRIDE; 90 const PP_Point* hot_spot) OVERRIDE;
91 virtual int32_t LockMouse(PP_Instance instance, 91 virtual int32_t LockMouse(PP_Instance instance,
92 PP_CompletionCallback callback) OVERRIDE; 92 PP_CompletionCallback callback) OVERRIDE;
93 virtual void UnlockMouse(PP_Instance instance) OVERRIDE; 93 virtual void UnlockMouse(PP_Instance instance) OVERRIDE;
94 virtual void SetTextInputType(PP_Instance instance,
95 PP_TextInput_Type type) OVERRIDE;
96 virtual void UpdateCaretPosition(PP_Instance instance,
97 const PP_Rect& caret,
98 const PP_Rect& bounding_box) OVERRIDE;
99 virtual void CancelCompositionText(PP_Instance instance) OVERRIDE;
100 virtual void SelectionChanged(PP_Instance instance) OVERRIDE;
101 virtual void UpdateSurroundingText(PP_Instance instance,
102 const char* text,
103 uint32_t caret,
104 uint32_t anchor) OVERRIDE;
94 105
95 #if !defined(OS_NACL) 106 #if !defined(OS_NACL)
96 virtual PP_Var ResolveRelativeToDocument( 107 virtual PP_Var ResolveRelativeToDocument(
97 PP_Instance instance, 108 PP_Instance instance,
98 PP_Var relative, 109 PP_Var relative,
99 PP_URLComponents_Dev* components) OVERRIDE; 110 PP_URLComponents_Dev* components) OVERRIDE;
100 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; 111 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE;
101 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, 112 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance,
102 PP_Instance target) OVERRIDE; 113 PP_Instance target) OVERRIDE;
103 virtual PP_Var GetDocumentURL(PP_Instance instance, 114 virtual PP_Var GetDocumentURL(PP_Instance instance,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 void OnMsgHandleInputEventAck(PP_Instance instance, 154 void OnMsgHandleInputEventAck(PP_Instance instance,
144 PP_TimeTicks timestamp); 155 PP_TimeTicks timestamp);
145 void OnHostMsgPostMessage(PP_Instance instance, 156 void OnHostMsgPostMessage(PP_Instance instance,
146 SerializedVarReceiveInput message); 157 SerializedVarReceiveInput message);
147 void OnHostMsgLockMouse(PP_Instance instance); 158 void OnHostMsgLockMouse(PP_Instance instance);
148 void OnHostMsgUnlockMouse(PP_Instance instance); 159 void OnHostMsgUnlockMouse(PP_Instance instance);
149 void OnHostMsgSetCursor(PP_Instance instance, 160 void OnHostMsgSetCursor(PP_Instance instance,
150 int32_t type, 161 int32_t type,
151 const ppapi::HostResource& custom_image, 162 const ppapi::HostResource& custom_image,
152 const PP_Point& hot_spot); 163 const PP_Point& hot_spot);
164 void OnHostMsgSetTextInputType(PP_Instance instance, PP_TextInput_Type type);
165 void OnHostMsgUpdateCaretPosition(PP_Instance instance,
166 const PP_Rect& caret,
167 const PP_Rect& bounding_box);
168 void OnHostMsgCancelCompositionText(PP_Instance instance);
169 void OnHostMsgUpdateSurroundingText(
170 PP_Instance instance,
171 const std::string& text,
172 uint32_t caret,
173 uint32_t anchor);
153 #if !defined(OS_NACL) 174 #if !defined(OS_NACL)
154 void OnHostMsgResolveRelativeToDocument(PP_Instance instance, 175 void OnHostMsgResolveRelativeToDocument(PP_Instance instance,
155 SerializedVarReceiveInput relative, 176 SerializedVarReceiveInput relative,
156 SerializedVarReturnValue result); 177 SerializedVarReturnValue result);
157 void OnHostMsgDocumentCanRequest(PP_Instance instance, 178 void OnHostMsgDocumentCanRequest(PP_Instance instance,
158 SerializedVarReceiveInput url, 179 SerializedVarReceiveInput url,
159 PP_Bool* result); 180 PP_Bool* result);
160 void OnHostMsgDocumentCanAccessDocument(PP_Instance active, 181 void OnHostMsgDocumentCanAccessDocument(PP_Instance active,
161 PP_Instance target, 182 PP_Instance target,
162 PP_Bool* result); 183 PP_Bool* result);
163 void OnHostMsgGetDocumentURL(PP_Instance instance, 184 void OnHostMsgGetDocumentURL(PP_Instance instance,
164 SerializedVarReturnValue result); 185 SerializedVarReturnValue result);
165 void OnHostMsgGetPluginInstanceURL(PP_Instance instance, 186 void OnHostMsgGetPluginInstanceURL(PP_Instance instance,
166 SerializedVarReturnValue result); 187 SerializedVarReturnValue result);
167 #endif // !defined(OS_NACL) 188 #endif // !defined(OS_NACL)
168 189
169 // Host -> Plugin message handlers. 190 // Host -> Plugin message handlers.
170 void OnPluginMsgMouseLockComplete(PP_Instance instance, int32_t result); 191 void OnPluginMsgMouseLockComplete(PP_Instance instance, int32_t result);
171 192
172 void MouseLockCompleteInHost(int32_t result, PP_Instance instance); 193 void MouseLockCompleteInHost(int32_t result, PP_Instance instance);
173 194
174 pp::CompletionCallbackFactory<PPB_Instance_Proxy, 195 pp::CompletionCallbackFactory<PPB_Instance_Proxy,
175 ProxyNonThreadSafeRefCount> callback_factory_; 196 ProxyNonThreadSafeRefCount> callback_factory_;
176 }; 197 };
177 198
178 } // namespace proxy 199 } // namespace proxy
179 } // namespace ppapi 200 } // namespace ppapi
180 201
181 #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ 202 #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698