OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // This file is for non-chromeos (win & linux) functions, such as | 5 // This file is for non-chromeos (win & linux) functions, such as |
6 // chrome.input.ime.activate, chrome.input.ime.createWindow and | 6 // chrome.input.ime.activate, chrome.input.ime.createWindow and |
7 // chrome.input.ime.onSelectionChanged. | 7 // chrome.input.ime.onSelectionChanged. |
8 // TODO(azurewei): May refactor the code structure by using delegate or | 8 // TODO(azurewei): May refactor the code structure by using delegate or |
9 // redesign the API to remove this platform-specific file in the future. | 9 // redesign the API to remove this platform-specific file in the future. |
10 | 10 |
11 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" | 11 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" |
12 | 12 |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/linked_ptr.h" | |
16 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
18 #include "chrome/browser/ui/browser_window.h" | 17 #include "chrome/browser/ui/browser_window.h" |
19 #include "chrome/browser/ui/input_method/input_method_engine.h" | 18 #include "chrome/browser/ui/input_method/input_method_engine.h" |
20 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/extensions/api/input_ime.h" | 20 #include "chrome/common/extensions/api/input_ime.h" |
22 #include "extensions/browser/extension_prefs.h" | 21 #include "extensions/browser/extension_prefs.h" |
23 #include "ui/base/ime/ime_bridge.h" | 22 #include "ui/base/ime/ime_bridge.h" |
24 #include "ui/gfx/geometry/rect.h" | 23 #include "ui/gfx/geometry/rect.h" |
25 | 24 |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 return RespondNow(Error(kErrorNoActiveEngine)); | 397 return RespondNow(Error(kErrorNoActiveEngine)); |
399 | 398 |
400 std::unique_ptr<api::input_ime::HideWindow::Params> params( | 399 std::unique_ptr<api::input_ime::HideWindow::Params> params( |
401 api::input_ime::HideWindow::Params::Create(*args_)); | 400 api::input_ime::HideWindow::Params::Create(*args_)); |
402 EXTENSION_FUNCTION_VALIDATE(params.get()); | 401 EXTENSION_FUNCTION_VALIDATE(params.get()); |
403 engine->HideImeWindow(params->window_id); | 402 engine->HideImeWindow(params->window_id); |
404 return RespondNow(NoArguments()); | 403 return RespondNow(NoArguments()); |
405 } | 404 } |
406 | 405 |
407 } // namespace extensions | 406 } // namespace extensions |
OLD | NEW |