Commit graph

463 commits

Author SHA1 Message Date
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
deepak1556
4068a62fa6 Define gfx::AcceleratedWidget to be uint64_t instead of NSView*
https://chromium-review.googlesource.com/c/chromium/src/+/792295
2018-06-19 11:49:42 +10:00
Milan Burda
2337237d58 Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02: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
2b24b26e59 refactor: do not pass WebContents to NativeWindow 2018-05-15 14:03:21 +09: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
Cheng Zhao
2225cc9608 refactor: manage widget_ in NativeWindow 2018-04-30 10:56:54 +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
Shelley Vohr
12a57ff1c2 clang-format objc files (#12673) 2018-04-20 11:47:04 -07: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
37a7df49d6 mac: Provide ViewsDelegate 2018-04-20 19:10:37 +09: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
Cheng Zhao
d706a30849 Fix crash when releasing window 2018-04-11 15:12:53 +09:00
Cheng Zhao
2b5bde4071 InstallView is no longer needed 2018-04-11 15:12:53 +09:00
Cheng Zhao
5a95aaaa54 kVibrancyType should be read in InitFromOptions 2018-04-11 15:12:53 +09:00
Cheng Zhao
cfd8ea8eb0 mac: Correctly unload previous content view 2018-04-11 15:12:53 +09:00
Cheng Zhao
56735d4ff5 Add NativeWindow::SetContentView 2018-04-11 15:12:53 +09:00
Cheng Zhao
97e8800677 Remove web_contents from NativeWindow's constructor 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
Samuel Attard
8c138e74be More vibrancy fixes (#12157)
* Only set title bar to transparent when vibrant with a custom titlebar
* Correctly set the transparent state of the GpuSwitcher so vibrancy works on reload
* Document case where using frame: false without custom titleBarStyle and vibrant
2018-03-07 11:40:36 -05:00
Cheng Zhao
411da169ac Repect old logic in windowWillUseStandardFrame 2018-03-06 16:54:20 +09:00
Cheng Zhao
78468098c5 Don't store WebContents in NativeWindow 2018-03-06 16:21:18 +09:00
Cheng Zhao
8bbe28e998 No need to get BrowserContext from NativeWindow 2018-03-06 16:21:17 +09: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
bc34ca9e25 mac: Call setMouseDownCanMoveWindow in 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
8a1884c407 mac: AcceleratedWidget should be window's content view 2018-03-06 16:20:37 +09:00
Cheng Zhao
4c7b48e596 mac: Window's native view should be its content view 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
Cheng Zhao
7b8890a4c9 web_contents can't be null 2018-03-06 16:20:37 +09:00
Cheng Zhao
2eaa6d0874 Move StoreFocus/RestoreFocus to BrowserWindow 2018-03-06 16:20:37 +09:00