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

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

Issue 8333004: Rename InterfaceID to ApiID and move the file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged 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
« no previous file with comments | « ppapi/proxy/ppb_text_input_proxy.h ('k') | ppapi/proxy/ppb_url_loader_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 #include "ppapi/proxy/ppb_text_input_proxy.h" 5 #include "ppapi/proxy/ppb_text_input_proxy.h"
6 6
7 #include "ppapi/proxy/plugin_dispatcher.h" 7 #include "ppapi/proxy/plugin_dispatcher.h"
8 #include "ppapi/proxy/ppapi_messages.h" 8 #include "ppapi/proxy/ppapi_messages.h"
9 #include "ppapi/thunk/enter.h" 9 #include "ppapi/thunk/enter.h"
10 #include "ppapi/thunk/thunk.h" 10 #include "ppapi/thunk/thunk.h"
11 11
12 namespace ppapi { 12 namespace ppapi {
13 namespace proxy { 13 namespace proxy {
14 14
15 PPB_TextInput_Proxy::PPB_TextInput_Proxy(Dispatcher* dispatcher) 15 PPB_TextInput_Proxy::PPB_TextInput_Proxy(Dispatcher* dispatcher)
16 : InterfaceProxy(dispatcher) { 16 : InterfaceProxy(dispatcher) {
17 } 17 }
18 18
19 PPB_TextInput_Proxy::~PPB_TextInput_Proxy() { 19 PPB_TextInput_Proxy::~PPB_TextInput_Proxy() {
20 } 20 }
21 21
22 ppapi::thunk::PPB_TextInput_FunctionAPI* 22 ppapi::thunk::PPB_TextInput_FunctionAPI*
23 PPB_TextInput_Proxy::AsPPB_TextInput_FunctionAPI() { 23 PPB_TextInput_Proxy::AsPPB_TextInput_FunctionAPI() {
24 return this; 24 return this;
25 } 25 }
26 26
27 void PPB_TextInput_Proxy::SetTextInputType(PP_Instance instance, 27 void PPB_TextInput_Proxy::SetTextInputType(PP_Instance instance,
28 PP_TextInput_Type type) { 28 PP_TextInput_Type type) {
29 dispatcher()->Send(new PpapiHostMsg_PPBTextInput_SetTextInputType( 29 dispatcher()->Send(new PpapiHostMsg_PPBTextInput_SetTextInputType(
30 INTERFACE_ID_PPB_TEXT_INPUT, instance, type)); 30 API_ID_PPB_TEXT_INPUT, instance, type));
31 } 31 }
32 32
33 void PPB_TextInput_Proxy::UpdateCaretPosition(PP_Instance instance, 33 void PPB_TextInput_Proxy::UpdateCaretPosition(PP_Instance instance,
34 const PP_Rect& caret, 34 const PP_Rect& caret,
35 const PP_Rect& bounding_box) { 35 const PP_Rect& bounding_box) {
36 dispatcher()->Send(new PpapiHostMsg_PPBTextInput_UpdateCaretPosition( 36 dispatcher()->Send(new PpapiHostMsg_PPBTextInput_UpdateCaretPosition(
37 INTERFACE_ID_PPB_TEXT_INPUT, instance, caret, bounding_box)); 37 API_ID_PPB_TEXT_INPUT, instance, caret, bounding_box));
38 } 38 }
39 39
40 void PPB_TextInput_Proxy::CancelCompositionText(PP_Instance instance) { 40 void PPB_TextInput_Proxy::CancelCompositionText(PP_Instance instance) {
41 dispatcher()->Send(new PpapiHostMsg_PPBTextInput_CancelCompositionText( 41 dispatcher()->Send(new PpapiHostMsg_PPBTextInput_CancelCompositionText(
42 INTERFACE_ID_PPB_TEXT_INPUT, instance)); 42 API_ID_PPB_TEXT_INPUT, instance));
43 } 43 }
44 44
45 bool PPB_TextInput_Proxy::OnMessageReceived(const IPC::Message& msg) { 45 bool PPB_TextInput_Proxy::OnMessageReceived(const IPC::Message& msg) {
46 bool handled = true; 46 bool handled = true;
47 IPC_BEGIN_MESSAGE_MAP(PPB_TextInput_Proxy, msg) 47 IPC_BEGIN_MESSAGE_MAP(PPB_TextInput_Proxy, msg)
48 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTextInput_SetTextInputType, 48 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTextInput_SetTextInputType,
49 OnMsgSetTextInputType) 49 OnMsgSetTextInputType)
50 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTextInput_UpdateCaretPosition, 50 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTextInput_UpdateCaretPosition,
51 OnMsgUpdateCaretPosition) 51 OnMsgUpdateCaretPosition)
52 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTextInput_CancelCompositionText, 52 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBTextInput_CancelCompositionText,
(...skipping 22 matching lines...) Expand all
75 75
76 void PPB_TextInput_Proxy::OnMsgCancelCompositionText(PP_Instance instance) { 76 void PPB_TextInput_Proxy::OnMsgCancelCompositionText(PP_Instance instance) {
77 ppapi::thunk::EnterFunctionNoLock<PPB_TextInput_FunctionAPI> enter(instance, 77 ppapi::thunk::EnterFunctionNoLock<PPB_TextInput_FunctionAPI> enter(instance,
78 true); 78 true);
79 if (enter.succeeded()) 79 if (enter.succeeded())
80 enter.functions()->CancelCompositionText(instance); 80 enter.functions()->CancelCompositionText(instance);
81 } 81 }
82 82
83 } // namespace proxy 83 } // namespace proxy
84 } // namespace ppapi 84 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_text_input_proxy.h ('k') | ppapi/proxy/ppb_url_loader_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698