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

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

Issue 715773002: Hotword Private API: Add support for retrieving localized strings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 long launchMode; 46 long launchMode;
47 }; 47 };
48 48
49 49
50 // The type of the recognized hotword. Right now it only has 'search' but 50 // The type of the recognized hotword. Right now it only has 'search' but
51 // could be expanded to other types of actions in the future. 51 // could be expanded to other types of actions in the future.
52 enum HotwordType { search }; 52 enum HotwordType { search };
53 53
54 callback GenericDoneCallback = void (); 54 callback GenericDoneCallback = void ();
55 callback LaunchStateCallback = void(LaunchState result); 55 callback LaunchStateCallback = void(LaunchState result);
56 callback LocalizeStringsCallback = void(object result);
56 callback StatusDetailsCallback = void(StatusDetails result); 57 callback StatusDetailsCallback = void(StatusDetails result);
57 58
58 interface Functions { 59 interface Functions {
59 // Sets the current enabled state of hotword search. 60 // Sets the current enabled state of hotword search.
60 // True: enable hotword search. False: disable hotword search. 61 // True: enable hotword search. False: disable hotword search.
61 static void setEnabled(boolean state, 62 static void setEnabled(boolean state,
62 optional GenericDoneCallback callback); 63 optional GenericDoneCallback callback);
63 64
64 // Retrieves the current state of hotword search. 65 // Retrieves the current state of hotword search.
65 // The result is put into a StatusDetails object. 66 // The result is put into a StatusDetails object.
66 static void getStatus(StatusDetailsCallback callback); 67 static void getStatus(StatusDetailsCallback callback);
67 68
69 // Retrieves a dictionary mapping names to localized resource strings.
70 static void getLocalizedStrings(LocalizeStringsCallback callback);
71
68 // Sets the current enabled state of audio logging in the extension. 72 // Sets the current enabled state of audio logging in the extension.
69 // True: logging enabled. False: no logging. 73 // True: logging enabled. False: no logging.
70 static void setAudioLoggingEnabled(boolean state, 74 static void setAudioLoggingEnabled(boolean state,
71 optional GenericDoneCallback callback); 75 optional GenericDoneCallback callback);
72 76
73 // Sets the current enabled state of hotword-always-on-search pref. 77 // Sets the current enabled state of hotword-always-on-search pref.
74 // True: enable hotword always on search. 78 // True: enable hotword always on search.
75 // False: disable hotword always on search. 79 // False: disable hotword always on search.
76 static void setHotwordAlwaysOnSearchEnabled(boolean state, 80 static void setHotwordAlwaysOnSearchEnabled(boolean state,
77 optional GenericDoneCallback callback); 81 optional GenericDoneCallback callback);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Fired when the speaker model should be finalized. 121 // Fired when the speaker model should be finalized.
118 static void onFinalizeSpeakerModel(); 122 static void onFinalizeSpeakerModel();
119 123
120 // Fired when the speaker model has been saved. 124 // Fired when the speaker model has been saved.
121 static void onSpeakerModelSaved(); 125 static void onSpeakerModelSaved();
122 126
123 // Fired when a hotword has triggered. 127 // Fired when a hotword has triggered.
124 static void onHotwordTriggered(); 128 static void onHotwordTriggered();
125 }; 129 };
126 }; 130 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698