OLD | NEW |
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 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * remoting.ContextMenuAdapter implementation backed by chrome.contextMenus. | 7 * remoting.ContextMenuAdapter implementation backed by chrome.contextMenus. |
8 */ | 8 */ |
9 | 9 |
10 'use strict'; | 10 'use strict'; |
11 | 11 |
12 /** @suppress {duplicate} */ | 12 /** @suppress {duplicate} */ |
13 var remoting = remoting || {}; | 13 var remoting = remoting || {}; |
14 | 14 |
15 /** | 15 /** |
16 * @constructor | 16 * @constructor |
17 * @implements {remoting.ContextMenuAdapter} | 17 * @implements {remoting.ContextMenuAdapter} |
18 */ | 18 */ |
19 remoting.ContextMenuChrome = function() { | 19 remoting.ContextMenuChrome = function() {}; |
20 }; | 20 |
| 21 remoting.ContextMenuChrome.prototype.dispose = function() {}; |
21 | 22 |
22 /** | 23 /** |
23 * @param {string} id An identifier for the menu entry. | 24 * @param {string} id An identifier for the menu entry. |
24 * @param {string} title The text to display in the menu. | 25 * @param {string} title The text to display in the menu. |
25 * @param {boolean} isCheckable True if the state of this menu entry should | 26 * @param {boolean} isCheckable True if the state of this menu entry should |
26 * have a check-box and manage its toggle state automatically. | 27 * have a check-box and manage its toggle state automatically. |
27 * @param {string=} opt_parentId The id of the parent menu item for submenus. | 28 * @param {string=} opt_parentId The id of the parent menu item for submenus. |
28 */ | 29 */ |
29 remoting.ContextMenuChrome.prototype.create = function( | 30 remoting.ContextMenuChrome.prototype.create = function( |
30 id, title, isCheckable, opt_parentId) { | 31 id, title, isCheckable, opt_parentId) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 }; | 84 }; |
84 | 85 |
85 /** | 86 /** |
86 * @param {*} message | 87 * @param {*} message |
87 * @param {Window} backgroundPage | 88 * @param {Window} backgroundPage |
88 */ | 89 */ |
89 remoting.ContextMenuChrome.prototype.postMessage_ = function( | 90 remoting.ContextMenuChrome.prototype.postMessage_ = function( |
90 message, backgroundPage) { | 91 message, backgroundPage) { |
91 backgroundPage.postMessage(message, '*'); | 92 backgroundPage.postMessage(message, '*'); |
92 }; | 93 }; |
OLD | NEW |