Commit graph

5339 commits

Author SHA1 Message Date
Robo
82322968a3 refactor: printing implementation (#15143)
* refactor: basic printing

* move build files to chromium_src/BUILD.gn
* remove dependency on chrome prerender sources

* spec: move printing specs behind feature flag

* build: register pdf compositor service
2018-11-09 14:42:34 +11:00
Samuel Attard
9aed2a465f fix: send NSView* as the response to getNativeWindowHandle() instead of a null handle (#15521) 2018-11-08 09:03:19 -08:00
Cheng Zhao
746beb0d8b fix: destroy WebContents synchronously on shutdown (#15541) 2018-11-08 07:57:28 -08:00
Jeremy Apthorp
7e0e12b8a3 fix: match Chrome's font fallback behavior (#15486)
* fix: match Chrome's font fallback behavior

Fixes #15481

* add a cache

* add test

* another test

* fix tests

* arial -> dejavu sans on linux apparently?
2018-11-08 10:51:51 -04:00
Heilig Benedek
ca2d74e118 feat: add methods to allow customization of save dialog during will-download event (#15497)
* 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
2018-11-08 10:51:06 -04:00
Shelley Vohr
e9ba26f50e
feat: allow registering multiple shortcuts (#15542)
This PR allows for multiple global shortcuts to be registered such that triggering any of them calls the same callback.
2018-11-07 09:40:38 -08:00
Jeremy Apthorp
934a7fc118
refactor: don't use AppIndicatorIcon directly (#15536) 2018-11-06 11:00:37 -08:00
Shelley Vohr
ece4c81c1a
fix: hiddenInset titleBar console spam (#15576) 2018-11-05 21:02:46 -08:00
Shelley Vohr
dcd2bf451d
refactor: remove 10.9 specific menu code (#15578) 2018-11-05 20:42:19 -08:00
Jeremy Apthorp
77f69cbe08
chore: remove unused use_transparent_window.patch (#15534)
Unneeded since 6f2f761df3 (diff-0bbbec38254ebb1146b15c15277c6aa1)
2018-11-05 13:19:21 -08:00
Shelley Vohr
c60745b8a3
fix: use NSURL path for receipt url (#15355) 2018-11-05 09:49:51 -08:00
Milan Burda
a19d20cfb8 refactor: more cleanup of chromium_src (#15424) 2018-11-05 10:29:33 -04:00
Samuel Attard
7f73240fd5
chore: use chromes auto generated definition of CHROME_VERSION_STRING (#15275) 2018-11-02 23:32:33 +11:00
Charles Kerr
feb31d088b
fix: honor properties.showHiddenFiles on Linux (#15503)
Previously the code only set the GtkFileChooser's property if `properties.showHiddenFiles` was set. 

This PR unconditionally sets the GtkFileChooser's property so that hidden files will be hidden if `properties.showHiddenFiles` was not set.
2018-10-31 16:13:01 -05:00
Shelley Vohr
b2e1a93177
refactor: remove hardcoded google api key (#15478)
* refactor: remove hardcoded Google API key

* address changes from review
2018-10-31 07:49:44 -07:00
Heilig Benedek
6d2a088be9 feat: detect high contrast color mode (#15493)
* feat: add event and method to detect high contrast color mode

* docs: add docs for isHighContrastColorScheme and high-contrast-color-scheme-changed

* refactor: correct type of contrast
2018-10-31 10:22:18 -04:00
Heilig Benedek
aa6f7a5d9f fix: don't append Shift modifier text twice to accelerators (#15400)
* fix: don't append Shift modifier text twice to accelerators

* style: use the new way of creating patches

* test: add menu item accelerator display tests

* fix: allocate accelerator on the stack

* fix: adjust tests to match expected behavior on mac
2018-10-31 10:13:44 -04:00
Heilig Benedek
894ae1b3f5 refactor: Improve accessibility of menus (#15302)
* refactor: improve menubar keyboard accessibility

* fix: create a temporary widget for tray icon context menu

* fix: focus menu bar with Alt when autohide is off

* fix: make menu bar focus work more like the native menus

* fix: only focus menu bar if it's not already focused

* fix: track accelerator registration to avoid duplicates

* docs: add docs for & notation in app menu item names

* fix: only try to activate accelerator if it's registered

* fix: add friend to monitor window focus change

* style: add <memory> include
2018-10-29 13:08:46 -05:00
Shelley Vohr
d21d83cfc8
fix: folder open not working in devtools (#15387) 2018-10-25 08:36:48 -07:00
Milan Burda
1f3a89197c chore: bump minimum supported macOS version to 10.10 (#15357) 2018-10-25 10:59:42 +02:00
Cheng Zhao
2f3a8ecd42
fix: child window with nativeWindowOpen should disable node integration (#15213)
* fix: child window with nativeWindowOpen should disable node integration

* Revert "fix: do not enable node integration in child window if not enabled (#15076)"

This reverts commit 0252d7686c.

This patch is not needed anymore since we are force disabling node integration
for child windows.
2018-10-25 15:31:07 +09:00
Andy Dill
7a23980f4b fix: set NSResizableWindowMask at init time (#15106) 2018-10-25 10:34:11 +09:00
Milan Burda
8ba271efba refactor: eliminate brightray (#15240) 2018-10-24 12:49:10 +02:00
Jeremy Apthorp
1d8ab03146 refactor: use public WakeLock interface (#15351)
* refactor: use public WakeLock interface

* remove power_save_blocker visibility patch
2018-10-23 22:12:58 -07:00
Milan Burda
465dee2c33 refactor: eliminate brightray::BrowserMainParts (#15336) 2018-10-23 13:15:55 -07:00
Charles Kerr
869e0ab14d
fix: honor dialog.showMessageBox()'s Icon argument on Linux (#15326)
* Don't call gtk_widget_show_all() on popup dialog.

Fixes #15317.

Notes: Fixed incorrect display of some GtkMessageDialog icons.

The issue is caused because GtkMessageDialog contains an icon widget
which is not shown when there's no associated icon. Our call to
`gtk_widget_show_all()` overrides this, showing the uninitialized
icon widget.

This PR fixes the issue by calling `gtk_widget_show()` where needed
and removing use of `gtk_widget_show_all()` in the message dialog.

* use gtk_dialog_set_default_response() for default

* fix: support icons on gtk+ messageboxes.
2018-10-23 12:44:47 -05:00
Cheng Zhao
260778e0fb feat: add MdTextButton to View APIs (#15328)
* view: make button focusable by default

* view: add MdTextButton

* view: add common methods to LabelButton
2018-10-23 10:57:13 -04:00
Nitish Sakhawalkar
ca4b4709e5 fix: Native window close crash (#15327) 2018-10-23 10:35:00 -04:00
Milan Burda
fbbb704146 refactor: eliminate brightray::BrowserClient (#15320) 2018-10-23 10:45:41 +02:00
Michelle Tilley
13247e592b
fix: correct reversed logic in NativeWindowMac::SetEnabled (#15257) 2018-10-22 13:01:45 -07:00
Cheng Zhao
cb9be091aa refactor: remove potential double free when managing WebContents (#15280)
* 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
2018-10-22 13:02:25 -05:00
Milan Burda
e8e7edf017 refactor: eliminate brightray::ContentClient (#15303) 2018-10-22 19:04:23 +02:00
Milan Burda
6d844a0b67 refactor: move media/net from brightray to atom (#15288) 2018-10-19 14:51:43 -04:00
Milan Burda
6f3c46cc7e refactor: move devtools from brightray to atom (#15234) 2018-10-19 15:50:30 +02:00
Cheng Zhao
94aa0762f0
refactor: remove WebContents::CreateFrom (#15241) 2018-10-19 17:52:07 +09:00
Andy Dill
37f2113032 feat: expose setBackgroundThrottling api (#15104) 2018-10-19 11:32:22 +11:00
Michelle Tilley
51f3fb9bde
fix: correctly enable and disable windows on Windows and Linux (#15184) 2018-10-18 14:23:40 -07:00
Milan Burda
db37ab1039 feat: add remote.require() / remote.getGlobal() filtering (#15014) 2018-10-18 14:36:45 +11:00
Milan Burda
a369a4172b refactor: move notifications from brightray to atom (#15209) 2018-10-17 20:01:11 +02:00
Heilig Benedek
4d085c4aae fix: don't call ReadRawDataComplete if it's not necessary (#15185) 2018-10-16 21:57:26 -07:00
Cheng Zhao
0252d7686c
fix: do not enable node integration in child window if not enabled (#15076) 2018-10-16 18:10:03 +09:00
Jeremy Apthorp
2a4f5c3284 chore: add --fix option to lint:cpp (#14977)
* chore: add --fix option to lint:cpp

* fix lint errors
2018-10-15 22:59:45 -07:00
Nitish Sakhawalkar
0c711f690e fix: add microtask runner and fix promise test (#15071)
* fix: Promise resolution and unit test

* Update to use microtask runner

* Address review
2018-10-16 02:26:47 +11:00
Milan Burda
d3efc52745 feat: add webPreferences.enableRemoteModule option (#13028) 2018-10-13 20:50:07 +03:00
Heilig Benedek
a82bcc7e3c refactor: move printing out of chromium_src (#15023)
* 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
2018-10-13 12:57:04 +11:00
Shelley Vohr
6fc2a2a051 fix: natively implement LoginItem functions (#15010) 2018-10-12 15:19:27 -07:00
Heilig Benedek
5ef5d60f77 refactor: move color_chooser out of chromium_src (#15091)
* chore: move color_chooser out of chromium_src

* fix: remove deleted source files

* fix: add build flag, patch and build instructions for ColorChooser
2018-10-12 10:53:46 +11:00
Heilig Benedek
95696c9456 refactor: move text-to-speech out of chromium_src (#15024)
* 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
2018-10-11 08:52:12 -05:00
Shelley Vohr
ba9a55c391 fix: update and enable osr (#15046)
* fix: update and enable osr

* fix: update MacHelper view to call GetNativeView

* style: move stuff around to make more sense

* chore: move OSR related things in SetOwnerWindow to CommonWebContentsDelegate

* fix: avoid crashing when GetOffscreenRenderWidgetHostView is called

* fix: specify default for current_device_scale_factor_
2018-10-11 09:14:01 -04:00
Milan Burda
a9475f3590 feat: add workingDirectory option to shell.openExternal() (#15065)
Allows passing `workingDirectory` to the underlying `ShellExecuteW` API on Windows.

the motivation is that by default `ShellExecute` would use the current working directory, which would get locked on Windows and can prevent autoUpdater from working correctly. We need to be able specify a different `workingDirectory` to prevent this situation.
2018-10-10 22:46:54 +02:00