| 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 <utility> | |
| 14 | |
| 15 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 16 #include "base/macros.h" | 14 #include "base/macros.h" |
| 17 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 18 | 16 |
| 19 namespace { | 17 namespace { |
| 20 | 18 |
| 21 bool IsInputImeEnabled() { | 19 bool IsInputImeEnabled() { |
| 22 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 20 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 23 switches::kEnableInputImeAPI); | 21 switches::kEnableInputImeAPI); |
| 24 } | 22 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 47 ->DispatchEventToExtension(extension_id_, std::move(event)); | 45 ->DispatchEventToExtension(extension_id_, std::move(event)); |
| 48 } | 46 } |
| 49 | 47 |
| 50 DISALLOW_COPY_AND_ASSIGN(ImeObserverNonChromeOS); | 48 DISALLOW_COPY_AND_ASSIGN(ImeObserverNonChromeOS); |
| 51 }; | 49 }; |
| 52 | 50 |
| 53 } // namespace | 51 } // namespace |
| 54 | 52 |
| 55 namespace extensions { | 53 namespace extensions { |
| 56 | 54 |
| 57 bool InputImeEventRouter::RegisterImeExtension( | 55 InputImeEventRouter::InputImeEventRouter(Profile* profile) |
| 58 const std::string& extension_id, | 56 : InputImeEventRouterBase(profile) {} |
| 59 const std::vector<extensions::InputComponentInfo>& input_components) { | |
| 60 return false; | |
| 61 } | |
| 62 | 57 |
| 63 void InputImeEventRouter::UnregisterAllImes(const std::string& extension_id) {} | 58 InputImeEventRouter::~InputImeEventRouter() {} |
| 59 |
| 60 void InputImeAPI::OnExtensionLoaded(content::BrowserContext* browser_context, |
| 61 const Extension* extension) {} |
| 62 |
| 63 void InputImeAPI::OnExtensionUnloaded(content::BrowserContext* browser_context, |
| 64 const Extension* extension, |
| 65 UnloadedExtensionInfo::Reason reason) {} |
| 66 |
| 67 void InputImeAPI::OnListenerAdded(const EventListenerInfo& details) {} |
| 64 | 68 |
| 65 } // namespace extensions | 69 } // namespace extensions |
| OLD | NEW |