How to add only close button to right corner of chromeapp

I am new to chrome app development. I have searched through many reference but I couldn't find a way to add close button to chrome app as we can see in postman or in browser.

I have read this doc, but I am not able to write code. Can some one please tell me how to add those buttons.


ANSWERS:


In createWindowOptions their is one attribute as frame by default it is set chrome. I have set that option as none so that's why basic browser button like close, minimize and maximize was not visible.


I would recommend making your own frame and using a frameless window. Here is an example of it: Frameless Window Sample on Github

Otherwise, if you're ok with having the minimize and close buttons, you can set a min and max for width and height. This will get rid of the maximize button.

chrome.app.runtime.onLaunched.addListener(function(launchData) {
  chrome.app.window.create(
    'index.html',
    {
      id: 'mainWindow',
      bounds: {width: 800, height: 600},
      maxWidth: 800, 
      maxHeight: 600
    }
  );
});


 MORE:


 ? Issue with triggering chrome.browserAction.onClicked.addListener
 ? Accessing text files with Javascript in a chrome app
 ? ChromeOS 56 disabling flash for kiosk app
 ? readAsText(file) only reads the last file in a directory
 ? Open links in new tab chrome packaged app
 ? window.local storage is not available in packaged apps
 ? How to create chrome tab of develop Chrome Extension like window.location?
 ? load data from chrome.storage into vue.js data
 ? How to show google chrome apps icon in system tray
 ? How to do parallel downloads of videos using XMLHttpRequest in javascript? Is there any solution to do chunk by chunk?