| OLD | NEW |
| (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_completion_callback.h" |
| 9 #include "ppapi/c/pp_bool.h" |
| 10 #include "ppapi/c/pp_instance.h" |
| 11 #include "ppapi/c/pp_point.h" |
| 12 #include "ppapi/c/pp_resource.h" |
| 13 #include "ppapi/proxy/interface_proxy.h" |
| 14 #include "ppapi/shared_impl/function_group_base.h" |
| 15 #include "ppapi/shared_impl/host_resource.h" |
| 16 #include "ppapi/thunk/ppb_text_input_api.h" |
| 17 |
| 18 struct PPB_TextInput_Dev; |
| 19 |
| 20 namespace ppapi { |
| 21 namespace proxy { |
| 22 |
| 23 class PPB_TextInput_Proxy |
| 24 : public ppapi::FunctionGroupBase, |
| 25 public ppapi::thunk::PPB_TextInput_FunctionAPI, |
| 26 public InterfaceProxy { |
| 27 public: |
| 28 PPB_TextInput_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 29 virtual ~PPB_TextInput_Proxy(); |
| 30 |
| 31 static const Info* GetInfo(); |
| 32 |
| 33 // FunctionGroupBase overrides. |
| 34 ppapi::thunk::PPB_TextInput_FunctionAPI* AsPPB_TextInput_FunctionAPI() |
| 35 OVERRIDE; |
| 36 |
| 37 // PPB_TextInput_FunctionAPI implementation. |
| 38 virtual void SetTextInputType(PP_Instance instance, |
| 39 PP_TextInput_Type type) OVERRIDE; |
| 40 virtual void UpdateCaretPosition(PP_Instance instance, |
| 41 const PP_Rect& caret, |
| 42 const PP_Rect& boundingBox) OVERRIDE; |
| 43 virtual void ConfirmCompositionText(PP_Instance instance) OVERRIDE; |
| 44 virtual void CancelCompositionText(PP_Instance instance) OVERRIDE; |
| 45 |
| 46 // InterfaceProxy implementation. |
| 47 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 48 |
| 49 private: |
| 50 // Message handlers. |
| 51 void OnMsgSetTextInputType(PP_Instance instance, PP_TextInput_Type type); |
| 52 void OnMsgUpdateCaretPosition(PP_Instance instance, |
| 53 PP_Rect caret, |
| 54 PP_Rect boundingBox); |
| 55 void OnMsgConfirmCompositionText(PP_Instance instance); |
| 56 void OnMsgCancelCompositionText(PP_Instance instance); |
| 57 }; |
| 58 |
| 59 } // namespace proxy |
| 60 } // namespace ppapi |
| 61 |
| 62 #endif // PPAPI_PPB_TEXT_INPUT_PROXY_H_ |
| OLD | NEW |