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

Side by Side Diff: chrome/common/extensions/api/hotword_private.idl

Issue 559303002: Hotword Audio Verification app: control the hotword settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launch-state
Patch Set: Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // The <code>chrome.hotwordPrivate</code> API allows extensions to access and 5 // The <code>chrome.hotwordPrivate</code> API allows extensions to access and
6 // mutate the preference for enabling hotword search. It also provides 6 // mutate the preference for enabling hotword search. It also provides
7 // information on whether the hotword search is available. This API provides an 7 // information on whether the hotword search is available. This API provides an
8 // event interface to transmit to the extension a signal that the preference fo 8 // event interface to transmit to the extension a signal that the preference fo
9 // hotword search has change. 9 // hotword search has change.
10 // 10 //
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 interface Functions { 52 interface Functions {
53 // Sets the current enabled state of hotword search. 53 // Sets the current enabled state of hotword search.
54 // True: enable hotword search. False: disable hotword search. 54 // True: enable hotword search. False: disable hotword search.
55 static void setEnabled(boolean state, 55 static void setEnabled(boolean state,
56 optional GenericDoneCallback callback); 56 optional GenericDoneCallback callback);
57 57
58 // Retrieves the current state of hotword search. 58 // Retrieves the current state of hotword search.
59 // The result is put into a StatusDetails object. 59 // The result is put into a StatusDetails object.
60 static void getStatus(StatusDetailsCallback callback); 60 static void getStatus(StatusDetailsCallback callback);
61 61
62 // Sets the current enabled state of hotword-always-on-search pref.
63 // True: enable hotword always on search.
64 // False: disable hotword always on search.
65 static void setAudioLoggingEnabled(boolean state,
66 optional GenericDoneCallback callback);
67
62 // Sets the current enabled state of audio logging in the extension. 68 // Sets the current enabled state of audio logging in the extension.
63 // True: logging enabled. False: no logging. 69 // True: logging enabled. False: no logging.
64 static void setAudioLoggingEnabled(boolean state, 70 static void setHotwordAlwaysOnSearchEnabled(boolean state,
rpetterson 2014/09/11 20:14:17 I think you got this function and the one above mi
kcarattini 2014/09/12 01:02:08 Done. Thanks for catching that.
65 optional GenericDoneCallback callback); 71 optional GenericDoneCallback callback);
66 72
67 // Sets the current state of the browser-requested hotword session. 73 // Sets the current state of the browser-requested hotword session.
68 static void setHotwordSessionState(boolean started, 74 static void setHotwordSessionState(boolean started,
69 optional GenericDoneCallback callback); 75 optional GenericDoneCallback callback);
70 76
71 // Notifies that a hotword has been recognized in the browser-requested 77 // Notifies that a hotword has been recognized in the browser-requested
72 // hotword session. 78 // hotword session.
73 static void notifyHotwordRecognition(HotwordType type, 79 static void notifyHotwordRecognition(HotwordType type,
74 optional GenericDoneCallback callback); 80 optional GenericDoneCallback callback);
75 81
76 // Retrieves the state that the Hotword Audio Verification app was 82 // Retrieves the state that the Hotword Audio Verification app was
77 // launched in. The result is put into a LaunchState object. 83 // launched in. The result is put into a LaunchState object.
78 static void getLaunchState(LaunchStateCallback callback); 84 static void getLaunchState(LaunchStateCallback callback);
79 }; 85 };
80 86
81 interface Events { 87 interface Events {
82 // Fired when the hotword search enabled preference is changed. 88 // Fired when the hotword search enabled preference is changed.
83 static void onEnabledChanged(); 89 static void onEnabledChanged();
84 90
85 // Fired when the browser wants to start a hotword session. 91 // Fired when the browser wants to start a hotword session.
86 static void onHotwordSessionRequested(); 92 static void onHotwordSessionRequested();
87 93
88 // Fired when the browser wants to stop the requested hotword session. 94 // Fired when the browser wants to stop the requested hotword session.
89 static void onHotwordSessionStopped(); 95 static void onHotwordSessionStopped();
90 }; 96 };
91 }; 97 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698