| OLD | NEW |
| 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_IME_DRIVER_MUS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_IME_DRIVER_IME_DRIVER_MUS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_IME_DRIVER_IME_DRIVER_MUS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_IME_DRIVER_IME_DRIVER_MUS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 | 12 |
| 13 #include "mojo/public/cpp/bindings/binding.h" | |
| 14 #include "services/ui/public/interfaces/ime/ime.mojom.h" | 13 #include "services/ui/public/interfaces/ime/ime.mojom.h" |
| 15 | 14 |
| 16 class IMEDriver : public ui::mojom::IMEDriver { | 15 class IMEDriver : public ui::mojom::IMEDriver { |
| 17 public: | 16 public: |
| 18 IMEDriver(); | 17 IMEDriver(); |
| 19 ~IMEDriver() override; | 18 ~IMEDriver() override; |
| 20 | 19 |
| 21 // Instantiate the IME driver and register it to the UI service. | 20 // Instantiate the IME driver and register it to the UI service. |
| 22 static void Register(); | 21 static void Register(); |
| 23 | 22 |
| 24 private: | 23 private: |
| 25 // ui::mojom::IMEDriver: | 24 // ui::mojom::IMEDriver: |
| 26 void StartSession(int32_t session_id, | 25 void StartSession(ui::mojom::StartSessionDetailsPtr details) override; |
| 27 ui::mojom::StartSessionDetailsPtr details) override; | |
| 28 void CancelSession(int32_t session_id) override; | |
| 29 | |
| 30 std::map<int32_t, std::unique_ptr<mojo::Binding<ui::mojom::InputMethod>>> | |
| 31 input_method_bindings_; | |
| 32 | 26 |
| 33 DISALLOW_COPY_AND_ASSIGN(IMEDriver); | 27 DISALLOW_COPY_AND_ASSIGN(IMEDriver); |
| 34 }; | 28 }; |
| 35 | 29 |
| 36 #endif // CHROME_BROWSER_UI_VIEWS_IME_DRIVER_IME_DRIVER_MUS_H_ | 30 #endif // CHROME_BROWSER_UI_VIEWS_IME_DRIVER_IME_DRIVER_MUS_H_ |
| OLD | NEW |