* refactor: make kRelauncherArgSeparator private to relauncher.cc
* refactor: make kRelauncherTypeArg private to relauncher.cc
* refactor: remove unused type relauncher::CharType
* refactor: move private constants into standalone private namespace
* refactor: move kWaitEventName into the only function that uses it
* refactor: more return-braced-init-list, this time for v8 and gin objects
* refactor: more return-braced-init-list, this time for v8, gin, std, and base objects
* refactor: misc-use-internal-linkage warnings in context bridge
move impl functions into anonymous namespace so that they're not visible
to other compilation units:
- ExposeAPIInWorld()
- IsCalledFromMainWorld()
- OverrideGlobalPropertyFromIsolatedWorld()
- OverrideGlobalValueFromIsolatedWorld()
- TraceKeyPath()
* refactor: misc-use-internal-linkage warnings in skia util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- struct ScaleFactorPair
- kScaleFactorPairs[]
- GetScaleFactorFromPath()
- AddImageSkiaRepFromPath()
* refactor: misc-use-internal-linkage warnings in printing util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetFullPagePlugin()
* refactor: misc-use-internal-linkage warnings in blijnk converter
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetKeyLocationCode()
- ModifiersToArray()
* refactor: misc-use-internal-linkage warnings in extrension system
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- ParseManifest()
* refactor: misc-use-internal-linkage warnings in skia util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetFrameTokenMap()
- GetFrameTreeNodeIdMap()
* refactor: misc-use-internal-linkage warnings in electron_api_utility_process.cc
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- GetAllUtilityProcessWrappers()
* refactor: misc-use-internal-linkage warnings in electron_api_menu
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- InvokeBoolMethod()
* refactor: misc-use-internal-linkage warnings in platform util
move impl details into anonymous namespace so that they're not visible
to other compilation units:
- struct TrashItemResult
- TrashItemOnBlockingThread()
* refactor: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]
* refactor: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list]
NB: using the braced-initializer list uncovered an error here:
the float returned by std::floor() can't be implicitly cast to
an int. This is solved by using base::ClampFloor<int>() instead.
std::floor()
* chore: remove unused local non-trivial variable relaunch_executable
became unused in June 2016 in 0d066de5
* chore: only declare program_name local variable if used
We declared it everywhere but only used it on Windows
* chore: remove unused local non-trivial variable path from UnregisterXWindow
it became unused in 2020 by 72a08926
* feat: add query-session-end event for Windows
* fix: remove debug line
* feat: notify with reason on session-end
* docs: add comments and return params
* docs: add same docs to the BrowserWindow
* fix: add shutdown reason if lParam == 0
* docs: remove 'force' word
* docs: revert multithreading.md change
* docs: add reasons documentation, reason variable renamed to reasons
* docs: improve 'shutdown' reason wording
* docs: reword with 'can be'
* fix: pass reasons by reference
* fix: use newer approach which expose reasons value directly on Event object
* docs: add escaping
* style: linter fixes
* fix: project now should compile
* fix: EmitWithoutEvent method added, EmitWithEvent moved to private again
* docs: typo fix
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
* docs: dedicated WindowSessionEndEvent type created
* docs: better wording for session-end event description
Co-authored-by: Will Anderson <will@itsananderson.com>
---------
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
Co-authored-by: Will Anderson <will@itsananderson.com>
* fix: performance-no-automatic-move in GetLogFileName()
remove `const` from log_filename.
Warning fixed by this commit:
../../electron/shell/common/logging.cc:40:12: warning: constness of 'log_filename' prevents automatic move [performance-no-automatic-move]
* fix: performance-no-automatic-move in GetBundleResourcePath()
remove `const` from request_relative_path.
Warning fixed by this commit:
electron/shell/browser/extensions/electron_extensions_browser_client.cc:187:10: warning: constness of 'request_relative_path' prevents automatic move [performance-no-automatic-move]
* fix: windows save dialog extension bug
* refactor: simplify firstSpec extraction
Co-authored-by: Charles Kerr <charles@charleskerr.com>
* refactor: split when necessary
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
---------
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
* refactor: use gdk_display_beep() to beep on Linux
* chore: make a stub declaration for gdk_display_beep()
* chore: remove unused file electron_gtk.sigs
* chore: remove unused #includes to make gn check happy
* fix: bugprone-narrowing-conversions warning in NativeImage::memory_usage_
- fix signed / unsigned math by using base/numerics/safe_conversions
- make memory_usage_ an int64_t so it can safely take the size_t
returned by computeByteSize()
Warning fixed by this commit:
../../electron/shell/common/api/electron_api_native_image.cc:155:26: warning: narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'int32_t' (aka 'int') is implementation-defined [bugprone-narrowing-conversions]
155 | new_memory_usage = image_skia->bitmap()->computeByteSize();
* fix: bugprone-narrowing-conversions warnings in NativeImage::CreateFromBitmap()
`SkImageInfo::MakeN32()` and `SkBitmap::allocN32Pixels()` both take int
width and height args, but we were feeding them unsigned ints.
../../electron/shell/common/api/electron_api_native_image.cc:508:36: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
508 | auto info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
| ^
../../electron/shell/common/api/electron_api_native_image.cc:508:43: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
508 | auto info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
| ^
../../electron/shell/common/api/electron_api_native_image.cc:524:25: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
524 | bitmap.allocN32Pixels(width, height, false);
| ^
../../electron/shell/common/api/electron_api_native_image.cc:524:32: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
524 | bitmap.allocN32Pixels(width, height, false);
| ^
../../electron/shell/common/api/electron_api_native_image.cc:528:48: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions]
528 | gfx::ImageSkia::CreateFromBitmap(bitmap, scale_factor);
fix: AutofillPopup warning: use '= default' to define a trivial default constructor [modernize-use-equals-default]
refactor: reduce #indclude scope in autofill_popup.h and autofill_popup_view.h
* chore: reland "fix: utility process exit code for graceful termination"
This reverts commit 1cae73ba09.
* fix: exit code on posix when killed via api
* chore: fix code style
* docs: Make ipcRenderer and ipcMain listener API docs consistent
* test: add some unit tests for ipcRenderer/ipcMain listener behavior
* fix: Mark on/off methods as primary and addListener/removeListener as aliases
* fix: clear all listeners before running ipcMain removeAllListeners tests