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

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: Fix dependencies. 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
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..e3ba5d721e3d4dad3c8ae859fb666a1831662729 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,6 +42,9 @@ 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;
@@ -45,7 +54,11 @@ class VIEWS_MUS_EXPORT InputMethodMUS : public ui::InputMethodBase {
// The toplevel window which is not owned by this class.
sky 2016/08/25 20:17:53 Document this may be null for tests.
Hadi 2016/08/26 15:57:07 Done.
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

Powered by Google App Engine
This is Rietveld 408576698