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

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: fixed compiling errors on chromeos. 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
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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 dom_code = ui::KeycodeConverter::CodeStringToDomCode(key_name.c_str()); 325 dom_code = ui::KeycodeConverter::CodeStringToDomCode(key_name.c_str());
326 if (dom_code == ui::DomCode::NONE) 326 if (dom_code == ui::DomCode::NONE)
327 dom_code = ui::UsLayoutKeyboardCodeToDomCode(code); 327 dom_code = ui::UsLayoutKeyboardCodeToDomCode(code);
328 CHECK(dom_code != ui::DomCode::NONE); 328 CHECK(dom_code != ui::DomCode::NONE);
329 ui::KeyEvent event( 329 ui::KeyEvent event(
330 event_type, 330 event_type,
331 code, 331 code,
332 dom_code, 332 dom_code,
333 modifiers); 333 modifiers);
334 if (input_method) { 334 if (input_method) {
335 input_method->DispatchKeyEvent(event); 335 input_method->DispatchKeyEvent(&event);
336 } else { 336 } else {
337 ui::EventDispatchDetails details = 337 ui::EventDispatchDetails details =
338 host->event_processor()->OnEventFromSource(&event); 338 host->event_processor()->OnEventFromSource(&event);
339 CHECK(!details.dispatcher_destroyed); 339 CHECK(!details.dispatcher_destroyed);
340 } 340 }
341 } 341 }
342 return true; 342 return true;
343 } 343 }
344 344
345 void MarkKeyboardLoadStarted() { 345 void MarkKeyboardLoadStarted() {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 459
460 void LogKeyboardControlEvent(KeyboardControlEvent event) { 460 void LogKeyboardControlEvent(KeyboardControlEvent event) {
461 UMA_HISTOGRAM_ENUMERATION( 461 UMA_HISTOGRAM_ENUMERATION(
462 "VirtualKeyboard.KeyboardControlEvent", 462 "VirtualKeyboard.KeyboardControlEvent",
463 event, 463 event,
464 keyboard::KEYBOARD_CONTROL_MAX); 464 keyboard::KEYBOARD_CONTROL_MAX);
465 } 465 }
466 466
467 } // namespace keyboard 467 } // namespace keyboard
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698