| Index: chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
|
| diff --git a/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js b/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
|
| index c413229adbbc7a278967f59c01c71e40c4ba1a4f..f68cd0ae090c31b88135658bf8a0c4d903069f97 100644
|
| --- a/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
|
| +++ b/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
|
| @@ -211,6 +211,18 @@ cr.define('cr.ui', function() {
|
| return this.getBoundingClientRect();
|
| };
|
| }
|
| + },
|
| +
|
| + /**
|
| + * Sets the given contextMenu to the given element. A contextMenu property
|
| + * would be added if necessary.
|
| + * @param {!Element} element The element or class to set the contextMenu to.
|
| + * @param {!cr.ui.Menu} contextMenu The contextMenu property to be set.
|
| + */
|
| + setContextMenu: function(element, contextMenu) {
|
| + if (!element.contextMenu)
|
| + this.addContextMenuProperty(element);
|
| + element.contextMenu = contextMenu;
|
| }
|
| };
|
|
|
|
|