| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // StartPageService collects data to be displayed in app list's start page | 49 // StartPageService collects data to be displayed in app list's start page |
| 50 // and hosts the start page contents. | 50 // and hosts the start page contents. |
| 51 class StartPageService : public KeyedService, | 51 class StartPageService : public KeyedService, |
| 52 public content::WebContentsObserver, | 52 public content::WebContentsObserver, |
| 53 public net::URLFetcherDelegate, | 53 public net::URLFetcherDelegate, |
| 54 public SpeechRecognizerDelegate { | 54 public SpeechRecognizerDelegate { |
| 55 public: | 55 public: |
| 56 typedef std::vector<scoped_refptr<const extensions::Extension> > | 56 typedef std::vector<scoped_refptr<const extensions::Extension> > |
| 57 ExtensionList; | 57 ExtensionList; |
| 58 // Gets the instance for the given profile. | 58 // Gets the instance for the given profile. May return nullptr. |
| 59 static StartPageService* Get(Profile* profile); | 59 static StartPageService* Get(Profile* profile); |
| 60 | 60 |
| 61 void AddObserver(StartPageObserver* observer); | 61 void AddObserver(StartPageObserver* observer); |
| 62 void RemoveObserver(StartPageObserver* observer); | 62 void RemoveObserver(StartPageObserver* observer); |
| 63 | 63 |
| 64 void Init(); | 64 void Init(); |
| 65 | 65 |
| 66 // Loads the start page WebContents if it hasn't already been loaded. | 66 // Loads the start page WebContents if it hasn't already been loaded. |
| 67 void LoadContentsIfNeeded(); | 67 void LoadContentsIfNeeded(); |
| 68 | 68 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 scoped_ptr<net::URLFetcher> doodle_fetcher_; | 179 scoped_ptr<net::URLFetcher> doodle_fetcher_; |
| 180 | 180 |
| 181 base::WeakPtrFactory<StartPageService> weak_factory_; | 181 base::WeakPtrFactory<StartPageService> weak_factory_; |
| 182 | 182 |
| 183 DISALLOW_COPY_AND_ASSIGN(StartPageService); | 183 DISALLOW_COPY_AND_ASSIGN(StartPageService); |
| 184 }; | 184 }; |
| 185 | 185 |
| 186 } // namespace app_list | 186 } // namespace app_list |
| 187 | 187 |
| 188 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ | 188 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ |
| OLD | NEW |