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

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

Issue 7978019: Additional update on Pepper IME API and boilerplate thunk/proxy implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated in response to yzshen's comments. Especially msgs made async. 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
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_PPB_TEXT_INPUT_PROXY_H_
6 #define PPAPI_PPB_TEXT_INPUT_PROXY_H_
7
8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/c/pp_rect.h"
10 #include "ppapi/proxy/interface_proxy.h"
11 #include "ppapi/thunk/ppb_text_input_api.h"
12
13 struct PPB_TextInput_Dev;
14
15 namespace ppapi {
16 namespace proxy {
17
18 class PPB_TextInput_Proxy
19 : public InterfaceProxy,
20 public ppapi::thunk::PPB_TextInput_FunctionAPI {
21 public:
22 PPB_TextInput_Proxy(Dispatcher* dispatcher);
23 virtual ~PPB_TextInput_Proxy();
24
25 // FunctionGroupBase overrides.
26 ppapi::thunk::PPB_TextInput_FunctionAPI* AsPPB_TextInput_FunctionAPI()
27 OVERRIDE;
28
29 // PPB_TextInput_FunctionAPI implementation.
30 virtual void SetTextInputType(PP_Instance instance,
31 PP_TextInput_Type type) OVERRIDE;
32 virtual void UpdateCaretPosition(PP_Instance instance,
33 const PP_Rect& caret,
34 const PP_Rect& bounding_box) OVERRIDE;
35 virtual void ConfirmCompositionText(PP_Instance instance) OVERRIDE;
36 virtual void CancelCompositionText(PP_Instance instance) OVERRIDE;
37
38 // InterfaceProxy implementation.
39 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
40
41 static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_TEXT_INPUT;
42
43 private:
44 // Message handlers.
45 void OnMsgSetTextInputType(PP_Instance instance, PP_TextInput_Type type);
46 void OnMsgUpdateCaretPosition(PP_Instance instance,
47 PP_Rect caret,
48 PP_Rect bounding_box);
49 void OnMsgConfirmCompositionText(PP_Instance instance);
50 void OnMsgCancelCompositionText(PP_Instance instance);
51
52 DISALLOW_COPY_AND_ASSIGN(PPB_TextInput_Proxy);
53 };
54
55 } // namespace proxy
56 } // namespace ppapi
57
58 #endif // PPAPI_PPB_TEXT_INPUT_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698