| 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_UI_APP_LIST_START_PAGE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 class StartPageService : public BrowserContextKeyedService { | 31 class StartPageService : public BrowserContextKeyedService { |
| 32 public: | 32 public: |
| 33 typedef std::vector<scoped_refptr<const extensions::Extension> > | 33 typedef std::vector<scoped_refptr<const extensions::Extension> > |
| 34 ExtensionList; | 34 ExtensionList; |
| 35 // Gets the instance for the given profile. | 35 // Gets the instance for the given profile. |
| 36 static StartPageService* Get(Profile* profile); | 36 static StartPageService* Get(Profile* profile); |
| 37 | 37 |
| 38 void AddObserver(StartPageObserver* observer); | 38 void AddObserver(StartPageObserver* observer); |
| 39 void RemoveObserver(StartPageObserver* observer); | 39 void RemoveObserver(StartPageObserver* observer); |
| 40 | 40 |
| 41 void ToggleSpeechRecognition(); |
| 42 |
| 41 content::WebContents* contents() { return contents_.get(); } | 43 content::WebContents* contents() { return contents_.get(); } |
| 42 RecommendedApps* recommended_apps() { return recommended_apps_.get(); } | 44 RecommendedApps* recommended_apps() { return recommended_apps_.get(); } |
| 43 void OnSearch(const base::string16& query); | 45 void OnSearch(const base::string16& query); |
| 46 void OnSpeechRecognitionStateChanged(bool recognizing); |
| 44 | 47 |
| 45 private: | 48 private: |
| 46 // A BrowserContextKeyedServiceFactory for this service. | 49 // A BrowserContextKeyedServiceFactory for this service. |
| 47 class Factory; | 50 class Factory; |
| 48 | 51 |
| 49 // ProfileDestroyObserver to shutdown the service on exiting. WebContents | 52 // ProfileDestroyObserver to shutdown the service on exiting. WebContents |
| 50 // depends on the profile and needs to be closed before the profile and its | 53 // depends on the profile and needs to be closed before the profile and its |
| 51 // keyed service shutdown. | 54 // keyed service shutdown. |
| 52 class ProfileDestroyObserver; | 55 class ProfileDestroyObserver; |
| 53 | 56 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 67 scoped_ptr<ProfileDestroyObserver> profile_destroy_observer_; | 70 scoped_ptr<ProfileDestroyObserver> profile_destroy_observer_; |
| 68 scoped_ptr<RecommendedApps> recommended_apps_; | 71 scoped_ptr<RecommendedApps> recommended_apps_; |
| 69 ObserverList<StartPageObserver> observers_; | 72 ObserverList<StartPageObserver> observers_; |
| 70 | 73 |
| 71 DISALLOW_COPY_AND_ASSIGN(StartPageService); | 74 DISALLOW_COPY_AND_ASSIGN(StartPageService); |
| 72 }; | 75 }; |
| 73 | 76 |
| 74 } // namespace app_list | 77 } // namespace app_list |
| 75 | 78 |
| 76 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ | 79 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ |
| OLD | NEW |