Charles Kerr
d663b4eaee
fix: fix gn cpplint warnings ( #14583 )
...
* chore: fix cpplint 'include_what_you_use' warnings
Typically by including <memory>, <utility> etc.
* chore: fix 'static/global string constant' warning
Use C style strings instead of std::string.
Style guide forbids non-trivial static / global variables. https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables
/home/charles/electron/electron-gn/src/electron/script/cpplint.js
* refactor: remove global string variables.
Fix 'global string variables are not permitted' linter warnings
by using the base::NoDestructor<> wrapper to make it explicit that
these variables are never destroyed.
The style guide's take on globals with nontrivial destructors:
https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables
* fix: initializer error introduced in last commit
* fix: remove WIP file that was included by accident
* fix: include order
* fix: include order
* fix: include order
* fix: include order, again
2018-09-12 19:25:56 -05:00
Paulius
b89848d683
feat: allow window above full screen windows on mac ( #14122 )
...
* allow window above full screen windows on mac
* add visibility change params to higher level files
* adress feedback, fix bool issue, remove compilation hooks
* adjust readme
* switch to options object
* single argument for native window views
2018-08-31 15:06:02 -07:00
Emmanuel Kimmerlin
5f6706ac33
feat: BrowserWindow.getNormalBounds() ( #13290 )
...
* First commit
* Add Mac support (1st attempt)
* Add Mac support (2nd attempt)
* Simplify tests
* Restore window state !
* Looking at other tests, seems minimize, maximize, fullscreen are skipped when in CI
* Fix Mac tests
* Restore tests in CI
* Fix typo
* widget getRestoredBounds not working on Mac !!
* widget getRestoredBounds not working on Mac !!
* Add IsNormal function
* Add IsNormal
* IsNormal => isNormal
* Deactivate fullscreen on Mac. Do not receive leave-fullscreen event
* Set default original_frame_
* Set default original_frame_
* Fix Mac
2018-08-24 14:33:27 -07:00
Birunthan Mohanathas
a42ca9eecc
feat: Add BrowserWindow.setWindowButtonVisibility()
...
Fixes #12701 and supersedes #13131 .
Ideally we would have added `setTitleBarStyle()`, but that is a
significantly more involved change. For example, consider the case where
we switch from `hidden` to `normal`. We would not only have to show the
traffic light buttons, we would also have to switch the window from a
frameless to a framed window and deal with various other window state.
Lets instead implement a simple solution for #12701 .
2018-07-25 10:12:27 -07:00
Cheng Zhao
0ec4ad288d
fix: fallback to FullSizeContentView for frameless window on mac ( #13599 )
...
fix: draggable regions not working on macOS
2018-07-10 11:43:42 +10:00
Samuel Attard
79fbd6bab1
Revert "fix: Drop support for OS X Mavericks (version 10.9)" ( #13333 )
2018-06-20 07:27:55 -05:00
Milan Burda
794fe741e9
fix: Drop support for OS X Mavericks (version 10.9)
2018-06-19 17:49:27 +02:00
Milan Burda
2337237d58
Refactoring: use C++11 class member variable initialization
2018-05-22 00:18:38 +02:00
Cheng Zhao
2b24b26e59
refactor: do not pass WebContents to NativeWindow
2018-05-15 14:03:21 +09:00
Cheng Zhao
a9709a635c
display WebContents as views::View on macOS
2018-05-04 09:55:09 +09:00
Cheng Zhao
2225cc9608
refactor: manage widget_ in NativeWindow
2018-04-30 10:56:54 +09:00
Cheng Zhao
6d18bd0633
refactor: Make NativeWindow inherit WidgetDelegate
2018-04-30 10:56:54 +09:00
Cheng Zhao
cf70267871
remove unnecessary overrides
2018-04-26 09:48:12 +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
Cheng Zhao
569967ac21
Move QLPreviewPanelDataSource to AtomNSWindowDelegate
2018-04-20 19:17:08 +09:00
Cheng Zhao
8e9667d86c
Manage AtomTouchBar in NativeWindow instead of AtomNSWindow
2018-04-20 19:15:01 +09:00
Cheng Zhao
37a7df49d6
mac: Provide ViewsDelegate
2018-04-20 19:10:37 +09:00
Jeremy Apthorp
e6695cf2ec
[chromium-style] override / virtual warnings
2018-04-19 11:12:10 -07:00
Shelley Vohr
53bdf22c85
clang-format atom files
2018-04-18 20:48:45 -04:00
Cheng Zhao
2b5bde4071
InstallView is no longer needed
2018-04-11 15:12:53 +09:00
Cheng Zhao
56735d4ff5
Add NativeWindow::SetContentView
2018-04-11 15:12:53 +09:00
Andreas
6b5e09478c
Mouse forward on macOS ( #12281 )
...
* Accept mouse events according to the forward parameter on macOS.
* Update BrowserWindow docs: mouse forward is available on macOS
2018-04-09 19:35:05 +09:00
MadfishDT
200388ff96
add moveTop API to move window z-oder to top for win32, mac ( #12485 )
...
* add moveTop API to move window z-oder to top for win32, mac
* BrowserWindow::MoveTop SetMethod bug fix
2018-04-03 08:04:32 -05:00
Cheng Zhao
5a4c2fb61d
mac: Pass the view to install
2018-03-06 16:20:37 +09:00
Cheng Zhao
498f5d65fd
mac: UninstallView is not used
2018-03-06 16:20:37 +09:00
Cheng Zhao
3b3e69f8b2
Save browser_view_ in the NativeWindow
...
No need to store it separately in subclasses.
2018-03-06 16:20:37 +09:00
Cheng Zhao
503b0ba1b1
mac: Move draggable region code to BrowserWindow
...
On macOS current draggable region implementation highly relies on
WebContents, the code is only meaningful for BrowserWindow.
2018-03-06 16:20:37 +09:00
Cheng Zhao
7d4ff3b061
mac: Call SetBackgroundOpaque in BrowserWindow
2018-03-06 16:20:37 +09:00
Cheng Zhao
1681ee35db
Set WebContents background color in BrowserWindow
2018-03-06 16:20:37 +09:00
Shelley Vohr
2abc69780e
move native-mate back into the api layer
2018-02-27 13:00:42 -08:00
Samuel Attard
5336b4a89c
Pass arguments instance through the chain in order to throw error
2018-02-27 16:11:58 +11:00
Cheng Zhao
c611eb061d
Move InputEventObserver to api::BrowserWindow
2018-02-22 19:01:45 +09:00
Cheng Zhao
bffb31c337
Remove OnMessageReceived from NativeWindow
2018-02-22 19:01:45 +09:00
Cheng Zhao
384b03d49b
UpdateDraggableRegionViews is redundant
2018-02-22 19:01:45 +09:00
Samuel Attard
ae65938752
Fix frameless windows with vibrancy ( #11886 )
2018-02-12 13:38:37 -05:00
Shelley Vohr
80aa399f8a
updates to mac enable method
2018-02-06 09:16:22 -05:00
deepak1556
99e26b8318
fix: draggable region ipc should be frame based
2018-01-01 22:54:02 +05:30
Cheng Zhao
8c5bb5969c
Merge pull request #10667 from dittos/window-opacity
...
Add window opacity support
2017-10-04 15:03:45 +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
Taeho Kim
7570ec9d39
Add BrowserWindow.getOpacity for consistency
2017-10-03 00:08:10 +09:00
Ted Kim
7f2c4a9e06
Add window opacity support
2017-09-29 17:49:10 +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
Zachary Flower
fa4d52f042
🎨 Track/restore original stylemask, rather than individual states.
2017-09-12 12:27:30 -06: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
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
Michael Kaylan
b4428e7e41
🍎 Add macOS native tab methods to window API
2017-08-21 23:24:30 -04:00
Cheng Zhao
9c552644d8
Fix compilation on mac
2017-08-17 16:47:12 +09:00