Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / hotword_private.idl
index a9a4fc2..24514f9 100644 (file)
     // Whether experimental hotwording functionality is enabled. Mirrors the
     // "enable-experimental-hotwording" flag.
     boolean experimentalHotwordEnabled;
+
+    // Whether always-on hotwording is enabled.
+    boolean alwaysOnEnabled;
+  };
+
+  dictionary LaunchState {
+    // TODO(kcarattini): Consider adding more variables here,
+    // such as the available state of the hotword service.
+
+    // The mode that the Hotword Audio Verification app was launched in.
+    long launchMode;
   };
 
+
   // The type of the recognized hotword. Right now it only has 'search' but
   // could be expanded to other types of actions in the future.
   enum HotwordType { search };
 
   callback GenericDoneCallback = void ();
+  callback LaunchStateCallback = void(LaunchState result);
   callback StatusDetailsCallback = void(StatusDetails result);
 
   interface Functions {
     static void setAudioLoggingEnabled(boolean state,
                                        optional GenericDoneCallback callback);
 
+    // Sets the current enabled state of hotword-always-on-search pref.
+    // True: enable hotword always on search.
+    // False: disable hotword always on search.
+    static void setHotwordAlwaysOnSearchEnabled(boolean state,
+        optional GenericDoneCallback callback);
+
     // Sets the current state of the browser-requested hotword session.
     static void setHotwordSessionState(boolean started,
                                        optional GenericDoneCallback callback);
     // hotword session.
     static void notifyHotwordRecognition(HotwordType type,
                                          optional GenericDoneCallback callback);
+
+    // Retrieves the state that the Hotword Audio Verification app was
+    // launched in. The result is put into a LaunchState object.
+    static void getLaunchState(LaunchStateCallback callback);
   };
 
   interface Events {