@@ -27,6 +27,7 @@ constexpr char kMultilineInputType[] = "TextInputType.multiline";
2727constexpr char kUpdateEditingStateMethod [] =
2828 " TextInputClient.updateEditingState" ;
2929constexpr char kPerformActionMethod [] = " TextInputClient.performAction" ;
30+ constexpr char kRequestAutofillMethod [] = " TextInput.requestAutofill" ;
3031constexpr char kSetPlatformViewClient [] = " TextInput.setPlatformViewClient" ;
3132constexpr char kTextCapitalization [] = " textCapitalization" ;
3233constexpr char kTextEnableSuggestions [] = " enableSuggestions" ;
@@ -45,8 +46,6 @@ constexpr char kSelectionIsDirectionalKey[] = "selectionIsDirectional";
4546constexpr char kTextKey [] = " text" ;
4647constexpr char kBadArgumentError [] = " Bad Arguments" ;
4748constexpr char kInternalConsistencyError [] = " Internal Consistency Error" ;
48-
49- constexpr char kRequestAutofillMethod [] = " TextInput.requestAutofill" ;
5049constexpr char kAutofill [] = " autofill" ;
5150constexpr char kUniqueIdentifier [] = " uniqueIdentifier" ;
5251constexpr char kHints [] = " hints" ;
@@ -70,10 +69,12 @@ TextInputChannel::TextInputChannel(
7069 std::unique_ptr<MethodResult<rapidjson::Document>> result) {
7170 HandleMethodCall (call, std::move (result));
7271 });
72+ #ifdef AUTOFILL_SUPPORT
7373 TizenAutofill& instance = TizenAutofill::GetInstance ();
7474 instance.SetPopupCallback (
7575 [this ]() { input_method_context_->PopupAutofillItems (); });
7676 instance.SetCommitCallback ([this ](std::string value) { OnCommit (value); });
77+ #endif
7778}
7879
7980TextInputChannel::~TextInputChannel () {}
@@ -318,10 +319,12 @@ void TextInputChannel::HandleMethodCall(
318319 cursor_offset);
319320 }
320321 SendStateUpdate ();
321- #ifdef AUTOFILL_SUPPORT
322322 } else if (method.compare (kRequestAutofillMethod ) == 0 ) {
323+ #ifdef AUTOFILL_SUPPORT
323324 TizenAutofill& instance = TizenAutofill::GetInstance ();
324325 instance.RequestAutofill (autofill_hints_, autofill_id_);
326+ #else
327+ result->NotImplemented ();
325328#endif
326329 } else {
327330 result->NotImplemented ();
0 commit comments