electron/atom/browser/api
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
..
atom_api_app.cc Move it into dialog 2017-04-03 15:05:24 -04:00
atom_api_app.h Remove old unnecssary change on app 2017-04-03 15:09:04 -04:00
atom_api_auto_updater.cc Add IsEmpty helper and remove GetInstance public usage 2017-04-11 09:09:17 -07:00
atom_api_auto_updater.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_browser_view.cc Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
atom_api_browser_view.h Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
atom_api_content_tracing.cc contentTracing.setWatchEvent/cancelWatchEvent is removed 2017-02-06 10:34:28 -08:00
atom_api_cookies.cc There is a new INSERTED type of ChangeCause 2017-02-06 10:34:29 -08:00
atom_api_cookies.h Namespace of ChangeCause has changed 2017-02-06 10:34:28 -08:00
atom_api_debugger.cc Fix API changes of Chrome 53 2016-09-14 16:22:43 +09:00
atom_api_debugger.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_desktop_capturer.cc WindowCapturer and ScreenCapturer are merged to DesktopCapturer 2017-02-06 10:34:28 -08:00
atom_api_desktop_capturer.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_dialog.cc Merge pull request #9099 from electron/certificate-trust 2017-04-04 11:17:09 -07:00
atom_api_download_item.cc remove the call to download_item_->Remove() on cancel 2017-02-24 14:08:21 +08:00
atom_api_download_item.h remove the call to download_item_->Remove() on cancel 2017-02-24 14:08:21 +08:00
atom_api_global_shortcut.cc Every native class now gets a name 2016-08-02 19:28:12 +09:00
atom_api_global_shortcut.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_menu.cc Add Menu.closePopup API on macOS 2017-02-22 10:30:28 -08:00
atom_api_menu.h 🎨 2017-02-22 10:30:28 -08:00
atom_api_menu_mac.h Make variables private instead of protected 2017-02-22 10:30:28 -08:00
atom_api_menu_mac.mm Add Menu.closePopup API on macOS 2017-02-22 10:30:28 -08:00
atom_api_menu_views.cc Implement ClosePopupAt on Windows/Linux 2017-02-22 10:30:28 -08:00
atom_api_menu_views.h Make variables private instead of protected 2017-02-22 10:30:28 -08:00
atom_api_net.cc Fixing code review issues. 2016-10-25 12:41:01 +02:00
atom_api_net.h Fixing code review issues. 2016-10-25 12:41:01 +02:00
atom_api_power_monitor.cc initialize -> require 2016-09-16 13:09:06 -07:00
atom_api_power_monitor.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_power_save_blocker.cc Update files for Chrome 54 API changes 2017-01-19 09:05:59 +02:00
atom_api_power_save_blocker.h Fix API changes of Chrome 53 2016-09-14 16:22:43 +09:00
atom_api_protocol.cc Remove linter errors 2016-12-12 12:51:48 -08:00
atom_api_protocol.h Remove linter errors 2016-12-12 12:51:48 -08:00
atom_api_render_process_preferences.cc Fix API changes of Chrome 53 2016-09-14 16:22:43 +09:00
atom_api_render_process_preferences.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_screen.cc initialize -> require 2016-09-16 13:09:06 -07:00
atom_api_screen.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_session.cc Avoid unnecessary copy of parameters. 2017-03-29 22:06:07 +02:00
atom_api_session.h session: api to clear auth cache 2016-12-09 09:54:30 -08:00
atom_api_system_preferences.cc Initialize color listener after app is ready 2017-02-03 09:00:18 -08:00
atom_api_system_preferences.h Initialize color listener after app is ready 2017-02-03 09:00:18 -08:00
atom_api_system_preferences_mac.mm Add systemPreferences.setUserDefault for macOS 2016-11-29 09:46:32 -08:00
atom_api_system_preferences_win.cc Initialize color listener after app is ready 2017-02-03 09:00:18 -08:00
atom_api_tray.cc Update files for Chrome 54 API changes 2017-01-19 09:05:59 +02:00
atom_api_tray.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_url_request.cc net: allow controlling redirects 2017-03-28 18:46:21 +05:30
atom_api_url_request.h net: allow controlling redirects 2017-03-28 18:46:21 +05:30
atom_api_web_contents.cc Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
atom_api_web_contents.h Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
atom_api_web_contents_mac.mm Access window through native view 2016-08-23 09:51:54 -07:00
atom_api_web_request.cc Allow filter to use any scheme 2017-02-06 10:34:30 -08:00
atom_api_web_request.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_web_view_manager.cc code cleanup 2017-02-12 01:48:24 +05:30
atom_api_window.cc Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
atom_api_window.h Implement initial, experimental BrowserView API 2017-04-13 01:27:27 +03:00
event.cc Every native class now gets a name 2016-08-02 19:28:12 +09:00
event.h Sort includes alphabetically 2016-08-26 15:30:02 -07:00
event_emitter.cc Set prototype of constructor directly 2016-08-02 20:38:35 +09:00
event_emitter.h Set prototype of constructor directly 2016-08-02 20:38:35 +09:00
frame_subscriber.cc Merge pull request #7163 from MaxWhere/frame-sub-scale-fix 2016-09-16 21:24:53 +09:00
frame_subscriber.h reverts subscriber api 2016-09-16 11:18:15 +02:00
save_page_handler.cc
save_page_handler.h
trackable_object.cc AttachAsUserData now can assume the existence of wrapper 2016-08-02 15:28:32 +09:00
trackable_object.h Don't load URL if web contents is destroyed 2016-12-28 13:40:06 -08:00