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 #include "chrome/browser/ui/views/ime_driver/input_method_bridge_chromeos.h" | 5 #include "chrome/browser/ui/views/ime_driver/input_method_bridge_chromeos.h" |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "chrome/browser/ui/views/ime_driver/remote_text_input_client.h" | 8 #include "chrome/browser/ui/views/ime_driver/remote_text_input_client.h" |
8 | 9 |
9 InputMethodBridge::InputMethodBridge(ui::mojom::TextInputClientPtr client) | 10 InputMethodBridge::InputMethodBridge(ui::mojom::TextInputClientPtr client) |
10 : client_(base::MakeUnique<RemoteTextInputClient>(std::move(client))), | 11 : client_(base::MakeUnique<RemoteTextInputClient>(std::move(client))), |
11 input_method_chromeos_( | 12 input_method_chromeos_( |
12 base::MakeUnique<ui::InputMethodChromeOS>(nullptr)) { | 13 base::MakeUnique<ui::InputMethodChromeOS>(nullptr)) { |
13 input_method_chromeos_->SetFocusedTextInputClient(client_.get()); | 14 input_method_chromeos_->SetFocusedTextInputClient(client_.get()); |
14 } | 15 } |
15 | 16 |
16 InputMethodBridge::~InputMethodBridge() {} | 17 InputMethodBridge::~InputMethodBridge() {} |
(...skipping 26 matching lines...) Expand all Loading... |
43 // behaviour of Windows. But for ChromeOS, we don't expect those char | 44 // behaviour of Windows. But for ChromeOS, we don't expect those char |
44 // events, so we filter them out. | 45 // events, so we filter them out. |
45 const bool handled = true; | 46 const bool handled = true; |
46 callback.Run(handled); | 47 callback.Run(handled); |
47 } | 48 } |
48 } | 49 } |
49 | 50 |
50 void InputMethodBridge::CancelComposition() { | 51 void InputMethodBridge::CancelComposition() { |
51 input_method_chromeos_->CancelComposition(client_.get()); | 52 input_method_chromeos_->CancelComposition(client_.get()); |
52 } | 53 } |
OLD | NEW |