2016-01-08 23:40:26 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-07-01 00:39:22 +04:00
|
|
|
|
2019-04-30 00:23:05 +03:00
|
|
|
#ifndef mozilla_dom_BrowserParent_h
|
|
|
|
#define mozilla_dom_BrowserParent_h
|
2009-07-01 00:39:22 +04:00
|
|
|
|
Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
2020-01-20 19:19:48 +03:00
|
|
|
#include <utility>
|
|
|
|
|
2017-02-01 18:38:16 +03:00
|
|
|
#include "LiveResizeListener.h"
|
Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
2020-01-20 19:19:48 +03:00
|
|
|
#include "Units.h"
|
|
|
|
#include "js/TypeDecls.h"
|
2015-06-05 12:28:18 +03:00
|
|
|
#include "mozilla/ContentCache.h"
|
Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
2020-01-20 19:19:48 +03:00
|
|
|
#include "mozilla/EventForwards.h"
|
|
|
|
#include "mozilla/RefPtr.h"
|
2019-05-07 19:08:22 +03:00
|
|
|
#include "mozilla/dom/BrowserBridgeParent.h"
|
Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
2020-01-20 19:19:48 +03:00
|
|
|
#include "mozilla/dom/File.h"
|
2010-07-19 22:33:33 +04:00
|
|
|
#include "mozilla/dom/PBrowserParent.h"
|
2015-10-30 02:30:57 +03:00
|
|
|
#include "mozilla/dom/PContent.h"
|
2014-02-18 04:30:06 +04:00
|
|
|
#include "mozilla/dom/PFilePickerParent.h"
|
Bug 802366 - The main event: Let a browser process inherit its app's id. r=bz,cjones
The main bug fixed here is that in half of our interfaces, we use "is browser frame/element" to mean "browser or app", and in the other half, we use it to mean "is browser not app".
There's a related, functional bug also fixed here, which is that a browser process doesn't inherit its parent's app-id. This causes problems e.g. for IndexedDB: If a browser inside an app uses IndexedDB, the DB should have the app's app-id.
I also modified Tab{Parent,Child} and nsFrameLoader to call "app" "ownOrContainingApp", to emphasize that we might have inherited the app from a parent process. I left nsIDocShell::appId alone, because changing that would have necessitated changing nsILoadGroup and therefore a /lot/ of users in Necko; it's also not clear it would have clarified anything in those cases.
2012-11-10 22:32:37 +04:00
|
|
|
#include "mozilla/dom/TabContext.h"
|
Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
2020-01-20 19:19:48 +03:00
|
|
|
#include "mozilla/dom/ipc/IdType.h"
|
2018-09-25 05:48:02 +03:00
|
|
|
#include "mozilla/gfx/CrossProcessPaint.h"
|
2016-05-11 04:16:41 +03:00
|
|
|
#include "mozilla/layers/CompositorBridgeParent.h"
|
2019-06-02 20:51:33 +03:00
|
|
|
#include "mozilla/layout/RemoteLayerTreeOwner.h"
|
2010-01-01 04:35:55 +03:00
|
|
|
#include "nsCOMPtr.h"
|
2012-06-23 05:27:30 +04:00
|
|
|
#include "nsIAuthPromptProvider.h"
|
2010-01-01 04:35:55 +03:00
|
|
|
#include "nsIBrowserDOMWindow.h"
|
2015-03-26 10:29:31 +03:00
|
|
|
#include "nsIDOMEventListener.h"
|
Bug 1257759 part.5 PluginInstanceChild should post received native key event to chrome process if the key combination may be a shortcut key r=jimm
When PluginInstanceChild receives native key events, it should post the events to the chrome process first for checking if the key combination is reserved. However, posting all key events to the chrome process may make damage to the performance of text input. Therefore, this patch starts to post a key event whose key combination may be a shortcut key. However, for avoiding to shuffle the event order, it posts following key events until all posted key events are handled by the chrome process.
For receiving response from widget, this patch defines nsIKeyEventInPluginCallback. It's specified by nsIWidget::OnWindowedPluginKeyEvent() for ensuring the caller will receive the reply. Basically, the caller of nsIWidget::OnWindowedPluginKeyEvent() should reply to the child process. However, if the widget is a PuppetWidget, it cannot return the result synchronously. Therefore, PuppetWidget::OnWindowedPluginKeyEvent() returns NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY and stores the callback to mKeyEventInPluginCallbacks. Then, TabParent::HandledWindowedPluginKeyEvent() will call PuppetWidget::HandledWindowedPluginKeyEvent().
MozReview-Commit-ID: G6brOU26NwQ
--HG--
extra : rebase_source : 8140456de278956d2d594e85c7b397ae366b4962
2016-04-19 14:09:37 +03:00
|
|
|
#include "nsIKeyEventInPluginCallback.h"
|
Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
2020-01-20 19:19:48 +03:00
|
|
|
#include "nsIWidget.h"
|
2014-01-23 00:27:23 +04:00
|
|
|
#include "nsIXULBrowserWindow.h"
|
2015-04-21 17:33:56 +03:00
|
|
|
#include "nsRefreshDriver.h"
|
2014-06-06 06:49:43 +04:00
|
|
|
#include "nsWeakReference.h"
|
2010-01-01 04:35:55 +03:00
|
|
|
|
2012-06-23 05:27:30 +04:00
|
|
|
class nsFrameLoader;
|
2013-10-19 00:57:55 +04:00
|
|
|
class nsIContent;
|
2013-11-06 21:21:15 +04:00
|
|
|
class nsIPrincipal;
|
2012-06-23 05:27:30 +04:00
|
|
|
class nsIURI;
|
2014-01-11 05:10:57 +04:00
|
|
|
class nsILoadContext;
|
2014-10-29 21:11:00 +03:00
|
|
|
class nsIDocShell;
|
2018-04-09 23:30:33 +03:00
|
|
|
class nsIWebBrowserPersistDocumentReceiver;
|
2009-11-06 23:43:39 +03:00
|
|
|
|
2009-07-01 00:39:22 +04:00
|
|
|
namespace mozilla {
|
2012-07-20 10:48:27 +04:00
|
|
|
|
2015-10-08 17:51:31 +03:00
|
|
|
namespace a11y {
|
2015-10-06 20:10:47 +03:00
|
|
|
class DocAccessibleParent;
|
2015-10-08 17:51:31 +03:00
|
|
|
}
|
2015-10-06 20:10:47 +03:00
|
|
|
|
2015-01-27 00:32:18 +03:00
|
|
|
namespace jsipc {
|
|
|
|
class CpowHolder;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace jsipc
|
2015-01-27 00:32:18 +03:00
|
|
|
|
2012-07-20 10:48:27 +04:00
|
|
|
namespace layers {
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 13:20:52 +04:00
|
|
|
struct TextureFactoryIdentifier;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace layers
|
2012-07-20 10:48:27 +04:00
|
|
|
|
2014-09-11 17:46:17 +04:00
|
|
|
namespace widget {
|
|
|
|
struct IMENotification;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace widget
|
2014-09-11 17:46:17 +04:00
|
|
|
|
2015-04-08 21:48:11 +03:00
|
|
|
namespace gfx {
|
|
|
|
class SourceSurface;
|
|
|
|
class DataSourceSurface;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace gfx
|
2015-04-08 21:48:11 +03:00
|
|
|
|
2009-08-12 20:18:08 +04:00
|
|
|
namespace dom {
|
2009-07-01 00:39:22 +04:00
|
|
|
|
2019-01-29 20:32:28 +03:00
|
|
|
class CanonicalBrowsingContext;
|
2012-08-02 10:02:29 +04:00
|
|
|
class ClonedMessageData;
|
2019-02-25 23:04:47 +03:00
|
|
|
class ContentParent;
|
2013-07-24 03:39:17 +04:00
|
|
|
class Element;
|
2015-04-08 21:48:11 +03:00
|
|
|
class DataTransfer;
|
2019-05-15 18:34:03 +03:00
|
|
|
class BrowserHost;
|
|
|
|
class BrowserBridgeParent;
|
2015-09-10 23:50:58 +03:00
|
|
|
|
|
|
|
namespace ipc {
|
|
|
|
class StructuredCloneData;
|
|
|
|
} // namespace ipc
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-05-06 17:47:56 +03:00
|
|
|
/**
|
|
|
|
* BrowserParent implements the parent actor part of the PBrowser protocol. See
|
|
|
|
* PBrowser for more information.
|
|
|
|
*/
|
2019-04-10 00:38:15 +03:00
|
|
|
class BrowserParent final : public PBrowserParent,
|
|
|
|
public nsIDOMEventListener,
|
|
|
|
public nsIAuthPromptProvider,
|
|
|
|
public nsIKeyEventInPluginCallback,
|
|
|
|
public nsSupportsWeakReference,
|
|
|
|
public TabContext,
|
|
|
|
public LiveResizeListener {
|
2016-01-05 12:59:30 +03:00
|
|
|
typedef mozilla::dom::ClonedMessageData ClonedMessageData;
|
2012-08-02 10:02:29 +04:00
|
|
|
|
2019-02-06 18:57:37 +03:00
|
|
|
friend class PBrowserParent;
|
|
|
|
|
2019-04-10 00:38:15 +03:00
|
|
|
virtual ~BrowserParent();
|
2014-06-23 23:56:07 +04:00
|
|
|
|
2009-07-01 00:39:22 +04:00
|
|
|
public:
|
2016-01-05 12:59:30 +03:00
|
|
|
// Helper class for ContentParent::RecvCreateWindow.
|
|
|
|
struct AutoUseNewTab;
|
2012-08-09 06:58:06 +04:00
|
|
|
|
2019-04-02 17:35:51 +03:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_NSIAUTHPROMPTPROVIDER
|
2016-01-05 12:59:30 +03:00
|
|
|
// nsIDOMEventListener interfaces
|
|
|
|
NS_DECL_NSIDOMEVENTLISTENER
|
2015-10-30 02:30:57 +03:00
|
|
|
|
2019-05-08 22:34:47 +03:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(BrowserParent, nsIDOMEventListener)
|
2019-04-02 17:35:51 +03:00
|
|
|
|
2019-04-10 00:38:15 +03:00
|
|
|
BrowserParent(ContentParent* aManager, const TabId& aTabId,
|
|
|
|
const TabContext& aContext,
|
|
|
|
CanonicalBrowsingContext* aBrowsingContext,
|
2019-05-15 18:34:03 +03:00
|
|
|
uint32_t aChromeFlags);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-04-30 00:57:42 +03:00
|
|
|
// Call from LayoutStatics only
|
|
|
|
static void InitializeStatics();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the focused BrowserParent or nullptr if chrome or another app
|
|
|
|
* is focused.
|
|
|
|
*/
|
|
|
|
static BrowserParent* GetFocused();
|
|
|
|
|
|
|
|
static BrowserParent* GetFrom(nsFrameLoader* aFrameLoader);
|
|
|
|
|
|
|
|
static BrowserParent* GetFrom(PBrowserParent* aBrowserParent);
|
|
|
|
|
|
|
|
static BrowserParent* GetFrom(nsIContent* aContent);
|
|
|
|
|
|
|
|
static BrowserParent* GetBrowserParentFromLayersId(
|
|
|
|
layers::LayersId aLayersId);
|
|
|
|
|
|
|
|
static TabId GetTabIdFrom(nsIDocShell* docshell);
|
|
|
|
|
2019-04-30 01:14:17 +03:00
|
|
|
const TabId GetTabId() const { return mTabId; }
|
|
|
|
|
|
|
|
ContentParent* Manager() const { return mManager; }
|
|
|
|
|
|
|
|
CanonicalBrowsingContext* GetBrowsingContext() { return mBrowsingContext; }
|
|
|
|
|
|
|
|
already_AddRefed<nsILoadContext> GetLoadContext();
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
Element* GetOwnerElement() const { return mFrameElement; }
|
2019-04-30 01:14:17 +03:00
|
|
|
|
|
|
|
nsIBrowserDOMWindow* GetBrowserDOMWindow() const { return mBrowserDOMWindow; }
|
|
|
|
|
2016-04-27 22:40:36 +03:00
|
|
|
already_AddRefed<nsPIDOMWindowOuter> GetParentWindowOuter();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-04-30 01:14:17 +03:00
|
|
|
already_AddRefed<nsIWidget> GetTopLevelWidget();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-04-30 01:14:17 +03:00
|
|
|
// Returns the closest widget for our frameloader's content.
|
|
|
|
already_AddRefed<nsIWidget> GetWidget() const;
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-04-30 01:14:17 +03:00
|
|
|
// Returns the top-level widget for our frameloader's document.
|
|
|
|
already_AddRefed<nsIWidget> GetDocWidget() const;
|
|
|
|
|
2019-08-19 11:27:32 +03:00
|
|
|
/**
|
|
|
|
* Returns the widget which may have native focus and handles text input
|
|
|
|
* like keyboard input, IME, etc.
|
|
|
|
*/
|
|
|
|
already_AddRefed<nsIWidget> GetTextInputHandlingWidget() const;
|
|
|
|
|
2019-04-30 01:14:17 +03:00
|
|
|
nsIXULBrowserWindow* GetXULBrowserWindow();
|
|
|
|
|
2019-07-19 01:45:16 +03:00
|
|
|
static uint32_t GetMaxTouchPoints(Element* aElement);
|
|
|
|
uint32_t GetMaxTouchPoints() { return GetMaxTouchPoints(mFrameElement); }
|
|
|
|
|
2019-04-30 01:14:17 +03:00
|
|
|
/**
|
2019-05-31 06:27:26 +03:00
|
|
|
* Return the top level DocAccessibleParent for this BrowserParent.
|
|
|
|
* Note that in the case of an out-of-process iframe, the returned actor
|
|
|
|
* might not be at the top level of the DocAccessibleParent tree; i.e. it
|
|
|
|
* might have a parent. However, it will be at the top level in its content
|
|
|
|
* process. That is, doc->IsTopLevelInContentProcess() will always be true,
|
|
|
|
* but doc->IsTopLevel() might not.
|
2019-04-30 01:14:17 +03:00
|
|
|
*/
|
|
|
|
a11y::DocAccessibleParent* GetTopLevelDocAccessible() const;
|
|
|
|
|
2019-06-01 00:00:57 +03:00
|
|
|
LayersId GetLayersId() const;
|
2019-04-30 01:14:17 +03:00
|
|
|
|
2019-05-15 18:34:03 +03:00
|
|
|
// Returns the BrowserBridgeParent if this BrowserParent is for an
|
|
|
|
// out-of-process iframe and nullptr otherwise.
|
|
|
|
BrowserBridgeParent* GetBrowserBridgeParent() const;
|
|
|
|
|
|
|
|
// Returns the BrowserHost if this BrowserParent is for a top-level browser
|
|
|
|
// and nullptr otherwise.
|
|
|
|
BrowserHost* GetBrowserHost() const;
|
|
|
|
|
2020-01-05 23:58:21 +03:00
|
|
|
ParentShowInfo GetShowInfo();
|
2019-04-30 01:14:17 +03:00
|
|
|
|
2019-10-24 11:51:06 +03:00
|
|
|
// Get the content principal from the owner element.
|
|
|
|
already_AddRefed<nsIPrincipal> GetContentPrincipal() const;
|
|
|
|
|
2019-04-30 01:14:17 +03:00
|
|
|
/**
|
|
|
|
* Let managees query if Destroy() is already called so they don't send out
|
|
|
|
* messages when the PBrowser actor is being destroyed.
|
|
|
|
*/
|
|
|
|
bool IsDestroyed() const { return mIsDestroyed; }
|
|
|
|
|
2019-06-04 19:19:27 +03:00
|
|
|
/**
|
|
|
|
* Returns whether we're in the process of creating a new window (from
|
|
|
|
* window.open). If so, LoadURL calls are being skipped until everything is
|
|
|
|
* set up. For further details, see `mCreatingWindow` below.
|
|
|
|
*/
|
|
|
|
bool CreatingWindow() const { return mCreatingWindow; }
|
|
|
|
|
2019-05-07 19:08:22 +03:00
|
|
|
/*
|
|
|
|
* Visit each BrowserParent in the tree formed by PBrowser and
|
|
|
|
* PBrowserBridge, including `this`.
|
|
|
|
*/
|
|
|
|
template <typename Callback>
|
|
|
|
void VisitAll(Callback aCallback) {
|
|
|
|
aCallback(this);
|
|
|
|
VisitAllDescendants(aCallback);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Visit each BrowserParent in the tree formed by PBrowser and
|
|
|
|
* PBrowserBridge, excluding `this`.
|
|
|
|
*/
|
|
|
|
template <typename Callback>
|
|
|
|
void VisitAllDescendants(Callback aCallback) {
|
|
|
|
const auto& browserBridges = ManagedPBrowserBridgeParent();
|
|
|
|
for (auto iter = browserBridges.ConstIter(); !iter.Done(); iter.Next()) {
|
|
|
|
BrowserBridgeParent* browserBridge =
|
|
|
|
static_cast<BrowserBridgeParent*>(iter.Get()->GetKey());
|
|
|
|
BrowserParent* browserParent = browserBridge->GetBrowserParent();
|
|
|
|
|
|
|
|
aCallback(browserParent);
|
|
|
|
browserParent->VisitAllDescendants(aCallback);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Visit each BrowserBridgeParent that is a child of this BrowserParent.
|
|
|
|
*/
|
|
|
|
template <typename Callback>
|
|
|
|
void VisitChildren(Callback aCallback) {
|
|
|
|
const auto& browserBridges = ManagedPBrowserBridgeParent();
|
|
|
|
for (auto iter = browserBridges.ConstIter(); !iter.Done(); iter.Next()) {
|
|
|
|
BrowserBridgeParent* browserBridge =
|
|
|
|
static_cast<BrowserBridgeParent*>(iter.Get()->GetKey());
|
|
|
|
aCallback(browserBridge);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-30 01:14:17 +03:00
|
|
|
void SetOwnerElement(Element* aElement);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
|
|
|
void SetBrowserDOMWindow(nsIBrowserDOMWindow* aBrowserDOMWindow) {
|
|
|
|
mBrowserDOMWindow = aBrowserDOMWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwapFrameScriptsFrom(nsTArray<FrameScriptInfo>& aFrameScripts) {
|
|
|
|
aFrameScripts.SwapElements(mDelayedFrameScripts);
|
|
|
|
}
|
|
|
|
|
2019-04-30 01:14:17 +03:00
|
|
|
void CacheFrameLoader(nsFrameLoader* aFrameLoader);
|
2018-10-20 03:02:37 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
void Destroy();
|
|
|
|
|
|
|
|
void RemoveWindowListeners();
|
|
|
|
|
|
|
|
void AddWindowListeners();
|
2015-10-30 02:30:57 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvMoveFocus(const bool& aForward,
|
|
|
|
const bool& aForDocumentNavigation);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSizeShellTo(const uint32_t& aFlags,
|
|
|
|
const int32_t& aWidth,
|
|
|
|
const int32_t& aHeight,
|
|
|
|
const int32_t& aShellItemWidth,
|
|
|
|
const int32_t& aShellItemHeight);
|
2016-05-11 12:44:57 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvDropLinks(nsTArray<nsString>&& aLinks);
|
2015-11-11 01:35:12 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvEvent(const RemoteDOMEvent& aEvent);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvReplyKeyEvent(const WidgetKeyboardEvent& aEvent);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvAccessKeyNotHandled(
|
|
|
|
const WidgetKeyboardEvent& aEvent);
|
2016-05-11 15:56:42 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRegisterProtocolHandler(const nsString& aScheme,
|
|
|
|
nsIURI* aHandlerURI,
|
|
|
|
const nsString& aTitle,
|
|
|
|
nsIURI* aDocURI);
|
2018-12-13 16:47:39 +03:00
|
|
|
|
2019-05-23 21:49:08 +03:00
|
|
|
mozilla::ipc::IPCResult RecvOnStateChange(
|
|
|
|
const Maybe<WebProgressData>& awebProgressData,
|
|
|
|
const RequestData& aRequestData, const uint32_t aStateFlags,
|
|
|
|
const nsresult aStatus,
|
|
|
|
const Maybe<WebProgressStateChangeData>& aStateChangeData);
|
|
|
|
|
2019-04-03 20:32:41 +03:00
|
|
|
mozilla::ipc::IPCResult RecvOnProgressChange(
|
|
|
|
const Maybe<WebProgressData>& aWebProgressData,
|
|
|
|
const RequestData& aRequestData, const int32_t aCurSelfProgress,
|
|
|
|
const int32_t aMaxSelfProgress, const int32_t aCurTotalProgres,
|
|
|
|
const int32_t aMaxTotalProgress);
|
|
|
|
|
2019-06-14 00:08:40 +03:00
|
|
|
mozilla::ipc::IPCResult RecvOnLocationChange(
|
|
|
|
const Maybe<WebProgressData>& aWebProgressData,
|
|
|
|
const RequestData& aRequestData, nsIURI* aLocation, const uint32_t aFlags,
|
|
|
|
const bool aCanGoBack, const bool aCanGoForward,
|
|
|
|
const Maybe<WebProgressLocationChangeData>& aLocationChangeData);
|
|
|
|
|
2019-04-03 20:31:54 +03:00
|
|
|
mozilla::ipc::IPCResult RecvOnStatusChange(
|
|
|
|
const Maybe<WebProgressData>& aWebProgressData,
|
|
|
|
const RequestData& aRequestData, const nsresult aStatus,
|
|
|
|
const nsString& aMessage);
|
|
|
|
|
2019-08-28 21:55:45 +03:00
|
|
|
mozilla::ipc::IPCResult RecvOnSecurityChange(
|
|
|
|
const Maybe<WebProgressData>& aWebProgressData,
|
|
|
|
const RequestData& aRequestData, const uint32_t aState,
|
|
|
|
const Maybe<WebProgressSecurityChangeData>& aSecurityChangeData);
|
|
|
|
|
2020-01-13 17:08:25 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNotifyContentBlockingEvent(
|
|
|
|
const uint32_t& aEvent, const RequestData& aRequestData,
|
2020-02-11 12:33:32 +03:00
|
|
|
const bool aBlocked, const nsACString& aTrackingOrigin,
|
2020-01-13 17:08:25 +03:00
|
|
|
nsTArray<nsCString>&& aTrackingFullHashes,
|
2020-03-10 02:36:37 +03:00
|
|
|
const Maybe<mozilla::ContentBlockingNotifier::StorageAccessGrantedReason>&
|
2020-01-13 17:08:25 +03:00
|
|
|
aReason);
|
|
|
|
|
2019-06-14 00:00:34 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNavigationFinished();
|
|
|
|
|
2019-05-24 18:45:05 +03:00
|
|
|
bool GetWebProgressListener(nsIBrowser** aOutBrowser,
|
|
|
|
nsIWebProgress** aOutManager,
|
|
|
|
nsIWebProgressListener** aOutListener);
|
|
|
|
|
2019-04-03 20:31:41 +03:00
|
|
|
void ReconstructWebProgressAndRequest(
|
|
|
|
nsIWebProgress* aManager, const Maybe<WebProgressData>& aWebProgressData,
|
2019-06-13 23:59:35 +03:00
|
|
|
const RequestData& aRequestData, nsIWebProgress** aOutWebProgress,
|
|
|
|
nsIRequest** aOutRequest);
|
2019-04-03 20:31:41 +03:00
|
|
|
|
2019-05-04 13:42:52 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSessionStoreUpdate(
|
|
|
|
const Maybe<nsCString>& aDocShellCaps, const Maybe<bool>& aPrivatedMode,
|
2019-08-27 17:47:27 +03:00
|
|
|
nsTArray<nsCString>&& aPositions,
|
|
|
|
nsTArray<int32_t>&& aPositionDescendants,
|
2019-08-02 17:19:00 +03:00
|
|
|
const nsTArray<InputFormData>& aInputs,
|
|
|
|
const nsTArray<CollectedInputDataValue>& aIdVals,
|
|
|
|
const nsTArray<CollectedInputDataValue>& aXPathVals,
|
2019-08-27 17:47:27 +03:00
|
|
|
nsTArray<nsCString>&& aOrigins, nsTArray<nsString>&& aKeys,
|
|
|
|
nsTArray<nsString>&& aValues, const bool aIsFullStorage,
|
2020-03-17 00:23:09 +03:00
|
|
|
const uint32_t& aFlushId, const bool& aIsFinal, const uint32_t& aEpoch);
|
2019-05-04 13:42:52 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvBrowserFrameOpenWindow(
|
2017-06-15 20:28:11 +03:00
|
|
|
PBrowserParent* aOpener, const nsString& aURL, const nsString& aName,
|
2019-04-25 02:50:40 +03:00
|
|
|
bool aForceNoReferrer, const nsString& aFeatures,
|
|
|
|
BrowserFrameOpenWindowResolver&& aResolve);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSyncMessage(
|
2016-01-05 12:59:30 +03:00
|
|
|
const nsString& aMessage, const ClonedMessageData& aData,
|
2019-07-10 06:27:27 +03:00
|
|
|
nsTArray<CpowEntry>&& aCpows, nsIPrincipal* aPrincipal,
|
2019-02-06 18:58:43 +03:00
|
|
|
nsTArray<ipc::StructuredCloneData>* aRetVal);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRpcMessage(
|
2016-01-05 12:59:30 +03:00
|
|
|
const nsString& aMessage, const ClonedMessageData& aData,
|
2019-07-10 06:27:27 +03:00
|
|
|
nsTArray<CpowEntry>&& aCpows, nsIPrincipal* aPrincipal,
|
2019-02-06 18:58:43 +03:00
|
|
|
nsTArray<ipc::StructuredCloneData>* aRetVal);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvAsyncMessage(const nsString& aMessage,
|
2019-07-10 06:27:27 +03:00
|
|
|
nsTArray<CpowEntry>&& aCpows,
|
2019-04-25 17:18:11 +03:00
|
|
|
nsIPrincipal* aPrincipal,
|
2019-02-06 18:58:43 +03:00
|
|
|
const ClonedMessageData& aData);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNotifyIMEFocus(
|
2016-01-05 12:59:30 +03:00
|
|
|
const ContentCache& aContentCache,
|
|
|
|
const widget::IMENotification& aEventMessage,
|
2019-02-06 18:58:43 +03:00
|
|
|
NotifyIMEFocusResolver&& aResolve);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNotifyIMETextChange(
|
2016-01-05 12:59:30 +03:00
|
|
|
const ContentCache& aContentCache,
|
2019-02-06 18:58:43 +03:00
|
|
|
const widget::IMENotification& aEventMessage);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNotifyIMECompositionUpdate(
|
2016-01-05 12:59:30 +03:00
|
|
|
const ContentCache& aContentCache,
|
2019-02-06 18:58:43 +03:00
|
|
|
const widget::IMENotification& aEventMessage);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNotifyIMESelection(
|
2016-01-05 12:59:30 +03:00
|
|
|
const ContentCache& aContentCache,
|
2019-02-06 18:58:43 +03:00
|
|
|
const widget::IMENotification& aEventMessage);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvUpdateContentCache(
|
|
|
|
const ContentCache& aContentCache);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNotifyIMEMouseButtonEvent(
|
|
|
|
const widget::IMENotification& aEventMessage, bool* aConsumedByIME);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNotifyIMEPositionChange(
|
2016-01-05 12:59:30 +03:00
|
|
|
const ContentCache& aContentCache,
|
2019-02-06 18:58:43 +03:00
|
|
|
const widget::IMENotification& aEventMessage);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvOnEventNeedingAckHandled(
|
|
|
|
const EventMessage& aMessage);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRequestIMEToCommitComposition(
|
|
|
|
const bool& aCancel, bool* aIsCommitted, nsString* aCommittedString);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvStartPluginIME(
|
2016-01-05 12:59:30 +03:00
|
|
|
const WidgetKeyboardEvent& aKeyboardEvent, const int32_t& aPanelX,
|
2019-02-06 18:58:43 +03:00
|
|
|
const int32_t& aPanelY, nsString* aCommitted);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSetPluginFocused(const bool& aFocused);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSetCandidateWindowForPlugin(
|
|
|
|
const widget::CandidateWindowPosition& aPosition);
|
|
|
|
mozilla::ipc::IPCResult RecvEnableIMEForPlugin(const bool& aEnable);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvDefaultProcOfPluginEvent(
|
|
|
|
const WidgetPluginEvent& aEvent);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvGetInputContext(widget::IMEState* aIMEState);
|
2018-04-11 19:26:33 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSetInputContext(
|
2018-06-19 23:31:24 +03:00
|
|
|
const widget::InputContext& aContext,
|
2019-02-06 18:58:43 +03:00
|
|
|
const widget::InputContextAction& aAction);
|
Bug 1257759 part.5 PluginInstanceChild should post received native key event to chrome process if the key combination may be a shortcut key r=jimm
When PluginInstanceChild receives native key events, it should post the events to the chrome process first for checking if the key combination is reserved. However, posting all key events to the chrome process may make damage to the performance of text input. Therefore, this patch starts to post a key event whose key combination may be a shortcut key. However, for avoiding to shuffle the event order, it posts following key events until all posted key events are handled by the chrome process.
For receiving response from widget, this patch defines nsIKeyEventInPluginCallback. It's specified by nsIWidget::OnWindowedPluginKeyEvent() for ensuring the caller will receive the reply. Basically, the caller of nsIWidget::OnWindowedPluginKeyEvent() should reply to the child process. However, if the widget is a PuppetWidget, it cannot return the result synchronously. Therefore, PuppetWidget::OnWindowedPluginKeyEvent() returns NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY and stores the callback to mKeyEventInPluginCallbacks. Then, TabParent::HandledWindowedPluginKeyEvent() will call PuppetWidget::HandledWindowedPluginKeyEvent().
MozReview-Commit-ID: G6brOU26NwQ
--HG--
extra : rebase_source : 8140456de278956d2d594e85c7b397ae366b4962
2016-04-19 14:09:37 +03:00
|
|
|
|
|
|
|
// See nsIKeyEventInPluginCallback
|
|
|
|
virtual void HandledWindowedPluginKeyEvent(
|
|
|
|
const NativeEventData& aKeyEventData, bool aIsConsumed) override;
|
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvOnWindowedPluginKeyEvent(
|
|
|
|
const NativeEventData& aKeyEventData);
|
Bug 1257759 part.5 PluginInstanceChild should post received native key event to chrome process if the key combination may be a shortcut key r=jimm
When PluginInstanceChild receives native key events, it should post the events to the chrome process first for checking if the key combination is reserved. However, posting all key events to the chrome process may make damage to the performance of text input. Therefore, this patch starts to post a key event whose key combination may be a shortcut key. However, for avoiding to shuffle the event order, it posts following key events until all posted key events are handled by the chrome process.
For receiving response from widget, this patch defines nsIKeyEventInPluginCallback. It's specified by nsIWidget::OnWindowedPluginKeyEvent() for ensuring the caller will receive the reply. Basically, the caller of nsIWidget::OnWindowedPluginKeyEvent() should reply to the child process. However, if the widget is a PuppetWidget, it cannot return the result synchronously. Therefore, PuppetWidget::OnWindowedPluginKeyEvent() returns NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY and stores the callback to mKeyEventInPluginCallbacks. Then, TabParent::HandledWindowedPluginKeyEvent() will call PuppetWidget::HandledWindowedPluginKeyEvent().
MozReview-Commit-ID: G6brOU26NwQ
--HG--
extra : rebase_source : 8140456de278956d2d594e85c7b397ae366b4962
2016-04-19 14:09:37 +03:00
|
|
|
|
2020-01-16 17:38:40 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRequestFocus(const bool& aCanRaise,
|
|
|
|
const CallerType aCallerType);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvLookUpDictionary(
|
2016-11-15 06:26:00 +03:00
|
|
|
const nsString& aText, nsTArray<mozilla::FontRange>&& aFontRangeArray,
|
2019-02-06 18:58:43 +03:00
|
|
|
const bool& aIsVertical, const LayoutDeviceIntPoint& aPoint);
|
2016-04-26 11:18:04 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvEnableDisableCommands(
|
2020-03-12 19:47:57 +03:00
|
|
|
const MaybeDiscarded<BrowsingContext>& aContext, const nsString& aAction,
|
|
|
|
nsTArray<nsCString>&& aEnabledCommands,
|
2019-02-06 18:58:43 +03:00
|
|
|
nsTArray<nsCString>&& aDisabledCommands);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSetCursor(
|
2019-01-15 16:56:52 +03:00
|
|
|
const nsCursor& aValue, const bool& aHasCustomCursor,
|
|
|
|
const nsCString& aUri, const uint32_t& aWidth, const uint32_t& aHeight,
|
|
|
|
const uint32_t& aStride, const gfx::SurfaceFormat& aFormat,
|
2019-02-14 00:02:55 +03:00
|
|
|
const uint32_t& aHotspotX, const uint32_t& aHotspotY, const bool& aForce);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-12-05 13:36:12 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSetLinkStatus(const nsString& aStatus);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvShowTooltip(const uint32_t& aX,
|
|
|
|
const uint32_t& aY,
|
|
|
|
const nsString& aTooltip,
|
|
|
|
const nsString& aDirection);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvHideTooltip();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSetNativeChildOfShareableWindow(
|
|
|
|
const uintptr_t& childWindow);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvDispatchFocusToTopLevelWindow();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRespondStartSwipeEvent(
|
|
|
|
const uint64_t& aInputBlockId, const bool& aStartSwipe);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvDispatchWheelEvent(
|
|
|
|
const mozilla::WidgetWheelEvent& aEvent);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvDispatchMouseEvent(
|
|
|
|
const mozilla::WidgetMouseEvent& aEvent);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvDispatchKeyboardEvent(
|
|
|
|
const mozilla::WidgetKeyboardEvent& aEvent);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-07-09 08:34:27 +03:00
|
|
|
mozilla::ipc::IPCResult RecvScrollRectIntoView(
|
|
|
|
const nsRect& aRect, const ScrollAxis& aVertical,
|
|
|
|
const ScrollAxis& aHorizontal, const ScrollFlags& aScrollFlags,
|
|
|
|
const int32_t& aAppUnitsPerDevPixel);
|
|
|
|
|
2019-02-06 18:58:07 +03:00
|
|
|
PColorPickerParent* AllocPColorPickerParent(const nsString& aTitle,
|
|
|
|
const nsString& aInitialColor);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:07 +03:00
|
|
|
bool DeallocPColorPickerParent(PColorPickerParent* aColorPicker);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-12-02 09:25:40 +03:00
|
|
|
#ifdef ACCESSIBILITY
|
2019-02-06 18:58:07 +03:00
|
|
|
PDocAccessibleParent* AllocPDocAccessibleParent(PDocAccessibleParent*,
|
|
|
|
const uint64_t&,
|
|
|
|
const uint32_t&,
|
|
|
|
const IAccessibleHolder&);
|
|
|
|
bool DeallocPDocAccessibleParent(PDocAccessibleParent*);
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvPDocAccessibleConstructor(
|
2016-01-05 12:59:30 +03:00
|
|
|
PDocAccessibleParent* aDoc, PDocAccessibleParent* aParentDoc,
|
2016-10-27 22:16:24 +03:00
|
|
|
const uint64_t& aParentID, const uint32_t& aMsaaID,
|
2016-12-02 02:28:54 +03:00
|
|
|
const IAccessibleHolder& aDocCOMProxy) override;
|
2019-12-02 09:25:40 +03:00
|
|
|
#endif
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-08-08 19:06:56 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNewWindowGlobal(
|
|
|
|
ManagedEndpoint<PWindowGlobalParent>&& aEndpoint,
|
|
|
|
const WindowGlobalInit& aInit);
|
2018-08-30 01:21:25 +03:00
|
|
|
|
Bug 1581855:Part 2 - Present VR output to VR Host r=kip,jrmuizel,sotaro,bryce
This change is a continuation of Part 1 (Bug 1570128), where the 2D content rendered by Firefox for Firefox Reality on Desktop is marshalled through VRHost so that it can be presented in a VR environment.
A new class, FxrOutputHandler, is created to manage creating a sharable texture, sharing it through VRShMem, and updating it when content updates. This class updates content with both WebRender and conventional rendering output.
This initial iteration of FxrOutputHandler does not have synchronization between reading and writing this shared texture across processes. A subsequent fix (Bug 1581881) is pending, which will reuse WebVR code to manage writing to and reading from a pool of textures.
This also presents issues with rendering protected media, so an additional class, FxrWindowManager, is created to manage all windows created for Firefox Reality on Desktop so that it can inform whether or not protected media can be presented.
The automated manual tests in vrhosttest.cpp now show the real shared texture handle rather than a fake value, which shows that marshaling succeeded.
Differential Revision: https://phabricator.services.mozilla.com/D46179
--HG--
extra : moz-landing-system : lando
2019-09-26 15:50:44 +03:00
|
|
|
mozilla::ipc::IPCResult RecvIsWindowSupportingProtectedMedia(
|
|
|
|
const uint64_t& aOuterWindowID,
|
|
|
|
IsWindowSupportingProtectedMediaResolver&& aResolve);
|
|
|
|
|
2019-11-06 17:53:08 +03:00
|
|
|
mozilla::ipc::IPCResult RecvIsWindowSupportingWebVR(
|
|
|
|
const uint64_t& aOuterWindowID,
|
|
|
|
IsWindowSupportingWebVRResolver&& aResolve);
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
void LoadURL(nsIURI* aURI);
|
|
|
|
|
2019-04-17 03:53:28 +03:00
|
|
|
void ResumeLoad(uint64_t aPendingSwitchID);
|
|
|
|
|
2018-11-07 00:15:07 +03:00
|
|
|
void InitRendering();
|
2019-06-01 00:00:57 +03:00
|
|
|
bool AttachLayerManager();
|
2018-11-05 22:56:29 +03:00
|
|
|
void MaybeShowFrame();
|
2017-01-17 23:52:45 +03:00
|
|
|
|
2020-01-13 14:30:36 +03:00
|
|
|
bool Show(const OwnerShowInfo&);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
|
|
|
void UpdateDimensions(const nsIntRect& aRect, const ScreenIntSize& aSize);
|
2017-06-07 21:36:46 +03:00
|
|
|
|
|
|
|
DimensionInfo GetDimensionInfo();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-09-20 21:03:58 +03:00
|
|
|
nsresult UpdatePosition();
|
|
|
|
|
2016-02-23 19:10:00 +03:00
|
|
|
void SizeModeChanged(const nsSizeMode& aSizeMode);
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
void ThemeChanged();
|
|
|
|
|
2016-05-11 15:56:42 +03:00
|
|
|
void HandleAccessKey(const WidgetKeyboardEvent& aEvent,
|
2017-07-06 11:36:19 +03:00
|
|
|
nsTArray<uint32_t>& aCharCodes);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-11-14 08:59:47 +03:00
|
|
|
#if defined(MOZ_WIDGET_ANDROID)
|
|
|
|
void DynamicToolbarMaxHeightChanged(ScreenIntCoord aHeight);
|
2019-11-22 00:15:46 +03:00
|
|
|
void DynamicToolbarOffsetChanged(ScreenIntCoord aOffset);
|
2019-11-14 08:59:47 +03:00
|
|
|
#endif
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
void Activate();
|
|
|
|
|
2019-06-14 10:02:18 +03:00
|
|
|
void Deactivate(bool aWindowLowering);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-09-18 05:06:32 +03:00
|
|
|
void MouseEnterIntoWidget();
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
bool MapEventCoordinatesForChildProcess(mozilla::WidgetEvent* aEvent);
|
|
|
|
|
|
|
|
void MapEventCoordinatesForChildProcess(const LayoutDeviceIntPoint& aOffset,
|
|
|
|
mozilla::WidgetEvent* aEvent);
|
|
|
|
|
|
|
|
LayoutDeviceToCSSScale GetLayoutDeviceToCSSScale();
|
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRequestNativeKeyBindings(
|
2017-05-19 12:46:02 +03:00
|
|
|
const uint32_t& aType, const mozilla::WidgetKeyboardEvent& aEvent,
|
2019-02-06 18:58:43 +03:00
|
|
|
nsTArray<mozilla::CommandInt>* aCommands);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSynthesizeNativeKeyEvent(
|
2016-01-05 12:59:30 +03:00
|
|
|
const int32_t& aNativeKeyboardLayout, const int32_t& aNativeKeyCode,
|
|
|
|
const uint32_t& aModifierFlags, const nsString& aCharacters,
|
2019-02-06 18:58:43 +03:00
|
|
|
const nsString& aUnmodifiedCharacters, const uint64_t& aObserverId);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSynthesizeNativeMouseEvent(
|
2016-01-05 12:59:30 +03:00
|
|
|
const LayoutDeviceIntPoint& aPoint, const uint32_t& aNativeMessage,
|
2019-02-06 18:58:43 +03:00
|
|
|
const uint32_t& aModifierFlags, const uint64_t& aObserverId);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSynthesizeNativeMouseMove(
|
|
|
|
const LayoutDeviceIntPoint& aPoint, const uint64_t& aObserverId);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSynthesizeNativeMouseScrollEvent(
|
2016-01-05 12:59:30 +03:00
|
|
|
const LayoutDeviceIntPoint& aPoint, const uint32_t& aNativeMessage,
|
|
|
|
const double& aDeltaX, const double& aDeltaY, const double& aDeltaZ,
|
|
|
|
const uint32_t& aModifierFlags, const uint32_t& aAdditionalFlags,
|
2019-02-06 18:58:43 +03:00
|
|
|
const uint64_t& aObserverId);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSynthesizeNativeTouchPoint(
|
2016-01-05 12:59:30 +03:00
|
|
|
const uint32_t& aPointerId, const TouchPointerState& aPointerState,
|
2016-04-15 13:39:36 +03:00
|
|
|
const LayoutDeviceIntPoint& aPoint, const double& aPointerPressure,
|
2019-02-06 18:58:43 +03:00
|
|
|
const uint32_t& aPointerOrientation, const uint64_t& aObserverId);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSynthesizeNativeTouchTap(
|
2016-04-15 13:39:36 +03:00
|
|
|
const LayoutDeviceIntPoint& aPoint, const bool& aLongTap,
|
2019-02-06 18:58:43 +03:00
|
|
|
const uint64_t& aObserverId);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvClearNativeTouchSequence(
|
|
|
|
const uint64_t& aObserverId);
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSetPrefersReducedMotionOverrideForTest(
|
|
|
|
const bool& aValue);
|
|
|
|
mozilla::ipc::IPCResult RecvResetPrefersReducedMotionOverrideForTest();
|
2018-09-15 04:00:07 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
void SendMouseEvent(const nsAString& aType, float aX, float aY,
|
|
|
|
int32_t aButton, int32_t aClickCount, int32_t aModifiers,
|
|
|
|
bool aIgnoreRootScrollFrame);
|
|
|
|
|
2017-07-05 12:59:44 +03:00
|
|
|
/**
|
|
|
|
* The following Send*Event() marks aEvent as posted to remote process if
|
|
|
|
* it succeeded. So, you can check the result with
|
|
|
|
* aEvent.HasBeenPostedToRemoteProcess().
|
|
|
|
*/
|
|
|
|
void SendRealMouseEvent(WidgetMouseEvent& aEvent);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-07-05 12:59:44 +03:00
|
|
|
void SendRealDragEvent(WidgetDragEvent& aEvent, uint32_t aDragAction,
|
2019-08-20 15:43:02 +03:00
|
|
|
uint32_t aDropEffect, nsIPrincipal* aPrincipal,
|
|
|
|
nsIContentSecurityPolicy* aCsp);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-07-05 12:59:44 +03:00
|
|
|
void SendMouseWheelEvent(WidgetWheelEvent& aEvent);
|
|
|
|
|
|
|
|
void SendRealKeyEvent(WidgetKeyboardEvent& aEvent);
|
|
|
|
|
|
|
|
void SendRealTouchEvent(WidgetTouchEvent& aEvent);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-07-05 12:59:44 +03:00
|
|
|
void SendPluginEvent(WidgetPluginEvent& aEvent);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-07-05 12:59:44 +03:00
|
|
|
/**
|
|
|
|
* Different from above Send*Event(), these methods return true if the
|
|
|
|
* event has been posted to the remote process or failed to do that but
|
|
|
|
* shouldn't be handled by following event listeners.
|
|
|
|
* If you need to check if it's actually posted to the remote process,
|
|
|
|
* you can refer aEvent.HasBeenPostedToRemoteProcess().
|
|
|
|
*/
|
|
|
|
bool SendCompositionEvent(mozilla::WidgetCompositionEvent& aEvent);
|
|
|
|
|
|
|
|
bool SendSelectionEvent(mozilla::WidgetSelectionEvent& aEvent);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2016-09-21 17:26:33 +03:00
|
|
|
bool SendHandleTap(TapType aType, const LayoutDevicePoint& aPoint,
|
|
|
|
Modifiers aModifiers, const ScrollableLayerGuid& aGuid,
|
|
|
|
uint64_t aInputBlockId);
|
|
|
|
|
2019-02-06 18:58:07 +03:00
|
|
|
PFilePickerParent* AllocPFilePickerParent(const nsString& aTitle,
|
|
|
|
const int16_t& aMode);
|
2015-01-16 21:07:50 +03:00
|
|
|
|
2019-02-06 18:58:07 +03:00
|
|
|
bool DeallocPFilePickerParent(PFilePickerParent* actor);
|
2015-01-16 21:07:50 +03:00
|
|
|
|
2019-03-22 22:14:01 +03:00
|
|
|
mozilla::ipc::IPCResult RecvIndexedDBPermissionRequest(
|
2019-04-25 17:18:11 +03:00
|
|
|
nsIPrincipal* aPrincipal, IndexedDBPermissionRequestResolver&& aResolve);
|
2015-04-08 21:48:11 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
bool GetGlobalJSObject(JSContext* cx, JSObject** globalp);
|
2015-08-06 00:25:39 +03:00
|
|
|
|
2018-04-09 23:30:33 +03:00
|
|
|
void StartPersistence(uint64_t aOuterWindowID,
|
|
|
|
nsIWebBrowserPersistDocumentReceiver* aRecv,
|
|
|
|
ErrorResult& aRv);
|
2015-10-02 15:25:22 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
bool HandleQueryContentEvent(mozilla::WidgetQueryContentEvent& aEvent);
|
|
|
|
|
2016-08-31 04:30:45 +03:00
|
|
|
bool SendPasteTransferable(const IPCDataTransfer& aDataTransfer,
|
|
|
|
const bool& aIsPrivateData,
|
2019-04-25 17:18:11 +03:00
|
|
|
nsIPrincipal* aRequestingPrincipal,
|
2018-03-14 11:44:36 +03:00
|
|
|
const uint32_t& aContentPolicyType);
|
2016-08-31 04:30:45 +03:00
|
|
|
|
2019-03-04 20:35:47 +03:00
|
|
|
// Helper for transforming a point
|
|
|
|
LayoutDeviceIntPoint TransformPoint(
|
|
|
|
const LayoutDeviceIntPoint& aPoint,
|
|
|
|
const LayoutDeviceToLayoutDeviceMatrix4x4& aMatrix);
|
|
|
|
LayoutDevicePoint TransformPoint(
|
|
|
|
const LayoutDevicePoint& aPoint,
|
|
|
|
const LayoutDeviceToLayoutDeviceMatrix4x4& aMatrix);
|
|
|
|
|
|
|
|
// Transform a coordinate from the parent process coordinate space to the
|
|
|
|
// child process coordinate space.
|
|
|
|
LayoutDeviceIntPoint TransformParentToChild(
|
|
|
|
const LayoutDeviceIntPoint& aPoint);
|
|
|
|
LayoutDevicePoint TransformParentToChild(const LayoutDevicePoint& aPoint);
|
|
|
|
|
|
|
|
// Transform a coordinate from the child process coordinate space to the
|
|
|
|
// parent process coordinate space.
|
|
|
|
LayoutDeviceIntPoint TransformChildToParent(
|
|
|
|
const LayoutDeviceIntPoint& aPoint);
|
|
|
|
LayoutDevicePoint TransformChildToParent(const LayoutDevicePoint& aPoint);
|
|
|
|
LayoutDeviceIntRect TransformChildToParent(const LayoutDeviceIntRect& aRect);
|
|
|
|
|
|
|
|
// Returns the matrix that transforms event coordinates from the coordinate
|
|
|
|
// space of the child process to the coordinate space of the parent process.
|
|
|
|
LayoutDeviceToLayoutDeviceMatrix4x4 GetChildToParentConversionMatrix();
|
|
|
|
|
2019-03-09 23:33:17 +03:00
|
|
|
void SetChildToParentConversionMatrix(
|
2019-09-12 11:08:45 +03:00
|
|
|
const Maybe<LayoutDeviceToLayoutDeviceMatrix4x4>& aMatrix,
|
|
|
|
const ScreenRect& aRemoteDocumentRect);
|
2019-03-09 23:33:17 +03:00
|
|
|
|
2017-07-14 01:33:25 +03:00
|
|
|
// Returns the offset from the origin of our frameloader's nearest widget to
|
|
|
|
// the origin of its layout frame. This offset is used to translate event
|
|
|
|
// coordinates relative to the PuppetWidget origin in the child process.
|
2019-03-04 20:35:47 +03:00
|
|
|
//
|
|
|
|
// GOING AWAY. PLEASE AVOID ADDING CALLERS. Use the above tranformation
|
|
|
|
// methods instead.
|
2016-01-05 12:59:30 +03:00
|
|
|
LayoutDeviceIntPoint GetChildProcessOffset();
|
2017-07-14 01:31:55 +03:00
|
|
|
|
|
|
|
// Returns the offset from the on-screen origin of our top-level window's
|
|
|
|
// widget (including window decorations) to the origin of our frameloader's
|
|
|
|
// nearest widget. This offset is used to translate coordinates from the
|
|
|
|
// PuppetWidget's origin to absolute screen coordinates in the child.
|
|
|
|
LayoutDeviceIntPoint GetClientOffset();
|
|
|
|
|
2019-05-06 15:00:03 +03:00
|
|
|
void StopIMEStateManagement();
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
/**
|
|
|
|
* Native widget remoting protocol for use with windowed plugins with e10s.
|
|
|
|
*/
|
2019-02-06 18:58:07 +03:00
|
|
|
PPluginWidgetParent* AllocPPluginWidgetParent();
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:07 +03:00
|
|
|
bool DeallocPPluginWidgetParent(PPluginWidgetParent* aActor);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:07 +03:00
|
|
|
PPaymentRequestParent* AllocPPaymentRequestParent();
|
2017-05-25 20:50:32 +03:00
|
|
|
|
2019-02-06 18:58:07 +03:00
|
|
|
bool DeallocPPaymentRequestParent(PPaymentRequestParent* aActor);
|
2017-05-25 20:50:32 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
bool SendLoadRemoteScript(const nsString& aURL,
|
|
|
|
const bool& aRunInGlobalScope);
|
|
|
|
|
2018-07-30 16:24:50 +03:00
|
|
|
void LayerTreeUpdate(const LayersObserverEpoch& aEpoch, bool aActive);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvInvokeDragSession(
|
2016-01-05 12:59:30 +03:00
|
|
|
nsTArray<IPCDataTransfer>&& aTransfers, const uint32_t& aAction,
|
2019-03-21 07:52:48 +03:00
|
|
|
Maybe<Shmem>&& aVisualDnDData, const uint32_t& aStride,
|
2018-04-10 18:53:44 +03:00
|
|
|
const gfx::SurfaceFormat& aFormat, const LayoutDeviceIntRect& aDragRect,
|
2019-08-20 15:43:02 +03:00
|
|
|
nsIPrincipal* aPrincipal, nsIContentSecurityPolicy* aCsp);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2018-02-09 04:43:53 +03:00
|
|
|
void AddInitialDnDDataTo(DataTransfer* aDataTransfer,
|
2019-01-04 06:16:46 +03:00
|
|
|
nsIPrincipal** aPrincipal);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2016-10-19 22:01:39 +03:00
|
|
|
bool TakeDragVisualization(RefPtr<mozilla::gfx::SourceSurface>& aSurface,
|
|
|
|
LayoutDeviceIntRect* aDragRect);
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2017-04-10 00:31:24 +03:00
|
|
|
mozilla::ipc::IPCResult RecvEnsureLayersConnected(
|
2019-02-06 18:58:43 +03:00
|
|
|
CompositorOptions* aCompositorOptions);
|
2016-09-20 11:19:32 +03:00
|
|
|
|
2017-02-01 18:38:16 +03:00
|
|
|
// LiveResizeListener implementation
|
|
|
|
void LiveResizeStarted() override;
|
|
|
|
void LiveResizeStopped() override;
|
|
|
|
|
2017-03-21 10:44:12 +03:00
|
|
|
void SetReadyToHandleInputEvents() { mIsReadyToHandleInputEvents = true; }
|
|
|
|
bool IsReadyToHandleInputEvents() { return mIsReadyToHandleInputEvents; }
|
|
|
|
|
2018-11-05 19:52:03 +03:00
|
|
|
void NavigateByKey(bool aForward, bool aForDocumentNavigation);
|
|
|
|
|
2019-05-08 23:47:18 +03:00
|
|
|
bool GetDocShellIsActive();
|
|
|
|
void SetDocShellIsActive(bool aDocShellIsActive);
|
|
|
|
|
|
|
|
bool GetHasPresented();
|
|
|
|
bool GetHasLayers();
|
|
|
|
bool GetRenderLayers();
|
|
|
|
void SetRenderLayers(bool aRenderLayers);
|
|
|
|
void PreserveLayers(bool aPreserveLayers);
|
|
|
|
void NotifyResolutionChanged();
|
|
|
|
|
|
|
|
void Deprioritize();
|
|
|
|
|
|
|
|
bool StartApzAutoscroll(float aAnchorX, float aAnchorY, nsViewID aScrollId,
|
|
|
|
uint32_t aPresShellId);
|
|
|
|
void StopApzAutoscroll(nsViewID aScrollId, uint32_t aPresShellId);
|
2019-05-08 22:34:47 +03:00
|
|
|
|
2020-03-17 03:50:29 +03:00
|
|
|
// Suspend nsIWebProgressListener events until after the next STATE_START
|
|
|
|
// onStateChange. This is used to block STATE_STOP events from the old process
|
|
|
|
// when process switching away, as well as the initial about:blank and
|
|
|
|
// STATE_START from the new process.
|
|
|
|
void SuspendProgressEventsUntilAfterNextLoadStarts() {
|
|
|
|
mSuspendedProgressEvents = true;
|
|
|
|
}
|
2020-01-10 01:31:40 +03:00
|
|
|
|
2009-11-05 21:14:22 +03:00
|
|
|
protected:
|
2019-05-15 18:34:03 +03:00
|
|
|
friend BrowserBridgeParent;
|
|
|
|
friend BrowserHost;
|
|
|
|
|
|
|
|
void SetBrowserBridgeParent(BrowserBridgeParent* aBrowser);
|
|
|
|
void SetBrowserHost(BrowserHost* aBrowser);
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
bool ReceiveMessage(
|
|
|
|
const nsString& aMessage, bool aSync, ipc::StructuredCloneData* aData,
|
|
|
|
mozilla::jsipc::CpowHolder* aCpows, nsIPrincipal* aPrincipal,
|
|
|
|
nsTArray<ipc::StructuredCloneData>* aJSONRetVal = nullptr);
|
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvAsyncAuthPrompt(const nsCString& aUri,
|
|
|
|
const nsString& aRealm,
|
|
|
|
const uint64_t& aCallbackId);
|
2010-03-30 00:29:45 +04:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult Recv__delete__() override;
|
2014-06-11 09:44:36 +04:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason why) override;
|
2012-07-17 22:27:27 +04:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRemotePaintIsReady();
|
2014-05-23 22:19:00 +04:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvNotifyCompositorTransaction();
|
2018-10-25 23:23:46 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRemoteIsReadyToHandleInputEvents();
|
2017-03-21 10:44:12 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvPaintWhileInterruptingJSNoOp(
|
|
|
|
const LayersObserverEpoch& aEpoch);
|
2016-07-23 02:36:45 +03:00
|
|
|
|
2019-12-10 11:23:06 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSetDimensions(
|
|
|
|
const uint32_t& aFlags, const int32_t& aX, const int32_t& aY,
|
|
|
|
const int32_t& aCx, const int32_t& aCy, const double& aScale);
|
2015-01-13 03:41:53 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvShowCanvasPermissionPrompt(
|
2019-05-17 16:23:04 +03:00
|
|
|
const nsCString& aOrigin, const bool& aHideDoorHanger);
|
2016-10-14 10:31:02 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSetSystemFont(const nsCString& aFontName);
|
|
|
|
mozilla::ipc::IPCResult RecvGetSystemFont(nsCString* aFontName);
|
2018-08-07 05:58:36 +03:00
|
|
|
|
2019-02-06 18:58:43 +03:00
|
|
|
mozilla::ipc::IPCResult RecvVisitURI(const URIParams& aURI,
|
2019-03-06 17:05:50 +03:00
|
|
|
const Maybe<URIParams>& aLastVisitedURI,
|
2019-02-06 18:58:43 +03:00
|
|
|
const uint32_t& aFlags);
|
2018-11-16 20:29:57 +03:00
|
|
|
|
2019-07-10 06:27:27 +03:00
|
|
|
mozilla::ipc::IPCResult RecvQueryVisitedState(nsTArray<URIParams>&& aURIs);
|
2018-11-16 20:32:02 +03:00
|
|
|
|
2019-09-19 03:00:44 +03:00
|
|
|
mozilla::ipc::IPCResult RecvMaybeFireEmbedderLoadEvents(
|
2020-03-12 01:29:53 +03:00
|
|
|
bool aFireLoadAtEmbeddingElement);
|
2019-06-06 17:57:17 +03:00
|
|
|
|
2010-08-06 02:11:23 +04:00
|
|
|
private:
|
2018-11-05 19:52:03 +03:00
|
|
|
void SuppressDisplayport(bool aEnabled);
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
void DestroyInternal();
|
|
|
|
|
2019-09-27 01:11:17 +03:00
|
|
|
void SetRenderLayersInternal(bool aEnabled);
|
2018-05-15 09:45:00 +03:00
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
already_AddRefed<nsFrameLoader> GetFrameLoader(
|
|
|
|
bool aUseCachedFrameLoaderAfterDestroy = false) const;
|
|
|
|
|
|
|
|
void TryCacheDPIAndScale();
|
|
|
|
|
|
|
|
bool AsyncPanZoomEnabled() const;
|
|
|
|
|
|
|
|
// Update state prior to routing an APZ-aware event to the child process.
|
|
|
|
// |aOutTargetGuid| will contain the identifier
|
|
|
|
// of the APZC instance that handled the event. aOutTargetGuid may be null.
|
|
|
|
// |aOutInputBlockId| will contain the identifier of the input block
|
|
|
|
// that this event was added to, if there was one. aOutInputBlockId may be
|
|
|
|
// null. |aOutApzResponse| will contain the response that the APZ gave when
|
|
|
|
// processing the input block; this is used for generating appropriate
|
|
|
|
// pointercancel events.
|
|
|
|
void ApzAwareEventRoutingToChild(ScrollableLayerGuid* aOutTargetGuid,
|
|
|
|
uint64_t* aOutInputBlockId,
|
|
|
|
nsEventStatus* aOutApzResponse);
|
|
|
|
|
2019-04-30 00:33:21 +03:00
|
|
|
// When dropping links we perform a roundtrip from
|
|
|
|
// Parent (SendRealDragEvent) -> Child -> Parent (RecvDropLinks)
|
|
|
|
// and have to ensure that the child did not modify links to be loaded.
|
|
|
|
bool QueryDropLinksForVerification();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// This is used when APZ needs to find the BrowserParent associated with a
|
|
|
|
// layer to dispatch events.
|
|
|
|
typedef nsDataHashtable<nsUint64HashKey, BrowserParent*>
|
|
|
|
LayerToBrowserParentTable;
|
|
|
|
static LayerToBrowserParentTable* sLayerToBrowserParentTable;
|
|
|
|
|
|
|
|
static void AddBrowserParentToTable(layers::LayersId aLayersId,
|
|
|
|
BrowserParent* aBrowserParent);
|
|
|
|
|
|
|
|
static void RemoveBrowserParentFromTable(layers::LayersId aLayersId);
|
|
|
|
|
2020-02-18 16:30:04 +03:00
|
|
|
// Keeps track of which BrowserParent has keyboard focus.
|
|
|
|
// If nullptr, the parent process has focus.
|
|
|
|
// Use UpdateFocus() to manage.
|
|
|
|
static BrowserParent* sFocus;
|
2019-04-30 00:33:21 +03:00
|
|
|
|
2020-02-18 16:30:04 +03:00
|
|
|
// Keeps track of which top-level BrowserParent the keyboard focus is under.
|
|
|
|
// If nullptr, the parent process has focus.
|
|
|
|
// Use SetTopLevelWebFocus and UnsetTopLevelWebFocus to manage.
|
|
|
|
static BrowserParent* sTopLevelWebFocus;
|
2019-04-30 00:33:21 +03:00
|
|
|
|
2020-02-18 16:30:04 +03:00
|
|
|
// Setter for sTopLevelWebFocus
|
|
|
|
static void SetTopLevelWebFocus(BrowserParent* aBrowserParent);
|
|
|
|
|
|
|
|
// Unsetter for sTopLevelWebFocus; only unsets if argument matches
|
|
|
|
// current sTopLevelWebFocus. Use UnsetTopLevelWebFocusAll() to
|
|
|
|
// unset regardless of current value.
|
|
|
|
static void UnsetTopLevelWebFocus(BrowserParent* aBrowserParent);
|
|
|
|
|
|
|
|
// Recomputes sFocus and returns it.
|
|
|
|
static BrowserParent* UpdateFocus();
|
2019-04-30 00:33:21 +03:00
|
|
|
|
2019-08-26 16:08:32 +03:00
|
|
|
void OnSubFrameCrashed();
|
|
|
|
|
2020-03-11 03:31:31 +03:00
|
|
|
struct APZData {
|
|
|
|
bool operator==(const APZData& aOther) {
|
|
|
|
return aOther.guid == guid && aOther.blockId == blockId &&
|
|
|
|
aOther.apzResponse == apzResponse;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator!=(const APZData& aOther) { return !(*this == aOther); }
|
|
|
|
|
|
|
|
ScrollableLayerGuid guid;
|
|
|
|
uint64_t blockId;
|
|
|
|
nsEventStatus apzResponse;
|
|
|
|
};
|
|
|
|
void SendRealTouchMoveEvent(WidgetTouchEvent& aEvent, APZData& aAPZData,
|
|
|
|
uint32_t aConsecutiveTouchMoveCount);
|
|
|
|
|
2019-07-03 09:06:26 +03:00
|
|
|
public:
|
2020-02-18 16:30:04 +03:00
|
|
|
// Unsets sTopLevelWebFocus regardless of its current value.
|
|
|
|
static void UnsetTopLevelWebFocusAll();
|
|
|
|
|
|
|
|
// Recomputes focus when the BrowsingContext tree changes in a
|
|
|
|
// way that potentially invalidates the sFocus.
|
|
|
|
static void UpdateFocusFromBrowsingContext();
|
2019-07-03 09:06:26 +03:00
|
|
|
|
|
|
|
private:
|
2019-04-30 00:50:29 +03:00
|
|
|
TabId mTabId;
|
|
|
|
|
|
|
|
RefPtr<ContentParent> mManager;
|
|
|
|
// The root browsing context loaded in this BrowserParent.
|
|
|
|
RefPtr<CanonicalBrowsingContext> mBrowsingContext;
|
|
|
|
nsCOMPtr<nsILoadContext> mLoadContext;
|
2019-05-21 17:14:57 +03:00
|
|
|
RefPtr<Element> mFrameElement;
|
2019-04-30 00:50:29 +03:00
|
|
|
nsCOMPtr<nsIBrowserDOMWindow> mBrowserDOMWindow;
|
|
|
|
// We keep a strong reference to the frameloader after we've sent the
|
|
|
|
// Destroy message and before we've received __delete__. This allows us to
|
|
|
|
// dispatch message manager messages during this time.
|
|
|
|
RefPtr<nsFrameLoader> mFrameLoader;
|
|
|
|
uint32_t mChromeFlags;
|
|
|
|
|
|
|
|
// Pointer back to BrowserBridgeParent if there is one associated with
|
|
|
|
// this BrowserParent. This is non-owning to avoid cycles and is managed
|
|
|
|
// by the BrowserBridgeParent instance, which has the strong reference
|
|
|
|
// to this BrowserParent.
|
|
|
|
BrowserBridgeParent* mBrowserBridgeParent;
|
2019-05-15 18:34:03 +03:00
|
|
|
// Pointer to the BrowserHost that owns us, if any. This is mutually
|
|
|
|
// exclusive with mBrowserBridgeParent, and one is guaranteed to be
|
|
|
|
// non-null.
|
|
|
|
BrowserHost* mBrowserHost;
|
2019-04-30 00:50:29 +03:00
|
|
|
|
2019-04-30 00:33:21 +03:00
|
|
|
ContentCacheInParent mContentCache;
|
|
|
|
|
2019-06-02 20:51:33 +03:00
|
|
|
layout::RemoteLayerTreeOwner mRemoteLayerTreeOwner;
|
2019-04-30 00:50:29 +03:00
|
|
|
LayersObserverEpoch mLayerTreeEpoch;
|
|
|
|
|
|
|
|
Maybe<LayoutDeviceToLayoutDeviceMatrix4x4> mChildToParentConversionMatrix;
|
|
|
|
|
2019-04-30 00:33:21 +03:00
|
|
|
nsIntRect mRect;
|
|
|
|
ScreenIntSize mDimensions;
|
|
|
|
hal::ScreenOrientation mOrientation;
|
|
|
|
float mDPI;
|
|
|
|
int32_t mRounding;
|
|
|
|
CSSToLayoutDeviceScale mDefaultScale;
|
|
|
|
bool mUpdatedDimensions;
|
|
|
|
nsSizeMode mSizeMode;
|
|
|
|
LayoutDeviceIntPoint mClientOffset;
|
|
|
|
LayoutDeviceIntPoint mChromeOffset;
|
|
|
|
|
2016-01-05 12:59:30 +03:00
|
|
|
// When loading a new tab or window via window.open, the child is
|
2019-04-10 01:39:01 +03:00
|
|
|
// responsible for loading the URL it wants into the new BrowserChild. When
|
|
|
|
// the parent receives the CreateWindow message, though, it sends a LoadURL
|
2016-01-05 12:59:30 +03:00
|
|
|
// message, usually for about:blank. It's important for the about:blank load
|
|
|
|
// to get processed because the Firefox frontend expects every new window to
|
|
|
|
// immediately start loading something (see bug 1123090). However, we want
|
|
|
|
// the child to process the LoadURL message before it returns from
|
|
|
|
// ProvideWindow so that the URL sent from the parent doesn't override the
|
|
|
|
// child's URL. This is not possible using our IPC mechanisms. To solve the
|
|
|
|
// problem, we skip sending the LoadURL message in the parent and instead
|
|
|
|
// return the URL as a result from CreateWindow. The child simulates
|
|
|
|
// receiving a LoadURL message before returning from ProvideWindow.
|
|
|
|
//
|
|
|
|
// The mCreatingWindow flag is set while dispatching CreateWindow. During
|
|
|
|
// that time, any LoadURL calls are skipped and the URL is stored in
|
|
|
|
// mSkippedURL.
|
|
|
|
bool mCreatingWindow;
|
|
|
|
nsCString mDelayedURL;
|
|
|
|
|
|
|
|
// When loading a new tab or window via window.open, we want to ensure that
|
|
|
|
// frame scripts for that tab are loaded before any scripts start to run in
|
|
|
|
// the window. We can't load the frame scripts the normal way, using
|
|
|
|
// separate IPC messages, since they won't be processed by the child until
|
|
|
|
// returning to the event loop, which is too late. Instead, we queue up
|
|
|
|
// frame scripts that we intend to load and send them as part of the
|
2019-04-10 01:39:01 +03:00
|
|
|
// CreateWindow response. Then BrowserChild loads them immediately.
|
2016-01-05 12:59:30 +03:00
|
|
|
nsTArray<FrameScriptInfo> mDelayedFrameScripts;
|
|
|
|
|
2019-04-10 01:39:01 +03:00
|
|
|
// Cached cursor setting from BrowserChild. When the cursor is over the tab,
|
2016-01-05 12:59:30 +03:00
|
|
|
// it should take this appearance.
|
|
|
|
nsCursor mCursor;
|
|
|
|
nsCOMPtr<imgIContainer> mCustomCursor;
|
|
|
|
uint32_t mCustomCursorHotspotX, mCustomCursorHotspotY;
|
|
|
|
|
2017-08-22 11:07:03 +03:00
|
|
|
nsTArray<nsString> mVerifyDropLinks;
|
|
|
|
|
2016-02-26 18:52:06 +03:00
|
|
|
#ifdef DEBUG
|
2019-04-30 00:50:29 +03:00
|
|
|
int32_t mActiveSupressDisplayportCount = 0;
|
2016-02-26 18:52:06 +03:00
|
|
|
#endif
|
2016-01-05 12:59:30 +03:00
|
|
|
|
2019-04-30 00:50:29 +03:00
|
|
|
// Cached value indicating the docshell active state of the remote browser.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mDocShellIsActive : 1;
|
2016-07-23 02:36:45 +03:00
|
|
|
|
2019-04-30 00:50:29 +03:00
|
|
|
// When true, we've initiated normal shutdown and notified our managing
|
|
|
|
// PContent.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mMarkedDestroying : 1;
|
2019-04-30 00:50:29 +03:00
|
|
|
// When true, the BrowserParent is invalid and we should not send IPC messages
|
|
|
|
// anymore.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mIsDestroyed : 1;
|
2019-04-30 00:50:29 +03:00
|
|
|
// True if the cursor changes from the BrowserChild should change the widget
|
|
|
|
// cursor. This happens whenever the cursor is in the tab's region.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mTabSetsCursor : 1;
|
2019-04-30 00:50:29 +03:00
|
|
|
|
2016-07-23 02:36:45 +03:00
|
|
|
// If this flag is set, then the tab's layers will be preserved even when
|
|
|
|
// the tab's docshell is inactive.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mPreserveLayers : 1;
|
2016-07-23 02:36:45 +03:00
|
|
|
|
2017-11-07 23:08:47 +03:00
|
|
|
// Holds the most recent value passed to the RenderLayers function. This
|
|
|
|
// does not necessarily mean that the layers have finished rendering
|
|
|
|
// and have uploaded - for that, use mHasLayers.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mRenderLayers : 1;
|
2017-11-03 17:27:05 +03:00
|
|
|
|
2018-10-01 20:05:32 +03:00
|
|
|
// Whether this is active for the ProcessPriorityManager or not.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mActiveInPriorityManager : 1;
|
2018-10-01 20:05:32 +03:00
|
|
|
|
2019-04-10 01:39:01 +03:00
|
|
|
// True if the compositor has reported that the BrowserChild has uploaded
|
2017-11-07 23:08:47 +03:00
|
|
|
// layers.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mHasLayers : 1;
|
2017-11-07 23:08:47 +03:00
|
|
|
|
2019-04-10 00:38:15 +03:00
|
|
|
// True if this BrowserParent has had its layer tree sent to the compositor
|
2017-03-04 22:12:38 +03:00
|
|
|
// at least once.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mHasPresented : 1;
|
2017-03-04 22:12:38 +03:00
|
|
|
|
2017-03-21 10:44:12 +03:00
|
|
|
// True when the remote browser is created and ready to handle input events.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mIsReadyToHandleInputEvents : 1;
|
2017-03-21 10:44:12 +03:00
|
|
|
|
2019-04-10 01:39:01 +03:00
|
|
|
// True if we suppress the eMouseEnterIntoWidget event due to the BrowserChild
|
|
|
|
// was not ready to handle it. We will resend it when the next time we fire a
|
|
|
|
// mouse event and the BrowserChild is ready.
|
2020-01-10 01:31:40 +03:00
|
|
|
bool mIsMouseEnterIntoWidgetEventSuppressed : 1;
|
|
|
|
|
2020-03-17 03:50:29 +03:00
|
|
|
// Set to true if we're currently suspending nsIWebProgress events.
|
|
|
|
// We keep suspending until we get a STATE_START onStateChange event
|
|
|
|
// (for something that isn't the initial about:blank) and then start
|
|
|
|
// allowing future events.
|
|
|
|
bool mSuspendedProgressEvents : 1;
|
2009-07-01 00:39:22 +04:00
|
|
|
};
|
|
|
|
|
2019-04-10 00:38:15 +03:00
|
|
|
struct MOZ_STACK_CLASS BrowserParent::AutoUseNewTab final {
|
2015-10-30 02:30:57 +03:00
|
|
|
public:
|
2019-04-10 00:38:15 +03:00
|
|
|
AutoUseNewTab(BrowserParent* aNewTab, nsCString* aURLToLoad)
|
2017-04-17 01:52:02 +03:00
|
|
|
: mNewTab(aNewTab), mURLToLoad(aURLToLoad) {
|
2016-01-05 12:59:30 +03:00
|
|
|
MOZ_ASSERT(!aNewTab->mCreatingWindow);
|
|
|
|
|
|
|
|
aNewTab->mCreatingWindow = true;
|
|
|
|
aNewTab->mDelayedURL.Truncate();
|
|
|
|
}
|
|
|
|
|
|
|
|
~AutoUseNewTab() {
|
|
|
|
mNewTab->mCreatingWindow = false;
|
|
|
|
*mURLToLoad = mNewTab->mDelayedURL;
|
|
|
|
}
|
2015-10-30 02:30:57 +03:00
|
|
|
|
|
|
|
private:
|
2019-09-24 20:25:58 +03:00
|
|
|
RefPtr<BrowserParent> mNewTab;
|
2016-01-05 12:59:30 +03:00
|
|
|
nsCString* mURLToLoad;
|
2015-10-30 02:30:57 +03:00
|
|
|
};
|
|
|
|
|
2009-08-12 20:18:08 +04:00
|
|
|
} // namespace dom
|
2009-07-01 00:39:22 +04:00
|
|
|
} // namespace mozilla
|
|
|
|
|
2019-04-30 00:23:05 +03:00
|
|
|
#endif // mozilla_dom_BrowserParent_h
|