* refactor: fix clang-tidy vector operation warnings
Fix vector population performance-inefficient-vector-operation warnings
generated by clang-tidy
* refactor: fix clang-tidy emplace_back warnings
In cases where a temporary is created to be passed
to push_back(), replace it with emplace_back().
Warning: modernize-use-emplace
* refactor: fix clang-tidy loop iteration warnings
When practical, use range-based for loops instead of C-style for loops.
clang-tiny check: modernize-loop-convert
* refactor: fix clang-tidy string initialize warning
Remove redundant empty string initialization.
clang-tidy check: readability-redundant-string-init
* use gin converter in atom_api_menu
* please only put necessary includes in header
Having include in header means they have dependency relationship,
putting arbitrary includes really really really really really makes
refacoring much harder.
* remove some simple uses of callback_converter_deprecated.h
* use gin callback converter in file_dialog code
* use gin in ErrorThrower
* use gin in atom_bundle_mover
* fix mistake in node stream
* deprecate native_mate version of event_emitter_caller
* use gin in node_bindings
* remove usages of native_mate event_emitter_caller.h except for EventEmitter
* fix compilation on Windows
* gin::Arguments behaves differently on GetNext
* just use StringToV8
* feat: add nativeTheme.shouldUseDarkColorsOverride to allow apps to override Chromiums theme choice
* spec: add tests for shouldUseDarkColorsOverride
* chore: add missing forward declarations
* refactor: rename overrideShouldUseDarkColors to themeSource
* chore: only run appLevelAppearance specs on Mojave and up
* chore: update patch with more info and no define
* Update spec-main/api-native-theme-spec.ts
Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org>
* Update api-native-theme-spec.ts
* Update api-native-theme-spec.ts
* Update api-native-theme-spec.ts
This is a speculative fix for a crash we are seeing in `menuDidClose`. We
can't repro the crash but the traces have it happening in this method
and just by reading through the impl the only part that jumps out as
Might Crash is this `model_` call. Other methods in the menu controller
check `model_` before using it so it probably makes sense to do that here
as well.
* add notice to files being removed
* add gin version of function_template.h
* rename callback.h to avoid confliction
* add gin version of callback_converter
* add gin converter for OnceCallback
* remove callback_converter_gin_adapter.h
* remove gin_util.h and gin_utils.h
* fix lint warning
* add helper for setting methods
* move Destroyable utilities out of native_mate
* do not set "destroy" in ObjectTemplateBuilder
* remove ObjectTemplateBuilder::MakeDestroyable
* do not pollute gin namespace
* add more comments
* remove hack of Arguments
On multi-monitor setups where the monitors are not all origined at 0 on
the Y coordinate (E.g. vertical stacked monitors) the maximize
calculation was incorrect as it assumed top was "0". This instead
adjusts the math to calculate the correct top value.
* refactor: don't walk maps twice to remove elements
* refactor: don't walk maps twice to read elements
* refactor: don't walk maps twice to insert elements
* refactor: don't walk map 3x on UvTaskRunner timeout
* refactor: more don't-walk-maps-twice cleanup
* fixup! refactor: don't walk maps twice to insert elements
* refactor: don't walk containers twice when erasing
* refactor: omit excess lookups in RemoteObjectFreer
* fix: remove WM_GETMINMAXINFO workaround since it's no longer needed
* fix: handle WM_GETMINMAXINFO ourselves
* fix: remove part of the chromium WM_GETMINMAXINFO handler
Sometimes it's necessary to convey more information about the window to screen reader users only (simply putting everything to the window title might be unnecessarily noisy).
For example, Chromium uses that technique to tell screen reader users that the window is in incognito mode (the incognito window looks differently and doesn't have «incognito» in the title, but for blind users the screen reader will announce that it's incognito).
* no need to get WebContents for URLLoaderFactory
* consult embedder for network_factory created in net module
* set disable_web_security to false
* re-enable webRequest tests in net module
* fix: i18n of gtk msgbox buttons
similar to #19756 (12df0e8) but for messageboxes
* refactor: DRY the gtk+ button mnemonics
* fix: don't compile gtk_util on non-Linux platforms
rename from `gtk_util.[cc,h]` to `util_gtk.[cc,h]` so that it gets
picked up by the `extra_source_filters` rule in `BUILD.gn`.
* fix: make linter happy
It really shows that I cannot build locally atm... :P
* fix: command-line scheme switch values' spillover
The value of one of the scheme command-line switches
shouldn't spill over into other switches.
Fixes#19911
* chore: make linter happy
* refactor: make util::Promise type safe when chaining in native
* fixup! refactor: make util::Promise type safe when chaining in native
* chore: remove spare brackets
* feat: enable picture in picture mode for video tags
* test: add test to verify picture in picture support
* lint: fix indent
* fix: clean up after rebase
* test: update test with 16:9 test video
* fix: .paches after rebase
* fix: fill uploadData property
* fix: requestHeaders in onBeforeSendHeaders
* fix: responseHeaders in onHeadersReceived
* fix: header keys should not be lowercased
* fix: gin::Dictionary::Get succeeds even though key does not exist...
* fix: throw for invalid filters
* test: re-enable api-web-request-spec
* chore: do not use deprecated base::Value API
* fix: gin treats Function as Dictionary when doing convertions
* fix: check if listener exists
* fix: listener callback should be executed in next tick
* feat: make InProgressRequest work
* test: re-enable protocol test that relies on webRequest
* chore: merge conditions
* feat: Implement BrowserWindow.moveAbove(mediaSourceId)
BrowserWindow.{focus,blur,moveTop}() are not enough in some
situations. For example when implementing an overlay that
follows another window that can lose focus. In that case
it is useful to move the overlay above the tracked window.
sourceId is a string in the format of DesktopCapturerSource.id,
for example "window:1869:0".
Notes: Added BrowserWindow.moveAbove(mediaSourceId)
https://github.com/electron/electron/issues/18922
* feat: Implement BrowserWindow.getMediaSourceId
Return the Window id in the format of DesktopCapturerSource's id.
For example "window🔢0".
https://github.com/electron/electron/issues/16460
Notes: Added BrowserWindow.getMediaSourceId
* feat: add new nativeTheme API
* chore: deprecate and clean up old systemPreferences theme APIs in favor of new nativeTheme module
* chore: clean up and deprecate things per feedback
* chore: add tests for deprecate and clean up invert impl
* build: when is a boolean not a boolean???