@@ -27,6 +27,7 @@ constexpr char kMultilineInputType[] = "TextInputType.multiline";
27
27
constexpr char kUpdateEditingStateMethod [] =
28
28
" TextInputClient.updateEditingState" ;
29
29
constexpr char kPerformActionMethod [] = " TextInputClient.performAction" ;
30
+ constexpr char kRequestAutofillMethod [] = " TextInput.requestAutofill" ;
30
31
constexpr char kSetPlatformViewClient [] = " TextInput.setPlatformViewClient" ;
31
32
constexpr char kTextCapitalization [] = " textCapitalization" ;
32
33
constexpr char kTextEnableSuggestions [] = " enableSuggestions" ;
@@ -45,8 +46,6 @@ constexpr char kSelectionIsDirectionalKey[] = "selectionIsDirectional";
45
46
constexpr char kTextKey [] = " text" ;
46
47
constexpr char kBadArgumentError [] = " Bad Arguments" ;
47
48
constexpr char kInternalConsistencyError [] = " Internal Consistency Error" ;
48
-
49
- constexpr char kRequestAutofillMethod [] = " TextInput.requestAutofill" ;
50
49
constexpr char kAutofill [] = " autofill" ;
51
50
constexpr char kUniqueIdentifier [] = " uniqueIdentifier" ;
52
51
constexpr char kHints [] = " hints" ;
@@ -70,10 +69,12 @@ TextInputChannel::TextInputChannel(
70
69
std::unique_ptr<MethodResult<rapidjson::Document>> result) {
71
70
HandleMethodCall (call, std::move (result));
72
71
});
72
+ #ifdef AUTOFILL_SUPPORT
73
73
TizenAutofill& instance = TizenAutofill::GetInstance ();
74
74
instance.SetPopupCallback (
75
75
[this ]() { input_method_context_->PopupAutofillItems (); });
76
76
instance.SetCommitCallback ([this ](std::string value) { OnCommit (value); });
77
+ #endif
77
78
}
78
79
79
80
TextInputChannel::~TextInputChannel () {}
@@ -318,10 +319,12 @@ void TextInputChannel::HandleMethodCall(
318
319
cursor_offset);
319
320
}
320
321
SendStateUpdate ();
321
- #ifdef AUTOFILL_SUPPORT
322
322
} else if (method.compare (kRequestAutofillMethod ) == 0 ) {
323
+ #ifdef AUTOFILL_SUPPORT
323
324
TizenAutofill& instance = TizenAutofill::GetInstance ();
324
325
instance.RequestAutofill (autofill_hints_, autofill_id_);
326
+ #else
327
+ result->NotImplemented ();
325
328
#endif
326
329
} else {
327
330
result->NotImplemented ();
0 commit comments