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

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

Issue 8059006: Additional update on Pepper IME API and boilerplate thunk/proxy implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win_shared happy. 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') | webkit/glue/webkit_glue.gypi » ('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/thunk.h"
7 #include "ppapi/thunk/ppb_text_input_api.h"
8
9 namespace ppapi {
10 namespace thunk {
11
12 namespace {
13
14 void SetTextInputType(PP_Instance instance, PP_TextInput_Type type) {
15 EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
16 if (enter.succeeded())
17 enter.functions()->SetTextInputType(instance, type);
18 }
19
20 void UpdateCaretPosition(PP_Instance instance,
21 const PP_Rect* caret,
22 const PP_Rect* bounding_box) {
23 EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
24 if (enter.succeeded() && caret && bounding_box)
25 enter.functions()->UpdateCaretPosition(instance, *caret, *bounding_box);
26 }
27
28 void CancelCompositionText(PP_Instance instance) {
29 EnterFunction<PPB_TextInput_FunctionAPI> enter(instance, true);
30 if (enter.succeeded())
31 enter.functions()->CancelCompositionText(instance);
32 }
33
34 const PPB_TextInput_Dev g_ppb_textinput_thunk = {
35 &SetTextInputType,
36 &UpdateCaretPosition,
37 &CancelCompositionText,
38 };
39
40 } // namespace
41
42 const PPB_TextInput_Dev* GetPPB_TextInput_Dev_Thunk() {
43 return &g_ppb_textinput_thunk;
44 }
45
46 } // namespace thunk
47 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_text_input_api.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698