Commit graph

1399 commits

Author SHA1 Message Date
Shelley Vohr
544d8a423c
feat: allow MenuItems to work optionally when hidden (#16853)
* feat: allow MenuItems to work optionally when hidden

* fix: actually include forward_declaration
2019-02-28 17:00:54 +00:00
Milan Burda
64078324bf refactor: make CHROME_GET_MESSAGES handler async (#17148) 2019-02-27 21:30:35 -06:00
Nitish Sakhawalkar
bfa07ec4be feat: Add new powerMonitor synchronous API (#17144)
`powerMonitor.querySystemIdleState` and `powerMonitor.querySystemIdleTime` had async backing APIs in chromium (https://chromium-review.googlesource.com/c/chromium/src/+/1379183). However, that has changed in ch73. So, this PR deprecates the old async APIs and adds new sync APIs.
2019-02-27 15:54:01 -05:00
Samuel Attard
08066581b0 fix: set cancelId to 1 when defaultId == 0 and no 'cancel' button (#17123) 2019-02-27 08:24:13 +00:00
Milan Burda
5a99ea4c46 refactor: merge ipcMainUtils.handle / handleSync (#17062) 2019-02-26 15:48:26 -08:00
Shelley Vohr
d9c7735a04 chore: augment promisifyMultiArg deprecation (#17066) 2019-02-25 18:25:25 -08:00
Felix Rieseberg
7f007109c3 refactor: Port inspector to TypeScript (#16943)
* 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
2019-02-25 18:10:25 -08:00
Thomas Beverley
1674388028 Fix webContents.print() (#17052) 2019-02-25 13:30:21 +00:00
ZYSzys
a40d826b11 chore: remove unused catch bindings (#16121) 2019-02-21 09:26:07 +00:00
Shelley Vohr
3edc497d3d
feat: show user gesture type in click event (#16954) 2019-02-20 12:20:24 +00:00
Felix Rieseberg
91f81b4b72 refactor: Port renderer/init to TypeScript (#17027)
* 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
2019-02-19 17:05:14 +00:00
Felix Rieseberg
2223114f20 refactor: Port chrome-api to TypeScript (#17014) 2019-02-19 13:09:44 +00:00
Milan Burda
7e7abc28f5 feat: promisify netLog.stopLogging (#16862) 2019-02-19 10:48:27 +00:00
Samuel Attard
3b74837020 refactor: Split 'Event' docs/types into more specific Event types (#17038)
* Event = Base event type (with preventDefault)
* IpcMainEvent = Event that ipcMain emits (with sender, reply, etc.)
* IpcRendererEvent = Event that ipcRenderer emits (with sender,
senderId, etc.)
* KeyboardEvent = Event that we emit with keyboard flags (ctrlKey,
altKey, etc.)

This will dramatically improve peoples TS experience with IPC events
2019-02-19 09:24:19 +00:00
Felix Rieseberg
eaa0e28396 refactor: Port content-scripts-injector to TypeScript (#17012) 2019-02-18 12:47:07 +00:00
Felix Rieseberg
596acdcb91 refactor: Port web-frame-init to TypeScript (#16934)
* refactor: Port web-frame-init to TypeScript

* refactor: Use ipcRendererInternal
2019-02-18 00:24:18 +00:00
Felix Rieseberg
6b3ff4f1f7 refactor: Port security warnings to TypeScript (#16937)
* refactor: Port security-warnings to TypeScript

* chore: make aliasify work on .ts files as well

* refactor: Implement feedback <3

* refactor: Correctly call executeJavaScript
2019-02-16 17:06:30 -08:00
Milan Burda
975a035d34 chore: re-enable devtools renderer sandbox (#16864)
* chore: re-enable devtools renderer sandbox

* chore: enable sandbox for chrome extension background script host renderers
2019-02-15 15:10:32 +05:30
Felix Rieseberg
2498e8d1c2 refactor: Port renderer-internal to TypeScript (#16939)
* 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
2019-02-14 17:24:25 -08:00
Samuel Attard
5790869a3f
chore: refactor browser IPC into TS and app API into TS (#16921)
* 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
2019-02-14 14:29:20 -08:00
deepak1556
005b7d8099 Print Preview: Add validity check for kSettingPagesPerSheet.
https://chromium-review.googlesource.com/c/chromium/src/+/1381133
2019-02-14 23:59:25 +05:30
deepak1556
547add94d0 Make //ui/base/idle API synchronous
https://chromium-review.googlesource.com/c/chromium/src/+/1379183
2019-02-14 23:59:23 +05:30
deepak1556
606c84b302 Blink: Plumb correct security origin for isolated world CSPs.
https://chromium-review.googlesource.com/c/chromium/src/+/1395190
2019-02-14 23:59:22 +05:30
Shelley Vohr
de27911661
feat: promisify webContents.savePage() (#16742)
* feat: promisify webContents.savePage()

* no need to make compatible w callbacks, we're breaking it

* fix promise resolve type

* address feedback from review

* fix promise return text

* update smoke test
2019-02-14 09:03:28 -08:00
Stewart Lord
84ef9cae6c fix: send chrome.runtime/tabs.sendMessage result to correct sender (#16945)
Additionally, use `.once` instead of `.on` for result specific listeners.
2019-02-14 06:07:55 -10:00
Felix Rieseberg
31494dfade refactor: Port getRemote to TypeScript (#16938)
* chore: make aliasify work on .ts files as well

* refactor: Port getRemote to TypeScript

* refactor: Implement feedback <3
2019-02-14 04:04:53 -10:00
Felix Rieseberg
6cd75744ef refactor: Port window-setup to TS (#16894)
* 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
2019-02-14 03:52:38 -10:00
Milan Burda
2492f0bcac refactor: promisify prototype methods (#16935) 2019-02-14 03:40:24 -10:00
Felix Rieseberg
9112ad01be refactor: Port renderer-internal-utils to TypeScript (#16942)
* chore: make aliasify work on .ts files as well

* refactor: Port renderer-internal-utils to TypeScript

* refactor: Implement feedback <3
2019-02-13 23:05:49 -08:00
Stewart Lord
228805353f fix: pass result to chrome.tabs.executeScript callback (#16941)
* fix: pass result to chrome.tabs.executeScript callback

Additionally, remove `nextId` counter in favor of `originResultID` counter which is more widely used in this file.

* fix: remove need for eslint override and better match style
2019-02-13 17:00:36 -08:00
Shelley Vohr
fed5b99a9f
feat: promisify contentTracing.getTraceBufferUsage() (#16600)
* feat: promsify contentTracing.getTraceBufferUsage()

* deprecate getTraceBufferUsage

* address feedback from review

* properly deprecate
2019-02-13 13:24:57 -08:00
Nitish Sakhawalkar
3dfef4a376 chore: Add new webFrame IsolatedWorldInfo API and deprecate (#16801)
* chore: Add new webFrame IsolatedWorldInfo API and deprecate

* Flag deprecated methods in documentation

* address comments

* Address review comments

* remove unused variable

* Update based on review
2019-02-13 08:05:28 -10:00
Milan Burda
1f458eb177 feat: promisify debugger.sendCommand() (#16861)
* remove duplicate entry for desktopCapturer.getSources

* feat: promisify debugger.sendCommand
2019-02-13 07:23:53 -10:00
Samuel Maddock
8f6a543398 feat: add chrome.runtime.getManifest (#16891)
* feat: add chrome.runtime.getManifest

* Add test for chrome.runtime.getManifest

* Use IPC utils for getManifest internals
2019-02-13 07:16:12 -10:00
Samuel Attard
01c442de64 refactor: convert more files to typescript (#16820) 2019-02-12 04:22:33 -10:00
Milan Burda
d8ba1278d1 chore: disable the remote module in devtools / chrome extension background scripts (#16866)
* cache isRemoteModuleEnabled

* chore: disable the remote module in devtools / chrome extension background scripts
2019-02-11 10:42:37 -10:00
Milan Burda
36ce3e9546 feat: promisify webContents.printToPDF() (#16795) 2019-02-11 09:20:04 -10:00
Milan Burda
7a3d220347 refactor: implement Chrome Extension APIs without the remote module (#16686)
* refactor: implement Chrome Extension APIs without the remote module

* remove unused potentiallyRemoteRequire
2019-02-10 10:38:14 -08:00
Cheng Zhao
d16b581140 fix: remove memory leak when using webFrame and spell checker (#16770)
* 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
2019-02-08 13:38:31 -08:00
Milan Burda
3f52e18a38 chore: add menu-will-close comment explaining setTimeout (#16794) 2019-02-08 13:38:03 -08:00
Milan Burda
1632c4b837 refactor: implement chrome.i18n.getMessage() without the remote module (#16739)
* refactor: implement chrome.i18n.getMessage() without the remote module

* replace navigator.language with app.getLocale()
2019-02-08 12:07:09 -08:00
Shelley Vohr
e790dbd737
chore: add standalone function deprecation helper (#16782) 2019-02-08 09:50:11 -08:00
Samuel Attard
db11b9b13b
fix: restore accidentally removed chrome-extension require (#16819) 2019-02-07 12:38:57 -08:00
Shelley Vohr
9ebba76c03
chore: improve existing error preservation in promisify (#16815)
This PR better preserves existing behavior in `deprecate.promisify()` in the cases where the promise fails. Previously, if a callback was only called with `data` instead of `err, data` and the promise was rejected, `data` would be populated with `err`, which could be confusing to users. This makes it such that `err` is called back on promise rejection if a callback is called with `err, data` a la Node.js.
2019-02-07 10:25:20 -08:00
Samuel Attard
4f8ebafa97 chore: dont log 100000000 chars of URL (#16800) 2019-02-07 08:50:47 -08:00
Samuel Attard
26df9992cf
build: use typescript for internal Electron JS code (#16441) 2019-02-06 10:27:20 -08:00
Shelley Vohr
858781ba83
feat: allow Menu.buildFromTemplate() to accept MenuItems (#16697)
* feat: allow Menu.buildFromTemplate to accept MenuItems

* add another spec

* fix linter error

* add submenu spec
2019-02-06 10:04:40 -08:00
Milan Burda
4211a9c69f refactor: use ipcRendererUtils.invokeSync / ipcMainUtils.handleSync (#16759) 2019-02-06 09:53:28 -08:00
Milan Burda
6d674eebb1 refactor: crashReporterInit (#16729) 2019-02-05 12:56:44 -08:00
Shelley Vohr
f303caa87c
refactor: remove ServiceWorker APIs from WebContents (#16717) 2019-02-04 22:22:46 -08:00