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

Side by Side Diff: ui/keyboard/keyboard_util.cc

Issue 1257603006: Refactoring for the InputMethod & InputMethodDelegate interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Sadrul's comment. Created 5 years, 4 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 | « ui/base/ime/remote_input_method_win_unittest.cc ('k') | ui/views/cocoa/bridged_content_view.mm » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/keyboard/keyboard_util.h" 5 #include "ui/keyboard/keyboard_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 dom_code = ui::KeycodeConverter::CodeStringToDomCode(key_name.c_str()); 320 dom_code = ui::KeycodeConverter::CodeStringToDomCode(key_name.c_str());
321 if (dom_code == ui::DomCode::NONE) 321 if (dom_code == ui::DomCode::NONE)
322 dom_code = ui::UsLayoutKeyboardCodeToDomCode(code); 322 dom_code = ui::UsLayoutKeyboardCodeToDomCode(code);
323 CHECK(dom_code != ui::DomCode::NONE); 323 CHECK(dom_code != ui::DomCode::NONE);
324 ui::KeyEvent event( 324 ui::KeyEvent event(
325 event_type, 325 event_type,
326 code, 326 code,
327 dom_code, 327 dom_code,
328 modifiers); 328 modifiers);
329 if (input_method) { 329 if (input_method) {
330 input_method->DispatchKeyEvent(event); 330 input_method->DispatchKeyEvent(&event);
331 } else { 331 } else {
332 ui::EventDispatchDetails details = 332 ui::EventDispatchDetails details =
333 host->event_processor()->OnEventFromSource(&event); 333 host->event_processor()->OnEventFromSource(&event);
334 CHECK(!details.dispatcher_destroyed); 334 CHECK(!details.dispatcher_destroyed);
335 } 335 }
336 } 336 }
337 return true; 337 return true;
338 } 338 }
339 339
340 void MarkKeyboardLoadStarted() { 340 void MarkKeyboardLoadStarted() {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 453 }
454 454
455 void LogKeyboardControlEvent(KeyboardControlEvent event) { 455 void LogKeyboardControlEvent(KeyboardControlEvent event) {
456 UMA_HISTOGRAM_ENUMERATION( 456 UMA_HISTOGRAM_ENUMERATION(
457 "VirtualKeyboard.KeyboardControlEvent", 457 "VirtualKeyboard.KeyboardControlEvent",
458 event, 458 event,
459 keyboard::KEYBOARD_CONTROL_MAX); 459 keyboard::KEYBOARD_CONTROL_MAX);
460 } 460 }
461 461
462 } // namespace keyboard 462 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/base/ime/remote_input_method_win_unittest.cc ('k') | ui/views/cocoa/bridged_content_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698