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

Side by Side Diff: services/ui/ime/test_ime_driver/test_ime_driver.h

Issue 2326913003: Privatize StrongBinding lifetime management (Closed)
Patch Set: rebase Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 SERVICES_UI_IME_TEST_IME_DRIVER_TEST_IME_DRIVER_H_ 5 #ifndef SERVICES_UI_IME_TEST_IME_DRIVER_TEST_IME_DRIVER_H_
6 #define SERVICES_UI_IME_TEST_IME_DRIVER_TEST_IME_DRIVER_H_ 6 #define SERVICES_UI_IME_TEST_IME_DRIVER_TEST_IME_DRIVER_H_
7 7
8 #include <stdint.h>
9
8 #include <map> 10 #include <map>
11 #include <memory>
9 12
10 #include "mojo/public/cpp/bindings/strong_binding.h" 13 #include "mojo/public/cpp/bindings/binding.h"
11 #include "services/ui/public/interfaces/ime.mojom.h" 14 #include "services/ui/public/interfaces/ime.mojom.h"
12 15
13 namespace ui { 16 namespace ui {
14 namespace test { 17 namespace test {
15 18
16 class TestIMEDriver : public ui::mojom::IMEDriver { 19 class TestIMEDriver : public ui::mojom::IMEDriver {
17 public: 20 public:
18 explicit TestIMEDriver(mojom::IMEDriverRequest request); 21 TestIMEDriver();
19 ~TestIMEDriver() override; 22 ~TestIMEDriver() override;
20 23
21 private: 24 private:
22 // ui::mojom::IMEDriver: 25 // ui::mojom::IMEDriver:
23 void StartSession( 26 void StartSession(
24 int32_t session_id, 27 int32_t session_id,
25 ui::mojom::TextInputClientPtr client, 28 ui::mojom::TextInputClientPtr client,
26 ui::mojom::InputMethodRequest input_method_request) override; 29 ui::mojom::InputMethodRequest input_method_request) override;
27 void CancelSession(int32_t session_id) override; 30 void CancelSession(int32_t session_id) override;
28 31
29 mojo::StrongBinding<mojom::IMEDriver> driver_binding_;
30 std::map<int32_t, std::unique_ptr<mojo::Binding<mojom::InputMethod>>> 32 std::map<int32_t, std::unique_ptr<mojo::Binding<mojom::InputMethod>>>
31 input_method_bindings_; 33 input_method_bindings_;
32 34
33 DISALLOW_COPY_AND_ASSIGN(TestIMEDriver); 35 DISALLOW_COPY_AND_ASSIGN(TestIMEDriver);
34 }; 36 };
35 37
36 } // namespace test 38 } // namespace test
37 } // namespace ui 39 } // namespace ui
38 40
39 #endif // SERVICES_UI_IME_TEST_IME_DRIVER_TEST_IME_DRIVER_H_ 41 #endif // SERVICES_UI_IME_TEST_IME_DRIVER_TEST_IME_DRIVER_H_
OLDNEW
« no previous file with comments | « services/ui/ime/test_ime_driver/test_ime_application.cc ('k') | services/ui/ime/test_ime_driver/test_ime_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698