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

Unified Diff: chrome/browser/ui/webui/app_list/start_page_handler.h

Issue 158143002: Fine tuned availability of hotword plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/app_list/start_page_handler.h
diff --git a/chrome/browser/ui/webui/app_list/start_page_handler.h b/chrome/browser/ui/webui/app_list/start_page_handler.h
index c3d35bbd026b7ef4aeb487a85f956f07e3f6a56a..b444f752897561e1b08c68de6f4eac13bb0e2667 100644
--- a/chrome/browser/ui/webui/app_list/start_page_handler.h
+++ b/chrome/browser/ui/webui/app_list/start_page_handler.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/ui/app_list/recommended_apps_observer.h"
#include "content/public/browser/web_ui_message_handler.h"
@@ -35,6 +36,18 @@ class StartPageHandler : public content::WebUIMessageHandler,
// Creates a ListValue for the recommended apps and sends it to js side.
void SendRecommendedApps();
+#if defined(OS_CHROMEOS)
+ // Returns true if the hotword is enabled.
+ bool HotwordEnabled();
+
+ // Called when the pref has been changed.
+ void OnHotwordEnabledChanged();
+
+ // Called when the availability of the hotword for NTP is changed. The new
+ // value has to be propagated.
+ void SynchronizeHotwordEnabled();
+#endif
+
// JS callbacks.
void HandleInitialize(const base::ListValue* args);
void HandleLaunchApp(const base::ListValue* args);
@@ -43,6 +56,7 @@ class StartPageHandler : public content::WebUIMessageHandler,
void HandleSpeechRecognition(const base::ListValue* args);
RecommendedApps* recommended_apps_; // Not owned.
+ PrefChangeRegistrar pref_change_registrar_;
DISALLOW_COPY_AND_ASSIGN(StartPageHandler);
};
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service_factory.cc ('k') | chrome/browser/ui/webui/app_list/start_page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698