| OLD | NEW | 
|    1 // Copyright 2013 The Chromium Authors. All rights reserved. |    1 // Copyright 2013 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_SEARCH_HOTWORD_SERVICE_H_ |    5 #ifndef CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ | 
|    6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ |    6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ | 
|    7  |    7  | 
|    8 #include "base/basictypes.h" |    8 #include "base/basictypes.h" | 
|    9 #include "base/memory/weak_ptr.h" |    9 #include "base/memory/weak_ptr.h" | 
|   10 #include "base/prefs/pref_change_registrar.h" |   10 #include "base/prefs/pref_change_registrar.h" | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
|   36                        public extensions::ExtensionRegistryObserver, |   36                        public extensions::ExtensionRegistryObserver, | 
|   37                        public KeyedService { |   37                        public KeyedService { | 
|   38  public: |   38  public: | 
|   39   // Returns true if the hotword supports the current system language. |   39   // Returns true if the hotword supports the current system language. | 
|   40   static bool DoesHotwordSupportLanguage(Profile* profile); |   40   static bool DoesHotwordSupportLanguage(Profile* profile); | 
|   41  |   41  | 
|   42   // Returns true if the "enable-experimental-hotwording" flag is set. |   42   // Returns true if the "enable-experimental-hotwording" flag is set. | 
|   43   static bool IsExperimentalHotwordingEnabled(); |   43   static bool IsExperimentalHotwordingEnabled(); | 
|   44  |   44  | 
|   45   explicit HotwordService(Profile* profile); |   45   explicit HotwordService(Profile* profile); | 
|   46   virtual ~HotwordService(); |   46   ~HotwordService() override; | 
|   47  |   47  | 
|   48   // Overridden from content::NotificationObserver: |   48   // Overridden from content::NotificationObserver: | 
|   49   virtual void Observe(int type, |   49   void Observe(int type, | 
|   50                        const content::NotificationSource& source, |   50                const content::NotificationSource& source, | 
|   51                        const content::NotificationDetails& details) override; |   51                const content::NotificationDetails& details) override; | 
|   52  |   52  | 
|   53   // Overridden from ExtensionRegisterObserver: |   53   // Overridden from ExtensionRegisterObserver: | 
|   54   virtual void OnExtensionInstalled( |   54   void OnExtensionInstalled(content::BrowserContext* browser_context, | 
|   55       content::BrowserContext* browser_context, |   55                             const extensions::Extension* extension, | 
|   56       const extensions::Extension* extension, |   56                             bool is_update) override; | 
|   57       bool is_update) override; |   57   void OnExtensionUninstalled(content::BrowserContext* browser_context, | 
|   58   virtual void OnExtensionUninstalled( |   58                               const extensions::Extension* extension, | 
|   59       content::BrowserContext* browser_context, |   59                               extensions::UninstallReason reason) override; | 
|   60       const extensions::Extension* extension, |  | 
|   61       extensions::UninstallReason reason) override; |  | 
|   62  |   60  | 
|   63   // Checks for whether all the necessary files have downloaded to allow for |   61   // Checks for whether all the necessary files have downloaded to allow for | 
|   64   // using the extension. |   62   // using the extension. | 
|   65   virtual bool IsServiceAvailable(); |   63   virtual bool IsServiceAvailable(); | 
|   66  |   64  | 
|   67   // Determine if hotwording is allowed in this profile based on field trials |   65   // Determine if hotwording is allowed in this profile based on field trials | 
|   68   // and language. |   66   // and language. | 
|   69   virtual bool IsHotwordAllowed(); |   67   virtual bool IsHotwordAllowed(); | 
|   70  |   68  | 
|   71   // Checks if the user has opted into audio logging. Returns true if the user |   69   // Checks if the user has opted into audio logging. Returns true if the user | 
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  148  |  146  | 
|  149   base::WeakPtrFactory<HotwordService> weak_factory_; |  147   base::WeakPtrFactory<HotwordService> weak_factory_; | 
|  150  |  148  | 
|  151   // Stores the launch mode for the Hotword Audio Verification App. |  149   // Stores the launch mode for the Hotword Audio Verification App. | 
|  152   LaunchMode hotword_audio_verification_launch_mode_; |  150   LaunchMode hotword_audio_verification_launch_mode_; | 
|  153  |  151  | 
|  154   DISALLOW_COPY_AND_ASSIGN(HotwordService); |  152   DISALLOW_COPY_AND_ASSIGN(HotwordService); | 
|  155 }; |  153 }; | 
|  156  |  154  | 
|  157 #endif  // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ |  155 #endif  // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ | 
| OLD | NEW |