| 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_IME_CONTROL_PROXY_H_ |
| 6 #define PPAPI_PPB_IME_CONTROL_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_ime_control_api.h" |
| 17 |
| 18 struct PPB_IMEControl_Dev; |
| 19 |
| 20 namespace ppapi { |
| 21 namespace proxy { |
| 22 |
| 23 class PPB_IMEControl_Proxy |
| 24 : public ppapi::FunctionGroupBase, |
| 25 public ppapi::thunk::PPB_IMEControl_FunctionAPI, |
| 26 public InterfaceProxy { |
| 27 public: |
| 28 PPB_IMEControl_Proxy(Dispatcher* dispatcher, const void* target_interface); |
| 29 virtual ~PPB_IMEControl_Proxy(); |
| 30 |
| 31 static const Info* GetInfo(); |
| 32 |
| 33 // FunctionGroupBase overrides. |
| 34 ppapi::thunk::PPB_IMEControl_FunctionAPI* AsPPB_IMEControl_FunctionAPI() |
| 35 OVERRIDE; |
| 36 |
| 37 // PPB_IMEControl_FunctionAPI implementation. |
| 38 virtual void SetTextInputType(PP_Instance instance, |
| 39 PP_TextInput_Type type) OVERRIDE; |
| 40 virtual void UpdateCaretPosition(PP_Instance instance, PP_Rect caret, |
| 41 PP_Rect boundingBox) OVERRIDE; |
| 42 virtual void ConfirmCompositionText(PP_Instance instance) OVERRIDE; |
| 43 virtual void CancelCompositionText(PP_Instance instance) OVERRIDE; |
| 44 |
| 45 // InterfaceProxy implementation. |
| 46 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 47 |
| 48 private: |
| 49 // Message handlers. |
| 50 void OnMsgSetTextInputType(PP_Instance instance, PP_TextInput_Type type); |
| 51 void OnMsgUpdateCaretPosition(PP_Instance instance, PP_Rect caret, |
| 52 PP_Rect boundingBox); |
| 53 void OnMsgConfirmCompositionText(PP_Instance instance); |
| 54 void OnMsgCancelCompositionText(PP_Instance instance); |
| 55 }; |
| 56 |
| 57 } // namespace proxy |
| 58 } // namespace ppapi |
| 59 |
| 60 #endif // PPAPI_PPB_IME_CONTROL_PROXY_H_ |
| OLD | NEW |