| 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> |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 protected: | 209 protected: |
| 210 virtual ~InputImeHideInputViewFunction() {} | 210 virtual ~InputImeHideInputViewFunction() {} |
| 211 | 211 |
| 212 // ExtensionFunction: | 212 // ExtensionFunction: |
| 213 virtual bool RunImpl() OVERRIDE; | 213 virtual bool RunImpl() OVERRIDE; |
| 214 }; | 214 }; |
| 215 | 215 |
| 216 class InputImeAPI : public ProfileKeyedAPI, | 216 class InputImeAPI : public ProfileKeyedAPI, |
| 217 public content::NotificationObserver { | 217 public content::NotificationObserver { |
| 218 public: | 218 public: |
| 219 explicit InputImeAPI(Profile* profile); | 219 explicit InputImeAPI(content::BrowserContext* context); |
| 220 virtual ~InputImeAPI(); | 220 virtual ~InputImeAPI(); |
| 221 | 221 |
| 222 // ProfileKeyedAPI implementation. | 222 // ProfileKeyedAPI implementation. |
| 223 static ProfileKeyedAPIFactory<InputImeAPI>* GetFactoryInstance(); | 223 static ProfileKeyedAPIFactory<InputImeAPI>* GetFactoryInstance(); |
| 224 | 224 |
| 225 // content::NotificationObserver implementation. | 225 // content::NotificationObserver implementation. |
| 226 virtual void Observe(int type, | 226 virtual void Observe(int type, |
| 227 const content::NotificationSource& source, | 227 const content::NotificationSource& source, |
| 228 const content::NotificationDetails& details) OVERRIDE; | 228 const content::NotificationDetails& details) OVERRIDE; |
| 229 | 229 |
| 230 private: | 230 private: |
| 231 friend class ProfileKeyedAPIFactory<InputImeAPI>; | 231 friend class ProfileKeyedAPIFactory<InputImeAPI>; |
| 232 InputImeEventRouter* input_ime_event_router(); | 232 InputImeEventRouter* input_ime_event_router(); |
| 233 | 233 |
| 234 // ProfileKeyedAPI implementation. | 234 // ProfileKeyedAPI implementation. |
| 235 static const char* service_name() { | 235 static const char* service_name() { |
| 236 return "InputImeAPI"; | 236 return "InputImeAPI"; |
| 237 } | 237 } |
| 238 static const bool kServiceIsNULLWhileTesting = true; | 238 static const bool kServiceIsNULLWhileTesting = true; |
| 239 | 239 |
| 240 Profile* const profile_; | 240 Profile* const profile_; |
| 241 content::NotificationRegistrar registrar_; | 241 content::NotificationRegistrar registrar_; |
| 242 }; | 242 }; |
| 243 | 243 |
| 244 } // namespace extensions | 244 } // namespace extensions |
| 245 | 245 |
| 246 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ | 246 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ |
| OLD | NEW |