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

Side by Side Diff: chrome/browser/ui/views/ime_driver/remote_text_input_client.h

Issue 2626983003: IME for Mus: Send TextInputClient information to IMEDriver. (Closed)
Patch Set: . Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_IME_DRIVER_REMOTE_TEXT_INPUT_CLIENT_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_IME_DRIVER_REMOTE_TEXT_INPUT_CLIENT_H_
6 #define CHROME_BROWSER_UI_VIEWS_IME_DRIVER_REMOTE_TEXT_INPUT_CLIENT_H_ 6 #define CHROME_BROWSER_UI_VIEWS_IME_DRIVER_REMOTE_TEXT_INPUT_CLIENT_H_
7 7
8 #include "services/ui/public/interfaces/ime/ime.mojom.h" 8 #include "services/ui/public/interfaces/ime/ime.mojom.h"
9 #include "ui/base/ime/text_input_client.h" 9 #include "ui/base/ime/text_input_client.h"
10 10
11 // This implementation of ui::TextInputClient sends all updates via mojo IPC to 11 // This implementation of ui::TextInputClient sends all updates via mojo IPC to
12 // a remote client. This is intended to be passed to the overrides of 12 // a remote client. This is intended to be passed to the overrides of
13 // ui::InputMethod::SetFocusedTextInputClient(). 13 // ui::InputMethod::SetFocusedTextInputClient().
14 class RemoteTextInputClient : public ui::TextInputClient { 14 class RemoteTextInputClient : public ui::TextInputClient {
15 public: 15 public:
16 explicit RemoteTextInputClient(ui::mojom::TextInputClientPtr remote_client); 16 explicit RemoteTextInputClient(
sky 2017/01/13 20:32:41 remove explicit
Hadi 2017/01/13 21:47:52 Done.
17 ui::mojom::TextInputClientInformationPtr client_info,
18 ui::mojom::TextInputClientPtr remote_client);
17 ~RemoteTextInputClient() override; 19 ~RemoteTextInputClient() override;
18 20
21 void SetTextInputType(ui::TextInputType text_input_type);
22 void SetCaretBounds(const gfx::Rect& caret_bounds);
23
19 private: 24 private:
20 // ui::TextInputClient: 25 // ui::TextInputClient:
21 void SetCompositionText(const ui::CompositionText& composition) override; 26 void SetCompositionText(const ui::CompositionText& composition) override;
22 void ConfirmCompositionText() override; 27 void ConfirmCompositionText() override;
23 void ClearCompositionText() override; 28 void ClearCompositionText() override;
24 void InsertText(const base::string16& text) override; 29 void InsertText(const base::string16& text) override;
25 void InsertChar(const ui::KeyEvent& event) override; 30 void InsertChar(const ui::KeyEvent& event) override;
26 ui::TextInputType GetTextInputType() const override; 31 ui::TextInputType GetTextInputType() const override;
27 ui::TextInputMode GetTextInputMode() const override; 32 ui::TextInputMode GetTextInputMode() const override;
28 base::i18n::TextDirection GetTextDirection() const override; 33 base::i18n::TextDirection GetTextDirection() const override;
(...skipping 12 matching lines...) Expand all
41 base::string16* text) const override; 46 base::string16* text) const override;
42 void OnInputMethodChanged() override; 47 void OnInputMethodChanged() override;
43 bool ChangeTextDirectionAndLayoutAlignment( 48 bool ChangeTextDirectionAndLayoutAlignment(
44 base::i18n::TextDirection direction) override; 49 base::i18n::TextDirection direction) override;
45 void ExtendSelectionAndDelete(size_t before, size_t after) override; 50 void ExtendSelectionAndDelete(size_t before, size_t after) override;
46 void EnsureCaretNotInRect(const gfx::Rect& rect) override; 51 void EnsureCaretNotInRect(const gfx::Rect& rect) override;
47 bool IsTextEditCommandEnabled(ui::TextEditCommand command) const override; 52 bool IsTextEditCommandEnabled(ui::TextEditCommand command) const override;
48 void SetTextEditCommandForNextKeyEvent(ui::TextEditCommand command) override; 53 void SetTextEditCommandForNextKeyEvent(ui::TextEditCommand command) override;
49 54
50 ui::mojom::TextInputClientPtr remote_client_; 55 ui::mojom::TextInputClientPtr remote_client_;
56 ui::TextInputType text_input_type_;
57 ui::TextInputMode text_input_mode_;
58 base::i18n::TextDirection text_direction_;
59 int text_input_flags_;
60 gfx::Rect caret_bounds_;
51 61
52 DISALLOW_COPY_AND_ASSIGN(RemoteTextInputClient); 62 DISALLOW_COPY_AND_ASSIGN(RemoteTextInputClient);
53 }; 63 };
54 64
55 #endif // CHROME_BROWSER_UI_VIEWS_IME_DRIVER_REMOTE_TEXT_INPUT_CLIENT_H_ 65 #endif // CHROME_BROWSER_UI_VIEWS_IME_DRIVER_REMOTE_TEXT_INPUT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698