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

Side by Side Diff: ppapi/thunk/ppb_text_input_thunk.cc

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: Removed PPB_TextInput_Dev::ConfirmCompositionText. 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/thunk/ppb_text_input_api.h ('k') | ppapi/thunk/thunk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ppapi/thunk/enter.h"
6 #include "ppapi/thunk/ppb_text_input_api.h"
7
8 namespace ppapi {
9 namespace thunk {
10
11 namespace {
12
13 void SetTextInputType(PP_Instance instance, PP_TextInput_Type type) {
14 EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
15 if (enter.succeeded())
16 enter.functions()->SetTextInputType(instance, type);
17 }
18
19 void UpdateCaretPosition(PP_Instance instance,
20 const PP_Rect* caret,
21 const PP_Rect* bounding_box) {
22 EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
23 if (enter.succeeded() && caret && bounding_box)
24 enter.functions()->UpdateCaretPosition(instance, *caret, *bounding_box);
25 }
26
27 void CancelCompositionText(PP_Instance instance) {
28 EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
29 if (enter.succeeded())
30 enter.functions()->CancelCompositionText(instance);
31 }
32
33 const PPB_TextInput_Dev g_ppb_textinput_thunk = {
34 &SetTextInputType,
35 &UpdateCaretPosition,
36 &CancelCompositionText,
37 };
38
39 } // namespace
40
41 const PPB_TextInput_Dev* GetPPB_TextInput_Dev_Thunk() {
42 return &g_ppb_textinput_thunk;
43 }
44
45 } // namespace thunk
46 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_text_input_api.h ('k') | ppapi/thunk/thunk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698