* feat: add method to DownloadItem that allows customization of dialog options
* docs: add docs for get/setSaveDialogOptions
* add missing copy constructor for DialogSettings on mac and linux
* fix: don't filter dialog options for mas build, don't return properties
* test: add test for get/setSaveDialogOptions
* fix: remove openDevtools added for debugging
* test: fix failing test because of new event parameter
* docs: use SaveDialogOptions instead of Object
* fix: allow stream protocols to return headers with multiple values
This allows stream protocols to return headers with multiple values as
an array of values.
Fixes https://github.com/electron/electron/issues/14778
* Prefer ConvertFromV8
* Cleanup header conversion
1. Deduplicate the code by using a lambda
2. Remove duplicate calls to headers->Get(key)
* Fix broken test
Headers with multiple values are now being converted correctly, this
test asserted the wrong behavior.
* Use weak pointer to avoid race condition
* Use DeleteSoon to delete pointer across threads
* Simplify EventSubscriber
* No need to manually mange V8 convertions
* Fix cpplint warning
We should update cpplint for this, but let's do it in other PR.
* Move UI thread operations to EventSubscriber
* Less and more assertions
Some methods are now private so no more need to assert threads.
* Fix cpplint warnings
* No longer needs the EventEmitted
* EventSubscriber => StreamSubscriber
* Reduce the copies when passing data
* Fix cpplint warnings
* chore: fix cpplint 'include_what_you_use' warnings
Typically by including <memory>, <utility> etc.
* chore: fix 'static/global string constant' warning
Use C style strings instead of std::string.
Style guide forbids non-trivial static / global variables. https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables
/home/charles/electron/electron-gn/src/electron/script/cpplint.js
* refactor: remove global string variables.
Fix 'global string variables are not permitted' linter warnings
by using the base::NoDestructor<> wrapper to make it explicit that
these variables are never destroyed.
The style guide's take on globals with nontrivial destructors:
https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables
* fix: initializer error introduced in last commit
* fix: remove WIP file that was included by accident
* fix: include order
* fix: include order
* fix: include order
* fix: include order, again
* add new native_mate converters for base::Value
* fix converter swapping
* remove createDeepCopy from browser/api
* replace missing ListValue converter
* convert bulk of remaining createDeepCopy instances
* convert last remaining instances of createDeepCopy
* incremental progress and helper methods for value conversion
* convert Get and add template function for GetString
* final DictionaryValue method conversions
* remove usage of base::DictionaryValue in web_contents_preferences
* use IsEnabled helper where possible
* Update atom_api_web_view_manager.cc
* Don't use JSON to send the result of `ipcRenderer.sendSync`.
- Change the return type of AtomViewHostMsg_Message_Sync from `base::string16`
to `base::ListValue`
- Adjust lib/browser/api/web-contents.js and /lib/renderer/api/ipc-renderer.js
to wrap/unwrap return values to/from array, instead of
serializing/deserializing JSON.
This change can greatly improve `ipcRenderer.sendSync` calls where the return
value contains Buffer instances, because those are converted to Array before
being serialized to JSON(which has no efficient way of representing byte
arrays).
A simple benchmark where remote.require('fs') was used to read a 16mb file got
at least 5x faster, not to mention it used a lot less memory. This difference
tends increases with larger buffers.
* Don't base64 encode Buffers
* Don't allocate V8ValueConverter on the heap
* Replace hidden global.sandbox with NodeBindings::IsInitialized()
* Refactoring: check NodeBindings::IsInitialized() in V8ValueConverter
* Refactor problematic test to make it more reliable
* Add tests for NaN and Infinity
* Propagate referrer to new windows
Fixes#9205
* Rearrange -new-window event arguments for backwards-compatibility
* Plumb referrer policy through guest-window-manager
* Document the Referrer structure and its uses
* Add tests for referrer in new windows
* Docs nits