Milan Burda
45e78728bd
chore: move more constants to options_switches.h/cc ( #13093 )
...
* Add options::kNativeWindowOpen
* Add options::kSandbox
* Add options::kPlugins
* Add options::kWebSecurity
* Add options::kAllowRunningInsecureContent
* Add options::kOffscreen
2018-05-29 03:09:51 -05:00
Shelley Vohr
8bb7525fe0
fix missing instance of kBlinkFeatures => kEnableBlinkFeatures
2018-05-25 11:12:40 -07:00
Cheng Zhao
0f7c25fc63
Put View APIs under a build flag
2018-05-24 15:44:07 +09:00
Cheng Zhao
2c8dc9e0bd
Add View.addChildView API
2018-05-24 15:36:29 +09:00
Cheng Zhao
322bde526c
Add LayoutManager/BoxLayout APIs
2018-05-24 15:36:29 +09:00
Shelley Vohr
bc10be3de6
rename exposed session method to setCertificateVerifyProc
2018-05-23 13:51:28 -07:00
Shelley Vohr
4a90056462
remove webContents.openDevTools() deprecation
2018-05-23 09:30:15 -07:00
Shelley Vohr
3deffa859d
remove appcommand media-play_pause option deprecation
2018-05-23 09:24:32 -07:00
Shelley Vohr
003a5a0160
remove tray.setHighlightMode() deprecation
2018-05-23 09:20:39 -07:00
Shelley Vohr
72c63a10ee
remove screen.getMenuBarHeight() deprecation
2018-05-23 09:11:48 -07:00
Milan Burda
2337237d58
Refactoring: use C++11 class member variable initialization
2018-05-22 00:18:38 +02:00
Cheng Zhao
595b0663b2
WebContents may be managed by multiple owners
2018-05-21 10:53:09 +09:00
Cheng Zhao
3b81312cf7
clear pointer when WebContents is closed
2018-05-21 10:53:09 +09:00
Cheng Zhao
51db1efb8a
prevent double-adding a WebContents to view
2018-05-21 10:53:09 +09:00
Cheng Zhao
aeeb2a259f
destruct objects in stack order
2018-05-21 10:53:09 +09:00
Cheng Zhao
fd4a0626c5
destroy WebContents when view is destroyed
2018-05-21 10:53:08 +09:00
htk3
7c2303c758
Correct app-command name of APPCOMMAND_MEDIA_PLAY_PAUSE ( #12408 )
...
* correct app-command name
* add compatibility with old app-command name
* add temporary compatibility with old app-command name
* add a comment saying that media-play_pause is deprecated
* fix lint
2018-05-21 10:52:04 +09:00
Heilig Benedek
8b2bffcf9e
Only expand maximum size constraint if there was a constraint originally ( #13003 )
2018-05-21 10:56:45 +10:00
Jeremy Apthorp
156a97b80d
fix: Menu.setApplicationMenu(null) crash on Linux ( #12983 )
2018-05-18 10:29:28 -07:00
Zhuo Lu
d2653e8192
Fix: Prevent menu update while it's open ( #12809 )
...
* Update application menu on default runloop
Menu change should be prevented while the menu is open
* Fix code style
* Memory safety
2018-05-17 11:19:28 +10:00
Jeremy Apthorp
da0fd10423
refactor: chromium-style warnings in linux code ( #12949 )
2018-05-16 14:12:45 -05:00
John Kleinschmidt
9488ef4867
Merge pull request #12496 from mikeykhalil/8952-ignore-tray-double-click-events
...
8952 option to ignore tray double click events
2018-05-16 10:17:36 -04:00
John Kleinschmidt
e1c374de6e
Merge pull request #12954 from electron/web-dialog-helper
...
Fix empty description when only one extension is given (GetFileTypesFromAcceptType)
2018-05-16 10:15:54 -04:00
Milan Burda
211d7825d3
feat: DIP <-> screen coordinate conversions ( #12879 )
2018-05-16 18:34:09 +09:00
Milan Burda
9d9d6ca20b
Fix empty description when only one extension is given
2018-05-16 01:58:58 +02:00
Jeremy Apthorp
73eb5af2cc
refactor: remove unnecessary std::moves in linux code ( #12951 )
...
The compiler was complaining that the move was preventing copy elision.
2018-05-15 14:33:47 -07:00
Jeremy Apthorp
8fa48d1c04
fix: unused variable warnings in linux code ( #12950 )
2018-05-15 13:49:27 -05:00
Jeremy Apthorp
136105e353
fix: wrong list index type in file_dialog_gtk.cc ( #12952 )
2018-05-15 13:22:52 -05:00
Cheng Zhao
2f3fcb9dbe
give window a default content view
...
Certain APIs are expecting the window to have a content view, having a
default one simplifies our design.
2018-05-15 14:12:47 +09:00
Cheng Zhao
ea97f43145
check content view in SetMenuBarVisibility
2018-05-15 14:12:47 +09:00
Cheng Zhao
bb2715e7a5
feat: add TopLevelWindow.setContentView API
2018-05-15 14:12:47 +09:00
Cheng Zhao
2b24b26e59
refactor: do not pass WebContents to NativeWindow
2018-05-15 14:03:21 +09:00
Cheng Zhao
640877ebf8
attach native view after widget is created
2018-05-15 14:03:21 +09:00
Cheng Zhao
5a320222e2
feat: add WebContentsView API
2018-05-15 14:03:21 +09:00
Cheng Zhao
e058d11657
feat: add View API
2018-05-15 14:03:21 +09:00
John Kleinschmidt
0fd8513c80
Merge pull request #12904 from electron/fix-12875
...
Allow frameless transparent windows to be sized smaller than 64x64 on Windows
2018-05-14 10:46:40 -04:00
Heilig Benedek
ce8af7d499
#else instead of #elif
2018-05-12 22:05:25 +02:00
Heilig Benedek
c6bf39b283
Only include windows headers on windows
2018-05-12 21:33:47 +02:00
Heilig Benedek
f1fd457411
Format code with clang-format
2018-05-12 19:51:19 +02:00
Heilig Benedek
eae0674f61
Match chromium's workaround when setting size of unresizable windows
2018-05-12 17:37:31 +02:00
Jeremy Apthorp
cc386f2345
Merge pull request #12884 from nornagon/views-defines
...
Require !OS_MACOSX as well as TOOLKIT_VIEWS for views code
2018-05-10 14:13:19 -07:00
Jeremy Apthorp
72057bf7ef
clang-format atom_api_web_contents.cc
2018-05-10 14:11:19 -07:00
Jeremy Apthorp
87d0175c76
Require !OS_MACOSX as well as TOOLKIT_VIEWS for views code
2018-05-10 14:11:19 -07:00
Jeremy Apthorp
73ac019882
Fix up #includes to work with both GYP and GN
2018-05-10 13:38:40 -07:00
Samuel Attard
5b5c161601
feat: new makeSingleInstance API ( #12782 )
...
* Refactor app.makeSingleInstance
* new API `app.isPrimaryInstance()`
* new API `app.isSingleInstance()`
* new event `app.on('second-instance')`
* deprecated old syntax `app.makeSingleInstance(cb)`
* deprecated old syntax of `app.makeSingleInstance() --> bool` in favor
of `app.isPrimaryInstance()`
* Fix spec, we don't need process.nextTick hacks any more
* Make deprecation TODO for the return value of makeSingleInstance
* Refactor makeSingleInstance to requestSingleInstanceLock and add appropriate deprecation comments
* I swear this isn't tricking the linter
* Make const
* Add deprecation warnings for release, and add to planned-breaking-changes
BREAKING CHANGE
2018-05-08 01:29:18 +10:00
Jeremy Apthorp
b280ea5579
chromium-style fixes ( #12826 )
2018-05-03 23:45:12 -07:00
Cheng Zhao
a2c3db666e
viewDidMoveToSuperview may not be implemented
2018-05-04 09:55:09 +09:00
Cheng Zhao
5547df6073
report correct content size in AtomNSWindow
...
The views framework relies on NSWindow to return content size of window,
since we don't use the borderless window, the original result would
include titlebar. We have to override the function to return correct
result for frameless window.
2018-05-04 09:55:09 +09:00
Cheng Zhao
28fc58067b
remove usage of FullSizeContentView
2018-05-04 09:55:09 +09:00
Cheng Zhao
a9709a635c
display WebContents as views::View on macOS
2018-05-04 09:55:09 +09:00
Cheng Zhao
ada884a129
refactor: setup contentView on initialization
2018-05-04 09:55:09 +09:00
mikeykhalil
94ffd4bfc0
add getter for ignoreDoubleClickEvents field
2018-05-03 13:49:33 -07:00
mikeykhalil
208374afa4
clean up ignore double click event implementation
2018-05-03 13:49:33 -07:00
mikeykhalil
1f29124d11
updated Tray API to ignore double click events on macOS ( #8952 )
2018-05-03 13:49:32 -07:00
Jeremy Apthorp
cdc5022305
Fix chromium-style errors ( #12802 )
2018-05-03 09:04:22 -05:00
bughit
55a7f6f0ce
add did-frame-navigate event to WebContents ( #12723 )
...
* add did-frame-navigate event to WebContents, pass http response code to it and did-navigate
* docs for frame routing id related api changes on WebFrame and WebContents
2018-05-01 13:34:41 +09:00
Cheng Zhao
c67d1b62e3
refactor: NativeWindowViews should not be a View ( #12750 )
2018-05-01 13:28:22 +09:00
Samuel Attard
338a816ffd
Screen Lock / Unlock events ( #12714 )
...
* initial lock-screen and unlock-screen event implementation for macOS
* Implementation of lock-screen and unlock-screen on windows
2018-05-01 02:04:27 +10:00
Cheng Zhao
089428857c
remove unnecessary defines
2018-04-30 10:56:54 +09:00
Cheng Zhao
e07ea24610
remove unnecessary static_cast
2018-04-30 10:56:54 +09:00
Cheng Zhao
2225cc9608
refactor: manage widget_ in NativeWindow
2018-04-30 10:56:54 +09:00
Cheng Zhao
727cd68cee
refactor: Use widget() instead of window_
2018-04-30 10:56:54 +09:00
Cheng Zhao
6d18bd0633
refactor: Make NativeWindow inherit WidgetDelegate
2018-04-30 10:56:54 +09:00
Zeke Sikelianos
cc98bd6b6d
Merge pull request #12662 from electron/prevent-default
...
Stop overwriting prevent_default if default wasn't prevented
2018-04-26 12:12:18 -07:00
Jeremy Apthorp
dd7e0f80fe
Turn off visual zoom by default ( #12679 )
2018-04-26 10:27:35 -05:00
Jeremy Apthorp
1a64b9f0c2
Disable navigating on drag/drop ( #12655 )
...
* Disable navigating on drag/drop
* Add a WebPreferences option to re-enable navigate on drag/drop
2018-04-26 10:23:27 -05:00
bughit
4fcd178c36
expose WebFrame#routingId ( #12614 )
...
* expose WebFrame#routingId and pass it to WebContents frame specific events along with frameProcessId; add WebContets.did-start-navigation event
* fix compilation error on ia32 Windows
2018-04-26 19:17:55 +09:00
Cheng Zhao
cf70267871
remove unnecessary overrides
2018-04-26 09:48:12 +09:00
Cheng Zhao
5e48dd9d45
be aware of views::Widget's layer
2018-04-25 15:10:29 +09:00
Cheng Zhao
39242c978f
fix failed BrowserWindow tests
2018-04-25 15:10:29 +09:00
Cheng Zhao
75a624434c
refactor: use views::Widget on macOS
2018-04-25 15:10:29 +09:00
Nitish Sakhawalkar
2579071b98
Deprecate did-get-response-details and did-get-redirect-request ( #12615 )
...
* Deprecate webContents events did-get-response-details and did-get-redirect-request.
* Update guest view files
* Update webview tag docs and update specs
* Update deprecate.event function
* Update comment
* Update more
* Update documentation for other deprecated event
2018-04-23 14:46:12 -05:00
Shelley Vohr
12a57ff1c2
clang-format objc files ( #12673 )
2018-04-20 11:47:04 -07:00
Cheng Zhao
28b85762fd
Merge pull request #12660 from electron/mac-views
...
Refactor NativeWindow (Part 8): Prepare work for using views::Widget on macOS
2018-04-20 21:31:28 +09:00
Robo
ff571f3b5d
Part I: Move from base::Bind to base::BindOnce and remove unneeded base::Passed ( #12661 )
2018-04-20 19:55:05 +09:00
Cheng Zhao
aa5c80f8a6
Fix new clang warnings
2018-04-20 19:26:20 +09:00
Cheng Zhao
c44279bb10
Move AtomNSWindow to a new file
2018-04-20 19:26:20 +09:00
Cheng Zhao
569967ac21
Move QLPreviewPanelDataSource to AtomNSWindowDelegate
2018-04-20 19:17:08 +09:00
Cheng Zhao
f6a7e5ea23
Move NSTouchBarDelegate to AtomNSWindowDelegate
2018-04-20 19:15:45 +09:00
Cheng Zhao
8e9667d86c
Manage AtomTouchBar in NativeWindow instead of AtomNSWindow
2018-04-20 19:15:01 +09:00
Cheng Zhao
ce54fd334d
Move AtomNSWindowDelegate to a new file
2018-04-20 19:12:17 +09:00
Cheng Zhao
1c6c75da4f
Merge the logic of managing ViewsDelegate
2018-04-20 19:10:37 +09:00
Cheng Zhao
9bc79f840e
mac: Override NativeWidgetMac
2018-04-20 19:10:37 +09:00
Cheng Zhao
37a7df49d6
mac: Provide ViewsDelegate
2018-04-20 19:10:37 +09:00
deepak1556
30f1d0991b
enable chromium style checker plugin for electron and brightray targets
2018-04-19 11:12:58 -07:00
Jeremy Apthorp
eb7ccf8afa
Bring mac code into conformance with -Wobjc-missing-property-synthesis
2018-04-19 11:12:58 -07:00
Jeremy Apthorp
f3c00e96aa
Bring mac code into conformance with -Wunguarded-availability
2018-04-19 11:12:58 -07:00
Jeremy Apthorp
27cee90e5e
[chromium-style] move methods out of headers
2018-04-19 11:12:58 -07:00
Jeremy Apthorp
f1587da480
[chromium-style] out-of-line default constructors and destructors
2018-04-19 11:12:58 -07:00
Jeremy Apthorp
6c26bb1cf8
[chromium-style] destructors of ref-counted objects should be private
2018-04-19 11:12:10 -07:00
Jeremy Apthorp
e6695cf2ec
[chromium-style] override / virtual warnings
2018-04-19 11:12:10 -07:00
Jeremy Apthorp
a635f078c6
[chromium-style] auto variable type must not deduce to a raw pointer type
2018-04-19 11:10:52 -07:00
Birunthan Mohanathas
cd407d1c3f
Stop overwriting prevent_default if default wasn't prevented
...
This didn't actually cause any issues because there is only one listener
for the affected methods right now. Should we have added more, the last
called observer would have overwritten `prevent_default`. Lets only set
it when necessary to avoid this footgun in the future.
2018-04-19 12:45:21 +02:00
Cheng Zhao
7473b612c5
Make Menu API accept TopLevelWindow
2018-04-19 13:08:37 +09:00
Cheng Zhao
1340b17424
Do not return TopLevelWindow in BrowserWindow.getAllWindows
2018-04-19 13:08:37 +09:00
Cheng Zhao
e38f511737
Make BrowserWindow inheirt TopLevelWindow in JS
2018-04-19 13:08:37 +09:00
Cheng Zhao
71ebd99dfa
Expose TopLevelWindow to JavaScript
2018-04-19 13:08:36 +09:00
Cheng Zhao
cfed9fa4b9
Make sure we append parent->child_windows after InitWith
2018-04-19 12:45:48 +09:00
Cheng Zhao
89d909ab43
Only include UIAutomationCoreApi.h where necessary
2018-04-19 11:14:55 +09:00
Shelley Vohr
c6f4bbd143
also format missing .cc files
2018-04-18 20:48:45 -04:00