| 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 #include "chrome/browser/ui/app_list/start_page_service.h" | 5 #include "chrome/browser/ui/app_list/start_page_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| 11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
| 12 #include "chrome/browser/extensions/extension_system_factory.h" | 12 #include "chrome/browser/extensions/extension_system_factory.h" |
| 13 #include "chrome/browser/extensions/install_tracker_factory.h" | 13 #include "chrome/browser/extensions/install_tracker_factory.h" |
| 14 #include "chrome/browser/media/media_stream_infobar_delegate.h" | 14 #include "chrome/browser/media/media_stream_infobar_delegate.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/ui/app_list/recommended_apps.h" | 16 #include "chrome/browser/ui/app_list/recommended_apps.h" |
| 17 #include "chrome/browser/ui/app_list/start_page_observer.h" | 17 #include "chrome/browser/ui/app_list/start_page_observer.h" |
| 18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
| 19 #include "chrome/common/extensions/extension.h" | |
| 20 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
| 21 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 20 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
| 22 #include "components/browser_context_keyed_service/browser_context_keyed_service
_factory.h" | 21 #include "components/browser_context_keyed_service/browser_context_keyed_service
_factory.h" |
| 23 #include "content/public/browser/notification_observer.h" | 22 #include "content/public/browser/notification_observer.h" |
| 24 #include "content/public/browser/notification_registrar.h" | 23 #include "content/public/browser/notification_registrar.h" |
| 25 #include "content/public/browser/notification_service.h" | 24 #include "content/public/browser/notification_service.h" |
| 26 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| 27 #include "content/public/browser/web_contents_delegate.h" | 26 #include "content/public/browser/web_contents_delegate.h" |
| 27 #include "extensions/common/extension.h" |
| 28 | 28 |
| 29 namespace app_list { | 29 namespace app_list { |
| 30 | 30 |
| 31 class StartPageService::Factory : public BrowserContextKeyedServiceFactory { | 31 class StartPageService::Factory : public BrowserContextKeyedServiceFactory { |
| 32 public: | 32 public: |
| 33 static StartPageService* GetForProfile(Profile* profile) { | 33 static StartPageService* GetForProfile(Profile* profile) { |
| 34 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 34 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 35 switches::kShowAppListStartPage)) { | 35 switches::kShowAppListStartPage)) { |
| 36 return NULL; | 36 return NULL; |
| 37 } | 37 } |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 FOR_EACH_OBSERVER(StartPageObserver, | 162 FOR_EACH_OBSERVER(StartPageObserver, |
| 163 observers_, | 163 observers_, |
| 164 OnSpeechRecognitionStateChanged(recognizing)); | 164 OnSpeechRecognitionStateChanged(recognizing)); |
| 165 } | 165 } |
| 166 | 166 |
| 167 void StartPageService::Shutdown() { | 167 void StartPageService::Shutdown() { |
| 168 contents_.reset(); | 168 contents_.reset(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace app_list | 171 } // namespace app_list |
| OLD | NEW |