* Parse stream protocol handler
* Pipe node stream to mojo
* Merge the parser for headers
* Add ToDict helper to simplify code
* Simplify dispatching logic
* Add an experimental API for returning any type of response
* Fix subscribing event
* URL loaders' lifetime is independent of the factory
* HandleError helper is no longer needed
* Rename "SendResponse" => "StartLoading" to follow naming conventions
* Delete when connection error happens
* Fix cpplint warning
This turns the AtomViewMsg_Offscreen message, which only called the global setter blink::WebView::SetUseExternalPopupMenus(false) to get Chrome to render popup menus in the renderer instead of externally on macOS, into a command-line renderer flag --offscreen which does the same thing, except at render thread startup time, which is where Chromium sets the flag: https://chromium.googlesource.com/chromium/src/+/refs/tags/75.0.3755.3/content/renderer/render_thread_impl.cc#728.
This was the last usage of RenderViewObserver in our codebase, so this PR also removes that class.
Previously, we were creating the app logs folder at a predefined location during initial electron startup, which meant that it had to be manually removed and prevented clean app portability. This refactors that implementation such that it's now an opt-in feature and developers must call app.setAppLogsPath(path) with an optional custom path in order to set this directory.
* refactor: use mojo for electron internal IPC
* add sender_id, drop MessageSync
* remove usages of AtomFrameMsg_Message
* iwyu
* first draft of renderer->browser direction
* refactor to reuse a single ipc interface
* implement TakeHeapSnapshot through mojo
* the rest of the owl^WtakeHeapSnapshot mojofication
* remove no-op overrides in AtomRendererClient
* delete renderer-side ElectronApiServiceImpl when its pipe is destroyed
* looks like we don't need to overlay the renderer manifest after all
* don't try to send 2 replies to a sync rpc
* undo changes to manifests.cc
* unify sandboxed + unsandboxed ipc events
* lint
* register ElectronBrowser mojo service on devtools WebContents
* fix takeHeapSnapshopt failure paths
* {electron_api => atom}::mojom
* add send_to_all to ElectronRenderer::Message
* keep interface alive until callback is called
* review comments
* use GetContext from RendererClientBase
* robustify a test that uses window.open
* MessageSync posts a task to put sync messages in the same queue as async ones
* add v8::MicrotasksScope and node::CallbackScope
* iwyu
* use weakptr to api::WebContents instead of Unretained
* make MessageSync an asynchronous message & use non-associated interface
* iwyu + comments
* remove unused WeakPtrFactory
* inline OnRendererMessage[Sync]
* cleanups & comments
* use helper methods instead of inline lambdas
* remove unneeded async in test
* add mojo to manifests deps
* add gn check for //electron/manifests and mojo
* don't register renderer side service until preload has been run
* update gn check targets list
* move interface registration back to RenderFrameCreated
* refactor: Port inspector to TypeScript
* refactor: Add another type to inspector
* refactor: Use correct paths
* Update lib/renderer/inspector.ts
Co-Authored-By: felixrieseberg <felix@felixrieseberg.com>
* refactor: Implement feedback <3
* refactor: Don't define blob at all
* fix: Correct type
* refactor: Port renderer/init to TypeScript
* Update lib/renderer/init.ts
Co-Authored-By: felixrieseberg <felix@felixrieseberg.com>
* refactor: Type this a bit more loosely
* refactor: Type parseOption strictly
* refactor: Port security-warnings to TypeScript
* chore: make aliasify work on .ts files as well
* refactor: Implement feedback <3
* refactor: Correctly call executeJavaScript
* chore: make aliasify work on .ts files as well
* refactor: Port ipc-renderer-internal to TypeScript
* refactor: Correctly import internal ipcRenderer
* refactor: One more rename
* refactor: Fix one more lint issue
* refactor: Correctly reference ipcRendererInternal
* chore: refactor browser IPC into typescript
* chore: refactor app.ts into Typescript
* Refactors app.dock into cpp
* Removes app.launcher which has not existed for 3 years
* Removes 2 deprecated APIs (that have been deprecated for more than one
major)
* Refactors deprecate.ts as well
* refactor: Port window-setup to TS
* refactor: Make the linter happy
* refactor: Sneaky little TS error
* refactor: Correctly import window-setup
* refactor: Implement feedback <3
* refactor: Allow decorators in TS
* refactor: Use named windowSetup in isolatedRenderer
* refactor: Help TS understand
* refactor: Welp, use createEvent again
* refactor: Use the correct target in the decorator
* fix: do not create native api::WebFrame in webFrame
When reloading a page without restarting renderer process (for example
sandbox mode), the blink::WebFrame is not destroyed, but api::WebFrame
is always recreated for the new page context. This leaves a leak of
api::WebFrame.
* fix: remove spell checker when page context is released
* refactor: remove js2asar.py and port logic to JS in more readable / GN-style way
* refactor: further clean up ASAR impl, add new node_action GN template
Unify the behavior between default app and packaged apps:
- create default application menu unless the app has one
- default window-all-closed handling unless the app handles the event
Global requests currently includes DNS over HTTPS requests,
certain cert validation requests (OCSP, AIA, etc) on some platforms
and geolocation requests.
* fix: match Chrome's font fallback behavior
Fixes#15481
* add a cache
* add test
* another test
* fix tests
* arial -> dejavu sans on linux apparently?
* 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
* refactor: remove -new-contents-created event
Chromium expects us to take ownership of WebContents in AddNewContents,
we should not create V8 wrapper in WebContentsCreated, otherwise we
would have WebContents being managed by 2 unique_ptr at the same time.
* refactor: make CreateAndTake take unique_ptr
* remove printing related things from chromium_src
* chore: add printing build flag and patch
* fix: include PrintingService on other platforms too
* fix: printing_handler is only needed on Windows
* fix: format BUILD.gn properly
* fix: rename printing build flag to avoid conflict with chromium
* fix: place previously missed printing calls behind build flag
* fix: accidentally renamed flag in patch file
* fix: don't include all printing strings
* fix: allow ShowItemInFolder and OpenItem to block, fixing a DCHECK crash
* fix: make things compile, some changes got lost while rebasing
* fix: remove rogue line from BUILD.gn
* chore: update patch description
* style: lint fix
* chore: use chromium printing buildflag, move node related stuff out of patch
* revert: remove ScopedAllowBlockingForTesting call
* fix: fix my rebase blooper
* fix: re-add header lost during rebase, update patch
* fix: add <map> include, tweak the patch a bit
* revert: remove rogue diff from patch
* fix: clean up after rebase
* chore: add tts patch and buildflag, makes tts work again
* chore: add tts patch and buildflag, makes tts work again
* fix: make things compile
* build: add relevant tts files for linux
* fix: update patch and patch description, should now compile on mac
* build: move chrome specific sources under chromium_src:chrome target
* build: enable_extensions again
We are depending on them, check `//electron/chromium_src:chrome` target
for more info.
* fix: update tts.patch to receive notifications about browser context destruction
* fix: extend browser process from chrome layer
The global state g_browser_process is shared between //chrome
and //electron.
* spec: add basic speech synthesis test
* spec: skip speech tests on ci
* build: fix compilation on windows
* [ci skip] refactor: create request context from network context
* [ci skip] refactor: subscribe to mojo cookiemanager for cookie changes
* [ci skip] refactor: manage the lifetime of custom URLRequestJobFactory
* refactor: use OOP mojo proxy resolver
* revert: add support for kIgnoreCertificateErrorsSPKIList
* build: provide service manifest overlays for content services
* chore: gn format
* fix: log-net-log switch not working as expected
* spec: verify proxy settings are respected from pac script with session.setProxy
* chore: use chrome constants where possible
* fix: initialize request context for global cert fetcher
* refactor: fix destruction of request context getters
* spec: use custom session for proxy tests
* fix: queue up additional stop callbacks while net log is being stopped
* fix: Add CHECK for cookie manager retrieval
* chore: add helper to retrieve logging state for net log module
* fix: ui::ResourceBundle::GetRawDataResourceForScale => GetRawDataResource
* style: comment unused parameters
* build: move //components/certificate_transparency deps from //brightray
* chore: update gritsettings_resource_ids patch
* chore: update api for chromium 68
* fix: net log instance is now a property of session
* 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: add GN linter
* chore: fix GN lint errors
* try some crazy bash to get a gn exe
* base64 on linux is different
* cloning build_tools doesn't download GN
* download_from_google_storage needs depot_tools in the path
* fixup! chore: add GN linter
* Revert "post all desktop capturer apis to worker threads"
This reverts commit 5a28759fea.
* refactor: desktop capturer module
* Creates the screen and window capturer for the liftime of the app
* Fixes incorrect usage of weak ptr
* build: add //ui/snapshot to chromium_src deps
* fix: handle scenarios when there are no captured sources
* Implementation of getGPUInfo API.
* Clear promise set
* Changes to promise usage
* Minor fixes
* Fix linux build
* Update spec
* Fix lint (linter didn't run on windows locally)
* Test running single test for CI
* Update spec
* Disable nodeIntegration
* Enable contextIsolation
* Re-implement the CSP security check to handle running in
contextIsolation
* Disable bad DCHECKS for the promise helper
* Remove the unused "-d" flag for the electron binary
* Added a way to hide the default help output for electron devs who
don't want to see it every time
* feat: add will-redirect to allow people to prevent 30X redirects
* spec: add tests for the will-redirect event
* refactor: implement will-redirect using NavigationThrottle instead of PostTask
This avoids a potential race condition and immediately cancels the
navigation
* docs: add docs for did-redirect-navigation
* refactor: move AtomNavigationThrottle out of net folder
* refactor: update header guard for atom_navigation_throttle.h
* refactor: fix chromium style errors in the GN build
* refactor: update throttle impl to NOTREACHED and std::make_unqique