| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // ProfileDestroyObserver to shutdown the service on exiting. WebContents | 68 // ProfileDestroyObserver to shutdown the service on exiting. WebContents |
| 69 // depends on the profile and needs to be closed before the profile and its | 69 // depends on the profile and needs to be closed before the profile and its |
| 70 // keyed service shutdown. | 70 // keyed service shutdown. |
| 71 class ProfileDestroyObserver; | 71 class ProfileDestroyObserver; |
| 72 | 72 |
| 73 // The WebContentsDelegate implementation for the start page. This allows | 73 // The WebContentsDelegate implementation for the start page. This allows |
| 74 // getUserMedia() request from the web contents. | 74 // getUserMedia() request from the web contents. |
| 75 class StartPageWebContentsDelegate; | 75 class StartPageWebContentsDelegate; |
| 76 | 76 |
| 77 explicit StartPageService(Profile* profile); | 77 explicit StartPageService(Profile* profile); |
| 78 virtual ~StartPageService(); | 78 ~StartPageService() override; |
| 79 | 79 |
| 80 void LoadContents(); | 80 void LoadContents(); |
| 81 void UnloadContents(); | 81 void UnloadContents(); |
| 82 | 82 |
| 83 // KeyedService overrides: | 83 // KeyedService overrides: |
| 84 virtual void Shutdown() override; | 84 void Shutdown() override; |
| 85 | 85 |
| 86 Profile* profile_; | 86 Profile* profile_; |
| 87 scoped_ptr<content::WebContents> contents_; | 87 scoped_ptr<content::WebContents> contents_; |
| 88 scoped_ptr<StartPageWebContentsDelegate> contents_delegate_; | 88 scoped_ptr<StartPageWebContentsDelegate> contents_delegate_; |
| 89 scoped_ptr<ProfileDestroyObserver> profile_destroy_observer_; | 89 scoped_ptr<ProfileDestroyObserver> profile_destroy_observer_; |
| 90 scoped_ptr<RecommendedApps> recommended_apps_; | 90 scoped_ptr<RecommendedApps> recommended_apps_; |
| 91 SpeechRecognitionState state_; | 91 SpeechRecognitionState state_; |
| 92 ObserverList<StartPageObserver> observers_; | 92 ObserverList<StartPageObserver> observers_; |
| 93 bool speech_button_toggled_manually_; | 93 bool speech_button_toggled_manually_; |
| 94 bool speech_result_obtained_; | 94 bool speech_result_obtained_; |
| 95 | 95 |
| 96 bool webui_finished_loading_; | 96 bool webui_finished_loading_; |
| 97 std::vector<base::Closure> pending_webui_callbacks_; | 97 std::vector<base::Closure> pending_webui_callbacks_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(StartPageService); | 99 DISALLOW_COPY_AND_ASSIGN(StartPageService); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace app_list | 102 } // namespace app_list |
| 103 | 103 |
| 104 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ | 104 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ |
| OLD | NEW |