electron/lib/browser
Birunthan Mohanathas 8b9f7e5b00 Implement initial, experimental BrowserView API
Right now, `<webview>` is the only way to embed additional content in a
`BrowserWindow`. Unfortunately `<webview>` suffers from a [number of
problems](https://github.com/electron/electron/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20label%3Awebview%20).
To make matters worse, many of these are upstream Chromium bugs instead
of Electron-specific bugs.

For us at [Figma](https://www.figma.com), the main issue is very slow
performance.

Despite the upstream improvements to `<webview>` through the OOPIF work, it is
probable that there will continue to be `<webview>`-specific bugs in the
future.

Therefore, this introduces a `<webview>` alternative to called `BrowserView`,
which...

- is a thin wrapper around `api::WebContents` (so bugs in `BrowserView` will
  likely also be bugs in `BrowserWindow` web contents)

- is instantiated in the main process like `BrowserWindow` (and unlike
  `<webview>`, which lives in the DOM of a `BrowserWindow` web contents)

- needs to be added to a `BrowserWindow` to display something on the screen

This implements the most basic API. The API is expected to evolve and change in
the near future and has consequently been marked as experimental. Please do not
use this API in production unless you are prepared to deal with breaking
changes.

In the future, we will want to change the API to support multiple
`BrowserView`s per window. We will also want to consider z-ordering
auto-resizing, and possibly even nested views.
2017-04-13 01:27:27 +03:00
..
api Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
chrome-extension.js Implement chrome.runtime.onMessage response callback 2016-11-15 21:30:40 +11:00
desktop-capturer.js Remove returns from event listeners 2016-05-19 15:28:08 -07:00
guest-view-manager.js Forward webview visibility change events from browser process 2017-02-28 08:23:00 -08:00
guest-window-manager.js Implement window overrides in main context 2017-01-16 12:38:16 -08:00
init.js Use spread syntax instead of function apply 2016-12-01 14:56:00 -08:00
objects-registry.js Co-locate with other private methods 2016-12-02 10:41:42 -08:00
rpc-server.js Match args style of other IPC handlers 2017-04-04 11:18:16 -07:00