| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #include "ui/base/ime/input_method_base.h" | 5 #ifndef UI_AURA_MUS_INPUT_METHOD_MUS_H_ |
| 6 | 6 #define UI_AURA_MUS_INPUT_METHOD_MUS_H_ |
| 7 #ifndef UI_VIEWS_MUS_INPUT_METHOD_MUS_H_ | |
| 8 #define UI_VIEWS_MUS_INPUT_METHOD_MUS_H_ | |
| 9 | 7 |
| 10 #include "base/macros.h" | 8 #include "base/macros.h" |
| 11 #include "mojo/public/cpp/bindings/strong_binding.h" | 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 12 #include "services/service_manager/public/cpp/connector.h" | 10 #include "services/service_manager/public/cpp/connector.h" |
| 13 #include "services/ui/public/interfaces/ime.mojom.h" | 11 #include "services/ui/public/interfaces/ime.mojom.h" |
| 14 #include "ui/views/mus/mus_export.h" | 12 #include "ui/aura/aura_export.h" |
| 13 #include "ui/base/ime/input_method_base.h" |
| 15 | 14 |
| 16 namespace ui { | 15 namespace ui { |
| 17 class Window; | |
| 18 namespace mojom { | 16 namespace mojom { |
| 19 enum class EventResult; | 17 enum class EventResult; |
| 20 } // namespace mojom | 18 } |
| 21 } // namespace ui | 19 } |
| 22 | 20 |
| 23 namespace views { | 21 namespace aura { |
| 24 | 22 |
| 25 class TextInputClientImpl; | 23 class TextInputClientImpl; |
| 24 class Window; |
| 26 | 25 |
| 27 class VIEWS_MUS_EXPORT InputMethodMus : public ui::InputMethodBase { | 26 class AURA_EXPORT InputMethodMus : public ui::InputMethodBase { |
| 28 public: | 27 public: |
| 29 InputMethodMus(ui::internal::InputMethodDelegate* delegate, | 28 InputMethodMus(ui::internal::InputMethodDelegate* delegate, Window* window); |
| 30 ui::Window* window); | |
| 31 ~InputMethodMus() override; | 29 ~InputMethodMus() override; |
| 32 | 30 |
| 33 void Init(service_manager::Connector* connector); | 31 void Init(service_manager::Connector* connector); |
| 34 void DispatchKeyEvent( | 32 void DispatchKeyEvent( |
| 35 ui::KeyEvent* event, | 33 ui::KeyEvent* event, |
| 36 std::unique_ptr<base::Callback<void(ui::mojom::EventResult)>> | 34 std::unique_ptr<base::Callback<void(ui::mojom::EventResult)>> |
| 37 ack_callback); | 35 ack_callback); |
| 38 | 36 |
| 39 // Overridden from ui::InputMethod: | 37 // Overridden from ui::InputMethod: |
| 40 void OnFocus() override; | 38 void OnFocus() override; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 57 | 55 |
| 58 void UpdateTextInputType(); | 56 void UpdateTextInputType(); |
| 59 void ProcessKeyEventCallback( | 57 void ProcessKeyEventCallback( |
| 60 const ui::KeyEvent& event, | 58 const ui::KeyEvent& event, |
| 61 std::unique_ptr<base::Callback<void(ui::mojom::EventResult)>> | 59 std::unique_ptr<base::Callback<void(ui::mojom::EventResult)>> |
| 62 ack_callback, | 60 ack_callback, |
| 63 bool handled); | 61 bool handled); |
| 64 | 62 |
| 65 // The toplevel window which is not owned by this class. This may be null | 63 // The toplevel window which is not owned by this class. This may be null |
| 66 // for tests. | 64 // for tests. |
| 67 ui::Window* window_; | 65 Window* window_; |
| 68 | 66 |
| 69 ui::mojom::IMEServerPtr ime_server_; | 67 ui::mojom::IMEServerPtr ime_server_; |
| 70 ui::mojom::InputMethodPtr input_method_; | 68 ui::mojom::InputMethodPtr input_method_; |
| 71 std::unique_ptr<TextInputClientImpl> text_input_client_; | 69 std::unique_ptr<TextInputClientImpl> text_input_client_; |
| 72 | 70 |
| 73 DISALLOW_COPY_AND_ASSIGN(InputMethodMus); | 71 DISALLOW_COPY_AND_ASSIGN(InputMethodMus); |
| 74 }; | 72 }; |
| 75 | 73 |
| 76 } // namespace views | 74 } // namespace aura |
| 77 | 75 |
| 78 #endif // UI_VIEWS_MUS_INPUT_METHOD_MUS_H_ | 76 #endif // UI_AURA_MUS_INPUT_METHOD_MUS_H_ |
| OLD | NEW |