renderMenu_(elem, blob) {
    var contentBlob;
    var displayedAction;
    if (blob instanceof panels.prompt.PanelBase) {
      contentBlob = blob.getContent();
      displayedAction = contentBlob.action;
    } else {
      contentBlob = blob || null;
    }

    var menu = new goog.ui.PopupMenu();
    goog.array.forEach(this.selectableActions_, function(action) {
      var menuItem = new goog.ui.MenuItem(action.title);
      menuItem.setValue(action.value);
      if (displayedAction == action.value) {
        menuItem.setEnabled(false);
      }
      menu.addChild(menuItem, true);
    });
    this.addChild(menu, false);
    menu.render(goog.dom.getElement(constants.ElementId.BODY));

    this.getHandler().listen(
        menu, goog.ui.Component.EventType.ACTION,
        goog.partial(this.selectAction_, contentBlob));

    var menuButton = this.getElementByClass(constants.CssClass.MENU_BUTTON);

    menu.setToggleMode(true);
    menu.attach(
        menuButton, goog.positioning.Corner.TOP_LEFT,
        goog.positioning.Corner.BOTTOM_LEFT);

    return menu;
  }
Renders the main menu.
@param {Element} elem The element into which the UI elements are to be
    rendered.
@param {panels.prompt.PanelBase|messages.BridgeMessageRequest} blob The
    prompt UI panel that is displayed to the user or the content blob that
    the user has selected.
@return {!goog.ui.PopupMenu} Created menu
@private