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

Side by Side Diff: chrome/browser/search/hotword_service.h

Issue 467113004: Adds a skeleton component app for Always-On Hotwording opt-in flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Copyright Year Created 6 years, 4 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_SEARCH_HOTWORD_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_
6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ 6 #define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 virtual bool IsHotwordAllowed(); 66 virtual bool IsHotwordAllowed();
67 67
68 // Checks if the user has opted into audio logging. Returns true if the user 68 // Checks if the user has opted into audio logging. Returns true if the user
69 // is opted in, false otherwise.. 69 // is opted in, false otherwise..
70 bool IsOptedIntoAudioLogging(); 70 bool IsOptedIntoAudioLogging();
71 71
72 // Control the state of the hotword extension. 72 // Control the state of the hotword extension.
73 void EnableHotwordExtension(ExtensionService* extension_service); 73 void EnableHotwordExtension(ExtensionService* extension_service);
74 void DisableHotwordExtension(ExtensionService* extension_service); 74 void DisableHotwordExtension(ExtensionService* extension_service);
75 75
76 // Handles launching the Hotword Audio Verification extension when the user
77 // turns it on via the settings menu.
78 void OnHotwordAlwaysOnSearchEnabledChanged(const std::string& pref_name);
79
76 // Handles enabling/disabling the hotword extension when the user 80 // Handles enabling/disabling the hotword extension when the user
77 // turns it off via the settings menu. 81 // turns it off via the settings menu.
78 void OnHotwordSearchEnabledChanged(const std::string& pref_name); 82 void OnHotwordSearchEnabledChanged(const std::string& pref_name);
79 83
80 // Called to handle the hotword session from |client|. 84 // Called to handle the hotword session from |client|.
81 void RequestHotwordSession(HotwordClient* client); 85 void RequestHotwordSession(HotwordClient* client);
82 void StopHotwordSession(HotwordClient* client); 86 void StopHotwordSession(HotwordClient* client);
83 HotwordClient* client() { return client_; } 87 HotwordClient* client() { return client_; }
84 88
85 // Checks if the current version of the hotword extension should be 89 // Checks if the current version of the hotword extension should be
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 HotwordClient* client_; 124 HotwordClient* client_;
121 int error_message_; 125 int error_message_;
122 bool reinstall_pending_; 126 bool reinstall_pending_;
123 127
124 base::WeakPtrFactory<HotwordService> weak_factory_; 128 base::WeakPtrFactory<HotwordService> weak_factory_;
125 129
126 DISALLOW_COPY_AND_ASSIGN(HotwordService); 130 DISALLOW_COPY_AND_ASSIGN(HotwordService);
127 }; 131 };
128 132
129 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_ 133 #endif // CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698