| 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 "ash/ime/input_method_menu_item.h" | 5 #include "ash/ime/input_method_menu_item.h" |
| 6 #include "ash/ime/input_method_menu_manager.h" | 6 #include "ash/ime/input_method_menu_manager.h" |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 new MockIMECandidateWindowHandler()); | 240 new MockIMECandidateWindowHandler()); |
| 241 | 241 |
| 242 IMEBridge::Get()->SetInputContextHandler(mock_input_context.get()); | 242 IMEBridge::Get()->SetInputContextHandler(mock_input_context.get()); |
| 243 IMEBridge::Get()->SetCandidateWindowHandler(mock_candidate_window.get()); | 243 IMEBridge::Get()->SetCandidateWindowHandler(mock_candidate_window.get()); |
| 244 | 244 |
| 245 IMEEngineHandlerInterface* engine_handler = | 245 IMEEngineHandlerInterface* engine_handler = |
| 246 IMEBridge::Get()->GetCurrentEngineHandler(); | 246 IMEBridge::Get()->GetCurrentEngineHandler(); |
| 247 ASSERT_TRUE(engine_handler); | 247 ASSERT_TRUE(engine_handler); |
| 248 | 248 |
| 249 extensions::ExtensionHost* host = | 249 extensions::ExtensionHost* host = |
| 250 extensions::ExtensionSystem::Get(profile()) | 250 extensions::ProcessManager::Get(profile()) |
| 251 ->process_manager() | |
| 252 ->GetBackgroundHostForExtension(extension_->id()); | 251 ->GetBackgroundHostForExtension(extension_->id()); |
| 253 ASSERT_TRUE(host); | 252 ASSERT_TRUE(host); |
| 254 | 253 |
| 255 engine_handler->Enable("APIArgumentIME"); | 254 engine_handler->Enable("APIArgumentIME"); |
| 256 IMEEngineHandlerInterface::InputContext context(ui::TEXT_INPUT_TYPE_TEXT, | 255 IMEEngineHandlerInterface::InputContext context(ui::TEXT_INPUT_TYPE_TEXT, |
| 257 ui::TEXT_INPUT_MODE_DEFAULT, | 256 ui::TEXT_INPUT_MODE_DEFAULT, |
| 258 ui::TEXT_INPUT_FLAG_NONE); | 257 ui::TEXT_INPUT_FLAG_NONE); |
| 259 engine_handler->FocusIn(context); | 258 engine_handler->FocusIn(context); |
| 260 | 259 |
| 261 { | 260 { |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 } | 984 } |
| 986 } | 985 } |
| 987 | 986 |
| 988 IMEBridge::Get()->SetInputContextHandler(NULL); | 987 IMEBridge::Get()->SetInputContextHandler(NULL); |
| 989 IMEBridge::Get()->SetCandidateWindowHandler(NULL); | 988 IMEBridge::Get()->SetCandidateWindowHandler(NULL); |
| 990 } | 989 } |
| 991 | 990 |
| 992 } // namespace | 991 } // namespace |
| 993 } // namespace input_method | 992 } // namespace input_method |
| 994 } // namespace chromeos | 993 } // namespace chromeos |
| OLD | NEW |