| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_LANGUAGE_SETTINGS_PRIVATE_LANGUAGE_SETTING
S_PRIVATE_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_LANGUAGE_SETTINGS_PRIVATE_LANGUAGE_SETTING
S_PRIVATE_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_LANGUAGE_SETTINGS_PRIVATE_LANGUAGE_SETTING
S_PRIVATE_DELEGATE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_LANGUAGE_SETTINGS_PRIVATE_LANGUAGE_SETTING
S_PRIVATE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <vector> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_vector.h" | |
| 10 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 11 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" | 12 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" |
| 12 #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h" | 13 #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h" |
| 13 #include "chrome/common/extensions/api/language_settings_private.h" | 14 #include "chrome/common/extensions/api/language_settings_private.h" |
| 14 #include "components/keyed_service/core/keyed_service.h" | 15 #include "components/keyed_service/core/keyed_service.h" |
| 15 #include "components/prefs/pref_change_registrar.h" | 16 #include "components/prefs/pref_change_registrar.h" |
| 16 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
| 17 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
| 18 #include "extensions/browser/event_router.h" | 19 #include "extensions/browser/event_router.h" |
| 19 | 20 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 30 public EventRouter::Observer, | 31 public EventRouter::Observer, |
| 31 public content::NotificationObserver, | 32 public content::NotificationObserver, |
| 32 public SpellcheckHunspellDictionary::Observer, | 33 public SpellcheckHunspellDictionary::Observer, |
| 33 public SpellcheckCustomDictionary::Observer { | 34 public SpellcheckCustomDictionary::Observer { |
| 34 public: | 35 public: |
| 35 static LanguageSettingsPrivateDelegate* Create( | 36 static LanguageSettingsPrivateDelegate* Create( |
| 36 content::BrowserContext* browser_context); | 37 content::BrowserContext* browser_context); |
| 37 ~LanguageSettingsPrivateDelegate() override; | 38 ~LanguageSettingsPrivateDelegate() override; |
| 38 | 39 |
| 39 // Returns the languages and statuses of the enabled spellcheck dictionaries. | 40 // Returns the languages and statuses of the enabled spellcheck dictionaries. |
| 40 ScopedVector<api::language_settings_private::SpellcheckDictionaryStatus> | 41 std::vector<api::language_settings_private::SpellcheckDictionaryStatus> |
| 41 GetHunspellDictionaryStatuses(); | 42 GetHunspellDictionaryStatuses(); |
| 42 | 43 |
| 43 protected: | 44 protected: |
| 44 explicit LanguageSettingsPrivateDelegate(content::BrowserContext* context); | 45 explicit LanguageSettingsPrivateDelegate(content::BrowserContext* context); |
| 45 | 46 |
| 46 // KeyedService implementation. | 47 // KeyedService implementation. |
| 47 void Shutdown() override; | 48 void Shutdown() override; |
| 48 | 49 |
| 49 // EventRouter::Observer implementation. | 50 // EventRouter::Observer implementation. |
| 50 void OnListenerAdded(const EventListenerInfo& details) override; | 51 void OnListenerAdded(const EventListenerInfo& details) override; |
| 51 void OnListenerRemoved(const EventListenerInfo& details) override; | 52 void OnListenerRemoved(const EventListenerInfo& details) override; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 content::NotificationRegistrar notification_registrar_; | 111 content::NotificationRegistrar notification_registrar_; |
| 111 | 112 |
| 112 PrefChangeRegistrar pref_change_registrar_; | 113 PrefChangeRegistrar pref_change_registrar_; |
| 113 | 114 |
| 114 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateDelegate); | 115 DISALLOW_COPY_AND_ASSIGN(LanguageSettingsPrivateDelegate); |
| 115 }; | 116 }; |
| 116 | 117 |
| 117 } // namespace extensions | 118 } // namespace extensions |
| 118 | 119 |
| 119 #endif // CHROME_BROWSER_EXTENSIONS_API_LANGUAGE_SETTINGS_PRIVATE_LANGUAGE_SETT
INGS_PRIVATE_DELEGATE_H_ | 120 #endif // CHROME_BROWSER_EXTENSIONS_API_LANGUAGE_SETTINGS_PRIVATE_LANGUAGE_SETT
INGS_PRIVATE_DELEGATE_H_ |
| OLD | NEW |