Commit graph

5598 commits

Author SHA1 Message Date
Samuel Attard
bdf3552be6 Merge pull request #10727 from electron/named-nativeimage
Add an API to get a nativeImage from a named NSImage
2017-10-12 10:02:07 +11:00
Birunthan Mohanathas
06d782279c Add systemPreferences.removeUserDefault()
This can be used to restore the default or global value of a `key`
previously set with `setUserDefault`.
2017-10-10 22:57:47 +03:00
Samuel Attard
2c7787900f
Follow style guide 2017-10-10 17:20:55 +11:00
Samuel Attard
9308c96f95
Appease the linting overlords 2017-10-10 17:17:51 +11:00
Samuel Attard
b5ba8699f3
Enable hsl shifting of named images 2017-10-10 17:05:13 +11:00
Samuel Attard
767a178bd1 Do not throw if the named image can not be found 2017-10-10 03:18:44 +11:00
Samuel Attard
e027ba9c47 Add nativeImage.createFromNamedImage API 2017-10-10 03:13:40 +11:00
Samuel Attard
d350134c4f Ensure that the touchbar's esape item can be set before setting it 2017-10-10 02:24:49 +11:00
Shelley Vohr
242e097e9b Merge pull request #10670 from electron/add-linuxdefaultprotocol
add setAsDefaultProtocolClient for Linux
2017-10-07 10:07:02 -05:00
Shelley Vohr
443c30890b
remove dummy check 2017-10-07 10:38:08 -04:00
Shelley Vohr
35eea8bea5
remove unused xdg setting 2017-10-07 00:38:25 -04:00
Shelley Vohr
66827755e7
remove chrome check and change protocol handler 2017-10-07 00:36:18 -04:00
Shelley Vohr
a1347f67a1
remove a space from a comment wow thanks linter 2017-10-06 23:40:58 -04:00
Shelley Vohr
c9da806c84
slight refactor and lin cleanup 2017-10-06 23:32:46 -04:00
Antoine
5e6b683cfb fixed: trying to fix the build 2017-10-05 15:57:27 -07:00
Antoine
8e1945f768 🍎 skip tabbing category if macOS < Sierra
Previously, the macro was ensuring the` MAC_OS_X_VERSION_10_12` was not defined to decide to compile a `NSWindow` category back porting native tabs or not.

This patch ensures to compile the `NSWindow` category only if the min required version is lesser than 1012 (`MAC_OS_X_VERSION_10_12`)
2017-10-05 14:11:58 -07:00
Shelley Vohr
f8f21815eb
syntax updates and pointer conversion 2017-10-05 00:30:14 -04:00
Cheng Zhao
bb71b09452 Fix building on Windows 2017-10-05 11:51:41 +09:00
Cheng Zhao
4342480473 Fix cpplint warnings 2017-10-05 11:49:26 +09:00
Sean Bannigan
0b205019b6 add mouse-move event and click event position for tray 2017-10-05 11:41:08 +09:00
Cheng Zhao
8c5bb5969c Merge pull request #10667 from dittos/window-opacity
Add window opacity support
2017-10-04 15:03:45 +09:00
Felix Rieseberg
a337b12877 Merge pull request #10680 from electron/idlewakeups-windows
Don't call GetIdleWakeupsPerSecond on Win
2017-10-03 22:04:55 -07:00
Felix Rieseberg
4e05d24d1b Merge pull request #10661 from electron/browserview-multiple-screens
BrowserView: Allow dragging of window to screen above menubar
2017-10-03 16:09:11 -07:00
Felix Rieseberg
9fcf7eb27c 🔧 Don't call GetIdleWakeupsPerSecond on Win 2017-10-03 10:21:31 -07:00
Shelley Vohr
6131a523dc
add xdg helper method 2017-10-03 11:10:38 -04:00
Cheng Zhao
150a4797a4 Merge pull request #10676 from qazbnm456/fix-unhandle-null-pointer
Add a null-pointer check before processing base::SupportsUserData::GetUserData
2017-10-03 20:18:51 +09:00
Daniel Ma
1bb042a661 feat(NativeWindowMac): addTabbedWindow
Add support for the [`NSWindow addTabbedWindow`][nsw] method on MacOSX

This plays nicely with the changes from #9052 and #9725

Usage samples available in [this commit][c] in my fork of
`electron-quick-start`

[nsw]: https://developer.apple.com/documentation/appkit/nswindow/1855947-addtabbedwindow
[c]: 79f06591df
2017-10-03 20:11:16 +09:00
Boik
d594092675 add a null-pointer check before processing base::SupportsUserData::GetUserData 2017-10-03 12:42:35 +08:00
Taeho Kim
7570ec9d39 Add BrowserWindow.getOpacity for consistency 2017-10-03 00:08:10 +09:00
Shelley Vohr
3f73e000ee
first pass at adding linux setAsDefaultProtocolClient 2017-10-02 10:21:30 -04:00
Taeho Kim
7df5182901 Fix lint 2017-10-02 09:52:27 +09:00
Felix Rieseberg
0cc1ebc021 🔧 Allow dragging window to screen above menubar (for real) 2017-09-29 14:20:34 -04:00
Zeke Sikelianos
9f895879bf Merge pull request #10191 from electron/add_log_path_support
add ability to access logs in getPath()
2017-09-29 11:11:29 -07:00
Ted Kim
7f2c4a9e06 Add window opacity support 2017-09-29 17:49:10 +09:00
Shelley Vohr
5ef4caf8ab
add ability to access logs in getPath() 2017-09-28 13:35:22 -04:00
John Kleinschmidt
7788b33dc9 Bump v1.8.1 2017-09-28 13:13:49 -04:00
Felix Rieseberg
89246f3714 🔧 Allow dragging over menubar 2017-09-27 17:43:09 -04:00
Birunthan Mohanathas
044a3a29a6 Simplify checking for NSFullScreenWindowMask 2017-09-27 16:36:18 +03:00
Felix Rieseberg
d45788a7b8 🔧 Don't drag fullscreen window 2017-09-26 18:03:44 -04:00
Birunthan Mohanathas
e1ddd3bdbc Stop sending resize event for minimized windows on Windows
This makes it consistent with macOS.

This also fixes BrowserView auto-resize on Windows when minimizing and
restoring the window. Previously it would incorrectly grow too in some
cases.
2017-09-25 11:44:32 +09:00
Birunthan Mohanathas
f3f6bedf8e Make BrowserView auto-resize relative to window size on Windows/Linux
Previously it was relative to the window web contents size, which was
not consistent with macOS.
2017-09-25 11:44:32 +09:00
Cheng Zhao
b7119b5756 Create watcher when message loop is ready 2017-09-20 11:58:32 +09:00
Samuel Attard
4147fa4629 Appease the linting gods 2017-09-20 11:58:32 +09:00
Samuel Attard
0ab83b301d Refactor as per @zcbenz comments
Also fix issue where we run the single instance callback *not* on the UI thread,
this apparently results in a hung process.
2017-09-20 11:58:32 +09:00
Samuel Attard
ecbeb0d117 Woops, how did that happen ;) 2017-09-20 11:58:32 +09:00
Samuel Attard
f928a399ae Move OnBrowserReady call to PreMainMessageLoopRun to account for timing issues on macOS 2017-09-20 11:58:32 +09:00
Samuel Attard
28900a9b63 Fix app.makeSingleInstance hanging on posix systems
Wait for the IO thread to be a thing before attempting to listen on the socket

Fixes #9880
2017-09-20 11:58:32 +09:00
Shelley Vohr
27fd2dad59
update shell.OpenItem to use NSWorkspace 2017-09-19 18:15:37 -04:00
Cheng Zhao
b277353238 Set secure schemes in native code
Code with same functionalities should be put together.
2017-09-15 16:48:55 +09:00
Cheng Zhao
ff023115f5 Style fixes 2017-09-14 16:12:34 +09:00
Rafael Nobre
77a1c5d7fc Avoids deadlock in case NSUserActivityDelegate method start being called from main thread. 2017-09-14 15:59:43 +09:00
Rafael Nobre
9483f0fc14 Adds synchronization logic to allow NSUserActivityDelegate to wait Javascript updating the NSUserActiity UserInfo if requested. 2017-09-14 15:59:43 +09:00
Rafael Nobre
c23b4a48ec Fixes NSUserActivityDelegate that was called on a background thread thus not working. 2017-09-14 15:59:43 +09:00
Rafael Nobre
76efee675f Requests updated user info data before each Handoff operation. 2017-09-14 15:59:43 +09:00
Rafael Nobre
a870799c32 Exposes more Handoff related APIs to Electron. 2017-09-14 15:59:43 +09:00
Cheng Zhao
19a7c7ac39 Styling fixes 2017-09-14 14:43:22 +09:00
xaviergonz
e18cdc185a add the fix for showinactive 2017-09-14 14:35:53 +09:00
xaviergonz
d0c91daaed make sure setparentwindow only shows the window if already visible 2017-09-14 14:35:53 +09:00
xaviergonz
dc7cc6921e fix for mac child windows so they honor show option 2017-09-14 14:35:53 +09:00
xaviergonz
dae63d323c add new internal set parent window method 2017-09-14 14:33:24 +09:00
Cheng Zhao
a19a229a59 Merge pull request #10254 from zachflower/feature/simple-fullscreen-mode
Feature/simple fullscreen mode
2017-09-14 09:39:50 +09:00
Zachary Flower
432b912c6a 🎨 Rename ambiguous simple_fullscreen_ variable to always_simple_fullscreen_ 2017-09-13 12:16:37 -06:00
Cheng Zhao
2048a1a638 Merge pull request #10429 from qazbnm456/web-request-origin
Track the origin of webRequest events
2017-09-13 22:23:44 +09:00
Cheng Zhao
c34fb146f6 Fix styling 2017-09-13 21:40:29 +09:00
Vanessa Yuen
9a7d8a0511 merge master into fix-fullscreen-with-resizable-flag. 2017-09-12 18:34:23 -04:00
Zachary Flower
fa4d52f042 🎨 Track/restore original stylemask, rather than individual states. 2017-09-12 12:27:30 -06:00
Boik
e66341ec59 add back the missing 'resourceType' property 2017-09-12 21:27:49 +08:00
Boik
a01abd0fee fix lint-cpp 2017-09-12 20:28:30 +08:00
Boik
2d771674bb get webContentsId instead 2017-09-12 20:17:11 +08:00
Boik
13d363d1f1 fix lint-cpp 2017-09-12 15:40:35 +08:00
Boik
549c30f9b2 first attempt to track the origin requesters of webRequest events 2017-09-12 15:40:35 +08:00
Cheng Zhao
59cadf9e4b Merge pull request #10366 from syohex/window-close-order
Close window in order from newer one on macOS
2017-09-12 16:22:38 +09:00
Cheng Zhao
bca71fcfc1 Merge pull request #10393 from j3l11234/fix_mac_crack
fix mac ime crack
2017-09-12 16:19:08 +09:00
Cheng Zhao
8493d5707e Fix cpplint warnings 2017-09-12 15:35:24 +09:00
Cheng Zhao
894bcdf749 Merge pull request #9896 from ferreus/dev/vladimir_8017
Fix #8017: Crash copying cropped image to clipboard
2017-09-12 15:02:44 +09:00
Cheng Zhao
10ab870237 Merge pull request #10321 from kaylanm/macos-native-tab-api
🍎 Add macOS native tab methods to window API
2017-09-11 18:49:56 +09:00
Cheng Zhao
cc9771a3d0 Merge pull request #10307 from liusy182/10240-theme-color-2
return null when theme color is transparent or not found
2017-09-11 18:40:35 +09:00
Cheng Zhao
e6733b4b23 Merge pull request #10305 from ivmirx/macos-accessibility
Special attribute for macOS accessibility
2017-09-11 17:58:20 +09:00
Cheng Zhao
0694334487 Merge pull request #10271 from kaylanm/macos-native-tab-menu-items
🍎 Add roles for macOS native tab menu items
2017-09-11 17:41:31 +09:00
Birunthan Mohanathas
511e82de67 Fix missing extension when saving a file without filters
Previously, when triggering the save dialog through e.g. `<a download>`
links (e.g. http://jsfiddle.net/koldev/cW7W5/), the extension was only
saved if Finder was set to show all extensions by default. We now always
display the extension to make sure that it is saved.

If we want to keep the extension hidden, we could also populate the
allowed file types array with the extension from the default filename,
but that would have interfered with how we set the filters.
2017-09-07 16:48:14 -07:00
John Kleinschmidt
4b1e2b42a4 Bump v1.8.0 2017-08-31 16:16:19 -04:00
Samuel Attard
6b010614e2 Implement moveToApplicationsFolder (#10142)
* Implement moveToApplicationsFolder

* Fix tabs / spaces

* Fix linting

* Use Browser::Quit, instead of exit

* Update documentation as per feedback

* Fix spec
2017-08-31 10:37:12 -04:00
Cheng Zhao
c2ab4f711f Merge pull request #10396 from electron/cleanup
Cleanup obsolete code
2017-08-30 19:05:05 +09:00
Ales Pergl
64d9e5b861 Removed obsolete io.h wrappers, included atlbase.h in atom_main.cc 2017-08-30 10:43:29 +02:00
Ales Pergl
7cd64f1bd1 Fixed crash on process exit on Windows 2017-08-30 09:23:19 +02:00
allenliu
5978775ce1 fix mac ime crack 2017-08-30 12:07:04 +08:00
Cheng Zhao
0550a4a9b8 Fix crash when emitting render-view-deleted event 2017-08-29 17:46:46 +09:00
Cheng Zhao
4febbec102 Fix crash when switching menus in menubar 2017-08-29 14:19:23 +09:00
Cheng Zhao
b2f3625eaa Fix deprecated node::MakeCallback call 2017-08-29 14:19:23 +09:00
Ales Pergl
a7bae32527 Re-enabled debug mode 2017-08-29 14:19:19 +09:00
Zeke Sikelianos
c6918966c2 Merge pull request #10214 from psh0628/contextisolation-sandbox-fix
fix contextIsolation issue while webPreference sandbox is on
2017-08-28 21:20:04 -07:00
Shohei YOSHIDA
55f2b524e7 Close window in order from newer one on macOS
A parent window is not closed if a child modal window still exists.
So a child window should be closed before parent window closed.
2017-08-28 13:56:05 +09:00
Ivan Mir
75b2915fee Change the parameter name for consistency 2017-08-27 11:53:25 -03:00
sungpark
65eb4e1994 fix compile error 2017-08-24 14:31:25 -07:00
Ivan Mir
6717f0d2bb Add accessibility setter to the app 2017-08-24 11:22:28 -03:00
Samuel Attard
7ecac42214 Merge pull request #10232 from electron/drag-browser-view
Add -webkit-app-region support to BrowserView
2017-08-24 10:30:56 +10:00
Felix Rieseberg
fdfbf3abfa 🔧 Respect the header 2017-08-23 17:26:18 -07:00
Felix Rieseberg
a44c2d5dcc 🔧 Extend interface 2017-08-23 16:10:31 -07:00
sungpark
f984bd2ff5 use spaces instead of hard tabs for indentation and add the supported modules as a sub-list 2017-08-23 10:52:02 -07:00
sungpark
bf07c5aebd fix contextIsolation issue while webPreference sandbox is on
contextIsolation didn't work while sandbox is on. The fix is contextIsolation picked up while sandbox on
2017-08-23 10:52:02 -07:00
Siyuan Liu
5cb58cd42f use nullptr instead of nullptr_t() 2017-08-23 09:30:58 +08:00
Felix Rieseberg
cd5cd25f74 🔪 Bonus colon 2017-08-22 11:14:21 -07:00
Michael Kaylan
b4428e7e41 🍎 Add macOS native tab methods to window API 2017-08-21 23:24:30 -04:00
Cheng Zhao
565ece6986 Merge pull request #10308 from electron/native-view
Add WebContents.getNativeView() API
2017-08-22 09:19:27 +09:00
Felix Rieseberg
f0680587fa 🔧 Linter fascism 2017-08-21 16:52:59 -07:00
Charlie Hess
f17bd040ad Merge pull request #10293 from electron/notification-sounds
Add support for soundName in main process notifications
2017-08-21 16:15:47 -07:00
Charlie Hess
db081d95d5
Review CommentZ. 2017-08-21 13:53:50 -07:00
Cheng Zhao
2c1984b6ed Add WebContents.getNativeView API 2017-08-21 19:50:12 +09:00
Cheng Zhao
70fd42808e Fix build on Linux 2017-08-21 17:42:45 +09:00
Cheng Zhao
19323c88f9 win: Fix "thickFrame: false" not working for normal window 2017-08-21 17:21:59 +09:00
Siyuan Liu
eeb2e58ad8 return null when theme color is not found 2017-08-20 22:48:13 +08:00
Ivan Mir
94dd068e15 Special attribute for macOS accessibility #7206
In the linked issue we were discussing that Electron apps are inaccessible unless VoiceOver is enabled. While it's a working solution for users with vision impairment, all other users and apps that require accessibility can't interact with Electron-based software because they don't keep VoiceOver running.

I suggest adding `AXManualAccessibility` for programmatically enabling it in Electron apps. The reason for a new attribute is that `AXEnhancedUserInterface` is already reserved by VoiceOver.

Adding this attribute will allow both Electron developers and 3rd party developers to enable and disable accessibility from their code by calling `accessibilitySetValue:forAttribute:` on the application.

It will be also possible to create a small utility app to switch accessibility in Electron-based apps until there's a native UI solution (like the accessibility settings page in Chrome).
2017-08-19 17:18:12 -03:00
Charlie Hess
2b9b186fd1
Rename soundName → sound. 2017-08-17 17:28:14 -07:00
Charlie Hess
0cfae1cc2b
Plumb in the macOS soundName property for notifications. 2017-08-17 13:31:20 -07:00
Cheng Zhao
9c552644d8 Fix compilation on mac 2017-08-17 16:47:12 +09:00
Cheng Zhao
ecff620528 Merge pull request #10081 from renaesop/master
Add a callback option to `webContents.print`
2017-08-17 15:56:02 +09:00
Cheng Zhao
f908678e8e Merge pull request #10183 from andens/mouse_forward
Mouse forward functionality on Windows
2017-08-17 15:54:22 +09:00
Andreas Flöjt
d4bbd7c7ab Add example of using mouse forwarding. 2017-08-16 03:28:52 +02:00
Andreas Flöjt
814702f5b8 Cleanup potential mouse forwarding resources when window is destroyed. 2017-08-16 03:28:07 +02:00
Felix Rieseberg
6191e6e787 🔧 Implement feedback 2017-08-15 16:14:58 -07:00
Michael Kaylan
7741a0e6ad 🍎 Add roles for macOS native tab menu items
Fixes #9086, #10064.
2017-08-15 11:30:39 -04:00
Catalin Fratila
60b363fa3b Fixing Windows tray icon content menu - based on chrome/browser/ui/views/status_icons/status_icon_win.cc 2017-08-15 16:19:23 +03:00
Kevin Sawicki
9d2aa6f1c7 Upgrade to node 8.2.0 2017-08-15 16:19:23 +03:00
Ales Pergl
9f8f95f4c9 Lock pixels before calling SkBitmap::getPixels and copy bitmap row-wise in case (stride != width) 2017-08-15 16:19:23 +03:00
deepak1556
778772710a intialize WebTextCheckClient https://codereview.chromium.org/2791753003 2017-08-15 16:19:22 +03:00
Gellert Hegyi
6ab0a8a287 removes unused autoresizelock from osrrwhv 2017-08-15 16:19:22 +03:00
Gellert Hegyi
1d10654a22 fixes bitmap to canvas conversion 2017-08-15 16:19:22 +03:00
Gellert Hegyi
76d46ce509 adds compositor resize lock client implementation 2017-08-15 16:19:22 +03:00
Gellert Hegyi
ca4a6e4692 fixes offscreen rendering on macos 2017-08-15 16:19:22 +03:00
Kevin Sawicki
9945fc5148 Don't destroy menu delegate until OnMenuClosed fires 2017-08-15 16:19:21 +03:00
Kevin Sawicki
34fff57646 Grant the devtools access to the extension origins 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
4fc2b3e642 Make download item drags look like bookmark
https://codereview.chromium.org/2750253002
2017-08-15 16:19:21 +03:00
Kevin Sawicki
4bb95acc2b 👕 Remove linter errors 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
c7cf844bcd Update CHROME_VERSION_STRING 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
f4411889a9 Fix free memory calculation.
https://codereview.chromium.org/2558043007
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
627eb30409 The Blink Rename 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
b8b7d0ab1a Rename methods in autofill 2017-08-15 16:19:21 +03:00
Kevin Sawicki
45db999593 Extend blink::WebTextCheckClient in atom::api::SpellCheckClient 2017-08-15 16:19:21 +03:00
Tony Ganch
4d9f309888 Fix HasServiceWorker check
Revert cb2014f9e8ae0283e5f20d4e2167be1592228887.
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
e2fe95894f Require explicit selection of traits for LazyInstance
https://codereview.chromium.org/2733283002
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
e16e1e2854 Remove URLRequestJobFactory::IsHandledURL.
https://codereview.chromium.org/2783343002
2017-08-15 16:19:21 +03:00
Tony Ganch
90574160db Replace x/y in WebMouseEvent with proper getters/setters 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
b997c2ffc1 Don't call deprecated copyPixelsTo
don't call deprecated copyPixelsTo
https://codereview.chromium.org/2812853002

stop using copyPixelsTo -- deprecated
https://codereview.chromium.org/2798413002

remove unused SkBitmap::copyPixelsTo
https://skia-review.googlesource.com/c/13171/
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
f824b1e9d4 Migrate base::TaskRunner from Closure to OnceClosure
Migrate base::TaskRunner from Closure to OnceClosure
https://codereview.chromium.org/2637843002

Pass Callback to TaskRunner by value and consume it on invocation (1)
https://codereview.chromium.org/2726523002

Replace base::get with std::get
https://codereview.chromium.org/2797133002
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
48821a6d2a Fix compilation 2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
d09cab2e21 Migrate base::TaskRunner from Closure to OnceClosure
Migrate base::TaskRunner from Closure to OnceClosure
https://codereview.chromium.org/2637843002

Pass Callback to TaskRunner by value and consume it on invocation (1)
https://codereview.chromium.org/2726523002

Replace base::get with std::get
https://codereview.chromium.org/2797133002
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
ffbb16e854 Adds a basic offline check to InstallableManager.
https://codereview.chromium.org/2751343002
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
30fafc2772 Fix CompositorResizeLock to do something.
https://codereview.chromium.org/2773433003
2017-08-15 16:19:21 +03:00
Aleksei Kuzmin
9b8a77f0d8 Adds the ability for WebContentsDelegate to decide if event should be updated
https://codereview.chromium.org/2775553002
2017-08-15 16:19:20 +03:00
Aleksei Kuzmin
d322769de8 WebMouseEvent coordinates are now fractional & private
https://codereview.chromium.org/2782893002
2017-08-15 16:19:20 +03:00