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

Unified Diff: ui/views/mus/input_method_mus.h

Issue 2230393002: IME for Mus: Make InputMethodMus use the IME Mojo API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update mash_browser_tests_manifest. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/mus/BUILD.gn ('k') | ui/views/mus/input_method_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/input_method_mus.h
diff --git a/ui/views/mus/input_method_mus.h b/ui/views/mus/input_method_mus.h
index 1ed2f7740ab5166b718fdd7afca2e86378a72837..146b5c31856d8c6166f756b358112186860f8467 100644
--- a/ui/views/mus/input_method_mus.h
+++ b/ui/views/mus/input_method_mus.h
@@ -8,6 +8,9 @@
#define UI_VIEWS_MUS_INPUT_METHOD_MUS_H_
#include "base/macros.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "services/shell/public/cpp/connector.h"
+#include "services/ui/public/interfaces/ime.mojom.h"
#include "ui/views/mus/mus_export.h"
namespace ui {
@@ -16,13 +19,16 @@ class Window;
namespace views {
-class VIEWS_MUS_EXPORT InputMethodMUS : public ui::InputMethodBase {
+class TextInputClientImpl;
+
+class VIEWS_MUS_EXPORT InputMethodMus : public ui::InputMethodBase {
public:
- InputMethodMUS(ui::internal::InputMethodDelegate* delegate,
+ InputMethodMus(ui::internal::InputMethodDelegate* delegate,
ui::Window* window);
- ~InputMethodMUS() override;
+ ~InputMethodMus() override;
+
+ void Init(shell::Connector* connector);
- private:
// Overridden from ui::InputMethod:
void OnFocus() override;
void OnBlur() override;
@@ -36,16 +42,24 @@ class VIEWS_MUS_EXPORT InputMethodMUS : public ui::InputMethodBase {
std::string GetInputLocale() override;
bool IsCandidatePopupOpen() const override;
+ private:
+ friend TextInputClientImpl;
+
// Overridden from ui::InputMethodBase:
void OnDidChangeFocusedClient(ui::TextInputClient* focused_before,
ui::TextInputClient* focused) override;
void UpdateTextInputType();
- // The toplevel window which is not owned by this class.
+ // The toplevel window which is not owned by this class. This may be null
+ // for tests.
ui::Window* window_;
- DISALLOW_COPY_AND_ASSIGN(InputMethodMUS);
+ ui::mojom::IMEServerPtr ime_server_;
+ ui::mojom::InputMethodPtr input_method_;
+ std::unique_ptr<TextInputClientImpl> text_input_client_;
+
+ DISALLOW_COPY_AND_ASSIGN(InputMethodMus);
};
} // namespace views
« no previous file with comments | « ui/views/mus/BUILD.gn ('k') | ui/views/mus/input_method_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698