In 1.4.5, Electron added a new API (`previewFile`) that allows you to open a quicklook preview panel. However, there isn't an API for closing the preview panel that is opened.

QLPreviewPanel is a subclass of NSWindow - using Mac OS X APIs, it's pretty easy to close the shared Quicklook preview panel.

We need this functionality because the panel does not close automatically when the window is blurred, or when another window is opened in the application (https://github.com/nylas/N1/issues/3021). Other user action, such as moving focus to a message that doesn't have quicklook attachments should also probably close the panel.

I'm not sure what a good name for this API would be. Maybe `dismissFilePreview` or `unpreviewFile`? 
atom/browser/native_window_mac.h
gfx::Rect WindowBoundsToContentBounds(const gfx::Rect& bounds);
  void UpdateDraggableRegions(
      const std::vector<DraggableRegion>& regions) override;
  void ShowWindowButton(NSWindowButton button);
  void InstallView();
  void UninstallView();
  
  
  void UpdateDraggableRegionViews(const std::vector<DraggableRegion>& regions);
  void RegisterInputEventObserver(content::RenderViewHost* host);
  void UnregisterInputEventObserver(content::RenderViewHost* host);
  base::scoped_nsobject<AtomNSWindow> window_;
  base::scoped_nsobject<AtomNSWindowDelegate> window_delegate_;
  
  id wheel_event_monitor_;
  
  base::scoped_nsobject<FullSizeContentView> content_view_;
  std::vector<DraggableRegion> draggable_regions_;
  bool is_kiosk_;
  bool zoom_to_page_width_;
  NSInteger attention_request_id_;  
  
  NSApplicationPresentationOptions kiosk_options_;
  
  TitleBarStyle title_bar_style_;
  DISALLOW_COPY_AND_ASSIGN(NativeWindowMac);
};
}  
#endif