Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 874563003: Remove old HTML app list start page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "base/metrics/user_metrics.h" 12 #include "base/metrics/user_metrics.h"
13 #include "base/prefs/pref_service.h" 13 #include "base/prefs/pref_service.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/chrome_notification_types.h" 15 #include "chrome/browser/chrome_notification_types.h"
16 #include "chrome/browser/media/media_stream_infobar_delegate.h" 16 #include "chrome/browser/media/media_stream_infobar_delegate.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/search/hotword_service.h" 18 #include "chrome/browser/search/hotword_service.h"
19 #include "chrome/browser/search/hotword_service_factory.h" 19 #include "chrome/browser/search/hotword_service_factory.h"
20 #include "chrome/browser/ui/app_list/recommended_apps.h"
21 #include "chrome/browser/ui/app_list/speech_auth_helper.h" 20 #include "chrome/browser/ui/app_list/speech_auth_helper.h"
22 #include "chrome/browser/ui/app_list/speech_recognizer.h" 21 #include "chrome/browser/ui/app_list/speech_recognizer.h"
23 #include "chrome/browser/ui/app_list/start_page_observer.h" 22 #include "chrome/browser/ui/app_list/start_page_observer.h"
24 #include "chrome/browser/ui/app_list/start_page_service_factory.h" 23 #include "chrome/browser/ui/app_list/start_page_service_factory.h"
25 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
26 #include "chrome/common/pref_names.h" 25 #include "chrome/common/pref_names.h"
27 #include "chrome/common/url_constants.h" 26 #include "chrome/common/url_constants.h"
28 #include "components/ui/zoom/zoom_controller.h" 27 #include "components/ui/zoom/zoom_controller.h"
29 #include "content/public/browser/browser_thread.h" 28 #include "content/public/browser/browser_thread.h"
30 #include "content/public/browser/notification_details.h" 29 #include "content/public/browser/notification_details.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 }; 197 };
199 198
200 // static 199 // static
201 StartPageService* StartPageService::Get(Profile* profile) { 200 StartPageService* StartPageService::Get(Profile* profile) {
202 return StartPageServiceFactory::GetForProfile(profile); 201 return StartPageServiceFactory::GetForProfile(profile);
203 } 202 }
204 203
205 StartPageService::StartPageService(Profile* profile) 204 StartPageService::StartPageService(Profile* profile)
206 : profile_(profile), 205 : profile_(profile),
207 profile_destroy_observer_(new ProfileDestroyObserver(this)), 206 profile_destroy_observer_(new ProfileDestroyObserver(this)),
208 recommended_apps_(new RecommendedApps(profile)),
209 state_(app_list::SPEECH_RECOGNITION_OFF), 207 state_(app_list::SPEECH_RECOGNITION_OFF),
210 speech_button_toggled_manually_(false), 208 speech_button_toggled_manually_(false),
211 speech_result_obtained_(false), 209 speech_result_obtained_(false),
212 webui_finished_loading_(false), 210 webui_finished_loading_(false),
213 speech_auth_helper_(new SpeechAuthHelper(profile, &clock_)), 211 speech_auth_helper_(new SpeechAuthHelper(profile, &clock_)),
214 network_available_(true), 212 network_available_(true),
215 microphone_available_(true), 213 microphone_available_(true),
216 weak_factory_(this) { 214 weak_factory_(this) {
217 // If experimental hotwording is enabled, then we're always "ready". 215 // If experimental hotwording is enabled, then we're always "ready".
218 // Transitioning into the "hotword recognizing" state is handled by the 216 // Transitioning into the "hotword recognizing" state is handled by the
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 492 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
495 std::string()); 493 std::string());
496 } 494 }
497 495
498 void StartPageService::UnloadContents() { 496 void StartPageService::UnloadContents() {
499 contents_.reset(); 497 contents_.reset();
500 webui_finished_loading_ = false; 498 webui_finished_loading_ = false;
501 } 499 }
502 500
503 } // namespace app_list 501 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service.h ('k') | chrome/browser/ui/webui/app_list/start_page_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698