Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / remoting / webapp / app_remoting / js / context_menu_adapter.js
bloba0c5b0ea6b6aa1c6981889441730168aa1eb7f14
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 /**
6 * @fileoverview
7 * Wrapper interface for chrome.contextMenus.
8 */
10 'use strict';
12 /** @suppress {duplicate} */
13 var remoting = remoting || {};
15 /**
16 * @interface
17 * @extends {base.Disposable}
19 remoting.ContextMenuAdapter = function() {
22 /**
23 * @param {string} id An identifier for the menu entry.
24 * @param {string} title The text to display in the menu.
25 * @param {boolean} isCheckable True if the state of this menu entry should
26 * have a check-box and manage its toggle state automatically. Note that
27 * checkable menu entries always start off unchecked; use updateCheckState
28 * to programmatically change the state.
29 * @param {string=} opt_parentId The id of the parent menu item for submenus.
31 remoting.ContextMenuAdapter.prototype.create = function(
32 id, title, isCheckable, opt_parentId) {
35 /**
36 * @param {string} id
37 * @param {string} title
39 remoting.ContextMenuAdapter.prototype.updateTitle = function(id, title) {
42 /**
43 * @param {string} id
44 * @param {boolean} checked
46 remoting.ContextMenuAdapter.prototype.updateCheckState = function(id, checked) {
49 /**
50 * @param {string} id
52 remoting.ContextMenuAdapter.prototype.remove = function(id) {
55 /**
56 * @param {function(OnClickData=):void} listener
58 remoting.ContextMenuAdapter.prototype.addListener = function(listener) {