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

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

Issue 2795503002: mash: Don't synthesize extra key press events in the window server (Closed)
Patch Set: remove InputMethodBridge workaround Created 3 years, 8 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
« no previous file with comments | « no previous file | services/ui/service.cc » ('j') | 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 "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #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"
9 9
10 InputMethodBridge::InputMethodBridge( 10 InputMethodBridge::InputMethodBridge(
(...skipping 19 matching lines...) Expand all
30 30
31 void InputMethodBridge::ProcessKeyEvent( 31 void InputMethodBridge::ProcessKeyEvent(
32 std::unique_ptr<ui::Event> event, 32 std::unique_ptr<ui::Event> event,
33 const ProcessKeyEventCallback& callback) { 33 const ProcessKeyEventCallback& callback) {
34 DCHECK(event->IsKeyEvent()); 34 DCHECK(event->IsKeyEvent());
35 ui::KeyEvent* key_event = event->AsKeyEvent(); 35 ui::KeyEvent* key_event = event->AsKeyEvent();
36 if (!key_event->is_char()) { 36 if (!key_event->is_char()) {
37 input_method_chromeos_->DispatchKeyEvent( 37 input_method_chromeos_->DispatchKeyEvent(
38 key_event, base::MakeUnique<base::Callback<void(bool)>>(callback)); 38 key_event, base::MakeUnique<base::Callback<void(bool)>>(callback));
39 } else { 39 } else {
40 // On Linux (include ChromeOS), the mus emulates the WM_CHAR generation 40 const bool handled = false;
41 // behaviour of Windows. But for ChromeOS, we don't expect those char
42 // events, so we filter them out.
43 const bool handled = true;
44 callback.Run(handled); 41 callback.Run(handled);
45 } 42 }
46 } 43 }
47 44
48 void InputMethodBridge::CancelComposition() { 45 void InputMethodBridge::CancelComposition() {
49 input_method_chromeos_->CancelComposition(client_.get()); 46 input_method_chromeos_->CancelComposition(client_.get());
50 } 47 }
OLDNEW
« no previous file with comments | « no previous file | services/ui/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698