Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / resources / hotword / launcher_manager.js
blob59646ea5a9a1dad0cb3eb0f78153e5646ce4e64e
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
3 // found in the LICENSE file.
5 cr.define('hotword', function() {
6 'use strict';
8 /**
9 * Class used to manage the interaction between hotwording and the launcher
10 * (app list).
11 * @param {!hotword.StateManager} stateManager
12 * @constructor
13 * @extends {hotword.BaseSessionManager}
15 function LauncherManager(stateManager) {
16 hotword.BaseSessionManager.call(this,
17 stateManager,
18 hotword.constants.SessionSource.LAUNCHER);
21 LauncherManager.prototype = {
22 __proto__: hotword.BaseSessionManager.prototype,
24 /** @override */
25 enabled: function() {
26 return this.stateManager.isSometimesOnEnabled();
29 /** @override */
30 onSessionStop: function() {
31 chrome.hotwordPrivate.setHotwordSessionState(false, function() {});
35 return {
36 LauncherManager: LauncherManager
38 });