Commit graph

2088 commits

Author SHA1 Message Date
Samuel Attard
7c8be94a6e IPC fixes for WebContents 2018-03-20 10:13:14 +03:00
Samuel Attard
a8e013dcb6 GetRenderProcessHost() has been removed for OOPI support, should use #include GetMainFrame()->GetProcess() 2018-03-20 10:13:14 +03:00
Samuel Attard
41b9825f00 WebContents are no longer IPC Sender's 2018-03-20 10:08:58 +03:00
Samuel Attard
12066a60f3 make_scoped_refptr --> WrapRefCounted 2018-03-20 10:08:58 +03:00
Samuel Attard
4666879f94 WebContentsObserver no longer provides explicit_set, we can calculate it 2018-03-20 10:08:57 +03:00
Samuel Attard
fb55db665c AllowCertificateError no longer sends overridable 2018-03-20 10:08:57 +03:00
Samuel Attard
7f50c3d08e TracingController -> Coordinator -- content tracing now uses 'endpoints' instead of 'sinks' 2018-03-20 10:08:57 +03:00
Samuel Attard
0ac883c6d4
Remove the race condition between new process creation and context release (#12342)
* Remove the race condition between new process creation and old process releasing remote context

Previously there was a race condition where the getId() method would return the new context ID even
though the release was for the old context.  This changes it to send the "initial" context ID with
the release message to ensure there is no race.

* fetch context ID from remote in sandbox mode
2018-03-20 15:54:47 +11:00
Birunthan Mohanathas
6f6f388f38 Fix non-draggable regions on macOS (#12327)
This was a regression in 503b0ba1.
2018-03-17 06:49:11 +09:00
Charles Kerr
c2673aa970 Set appropriate defaults for webview options (#12271)
* Persist defaults to webPreferences object to JS land can read the inferred values instead of just user defined values

* Test inherited default propogation

* Refactor to remove coupling from fetching values and defaults

* Test description type

* Fix up tests
2018-03-15 13:56:46 +09:00
OJ Kwon
e7181eb89c feat(powerMonitor): expose interface to query system idle state (#11807)
* feat(BrowserWindow): expose interface to query system idle state

* test(BrowserWindow): update test cases for querySystemIdle interface

* docs(BrowserWindow): add querySystemIdle interface documentation

* refactor(powerMonitor): move querySystemIdle into powerMonitor

* test(powerMonitor): split test cases for all platform
2018-03-14 14:42:08 +09:00
Robo
e741bc0577 fix crash when using getWebPreferences api with devtools webContents (#12254) 2018-03-14 11:19:22 +09:00
deepak1556
3cfe66e4c3 move ipc use from rvh to rfh 2018-03-09 15:01:09 +05:30
Aleš Pergl
0937b84b01 Use content origin in screen coordinates for calculating popup menu position (#12180) 2018-03-09 05:48:35 +09:00
Cheng Zhao
cc6bcb6c81 Fix some flaky tests in CI (#12153)
* Guard whole InitPrefs with ScopedAllowIO

Saw a crash:
0 0x7f8d2f7d918d base::debug::StackTrace::StackTrace()
1 0x7f8d2f7d755c base::debug::StackTrace::StackTrace()
2 0x7f8d2f867caa logging::LogMessage::~LogMessage()
3 0x7f8d2fa157c7 base::ThreadRestrictions::AssertIOAllowed()
4 0x7f8d2f83453a base::OpenFile()
5 0x7f8d2f82a967 base::ReadFileToStringWithMaxSize()
6 0x7f8d2f82ad44 base::ReadFileToString()
7 0x7f8d2f846f73 JSONFileValueDeserializer::ReadFileToString()
8 0x7f8d2f84738c JSONFileValueDeserializer::Deserialize()
9 0x7f8d35a5d1f6 <unknown>
10 0x7f8d35a5c217 JsonPrefStore::ReadPrefs()
11 0x7f8d35a87d3e PrefService::InitFromStorage()
12 0x7f8d35a87c60 PrefService::PrefService()
13 0x7f8d35a91a10 PrefServiceFactory::Create()
14 0x000000e86e1b brightray::BrowserContext::InitPrefs()
15 0x000000c2bd64 atom::AtomBrowserContext::AtomBrowserContext()
16 0x000000c320db atom::AtomBrowserContext::From()
17 0x000000b4b8b5 atom::api::Session::FromPartition()

* Fix done being called twice in setInterval test

The callback passed to browser process is called asyncly, so it is
possible that multiple callbacks has already been scheduled before we
can clearInternval.

* Fix failing test when dir name has special chars

The pdfSource is not escaped while parsedURL.search is.

* Call done with Error instead of string

* Fix crash caused by not removing input observer

Solve crash:
0 libcontent.dylib content::RenderWidgetHostImpl::DispatchInputEventWithLatencyInfo(blink::WebInputEvent const&, ui::LatencyInfo*) + 214
1 libcontent.dylib content::RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 1350
2 libcontent.dylib content::RenderWidgetHostViewMac::ProcessMouseEvent(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 44
3 libcontent.dylib content::RenderWidgetHostInputEventRouter::RouteMouseEvent(content::RenderWidgetHostViewBase*, blink::WebMouseEvent*, ui::LatencyInfo const&) + 1817

* Print detailed error

* Run tests after server is ready
2018-03-07 14:40:27 +09:00
Cheng Zhao
78468098c5 Don't store WebContents in NativeWindow 2018-03-06 16:21:18 +09:00
Cheng Zhao
413fdc6f0d views: Show menu on window's content view 2018-03-06 16:21:18 +09:00
Cheng Zhao
bf862d1d07 views: Focus webContents in BrowserWindow 2018-03-06 16:21:17 +09:00
Cheng Zhao
eea4e60b73 Remove NativeWindow's webview APIs 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
e7f175d578 Only mac needs to call SetActive 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
2eaa6d0874 Move StoreFocus/RestoreFocus to BrowserWindow 2018-03-06 16:20:37 +09:00
Cheng Zhao
cad3d694ab mac: Remove access to webContents in windowWillUseStandardFrame 2018-03-06 16:20:37 +09:00
Shelley Vohr
199cf31b9e
deprecate screen.getMenuBarHeight 2018-03-05 19:45:51 -05:00
Shelley Vohr
bf491de9fe
fix styling and add spec 2018-02-28 00:22:42 -08:00
Shelley Vohr
2abc69780e
move native-mate back into the api layer 2018-02-27 13:00:42 -08:00
Shelley Vohr
837a2d4bbd
appease the linter 2018-02-26 22:25:09 -08:00
Samuel Attard
b722150d87 Don't cast manually for NativeWindow* 2018-02-27 16:13:17 +11: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
53229e3d6c Fix network delegate race condition (#12044)
* Fix race condition when getting network delegate

* Remove the evil URLRequestContextGetter::network_delegate

* Move the arguments instead of const referrencing

Safer and more efficient.
2018-02-26 06:23:59 -08:00
Cheng Zhao
39e0433570 Fix build error after rebasing 2018-02-23 10:22:00 +09:00
shelley vohr
0e5b6f9300 Upgrade to node v9.3.0 (#11507)
* update submodule refs for node v9.3.0

* Define "llvm_version" for Node.js build

* NODE_MODULE_CONTEXT_AWARE_BUILTIN -> NODE_BUILTIN_MODULE_CONTEXT_AWARE

* update NodePlatform to MultiIsolatePlatform

* fix linting error

* update node ref

* REVIEW: Explicitly register builtin modules

https://github.com/nodejs/node/pull/16565

* update libcc ref

* switch libcc to c62

* REVIEW: Address node api changes

- Always start the inspector agent for https://github.com/nodejs/node/pull/17085
- Set the tracing controller for node https://github.com/nodejs/node/pull/15538
- Isolate data creation now requires plaform https://github.com/nodejs/node/pull/16700
2018-02-23 10:22:00 +09:00
deepak1556
5eb0a89579 REVIEW: let browser context manage cookie change sub list 2018-02-23 10:21:24 +09:00
deepak1556
248d572077 REVIEW: Subscribe to cookie store for changes in place of CookieMonsterDelegate 2018-02-23 10:21:23 +09:00
Aleksei Kuzmin
8f78bd3307 Remove was_ignored_by_handler from frame_messages.h
https://chromium-review.googlesource.com/587701
2018-02-23 10:21:23 +09:00
Shelley Vohr
128cb7f5b2 updates to build flags and comp errors 2018-02-23 10:21:23 +09:00
Cheng Zhao
3be92f550c Better clarity and fix typo 2018-02-23 09:15:13 +09:00
Cheng Zhao
816a96c2cc Update font settings in api::WebContents 2018-02-22 19:01:45 +09:00
Cheng Zhao
c87fc2426d Handle transparent WebContents in api::BrowserWindow 2018-02-22 19:01:45 +09:00
Cheng Zhao
c611eb061d Move InputEventObserver to api::BrowserWindow 2018-02-22 19:01:45 +09:00
Cheng Zhao
aa3eafcea1 Move closing logic to api::BrowserWindow
Closing a BrowserWindow is essentially closing a WebContents, the logic
should not be in NativeWindow.
2018-02-22 19:01:45 +09:00
Cheng Zhao
66fab65a1a Add NativeWindowObserver::OnCloseButtonClicked 2018-02-22 19:01:45 +09:00
Cheng Zhao
a25b49a127 Add ExtendedWebContentsObserver 2018-02-22 19:01:45 +09:00
Cheng Zhao
a3124e8873 Use observer to provide OnRendererUnresponsive 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
c2aa312e0c Check weak ptr before using it 2018-02-22 19:01:45 +09:00