| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/chromeos/input_method/input_method_engine.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_engine.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #undef FocusIn | 10 #undef FocusIn |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "ui/base/ime/candidate_window.h" | 24 #include "ui/base/ime/candidate_window.h" |
| 25 #include "ui/base/ime/chromeos/component_extension_ime_manager.h" | 25 #include "ui/base/ime/chromeos/component_extension_ime_manager.h" |
| 26 #include "ui/base/ime/chromeos/extension_ime_util.h" | 26 #include "ui/base/ime/chromeos/extension_ime_util.h" |
| 27 #include "ui/base/ime/chromeos/ime_keymap.h" | 27 #include "ui/base/ime/chromeos/ime_keymap.h" |
| 28 #include "ui/base/ime/composition_text.h" | 28 #include "ui/base/ime/composition_text.h" |
| 29 #include "ui/base/ime/ime_bridge.h" | 29 #include "ui/base/ime/ime_bridge.h" |
| 30 #include "ui/base/ime/text_input_flags.h" | 30 #include "ui/base/ime/text_input_flags.h" |
| 31 #include "ui/chromeos/ime/input_method_menu_item.h" | 31 #include "ui/chromeos/ime/input_method_menu_item.h" |
| 32 #include "ui/chromeos/ime/input_method_menu_manager.h" | 32 #include "ui/chromeos/ime/input_method_menu_manager.h" |
| 33 #include "ui/events/event.h" | 33 #include "ui/events/event.h" |
| 34 #include "ui/events/event_processor.h" | 34 #include "ui/events/event_sink.h" |
| 35 #include "ui/events/event_utils.h" | 35 #include "ui/events/event_utils.h" |
| 36 #include "ui/events/keycodes/dom/dom_code.h" | 36 #include "ui/events/keycodes/dom/dom_code.h" |
| 37 #include "ui/events/keycodes/dom/keycode_converter.h" | 37 #include "ui/events/keycodes/dom/keycode_converter.h" |
| 38 #include "ui/keyboard/keyboard_controller.h" | 38 #include "ui/keyboard/keyboard_controller.h" |
| 39 #include "ui/keyboard/keyboard_util.h" | 39 #include "ui/keyboard/keyboard_util.h" |
| 40 | 40 |
| 41 using input_method::InputMethodEngineBase; | 41 using input_method::InputMethodEngineBase; |
| 42 | 42 |
| 43 namespace chromeos { | 43 namespace chromeos { |
| 44 | 44 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 composition_text_.reset(new ui::CompositionText()); | 324 composition_text_.reset(new ui::CompositionText()); |
| 325 } | 325 } |
| 326 } | 326 } |
| 327 | 327 |
| 328 bool InputMethodEngine::SendKeyEvent(ui::KeyEvent* event, | 328 bool InputMethodEngine::SendKeyEvent(ui::KeyEvent* event, |
| 329 const std::string& code) { | 329 const std::string& code) { |
| 330 DCHECK(event); | 330 DCHECK(event); |
| 331 if (event->key_code() == ui::VKEY_UNKNOWN) | 331 if (event->key_code() == ui::VKEY_UNKNOWN) |
| 332 event->set_key_code(ui::DomKeycodeToKeyboardCode(code)); | 332 event->set_key_code(ui::DomKeycodeToKeyboardCode(code)); |
| 333 | 333 |
| 334 ui::EventProcessor* dispatcher = | 334 ui::EventSink* sink = |
| 335 ash::Shell::GetPrimaryRootWindow()->GetHost()->event_processor(); | 335 ash::Shell::GetPrimaryRootWindow()->GetHost()->event_sink(); |
| 336 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(event); | 336 ui::EventDispatchDetails details = sink->OnEventFromSource(event); |
| 337 return !details.dispatcher_destroyed; | 337 return !details.dispatcher_destroyed; |
| 338 } | 338 } |
| 339 | 339 |
| 340 } // namespace chromeos | 340 } // namespace chromeos |
| OLD | NEW |