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

Side by Side Diff: chrome/browser/ui/views/ime_driver/ime_driver_mus.cc

Issue 2626983003: IME for Mus: Send TextInputClient information to IMEDriver. (Closed)
Patch Set: . Created 3 years, 11 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 #include "chrome/browser/ui/views/ime_driver/ime_driver_mus.h" 5 #include "chrome/browser/ui/views/ime_driver/ime_driver_mus.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/common/service_manager_connection.h" 9 #include "content/public/common/service_manager_connection.h"
10 #include "mojo/public/cpp/bindings/strong_binding.h" 10 #include "mojo/public/cpp/bindings/strong_binding.h"
(...skipping 22 matching lines...) Expand all
33 MakeRequest(&ime_driver_ptr)); 33 MakeRequest(&ime_driver_ptr));
34 ui::mojom::IMERegistrarPtr ime_registrar; 34 ui::mojom::IMERegistrarPtr ime_registrar;
35 content::ServiceManagerConnection::GetForProcess() 35 content::ServiceManagerConnection::GetForProcess()
36 ->GetConnector() 36 ->GetConnector()
37 ->BindInterface(ui::mojom::kServiceName, &ime_registrar); 37 ->BindInterface(ui::mojom::kServiceName, &ime_registrar);
38 ime_registrar->RegisterDriver(std::move(ime_driver_ptr)); 38 ime_registrar->RegisterDriver(std::move(ime_driver_ptr));
39 } 39 }
40 40
41 void IMEDriver::StartSession( 41 void IMEDriver::StartSession(
42 int32_t session_id, 42 int32_t session_id,
43 ui::mojom::TextInputClientInformationPtr client_info,
43 ui::mojom::TextInputClientPtr client, 44 ui::mojom::TextInputClientPtr client,
44 ui::mojom::InputMethodRequest input_method_request) { 45 ui::mojom::InputMethodRequest input_method_request) {
45 #if defined(OS_CHROMEOS) 46 #if defined(OS_CHROMEOS)
46 input_method_bindings_[session_id] = 47 input_method_bindings_[session_id] =
47 base::MakeUnique<mojo::Binding<ui::mojom::InputMethod>>( 48 base::MakeUnique<mojo::Binding<ui::mojom::InputMethod>>(
48 new InputMethodBridge(std::move(client)), 49 new InputMethodBridge(std::move(client_info), std::move(client)),
49 std::move(input_method_request)); 50 std::move(input_method_request));
50 #else 51 #else
51 input_method_bindings_[session_id] = 52 input_method_bindings_[session_id] =
52 base::MakeUnique<mojo::Binding<ui::mojom::InputMethod>>( 53 base::MakeUnique<mojo::Binding<ui::mojom::InputMethod>>(
53 new SimpleInputMethod()); 54 new SimpleInputMethod());
54 #endif 55 #endif
55 } 56 }
56 57
57 void IMEDriver::CancelSession(int32_t session_id) { 58 void IMEDriver::CancelSession(int32_t session_id) {
58 input_method_bindings_.erase(session_id); 59 input_method_bindings_.erase(session_id);
59 } 60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698