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

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

Issue 2576973003: Fix a crash when typing in an exo window. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/input_method_bridge_chromeos.h" 5 #include "chrome/browser/ui/views/ime_driver/input_method_bridge_chromeos.h"
6 6
7 #include "chrome/browser/ui/views/ime_driver/remote_text_input_client.h" 7 #include "chrome/browser/ui/views/ime_driver/remote_text_input_client.h"
8 8
9 InputMethodBridge::InputMethodBridge(ui::mojom::TextInputClientPtr client) 9 InputMethodBridge::InputMethodBridge(ui::mojom::TextInputClientPtr client)
10 : client_(base::MakeUnique<RemoteTextInputClient>(std::move(client))), 10 : client_(base::MakeUnique<RemoteTextInputClient>(std::move(client))),
(...skipping 21 matching lines...) Expand all
32 32
33 void InputMethodBridge::ProcessKeyEvent( 33 void InputMethodBridge::ProcessKeyEvent(
34 std::unique_ptr<ui::Event> event, 34 std::unique_ptr<ui::Event> event,
35 const ProcessKeyEventCallback& callback) { 35 const ProcessKeyEventCallback& callback) {
36 DCHECK(event->IsKeyEvent()); 36 DCHECK(event->IsKeyEvent());
37 ui::KeyEvent* key_event = event->AsKeyEvent(); 37 ui::KeyEvent* key_event = event->AsKeyEvent();
38 if (!key_event->is_char()) { 38 if (!key_event->is_char()) {
39 input_method_chromeos_->DispatchKeyEvent( 39 input_method_chromeos_->DispatchKeyEvent(
40 key_event, base::MakeUnique<base::Callback<void(bool)>>(callback)); 40 key_event, base::MakeUnique<base::Callback<void(bool)>>(callback));
41 } else { 41 } else {
42 callback.Run(false); 42 callback.Run(true);
Hadi 2016/12/15 15:28:58 Can you please add some comments for why we are fi
Peng 2016/12/15 15:53:28 Done.
43 } 43 }
44 } 44 }
45 45
46 void InputMethodBridge::CancelComposition() { 46 void InputMethodBridge::CancelComposition() {
47 input_method_chromeos_->CancelComposition(client_.get()); 47 input_method_chromeos_->CancelComposition(client_.get());
48 } 48 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698