processSelectedContent_(contentBlob, opt_action) {
    this.clearFailure_();
    var action = opt_action || ext.constants.Actions.USER_SPECIFIED;
    var content = '';
    var origin = '';
    var recipients = [];
    var canInject = false;
    if (contentBlob) {
      if (contentBlob.request) {
        content = contentBlob.selection;
      }
      action =
          opt_action || contentBlob.action || utils.text.getPgpAction(content);
      origin = contentBlob.origin;
      recipients = contentBlob.recipients || [];
      contentBlob.action = action;
      canInject = contentBlob.canInject;
      contentBlob.subject = contentBlob.subject || undefined;
    }

    if (!this.pgpLauncher_.hasPassphrase() &&
        action != ext.constants.Actions.GET_PASSPHRASE) {
      this.processSelectedContent_(
          contentBlob, ext.constants.Actions.GET_PASSPHRASE);
      return;
    }

    var promptPanel = null;
    var elem = goog.dom.getElement(constants.ElementId.BODY);
    var title = this.getElementByClass(constants.CssClass.PROMPT_TITLE);
    title.textContent = this.getTitle_(action) || title.textContent;
    switch (action) {
      case constants.Actions.ENCRYPT_SIGN:
        promptPanel = new panels.prompt.EncryptSign(
            this.actionExecutor_,
            /** @type {!messages.BridgeMessageRequest} */ (contentBlob || {}),
            this.pgpLauncher_.getPreferences(),
            goog.bind(this.displayFailure_, this));
        break;
      case constants.Actions.DECRYPT_VERIFY:
        promptPanel = new panels.prompt.DecryptVerify(
            this.actionExecutor_,
            /** @type {!messages.BridgeMessageRequest} */ (contentBlob || {}),
            goog.bind(this.displayFailure_, this));
        break;
      case constants.Actions.IMPORT_KEY:
        promptPanel = new panels.prompt.ImportKey(
            this.actionExecutor_,
            /** @type {!messages.BridgeMessageRequest} */ (contentBlob || {}),
            goog.bind(this.displayFailure_, this));
        break;
      case constants.Actions.GET_PASSPHRASE:
        this.hideHeaderButtons_();
        this.renderKeyringPassphrase_(elem, contentBlob);
        return;
      case constants.Actions.USER_SPECIFIED:
        this.showMenuInline_(this.renderMenu_(elem, contentBlob));
        return;
      case constants.Actions.CONFIGURE_EXTENSION:
        /** @type {?} */ (this).pgpLauncher_.createWindow(
            'settings.html', this.isPopout, goog.nullFunction);
        return;
      case constants.Actions.NO_OP:
        this.close();
        return;
    }
    this.showHeaderButtons_();
    if (promptPanel) {
      this.panel_ = promptPanel;
      this.addChild(promptPanel, false);
      promptPanel.decorate(elem);
      title.textContent = promptPanel.getTitle();
    } else {
      this.panel_ = null;
    }

    this.getHandler().listen(
        elem, goog.events.EventType.CLICK,
        goog.bind(this.buttonClick_, this, action, origin, contentBlob));

    this.getHandler().listen(
        elem, goog.events.EventType.KEYDOWN,
        goog.bind(this.keypressListener_, this));

    if (utils.isChromeExtensionWindow() && !this.isPopout) {
      this.getHandler().listen(
          this.getElementByClass(constants.CssClass.POPOUT_BUTTON),
          goog.events.EventType.CLICK, goog.bind(this.handlePopout_, this));
    }

    this.renderMenu_(elem, promptPanel);
  }
Process the retrieved content blob and display it into the prompt UI.
@param {?messages.BridgeMessageRequest} contentBlob The content that the
    user has selected.
@param {constants.Actions=} opt_action Optional. The PGP action to perform.
    Defaults to user-specified.
@private