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