OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
14 #include "base/scoped_observer.h" | 14 #include "base/scoped_observer.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/ui/input_method/input_method_engine_base.h" | 18 #include "chrome/browser/ui/input_method/input_method_engine_base.h" |
19 #include "components/keyed_service/core/keyed_service.h" | 19 #include "components/keyed_service/core/keyed_service.h" |
20 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
| 21 #include "content/public/browser/notification_registrar.h" |
21 #include "extensions/browser/browser_context_keyed_api_factory.h" | 22 #include "extensions/browser/browser_context_keyed_api_factory.h" |
22 #include "extensions/browser/event_router.h" | 23 #include "extensions/browser/event_router.h" |
23 #include "extensions/browser/extension_function.h" | 24 #include "extensions/browser/extension_function.h" |
24 #include "extensions/browser/extension_registry_observer.h" | 25 #include "extensions/browser/extension_registry_observer.h" |
25 #include "extensions/common/extension.h" | 26 #include "extensions/common/extension.h" |
26 #include "ui/base/ime/ime_engine_handler_interface.h" | 27 #include "ui/base/ime/ime_engine_handler_interface.h" |
27 #include "ui/base/ime/text_input_flags.h" | 28 #include "ui/base/ime/text_input_flags.h" |
28 | 29 |
29 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
30 #include "chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h" | 31 #include "chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h" |
31 #elif defined(OS_LINUX) || defined(OS_WIN) | 32 #elif defined(OS_LINUX) || defined(OS_WIN) |
32 #include "chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h" | 33 #include "chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h" |
33 #endif // defined(OS_CHROMEOS) | 34 #endif // defined(OS_CHROMEOS) |
34 | 35 |
35 class Profile; | 36 class Profile; |
36 | 37 |
37 namespace content { | |
38 class NotificationRegistrar; | |
39 } | |
40 | |
41 namespace ui { | 38 namespace ui { |
42 class IMEEngineHandlerInterface; | 39 class IMEEngineHandlerInterface; |
43 | 40 |
44 class ImeObserver : public input_method::InputMethodEngineBase::Observer { | 41 class ImeObserver : public input_method::InputMethodEngineBase::Observer { |
45 public: | 42 public: |
46 ImeObserver(const std::string& extension_id, Profile* profile); | 43 ImeObserver(const std::string& extension_id, Profile* profile); |
47 | 44 |
48 ~ImeObserver() override {} | 45 ~ImeObserver() override {} |
49 | 46 |
50 // input_method::InputMethodEngineBase::Observer overrides. | 47 // input_method::InputMethodEngineBase::Observer overrides. |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 extension_registry_observer_; | 210 extension_registry_observer_; |
214 | 211 |
215 content::NotificationRegistrar registrar_; | 212 content::NotificationRegistrar registrar_; |
216 }; | 213 }; |
217 | 214 |
218 InputImeEventRouter* GetInputImeEventRouter(Profile* profile); | 215 InputImeEventRouter* GetInputImeEventRouter(Profile* profile); |
219 | 216 |
220 } // namespace extensions | 217 } // namespace extensions |
221 | 218 |
222 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ | 219 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
OLD | NEW |