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

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

Issue 631913004: Open the launcher when hotword is triggered in always-on mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hotword-google-com-ntp
Patch Set: Fix android build Created 6 years, 2 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 #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"
11 #include "base/callback.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/observer_list.h" 14 #include "base/observer_list.h"
14 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
15 #include "components/keyed_service/core/keyed_service.h" 16 #include "components/keyed_service/core/keyed_service.h"
16 #include "content/public/browser/web_contents.h" 17 #include "content/public/browser/web_contents.h"
17 #include "ui/app_list/speech_ui_model_observer.h" 18 #include "ui/app_list/speech_ui_model_observer.h"
18 19
19 namespace extensions { 20 namespace extensions {
20 class Extension; 21 class Extension;
(...skipping 15 matching lines...) Expand all
36 // Gets the instance for the given profile. 37 // Gets the instance for the given profile.
37 static StartPageService* Get(Profile* profile); 38 static StartPageService* Get(Profile* profile);
38 39
39 void AddObserver(StartPageObserver* observer); 40 void AddObserver(StartPageObserver* observer);
40 void RemoveObserver(StartPageObserver* observer); 41 void RemoveObserver(StartPageObserver* observer);
41 42
42 void AppListShown(); 43 void AppListShown();
43 void AppListHidden(); 44 void AppListHidden();
44 void ToggleSpeechRecognition(); 45 void ToggleSpeechRecognition();
45 46
47 // Called when the WebUI has finished loading.
48 void WebUILoaded();
49
46 // Returns true if the hotword is enabled in the app-launcher. 50 // Returns true if the hotword is enabled in the app-launcher.
47 bool HotwordEnabled(); 51 bool HotwordEnabled();
48 52
49 // They return essentially the same web contents but might return NULL when 53 // They return essentially the same web contents but might return NULL when
50 // some flag disables the feature. 54 // some flag disables the feature.
51 content::WebContents* GetStartPageContents(); 55 content::WebContents* GetStartPageContents();
52 content::WebContents* GetSpeechRecognitionContents(); 56 content::WebContents* GetSpeechRecognitionContents();
53 57
54 RecommendedApps* recommended_apps() { return recommended_apps_.get(); } 58 RecommendedApps* recommended_apps() { return recommended_apps_.get(); }
55 Profile* profile() { return profile_; } 59 Profile* profile() { return profile_; }
(...skipping 26 matching lines...) Expand all
82 Profile* profile_; 86 Profile* profile_;
83 scoped_ptr<content::WebContents> contents_; 87 scoped_ptr<content::WebContents> contents_;
84 scoped_ptr<StartPageWebContentsDelegate> contents_delegate_; 88 scoped_ptr<StartPageWebContentsDelegate> contents_delegate_;
85 scoped_ptr<ProfileDestroyObserver> profile_destroy_observer_; 89 scoped_ptr<ProfileDestroyObserver> profile_destroy_observer_;
86 scoped_ptr<RecommendedApps> recommended_apps_; 90 scoped_ptr<RecommendedApps> recommended_apps_;
87 SpeechRecognitionState state_; 91 SpeechRecognitionState state_;
88 ObserverList<StartPageObserver> observers_; 92 ObserverList<StartPageObserver> observers_;
89 bool speech_button_toggled_manually_; 93 bool speech_button_toggled_manually_;
90 bool speech_result_obtained_; 94 bool speech_result_obtained_;
91 95
96 bool webui_finished_loading_;
97 std::vector<base::Closure> pending_webui_callbacks_;
98
92 DISALLOW_COPY_AND_ASSIGN(StartPageService); 99 DISALLOW_COPY_AND_ASSIGN(StartPageService);
93 }; 100 };
94 101
95 } // namespace app_list 102 } // namespace app_list
96 103
97 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_ 104 #endif // CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.cc ('k') | chrome/browser/ui/app_list/start_page_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698