| Index: blimp/client/core/contents/ime_feature.h
|
| diff --git a/blimp/client/core/contents/ime_feature.h b/blimp/client/core/contents/ime_feature.h
|
| index c8ff6a473116a032029f9e1e8f4db679ea5487c3..48757ed22b69b82368eaa0293dc702e4a6453b3d 100644
|
| --- a/blimp/client/core/contents/ime_feature.h
|
| +++ b/blimp/client/core/contents/ime_feature.h
|
| @@ -27,16 +27,35 @@ namespace client {
|
|
|
| class ImeFeature : public BlimpMessageProcessor {
|
| public:
|
| + struct WebInputResponse;
|
| +
|
| // A callback to show IME.
|
| - using ShowImeCallback = base::Callback<void(const std::string&)>;
|
| + using ShowImeCallback = base::Callback<void(const WebInputResponse&)>;
|
| +
|
| + // A bundle of params required by the client.
|
| + struct WebInputRequest {
|
| + WebInputRequest();
|
| + ~WebInputRequest();
|
| +
|
| + ui::TextInputType input_type;
|
| + std::string text;
|
| + ShowImeCallback show_ime_callback;
|
| + };
|
| +
|
| + // A bundle of params to be sent to the engine.
|
| + struct WebInputResponse {
|
| + WebInputResponse();
|
| + ~WebInputResponse() = default;
|
| +
|
| + std::string text;
|
| + bool submit;
|
| + };
|
|
|
| // A delegate to be notified of text input requests.
|
| class Delegate {
|
| public:
|
| virtual ~Delegate() {}
|
| - virtual void OnShowImeRequested(ui::TextInputType input_type,
|
| - const std::string& text,
|
| - const ShowImeCallback& callback) = 0;
|
| + virtual void OnShowImeRequested(const WebInputRequest& request) = 0;
|
| virtual void OnHideImeRequested() = 0;
|
| };
|
|
|
| @@ -63,7 +82,7 @@ class ImeFeature : public BlimpMessageProcessor {
|
| // Sends text from IME to the blimp engine.
|
| void OnImeTextEntered(int tab_id,
|
| int render_widget_id,
|
| - const std::string& text);
|
| + const WebInputResponse& response);
|
|
|
| // Used to actually show or hide the IME. See notes on |set_delegate|.
|
| Delegate* delegate_ = nullptr;
|
|
|