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

Side by Side Diff: webkit/plugins/ppapi/ppb_ime_control_impl.cc

Issue 7621010: Never submit: tentative Pepper IME. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: snapshot Created 9 years, 3 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
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 "webkit/plugins/ppapi/ppb_ime_control_impl.h"
6
7 #include "base/logging.h"
8 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
9
10 namespace webkit {
11 namespace ppapi {
12
13 PPB_IMEControl_Impl::PPB_IMEControl_Impl(PluginInstance* instance)
14 : instance_(instance) {
15 }
16
17 ::ppapi::thunk::PPB_IMEControl_FunctionAPI*
18 PPB_IMEControl_Impl::AsPPB_IMEControl_FunctionAPI() {
19 return this;
20 }
21
22 COMPILE_ASSERT(int(WebKit::WebTextInputTypeNone) == \
23 int(PP_TEXTINPUT_TYPE_NONE), mismatching_enums);
24 COMPILE_ASSERT(int(WebKit::WebTextInputTypeText) == \
25 int(PP_TEXTINPUT_TYPE_TEXT), mismatching_enums);
26 COMPILE_ASSERT(int(WebKit::WebTextInputTypePassword) == \
27 int(PP_TEXTINPUT_TYPE_PASSWORD), mismatching_enums);
28 COMPILE_ASSERT(int(WebKit::WebTextInputTypeSearch) == \
29 int(PP_TEXTINPUT_TYPE_SEARCH), mismatching_enums);
30 COMPILE_ASSERT(int(WebKit::WebTextInputTypeEmail) == \
31 int(PP_TEXTINPUT_TYPE_EMAIL), mismatching_enums);
32 COMPILE_ASSERT(int(WebKit::WebTextInputTypeNumber) == \
33 int(PP_TEXTINPUT_TYPE_NUMBER), mismatching_enums);
34 COMPILE_ASSERT(int(WebKit::WebTextInputTypeTelephone) == \
35 int(PP_TEXTINPUT_TYPE_TELEPHONE), mismatching_enums);
36 COMPILE_ASSERT(int(WebKit::WebTextInputTypeURL) == \
37 int(PP_TEXTINPUT_TYPE_URL), mismatching_enums);
38
39 void PPB_IMEControl_Impl::SetTextInputType(PP_Instance instance,
40 PP_TextInput_Type type) {
41 int itype = type;
42 instance_->SetTextInputType(static_cast<WebKit::WebTextInputType>(itype));
43 }
44
45 void PPB_IMEControl_Impl::UpdateCaretPosition(PP_Instance instance,
46 PP_Rect caret,
47 PP_Rect boundingBox) {
48 instance_->UpdateCaretPosition(caret, boundingBox);
49 }
50
51 void PPB_IMEControl_Impl::ConfirmCompositionText(PP_Instance instance) {
52 // TODO(kinaba)
53 NOTIMPLEMENTED();
54 }
55
56 void PPB_IMEControl_Impl::CancelCompositionText(PP_Instance instance) {
57 // TODO(kinaba)
58 NOTIMPLEMENTED();
59 }
60
61 } // namespace ppapi
62 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698