Commit graph

7278 commits

Author SHA1 Message Date
Nitish Sakhawalkar
2d14a0e90d Update changed APIs/deps
Use brotli by default (36d58dd325)

Update Mac ui headers (897636c9f8)

Update AtomBrowserClient::HandleExternalProtocol API (cb656e1fd1)
2019-05-16 18:47:42 -07:00
Jeremy Apthorp
18d70e6e57 pin user32 on startup
https://chromium-review.googlesource.com/c/chromium/src/+/1551709

Loading it later causes a blocking call where blocking calls aren't allowed.
2019-05-16 18:47:42 -07:00
Nitish Sakhawalkar
03ee12d13e Update linux/win menu_bar.h
Chromium Commit 6a2f2686a9
2019-05-16 18:47:42 -07:00
Nitish Sakhawalkar
0580a2fb3e fix lint 2019-05-16 18:47:42 -07:00
Nitish Sakhawalkar
941851b3eb Update for changed APIs
Update AllowCertificateError API (c5b8df91d1)
2019-05-16 18:47:42 -07:00
Jeremy Apthorp
19550bd444 Manual follow-up rename in comments and variable names.
https://chromium-review.googlesource.com/c/chromium/src/+/1591429
2019-05-16 18:47:42 -07:00
Jeremy Apthorp
6f0524d87f use base::Owned instead of base::Passed for repeating handler 2019-05-16 18:47:42 -07:00
Jeremy Apthorp
6c6555c13c Convert Callbacks to OnceCallbacks in permissions APIs.
https://chromium-review.googlesource.com/c/chromium/src/+/1592356
2019-05-16 18:47:42 -07:00
Cheng Zhao
2ad62cedc3
feat: migrate protocol module to NetworkService (Part 7) (#18290)
* fix: make IsProtocolHandled return true for builtin schemes

* fix: return ERR_NOT_IMPLEMENTED for wrong arg

* Initial work of AsarURLLoader

* Put normal file logics in AsarURLLoader

* Implement asar file reading

* Don't change URL for unpacked file

* Fix cpplint warning
2019-05-15 08:29:58 +09:00
Samuel Attard
fde3137b90
fix: update the FileSelectHelper to support the new promise API (#18288)
* fix: update the FileSelectHelper to support the new promise API

Fixes #18254

So it turns out we've successfully introduced a way to write
non-typesafe C++.

This fixes two things:
* Uses the object the promise resolves
* Ensures we attach the Then handler before moving the promise

* fix: also fix misuse of Promise::Then in the download manager
2019-05-14 15:46:53 -07:00
Milan Burda
d027be05a6 refactor: combine bitmask flags property (replace '+' with '|' operator) (#18271) 2019-05-14 18:49:46 +03:00
Milan Burda
6609138959 feat: add webContents 'zoom-changed' event (#17747) 2019-05-14 09:40:40 +03:00
Jeremy Apthorp
78d45a17c8
fix: default enable_negotiate_port to false (#18251) 2019-05-13 11:28:01 -07:00
Milan Burda
3a5e6f2551 feat: allow setting working directory in app.setUserTasks() / app.setJumpList() (#18148) 2019-05-13 19:17:12 +03:00
Cheng Zhao
326215e1f1
feat: migrate protocol module to NetworkService (Part 6) (#18223)
* fix: start node strem asyncly

* fix: headers value may be a list

* fix: simply destruct on finish/error

* fix: class may destruct immediately after subscribing "data"

* fix: send meaningful error

* fix: must always provide a response body

* fix: handle the case when one write can not write all data

* fix: handle connection error
2019-05-11 15:15:01 +09:00
Nitish Sakhawalkar
85c24c0b47
chore: Add patch to partially revert chromium crashpad change (#17978)
This adds a patch to support functionality that we were using but chromium changed it. Electron uses breakpad on windows, chromium uses crashpad (which is newer). So this patch is needed until we update electron to use crashpad for windows.
2019-05-10 10:35:17 -07:00
Shelley Vohr
b3fcc080d5
fix: destroy tray on current tick (#18196)
This code was originally added in #6448 to handle an edge case crash in 10.9, and we no longer support 10.9 and therefore no longer need to account for this case.

It addressed the crash, but also created a race condition whereby when a new tray is created the old tray's destroy wouldn't have been fully completed and therefore a new one would be spawned. This fixes that by destroying the tray on the current tick once more.
2019-05-08 15:40:30 -07:00
Shelley Vohr
0ab3d7a0be
fix: crash on systemPreferences.getAccentColor() (#18144) 2019-05-07 08:26:34 -07:00
Shelley Vohr
02710ef574 refactor: make templateImage a property on nativeImage (#18124)
* refactor: make templateImage a property on nativeImage

* Update docs/api/native-image.md

Co-Authored-By: codebytere <codebytere@github.com>

* fix nativeImage prototype deprecation

* update for new property name

* Update docs/api/native-image.md

Co-Authored-By: codebytere <codebytere@github.com>
2019-05-07 06:52:07 -07:00
Milan Burda
91e3421525 refactor: use base::size() for array sizes (#18155) 2019-05-07 09:19:14 -04:00
Cheng Zhao
237f74a01f
feat: migrate protocol module to NetworkService (Part 5) (#18170)
* fix: always have head.headers available

* fix: use StringDataPipeProducer to write string

It can handle large strings correctly.

* fix: override RegisterNonNetworkSubresourceURLLoaderFactories

* fix: add dummy uninterceptProtocol implementation

* fix: jquery error handler can pass empty string

For some errors jquery would pass empty string in the error handler,
which makes tests pass when they should fail.

* chore: fix cpplint warnings

* fix: guard RegisterNonNetworkSubresourceURLLoaderFactories call

It may be called even when NetworkService is not enabled.

* test: disable protocol.interceptHttpProtocol test
2019-05-07 11:33:05 +09:00
Jeremy Apthorp
cb13d7a0a8
refactor: session.clearAuthCache nws13n (#17970) 2019-05-03 14:30:25 -07:00
Shelley Vohr
6d96f30ed3
refactor: make shell.OpenExternal async (#17135) 2019-05-03 13:53:45 -07:00
Shelley Vohr
0755857a0c chore: convert more files away from base::Bind (#18121)
* chore: convert more files away from base::Bind

* use BindOnce for JsAsker
2019-05-03 12:08:41 -07:00
Milan Burda
c25c31e018 refactor: convert C++ enums to C++11 enum classes (#18087) 2019-05-03 14:11:41 -04:00
Cheng Zhao
0a6eb8afca
feat: migrate protocol module to NetworkService (Part 4) (#18084)
* 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
2019-05-03 09:48:51 +09:00
Shelley Vohr
cc00fa8874 chore: convert base::Bind instances across some files (#18112) 2019-05-03 08:49:26 +09:00
Shelley Vohr
55a7f92297
chore: convert more module and helper files from bind (#18069) 2019-05-02 08:32:33 -07:00
Milan Burda
9585818a90 chore: add clang-format and limited linting for Objective-C sources (#18104) 2019-05-02 21:05:37 +09:00
Samuel Attard
d4f5ebefe6
feat: allow setting of global fallback user agent (#18016)
* feat: allow setting of global fallback user agent

* spec: add tests for app.set/getUserAgentFallback
2019-05-01 16:34:42 -07:00
Jeremy Apthorp
3949f0bd50
refactor: convert crash reporter to gin (#17952) 2019-05-01 15:19:11 -07:00
Shelley Vohr
f316c8470c
chore: convert session base::Bind instances (#18038)
Convert instances of base::Bind to base::BindOnce and base::BindRepeating as applicable in the session module as well as in Autofill popups.
2019-05-01 13:45:08 -07:00
Electron Bot
61effac72a chore: bump chromium to c75fbfd03652 (master) (#18090)
https://chromium-review.googlesource.com/c/chromium/src/+/1532361
2019-05-01 13:42:49 -07:00
Jeremy Apthorp
dd3913fada
refactor: convert powerSaveBlocker to gin (#18073) 2019-05-01 13:24:01 -07:00
Milan Burda
1abe658ef4 chore: clang-format (#18088)
* chore: clang-format

* chore: remove obsolete native_mate_files.gypi
2019-05-01 12:27:55 -07:00
Electron Bot
2616911f7a chore: bump chromium to 7dff37844cb3 (master) (#18059) 2019-04-30 17:18:22 -07:00
Shelley Vohr
00358545a9
fix: explicitly focus window on win.show() (#18046) 2019-04-30 16:43:45 -07:00
Samuel Attard
67b3fbca89
fix: ensure the inspector agent is shutdown before cleaning up the node env (#18028)
* fix: ensure the inspector agent is shutdown before cleaning up the node env

* spec: add tests to ensure clean shutdown with connected inspector agent

* Update node_debugger.cc
2019-04-30 15:44:40 -07:00
Jeremy Apthorp
24bf2c29e4
refactor: session.{clearCache,getCacheSize} nws13n (#17969) 2019-04-30 15:09:17 -07:00
Samuel Attard
98c51dd660
build: ensure consistent lock files across multiple machines (#17955)
* build: ensure consistent package-lock across multiple machines

* build: fix linting errors and use npm ci instead of npm install

* build: use a yarn.lock and yarn instead of package-lock and npm

* chore: replace package-lock.json files with yarn.lock

* chore: replace last instance of `npm install`
2019-04-30 13:59:47 -07:00
Shelley Vohr
8d83518f9a
refactor: make name a prop on app (#17701)
Update app.name to be a property on app.
2019-04-30 13:55:33 -07:00
Milan Burda
fcf0af15de feat: support ELECTRON_DEFAULT_ERROR_MODE in the GPU process (#17728) 2019-04-30 12:45:48 -04:00
Jeremy Apthorp
fdf5f838f4 refactor: native_mate => gin (cookies API) (#18036)
* convert cookie converters to gin

* event_emitter GetWrapper
2019-04-30 06:45:05 -07:00
Cheng Zhao
277f93653e
feat: migrate protocol module to NetworkService (Part 3) (#18030)
* Implement http protocol handler

* File protocol handler also accepts options

* Http protocol should inherit headers by default

* Only inherit necessary headers

* Slightly reorder logics
2019-04-30 09:47:04 +09:00
Shelley Vohr
7b55ee9d36 refactor: allow requiring modules with no side effects (#17496) 2019-04-30 09:46:08 +09:00
Shelley Vohr
4ee201c56e chore: convert View APIs away from base::Bind (#18035) 2019-04-30 09:40:39 +09:00
Samuel Attard
4a3771ff7f build: add support for Electron trace events (#17920) 2019-04-29 15:28:30 -07:00
Samuel Attard
77a4946069
refactor: rewire the desktop capturer API to remove race conditions (#18029)
We now create a new instance of atom::api::DesktopCapturer for every
request instead of weirdly re-using the same instance and queuing
requests.  This means there is now a 1:1 relationship between request
and DesktopCapturer so there isn't a race condition between the observer
for one request calling back before the observer of another.  This is an
issue ever since the backing APIs moved to worker threads.

This also does a few things to ensure memory management
* Only ever listen to one event per-request, after that we wipe the emit
function to ignore all future events
* Ensures we clean up the window_capturer_, screen_capturer_ and
captured_sources_ in native land once the request is over.

This _in theory_ fixes a flake we've been seeing on CI where we try to
resolve the promise for a request that no longerr exists.
2019-04-29 13:21:28 -07:00
Milan Burda
7574f91f31 refactor: natively promisify WebContents.prototype.takeHeapSnapshot (#18000) 2019-04-29 10:11:11 -07:00
Cheng Zhao
6f83977f47
feat: migrate protocol module to NetworkService (Part 2) (#17965)
* Pass protocol type and handler to factory

* Add converter for network::ResourceRequest

* Implement Buffer and String protocol handler

* Implement file protocol
2019-04-29 11:37:45 +09:00