mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Merge inbound to m-c.
This commit is contained in:
commit
e55134bbc7
@ -23,6 +23,7 @@
|
||||
#include "Relation.h"
|
||||
#include "RootAccessible.h"
|
||||
#include "States.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
||||
#include "mozilla/Util.h"
|
||||
#include "nsXPCOMStrings.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "nsIAccessibleStates.h"
|
||||
|
||||
#include "nsIContent.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsRefPtrHashtable.h"
|
||||
|
||||
|
@ -74,10 +74,11 @@ DocAccessible::
|
||||
DocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIPresShell* aPresShell) :
|
||||
HyperTextAccessibleWrap(aRootContent, this),
|
||||
mDocumentNode(aDocument), mScrollPositionChangedTicks(0),
|
||||
// XXX aaronl should we use an algorithm for the initial cache size?
|
||||
mAccessibleCache(kDefaultCacheSize),
|
||||
mNodeToAccessibleMap(kDefaultCacheSize),
|
||||
mDocumentNode(aDocument),
|
||||
mScrollPositionChangedTicks(0),
|
||||
mLoadState(eTreeConstructionPending), mDocFlags(0), mLoadEventType(0),
|
||||
mVirtualCursor(nullptr),
|
||||
mPresShell(aPresShell)
|
||||
|
@ -498,90 +498,30 @@ var Output = {
|
||||
speechHelper: {
|
||||
EARCONS: ['chrome://global/content/accessibility/tick.wav'],
|
||||
|
||||
delayedActions: [],
|
||||
|
||||
earconsToLoad: -1, // -1: not inited, 1 or more: initing, 0: inited
|
||||
|
||||
earconBuffers: {},
|
||||
|
||||
webaudioEnabled: false,
|
||||
inited: false,
|
||||
|
||||
webspeechEnabled: false,
|
||||
|
||||
doDelayedActionsIfLoaded: function doDelayedActionsIfLoaded(aToLoadCount) {
|
||||
if (aToLoadCount === 0) {
|
||||
this.outputActions(this.delayedActions);
|
||||
this.delayedActions = [];
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
init: function init() {
|
||||
if (this.earconsToLoad === 0) {
|
||||
// Already inited.
|
||||
return;
|
||||
}
|
||||
|
||||
let window = Utils.win;
|
||||
this.webaudioEnabled = !!window.AudioContext;
|
||||
this.webspeechEnabled = !!window.speechSynthesis;
|
||||
|
||||
this.earconsToLoad = this.webaudioEnabled ? this.EARCONS.length : 0;
|
||||
|
||||
if (this.doDelayedActionsIfLoaded(this.earconsToLoad)) {
|
||||
// Nothing to load
|
||||
return;
|
||||
}
|
||||
|
||||
this.audioContext = new window.AudioContext();
|
||||
|
||||
for (let earcon of this.EARCONS) {
|
||||
let xhr = new window.XMLHttpRequest();
|
||||
xhr.open('GET', earcon);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
xhr.onerror = () => {
|
||||
Logger.error('Error getting earcon:', xhr.statusText);
|
||||
this.doDelayedActionsIfLoaded(--this.earconsToLoad);
|
||||
};
|
||||
xhr.onload = () => {
|
||||
this.audioContext.decodeAudioData(
|
||||
xhr.response,
|
||||
(audioBuffer) => {
|
||||
try {
|
||||
let earconName = /.*\/(.*)\..*$/.exec(earcon)[1];
|
||||
this.earconBuffers[earconName] = new WeakMap();
|
||||
this.earconBuffers[earconName].set(window, audioBuffer);
|
||||
this.doDelayedActionsIfLoaded(--this.earconsToLoad);
|
||||
} catch (x) {
|
||||
Logger.logException(x);
|
||||
}
|
||||
},
|
||||
() => {
|
||||
this.doDelayedActionsIfLoaded(--this.earconsToLoad);
|
||||
Logger.error('Error decoding earcon');
|
||||
});
|
||||
};
|
||||
xhr.send();
|
||||
let earconName = /.*\/(.*)\..*$/.exec(earcon)[1];
|
||||
this.earconBuffers[earconName] = new WeakMap();
|
||||
this.earconBuffers[earconName].set(window, new window.Audio(earcon));
|
||||
}
|
||||
|
||||
this.inited = true;
|
||||
},
|
||||
|
||||
output: function output(aActions) {
|
||||
if (this.earconsToLoad !== 0) {
|
||||
// We did not load the earcons yet.
|
||||
this.delayedActions.push.apply(this.delayedActions, aActions);
|
||||
if (this.earconsToLoad < 0) {
|
||||
// Loading did not start yet, start it.
|
||||
this.init();
|
||||
}
|
||||
return;
|
||||
if (!this.inited) {
|
||||
this.init();
|
||||
}
|
||||
|
||||
this.outputActions(aActions);
|
||||
},
|
||||
|
||||
outputActions: function outputActions(aActions) {
|
||||
for (let action of aActions) {
|
||||
let window = Utils.win;
|
||||
Logger.info('tts.' + action.method,
|
||||
@ -595,13 +535,10 @@ var Output = {
|
||||
if (action.method === 'speak' && this.webspeechEnabled) {
|
||||
window.speechSynthesis.speak(
|
||||
new window.SpeechSynthesisUtterance(action.data));
|
||||
} else if (action.method === 'playEarcon' && this.webaudioEnabled) {
|
||||
} else if (action.method === 'playEarcon') {
|
||||
let audioBufferWeakMap = this.earconBuffers[action.data];
|
||||
if (audioBufferWeakMap) {
|
||||
let node = this.audioContext.createBufferSource();
|
||||
node.connect(this.audioContext.destination);
|
||||
node.buffer = audioBufferWeakMap.get(window);
|
||||
node.start(0);
|
||||
audioBufferWeakMap.get(window).cloneNode(false).play();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -798,6 +735,9 @@ var Input = {
|
||||
case 'swipeleft1':
|
||||
this.moveCursor('movePrevious', 'Simple', 'gesture');
|
||||
break;
|
||||
case 'exploreend1':
|
||||
this.activateCurrent(null, true);
|
||||
break;
|
||||
case 'swiperight2':
|
||||
this.sendScrollMessage(-1, true);
|
||||
break;
|
||||
@ -938,12 +878,13 @@ var Input = {
|
||||
mm.sendAsyncMessage(type, aDetails);
|
||||
},
|
||||
|
||||
activateCurrent: function activateCurrent(aData) {
|
||||
activateCurrent: function activateCurrent(aData, aActivateIfKey = false) {
|
||||
let mm = Utils.getMessageManager(Utils.CurrentBrowser);
|
||||
let offset = aData && typeof aData.keyIndex === 'number' ?
|
||||
aData.keyIndex - Output.brailleState.startOffset : -1;
|
||||
|
||||
mm.sendAsyncMessage('AccessFu:Activate', {offset: offset});
|
||||
mm.sendAsyncMessage('AccessFu:Activate',
|
||||
{offset: offset, activateIfKey: aActivateIfKey});
|
||||
},
|
||||
|
||||
sendContextMenuMessage: function sendContextMenuMessage() {
|
||||
|
@ -428,10 +428,10 @@ TouchPoint.prototype = {
|
||||
}
|
||||
|
||||
// To be considered an explore...
|
||||
if (!this.done &&
|
||||
duration > TouchAdapter.SWIPE_MAX_DURATION &&
|
||||
if (duration > TouchAdapter.SWIPE_MAX_DURATION &&
|
||||
(this.distanceTraveled / this.dpi) > TouchAdapter.TAP_MAX_RADIUS) {
|
||||
return {type: 'explore', x: this.x, y: this.y};
|
||||
return {type: this.done ? 'exploreend' : 'explore',
|
||||
x: this.x, y: this.y};
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -31,6 +31,7 @@ const ROLE_CHECK_MENU_ITEM = Ci.nsIAccessibleRole.ROLE_CHECK_MENU_ITEM;
|
||||
const ROLE_PASSWORD_TEXT = Ci.nsIAccessibleRole.ROLE_PASSWORD_TEXT;
|
||||
const ROLE_RADIO_MENU_ITEM = Ci.nsIAccessibleRole.ROLE_RADIO_MENU_ITEM;
|
||||
const ROLE_TOGGLE_BUTTON = Ci.nsIAccessibleRole.ROLE_TOGGLE_BUTTON;
|
||||
const ROLE_KEY = Ci.nsIAccessibleRole.ROLE_KEY;
|
||||
const ROLE_ENTRY = Ci.nsIAccessibleRole.ROLE_ENTRY;
|
||||
const ROLE_LIST = Ci.nsIAccessibleRole.ROLE_LIST;
|
||||
const ROLE_DEFINITION_LIST = Ci.nsIAccessibleRole.ROLE_DEFINITION_LIST;
|
||||
@ -104,6 +105,7 @@ var gSimpleTraversalRoles =
|
||||
ROLE_RADIO_MENU_ITEM,
|
||||
ROLE_TOGGLE_BUTTON,
|
||||
ROLE_ENTRY,
|
||||
ROLE_KEY,
|
||||
ROLE_HEADER,
|
||||
ROLE_HEADING,
|
||||
// Used for traversing in to child OOP frames.
|
||||
|
@ -164,6 +164,12 @@ function forwardToChild(aMessage, aListener, aVCPosition) {
|
||||
function activateCurrent(aMessage) {
|
||||
Logger.debug('activateCurrent');
|
||||
function activateAccessible(aAccessible) {
|
||||
if (aMessage.json.activateIfKey &&
|
||||
aAccessible.role != Ci.nsIAccessibleRole.ROLE_KEY) {
|
||||
// Only activate keys, don't do anything on other objects.
|
||||
return;
|
||||
}
|
||||
|
||||
if (aAccessible.actionCount > 0) {
|
||||
aAccessible.doAction(0);
|
||||
} else {
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "oleacc.h"
|
||||
#include "nsIAccessibleTypes.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
|
@ -378,6 +378,8 @@
|
||||
@BINPATH@/components/PeerConnection.js
|
||||
@BINPATH@/components/PeerConnection.manifest
|
||||
#endif
|
||||
@BINPATH@/components/HttpDataUsage.manifest
|
||||
@BINPATH@/components/HttpDataUsage.js
|
||||
@BINPATH@/components/SiteSpecificUserAgent.js
|
||||
@BINPATH@/components/SiteSpecificUserAgent.manifest
|
||||
@BINPATH@/components/storage-Legacy.js
|
||||
|
@ -544,6 +544,9 @@
|
||||
@BINPATH@/components/PeerConnection.manifest
|
||||
#endif
|
||||
|
||||
@BINPATH@/components/HttpDataUsage.manifest
|
||||
@BINPATH@/components/HttpDataUsage.js
|
||||
|
||||
@BINPATH@/chrome/marionette@JAREXT@
|
||||
@BINPATH@/chrome/marionette.manifest
|
||||
@BINPATH@/components/MarionetteComponents.manifest
|
||||
|
@ -7,7 +7,7 @@
|
||||
#define mozilla_RegistryMessageUtils_h
|
||||
|
||||
#include "ipc/IPCMessageUtils.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
struct SerializedURI
|
||||
{
|
||||
|
@ -10,32 +10,20 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsChromeProtocolHandler.h"
|
||||
#include "nsChromeRegistry.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsContentCID.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIChromeRegistry.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIFileURL.h"
|
||||
#include "nsIFileChannel.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIJARChannel.h"
|
||||
#include "nsIJARURI.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsIObjectOutputStream.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIStandardURL.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsString.h"
|
||||
#include "prlog.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -8,33 +8,23 @@
|
||||
#include "nsChromeRegistryChrome.h"
|
||||
#include "nsChromeRegistryContent.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "prio.h"
|
||||
#include "prprf.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsError.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsLayoutCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsString.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
|
||||
#include "nsCSSStyleSheet.h"
|
||||
#include "nsIConsoleService.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMLocation.h"
|
||||
#include "nsIDOMWindowCollection.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIJARProtocolHandler.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIProtocolHandler.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsIWindowMediator.h"
|
||||
|
||||
|
@ -6,31 +6,24 @@
|
||||
#ifndef nsChromeRegistry_h
|
||||
#define nsChromeRegistry_h
|
||||
|
||||
#include "nsIChromeRegistry.h"
|
||||
#include "nsIToolkitChromeRegistry.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsIXULOverlayProvider.h"
|
||||
#endif
|
||||
|
||||
#include "pldhash.h"
|
||||
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTHashtable.h"
|
||||
#include "nsURIHashKey.h"
|
||||
#include "nsInterfaceHashtable.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "nsIResProtocolHandler.h"
|
||||
#include "nsIXPConnect.h"
|
||||
|
||||
#include "mozilla/Omnijar.h"
|
||||
#include "mozilla/FileLocation.h"
|
||||
|
||||
class nsIDOMWindow;
|
||||
class nsIPrefBranch;
|
||||
class nsIURL;
|
||||
|
||||
// The chrome registry is actually split between nsChromeRegistryChrome and
|
||||
|
@ -13,35 +13,27 @@
|
||||
#include <windows.h>
|
||||
#elif defined(XP_MACOSX)
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#elif defined(MOZ_WIDGET_GTK)
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
#include "nsArrayEnumerator.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsComponentManager.h"
|
||||
#include "nsEnumeratorUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsStringEnumerator.h"
|
||||
#include "nsTextFormatter.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "nsZipArchive.h"
|
||||
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
|
||||
#include "nsICommandLine.h"
|
||||
#include "nsILocaleService.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsIResProtocolHandler.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsIVersionComparator.h"
|
||||
#include "nsIXPConnect.h"
|
||||
#include "nsIXULAppInfo.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
|
||||
#define UILOCALE_CMD_LINE_ARG "UILocale"
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsChromeRegistryChrome_h
|
||||
#define nsChromeRegistryChrome_h
|
||||
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsChromeRegistry.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "mozilla/Move.h"
|
||||
|
@ -4,11 +4,10 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "RegistryMessageUtils.h"
|
||||
#include "nsChromeRegistry.h"
|
||||
#include "nsChromeRegistryContent.h"
|
||||
#include "nsString.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsResProtocolHandler.h"
|
||||
#include "nsIResProtocolHandler.h"
|
||||
|
||||
nsChromeRegistryContent::nsChromeRegistryContent()
|
||||
{
|
||||
|
@ -7,10 +7,8 @@
|
||||
#define nsChromeRegistryContent_h
|
||||
|
||||
#include "nsChromeRegistry.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsClassHashtable.h"
|
||||
|
||||
class nsCString;
|
||||
struct ChromePackage;
|
||||
struct ResourceMapping;
|
||||
struct OverrideMapping;
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIWeakReferenceUtils.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
class nsIDOMDocument;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define nsAttrValue_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsStringBuffer.h"
|
||||
#include "nsColor.h"
|
||||
#include "nsCaseTreatment.h"
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "nsContentListDeclarations.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIHTMLCollection.h"
|
||||
#include "nsIDOMNodeList.h"
|
||||
#include "nsINodeList.h"
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
||||
// image copy stuff
|
||||
#include "nsIImageLoadingContent.h"
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIDOMMozNamedAttrMap.h"
|
||||
#include "nsRefPtrHashtable.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
class nsIAtom;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "nsIMozBrowserFrame.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
#include "mozilla/dom/StructuredCloneUtils.h"
|
||||
#include "js/StructuredClone.h"
|
||||
|
||||
using mozilla::dom::StructuredCloneData;
|
||||
using mozilla::dom::StructuredCloneClosure;
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsIWeakReferenceUtils.h"
|
||||
#include "SharedBuffer.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
||||
#include "mozilla/dom/nsSynthVoiceRegistry.h"
|
||||
#include "mozilla/dom/nsSpeechTask.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
* types don't need to be exported outside the SVG module.
|
||||
*/
|
||||
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
class nsSVGAngle;
|
||||
class nsSVGIntegerPair;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#define __NS_SVGDATAPARSER_H__
|
||||
|
||||
#include "nsError.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// helper macros
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsTextFragment.h"
|
||||
#include "nsTextNode.h"
|
||||
|
||||
#include "nsIInterfaceInfo.h"
|
||||
#include "nsIScriptError.h"
|
||||
|
||||
#include "nsIStyleRuleProcessor.h"
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "txXPathObjectAdaptor.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIClassInfo.h"
|
||||
#include "nsIInterfaceInfo.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(txXPathObjectAdaptor, txIXPathObject)
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "mozilla/ipc/InputStreamUtils.h"
|
||||
#include "mozilla/ipc/URIUtils.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIRandomGenerator.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "MainThreadUtils.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/dom/CryptoBinding.h"
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDOMException.h"
|
||||
#include "nsIException.h"
|
||||
#include "nsIProgrammingLanguage.h"
|
||||
#include "nsMemory.h"
|
||||
#include "prprf.h"
|
||||
#include "xpcprivate.h"
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIDOMClassInfo.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#define NS_IDOM_SCRIPT_OBJECT_FACTORY_IID \
|
||||
{ 0x2a50e17c, 0x46ff, 0x4150, \
|
||||
|
@ -7,7 +7,7 @@
|
||||
#define nsIScriptContext_h__
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIProgrammingLanguage.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "nsDOMClassInfo.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsproxy.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#define DOM_PROXY_OBJECT_SLOT js::PROXY_PRIVATE_SLOT
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "nsIAudioManager.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "MainThreadUtils.h"
|
||||
|
||||
|
||||
using namespace mozilla;
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "mozilla/Observer.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
extern bool gBluetoothDebugFlag;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "MainThreadUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
USING_BLUETOOTH_NAMESPACE
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
|
||||
#include "BluetoothChild.h"
|
||||
#include "MainThreadUtils.h"
|
||||
|
||||
USING_BLUETOOTH_NAMESPACE
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "nsProxyRelease.h"
|
||||
#include "AppProcessChecker.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsNetCID.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
#define BEGIN_FILE_NAMESPACE \
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "IDBDatabase.h"
|
||||
#include "IndexedDatabaseManager.h"
|
||||
#include "TransactionThreadPool.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
||||
USING_INDEXEDDB_NAMESPACE
|
||||
using mozilla::dom::quota::AssertIsOnIOThread;
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "IndexedDatabaseManager.h"
|
||||
#include "Key.h"
|
||||
#include "ProfilerHelpers.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
||||
#include "ipc/IndexedDBChild.h"
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "nsEventDispatcher.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsError.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsIInputStream.h"
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "AppProcessChecker.h"
|
||||
#ifdef MOZ_CHILD_PERMISSIONS
|
||||
#include "ContentParent.h"
|
||||
#include "mozIApplication.h"
|
||||
#include "mozilla/hal_sandbox/PHalParent.h"
|
||||
@ -15,6 +16,7 @@
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::hal_sandbox;
|
||||
using namespace mozilla::services;
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include "ContentChild.h"
|
||||
#include "ContentParent.h"
|
||||
#include "nsNetCID.h"
|
||||
|
||||
#define PRIVATE_REMOTE_INPUT_STREAM_IID \
|
||||
{0x30c7699f, 0x51d2, 0x48c8, {0xad, 0x56, 0xc0, 0x16, 0xd7, 0x6f, 0x71, 0x27}}
|
||||
|
@ -12,16 +12,13 @@
|
||||
#include "mozilla/dom/PBlobParent.h"
|
||||
#include "mozilla/dom/PBlobStreamChild.h"
|
||||
#include "mozilla/dom/PBlobStreamParent.h"
|
||||
#include "mozilla/dom/PContent.h"
|
||||
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
class nsIDOMBlob;
|
||||
class nsIIPCSerializableInputStream;
|
||||
class nsIInputStream;
|
||||
template<class T> class nsRevocableEventPtr;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -20,11 +20,9 @@
|
||||
#include "mozilla/dom/ExternalHelperAppChild.h"
|
||||
#include "mozilla/dom/PCrashReporterChild.h"
|
||||
#include "mozilla/dom/DOMStorageIPC.h"
|
||||
#include "mozilla/Hal.h"
|
||||
#include "mozilla/hal_sandbox/PHalChild.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
#include "mozilla/ipc/TestShellChild.h"
|
||||
#include "mozilla/ipc/XPCShellEnvironment.h"
|
||||
#include "mozilla/layers/CompositorChild.h"
|
||||
#include "mozilla/layers/ImageBridgeChild.h"
|
||||
#include "mozilla/layers/PCompositorChild.h"
|
||||
@ -35,17 +33,17 @@
|
||||
#endif
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
#include "nsIConsoleListener.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIMemoryReporter.h"
|
||||
#include "nsIMemoryInfoDumper.h"
|
||||
#include "nsIMutable.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsTObserverArray.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsStyleSheetService.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsIConsoleService.h"
|
||||
#include "nsJSEnvironment.h"
|
||||
@ -56,7 +54,6 @@
|
||||
#include "nsIJSRuntimeService.h"
|
||||
|
||||
#include "IHistory.h"
|
||||
#include "nsDocShellCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
||||
#include "base/message_loop.h"
|
||||
@ -64,14 +61,13 @@
|
||||
#include "base/task.h"
|
||||
|
||||
#include "nsChromeRegistryContent.h"
|
||||
#include "mozilla/chrome/RegistryMessageUtils.h"
|
||||
#include "nsFrameMessageManager.h"
|
||||
|
||||
#include "nsIGeolocationProvider.h"
|
||||
#include "JavaScriptParent.h"
|
||||
#include "mozilla/dom/PMemoryReportRequestChild.h"
|
||||
|
||||
#ifdef MOZ_PERMISSIONS
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsPermission.h"
|
||||
#include "nsPermissionManager.h"
|
||||
#endif
|
||||
@ -96,7 +92,6 @@
|
||||
|
||||
#include "mozilla/dom/indexedDB/PIndexedDBChild.h"
|
||||
#include "mozilla/dom/mobilemessage/SmsChild.h"
|
||||
#include "mozilla/dom/telephony/TelephonyChild.h"
|
||||
#include "mozilla/dom/devicestorage/DeviceStorageRequestChild.h"
|
||||
#include "mozilla/dom/bluetooth/PBluetoothChild.h"
|
||||
#include "mozilla/dom/PFMRadioChild.h"
|
||||
@ -111,13 +106,12 @@
|
||||
#include "ProcessUtils.h"
|
||||
#include "StructuredCloneUtils.h"
|
||||
#include "URIUtils.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsDeviceStorage.h"
|
||||
#include "AudioChannelService.h"
|
||||
#include "JavaScriptChild.h"
|
||||
#include "ProcessPriorityManager.h"
|
||||
#include "mozilla/dom/telephony/PTelephonyChild.h"
|
||||
|
||||
using namespace base;
|
||||
using namespace mozilla;
|
||||
@ -509,14 +503,14 @@ ContentChild::RecvDumpGCAndCCLogsToFile(const nsString& aIdentifier,
|
||||
return true;
|
||||
}
|
||||
|
||||
PCompositorChild*
|
||||
bool
|
||||
ContentChild::AllocPCompositorChild(mozilla::ipc::Transport* aTransport,
|
||||
base::ProcessId aOtherProcess)
|
||||
{
|
||||
return CompositorChild::Create(aTransport, aOtherProcess);
|
||||
}
|
||||
|
||||
PImageBridgeChild*
|
||||
bool
|
||||
ContentChild::AllocPImageBridgeChild(mozilla::ipc::Transport* aTransport,
|
||||
base::ProcessId aOtherProcess)
|
||||
{
|
||||
|
@ -9,11 +9,8 @@
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/PContentChild.h"
|
||||
#include "mozilla/dom/TabContext.h"
|
||||
#include "mozilla/dom/ipc/Blob.h"
|
||||
|
||||
#include "nsTArray.h"
|
||||
#include "nsIConsoleListener.h"
|
||||
#include "nsWeakPtr.h"
|
||||
|
||||
struct ChromePackage;
|
||||
class nsIDOMBlob;
|
||||
@ -80,10 +77,10 @@ public:
|
||||
void SetProcessName(const nsAString& aName);
|
||||
const void GetProcessName(nsAString& aName);
|
||||
|
||||
PCompositorChild*
|
||||
bool
|
||||
AllocPCompositorChild(mozilla::ipc::Transport* aTransport,
|
||||
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
|
||||
PImageBridgeChild*
|
||||
bool
|
||||
AllocPImageBridgeChild(mozilla::ipc::Transport* aTransport,
|
||||
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
|
||||
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "mozilla/dom/GeolocationBinding.h"
|
||||
#include "mozilla/dom/telephony/TelephonyParent.h"
|
||||
#include "SmsParent.h"
|
||||
#include "mozilla/Hal.h"
|
||||
#include "mozilla/hal_sandbox/PHalParent.h"
|
||||
#include "mozilla/ipc/TestShellParent.h"
|
||||
#include "mozilla/ipc/InputStreamUtils.h"
|
||||
@ -48,8 +47,6 @@
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsAppRunner.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCDefaultURIFixup.h"
|
||||
@ -59,9 +56,7 @@
|
||||
#include "nsConsoleMessage.h"
|
||||
#include "nsConsoleService.h"
|
||||
#include "nsDebugImpl.h"
|
||||
#include "nsDirectoryServiceDefs.h"
|
||||
#include "nsDOMFile.h"
|
||||
#include "nsExternalHelperAppService.h"
|
||||
#include "nsFrameMessageManager.h"
|
||||
#include "nsHashPropertyBag.h"
|
||||
#include "nsIAlertsService.h"
|
||||
@ -71,6 +66,7 @@
|
||||
#include "nsIDOMGeoGeolocation.h"
|
||||
#include "nsIDOMWakeLock.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIExternalProtocolService.h"
|
||||
#include "nsIFilePicker.h"
|
||||
#include "nsIMemoryReporter.h"
|
||||
#include "nsIMozBrowserFrame.h"
|
||||
@ -79,14 +75,12 @@
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIRemoteBlob.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsIStyleSheet.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIURIFixup.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsStyleSheetService.h"
|
||||
#include "nsSystemInfo.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsToolkitCompsCID.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
@ -99,13 +93,12 @@
|
||||
#include "nsIWebBrowserChrome.h"
|
||||
#include "nsIDocShell.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
# include "gfxAndroidPlatform.h"
|
||||
#if defined(ANDROID) || defined(LINUX)
|
||||
#include "nsSystemInfo.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
# include "nsExceptionHandler.h"
|
||||
# include "nsICrashReporter.h"
|
||||
#ifdef ANDROID
|
||||
# include "gfxAndroidPlatform.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_PERMISSIONS
|
||||
@ -1782,14 +1775,14 @@ ContentParent::Observe(nsISupports* aSubject,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PCompositorParent*
|
||||
bool
|
||||
ContentParent::AllocPCompositorParent(mozilla::ipc::Transport* aTransport,
|
||||
base::ProcessId aOtherProcess)
|
||||
{
|
||||
return CompositorParent::Create(aTransport, aOtherProcess);
|
||||
}
|
||||
|
||||
PImageBridgeParent*
|
||||
bool
|
||||
ContentParent::AllocPImageBridgeParent(mozilla::ipc::Transport* aTransport,
|
||||
base::ProcessId aOtherProcess)
|
||||
{
|
||||
|
@ -7,11 +7,7 @@
|
||||
#ifndef mozilla_dom_ContentParent_h
|
||||
#define mozilla_dom_ContentParent_h
|
||||
|
||||
#include "base/waitable_event_watcher.h"
|
||||
|
||||
#include "mozilla/dom/PContentParent.h"
|
||||
#include "mozilla/dom/PMemoryReportRequestParent.h"
|
||||
#include "mozilla/dom/TabContext.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
#include "mozilla/dom/ipc/Blob.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
@ -22,12 +18,7 @@
|
||||
#include "nsFrameMessageManager.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIThreadInternal.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIPermissionManager.h"
|
||||
#include "nsIDOMGeoPositionCallback.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "PermissionMessageUtils.h"
|
||||
|
||||
#define CHILD_PROCESS_SHUTDOWN_MESSAGE NS_LITERAL_STRING("child-process-shutdown")
|
||||
@ -36,6 +27,7 @@ class mozIApplication;
|
||||
class nsConsoleService;
|
||||
class nsIDOMBlob;
|
||||
class nsIMemoryReporter;
|
||||
template<class KeyClass,class DataType> class nsDataHashtable;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -59,6 +51,8 @@ class Element;
|
||||
class TabParent;
|
||||
class PStorageParent;
|
||||
class ClonedMessageData;
|
||||
class MemoryReport;
|
||||
class TabContext;
|
||||
|
||||
class ContentParent : public PContentParent
|
||||
, public nsIObserver
|
||||
@ -256,10 +250,10 @@ private:
|
||||
*/
|
||||
void ShutDownProcess(bool aCloseWithError);
|
||||
|
||||
PCompositorParent*
|
||||
bool
|
||||
AllocPCompositorParent(mozilla::ipc::Transport* aTransport,
|
||||
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
|
||||
PImageBridgeParent*
|
||||
bool
|
||||
AllocPImageBridgeParent(mozilla::ipc::Transport* aTransport,
|
||||
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
|
||||
|
||||
|
@ -8,10 +8,6 @@
|
||||
#define mozilla_dom_CrashReporterChild_h
|
||||
|
||||
#include "mozilla/dom/PCrashReporterChild.h"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -4,8 +4,7 @@
|
||||
* 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/. */
|
||||
#include "CrashReporterParent.h"
|
||||
|
||||
#include "base/process_util.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#include "mozilla/dom/PCrashReporterParent.h"
|
||||
#include "mozilla/dom/TabMessageUtils.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "nsIFile.h"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "nsIPropertyBag2.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::hal;
|
||||
|
@ -8,10 +8,8 @@
|
||||
#define mozilla_PreallocatedProcessManager_h
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -16,25 +16,14 @@
|
||||
#include "AudioChannelService.h"
|
||||
#include "prlog.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsWeakPtr.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "nsIFrameLoader.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMEventListener.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "StaticPtr.h"
|
||||
#include "nsIMozBrowserFrame.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "prlog.h"
|
||||
#include "nsIPropertyBag2.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include <process.h>
|
||||
|
@ -8,9 +8,6 @@
|
||||
#define mozilla_ProcessPriorityManager_h_
|
||||
|
||||
#include "mozilla/HalTypes.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsDataHashtable.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsJSEnvironment.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "MainThreadUtils.h"
|
||||
#include "StructuredCloneTags.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
|
@ -9,28 +9,23 @@
|
||||
#include "TabChild.h"
|
||||
|
||||
#include "Layers.h"
|
||||
#include "Blob.h"
|
||||
#include "ContentChild.h"
|
||||
#include "IndexedDBChild.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/IntentionalCrash.h"
|
||||
#include "mozilla/docshell/OfflineCacheUpdateChild.h"
|
||||
#include "mozilla/dom/PContentChild.h"
|
||||
#include "mozilla/dom/PContentDialogChild.h"
|
||||
#include "mozilla/ipc/DocumentRendererChild.h"
|
||||
#include "mozilla/ipc/FileDescriptorUtils.h"
|
||||
#include "mozilla/layers/AsyncPanZoomController.h"
|
||||
#include "mozilla/layers/CompositorChild.h"
|
||||
#include "mozilla/layers/ImageBridgeChild.h"
|
||||
#include "mozilla/layers/PLayerTransactionChild.h"
|
||||
#include "mozilla/layers/ShadowLayers.h"
|
||||
#include "mozilla/layout/RenderFrameChild.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "mozIApplication.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsCxPusher.h"
|
||||
#include "nsEmbedCID.h"
|
||||
@ -40,51 +35,32 @@
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsIAppsService.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsICachedFileDescriptorListener.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIDialogParamBlock.h"
|
||||
#include "nsIDocumentInlines.h"
|
||||
#include "nsIDOMClassInfo.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDOMWindowUtils.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIJSRuntimeService.h"
|
||||
#include "nsISSLStatusProvider.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsISecureBrowserUI.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIURIFixup.h"
|
||||
#include "nsCDefaultURIFixup.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIWebBrowser.h"
|
||||
#include "nsIWebBrowserFocus.h"
|
||||
#include "nsIWebBrowserSetup.h"
|
||||
#include "nsIWebProgress.h"
|
||||
#include "nsIXPCSecurityManager.h"
|
||||
#include "nsInterfaceHashtable.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsPIWindowRoot.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsScriptLoader.h"
|
||||
#include "nsSerializationHelper.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "PCOMContentPermissionRequestChild.h"
|
||||
#include "PuppetWidget.h"
|
||||
#include "StructuredCloneUtils.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "nsViewportInfo.h"
|
||||
#include "JavaScriptChild.h"
|
||||
#include "APZCCallbackHelper.h"
|
||||
|
@ -18,31 +18,23 @@
|
||||
#include "nsIWebBrowserChrome2.h"
|
||||
#include "nsIEmbeddingSiteWindow.h"
|
||||
#include "nsIWebBrowserChromeFocus.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIDOMEventListener.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIWindowProvider.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsFrameMessageManager.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "nsIDialogCreator.h"
|
||||
#include "nsIDialogParamBlock.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsIScriptObjectPrincipal.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsITabChild.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "FrameMetrics.h"
|
||||
#include "ProcessUtils.h"
|
||||
#include "mozilla/dom/TabContext.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
|
||||
struct gfxMatrix;
|
||||
class nsICachedFileDescriptorListener;
|
||||
|
@ -5,9 +5,11 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/dom/TabContext.h"
|
||||
#include "mozilla/dom/PTabContext.h"
|
||||
#include "mozilla/dom/TabParent.h"
|
||||
#include "mozilla/dom/TabChild.h"
|
||||
#include "nsIAppsService.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
|
||||
#define NO_APP_ID (nsIScriptSecurityManager::NO_APP_ID)
|
||||
|
||||
|
@ -7,16 +7,15 @@
|
||||
#ifndef mozilla_dom_TabContext_h
|
||||
#define mozilla_dom_TabContext_h
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/dom/PContent.h"
|
||||
#include "mozilla/dom/PBrowser.h"
|
||||
#include "mozilla/layout/RenderFrameUtils.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "mozIApplication.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
struct IPCTabContext;
|
||||
|
||||
/**
|
||||
* TabContext encapsulates information about an iframe that may be a mozbrowser
|
||||
* or mozapp. You can ask whether a TabContext corresponds to a mozbrowser or
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
#include "TabParent.h"
|
||||
|
||||
#include "Blob.h"
|
||||
#include "IDBFactory.h"
|
||||
#include "IndexedDBParent.h"
|
||||
#include "mozIApplication.h"
|
||||
@ -25,38 +24,34 @@
|
||||
#include "nsContentPermissionHelper.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsEventDispatcher.h"
|
||||
#include "nsEventStateManager.h"
|
||||
#include "nsFocusManager.h"
|
||||
#include "nsFrameLoader.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDOMApplicationRegistry.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "nsIDOMHTMLFrameElement.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDialogCreator.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIPromptFactory.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIMozBrowserFrame.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsIWebBrowserChrome.h"
|
||||
#include "nsIXULBrowserWindow.h"
|
||||
#include "nsIXULWindow.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsSerializationHelper.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "private/pprio.h"
|
||||
#include "StructuredCloneUtils.h"
|
||||
#include "JavaScriptParent.h"
|
||||
#include "TabChild.h"
|
||||
#include "nsNetCID.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
@ -7,25 +7,19 @@
|
||||
#ifndef mozilla_tabs_TabParent_h
|
||||
#define mozilla_tabs_TabParent_h
|
||||
|
||||
#include "base/basictypes.h"
|
||||
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/dom/PBrowserParent.h"
|
||||
#include "mozilla/dom/PContentDialogParent.h"
|
||||
#include "mozilla/dom/TabContext.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIAuthPromptProvider.h"
|
||||
#include "nsIBrowserDOMWindow.h"
|
||||
#include "nsIDialogParamBlock.h"
|
||||
#include "nsISecureBrowserUI.h"
|
||||
#include "nsITabParent.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "Units.h"
|
||||
#include "js/TypeDecls.h"
|
||||
|
||||
struct gfxMatrix;
|
||||
class mozIApplication;
|
||||
class nsFrameLoader;
|
||||
class nsIURI;
|
||||
class CpowHolder;
|
||||
@ -44,6 +38,7 @@ class RenderFrameParent;
|
||||
namespace dom {
|
||||
|
||||
class ClonedMessageData;
|
||||
class ContentParent;
|
||||
class Element;
|
||||
struct StructuredCloneData;
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "mozilla/dom/PBrowserChild.h"
|
||||
#include "mozilla/dom/TabChild.h"
|
||||
#include "mozilla/dom/MediaStreamTrackBinding.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
|
||||
#define AUDIO_PERMISSION_NAME "audio-capture"
|
||||
|
||||
|
@ -113,18 +113,32 @@ function getUserMedia(constraints, onSuccess, onError) {
|
||||
* Test method to execute after initialization
|
||||
*/
|
||||
function runTest(aCallback) {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({'set': [
|
||||
['media.peerconnection.enabled', true],
|
||||
['media.navigator.permission.disabled', true]]
|
||||
}, function () {
|
||||
try {
|
||||
aCallback();
|
||||
}
|
||||
catch (err) {
|
||||
unexpectedCallbackAndFinish()(err);
|
||||
}
|
||||
});
|
||||
if (window.SimpleTest) {
|
||||
// Running as a Mochitest.
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({'set': [
|
||||
['media.peerconnection.enabled', true],
|
||||
['media.navigator.permission.disabled', true]]
|
||||
}, function () {
|
||||
try {
|
||||
aCallback();
|
||||
}
|
||||
catch (err) {
|
||||
unexpectedCallbackAndFinish()(err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Steeplechase, let it call the callback.
|
||||
window.run_test = function(is_initiator) {
|
||||
var options = {is_local: is_initiator,
|
||||
is_remote: !is_initiator};
|
||||
aCallback(options);
|
||||
};
|
||||
// Also load the steeplechase test code.
|
||||
var s = document.createElement("script");
|
||||
s.src = "/test.js";
|
||||
document.head.appendChild(s);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -224,6 +224,20 @@ CommandChain.prototype = {
|
||||
this.insertBefore(id, commands);
|
||||
|
||||
return oldCommands;
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove all commands whose identifiers match the specified regex.
|
||||
*
|
||||
* @param {regex} id_match
|
||||
* Regular expression to match command identifiers.
|
||||
*/
|
||||
filterOut : function (id_match) {
|
||||
for (var i = this._commands.length - 1; i >= 0; i--) {
|
||||
if (id_match.test(this._commands[i][0])) {
|
||||
this._commands.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -318,6 +332,10 @@ MediaElementChecker.prototype = {
|
||||
* Optional options for the peer connection test
|
||||
* @param {object} [options.commands=commandsPeerConnection]
|
||||
* Commands to run for the test
|
||||
* @param {bool} [options.is_local=true]
|
||||
* true if this test should run the tests for the "local" side.
|
||||
* @param {bool} [options.is_remote=true]
|
||||
* true if this test should run the tests for the "remote" side.
|
||||
* @param {object} [options.config_pc1=undefined]
|
||||
* Configuration for the local peer connection instance
|
||||
* @param {object} [options.config_pc2=undefined]
|
||||
@ -328,19 +346,34 @@ function PeerConnectionTest(options) {
|
||||
// If no options are specified make it an empty object
|
||||
options = options || { };
|
||||
options.commands = options.commands || commandsPeerConnection;
|
||||
options.is_local = "is_local" in options ? options.is_local : true;
|
||||
options.is_remote = "is_remote" in options ? options.is_remote : true;
|
||||
|
||||
this.pcLocal = new PeerConnectionWrapper('pcLocal', options.config_pc1);
|
||||
this.pcRemote = new PeerConnectionWrapper('pcRemote', options.config_pc2 || options.config_pc1);
|
||||
if (options.is_local)
|
||||
this.pcLocal = new PeerConnectionWrapper('pcLocal', options.config_pc1);
|
||||
else
|
||||
this.pcLocal = null;
|
||||
|
||||
if (options.is_remote)
|
||||
this.pcRemote = new PeerConnectionWrapper('pcRemote', options.config_pc2 || options.config_pc1);
|
||||
else
|
||||
this.pcRemote = null;
|
||||
|
||||
this.connected = false;
|
||||
|
||||
// Create command chain instance and assign default commands
|
||||
this.chain = new CommandChain(this, options.commands);
|
||||
if (!options.is_local) {
|
||||
this.chain.filterOut(/^PC_LOCAL/);
|
||||
}
|
||||
if (!options.is_remote) {
|
||||
this.chain.filterOut(/^PC_REMOTE/);
|
||||
}
|
||||
|
||||
var self = this;
|
||||
this.chain.onFinished = function () {
|
||||
self.teardown();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@ -354,8 +387,10 @@ PeerConnectionTest.prototype.close = function PCT_close(onSuccess) {
|
||||
|
||||
// There is no onclose event for the remote peer existent yet. So close it
|
||||
// side-by-side with the local peer.
|
||||
this.pcLocal.close();
|
||||
this.pcRemote.close();
|
||||
if (this.pcLocal)
|
||||
this.pcLocal.close();
|
||||
if (this.pcRemote)
|
||||
this.pcRemote.close();
|
||||
this.connected = false;
|
||||
|
||||
onSuccess();
|
||||
@ -444,8 +479,10 @@ function PCT_setLocalDescription(peer, desc, onSuccess) {
|
||||
*/
|
||||
PeerConnectionTest.prototype.setMediaConstraints =
|
||||
function PCT_setMediaConstraints(constraintsLocal, constraintsRemote) {
|
||||
this.pcLocal.constraints = constraintsLocal;
|
||||
this.pcRemote.constraints = constraintsRemote;
|
||||
if (this.pcLocal)
|
||||
this.pcLocal.constraints = constraintsLocal;
|
||||
if (this.pcRemote)
|
||||
this.pcRemote.constraints = constraintsRemote;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -455,7 +492,8 @@ function PCT_setMediaConstraints(constraintsLocal, constraintsRemote) {
|
||||
*/
|
||||
PeerConnectionTest.prototype.setOfferConstraints =
|
||||
function PCT_setOfferConstraints(constraints) {
|
||||
this.pcLocal.offerConstraints = constraints;
|
||||
if (this.pcLocal)
|
||||
this.pcLocal.offerConstraints = constraints;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -506,7 +544,10 @@ PeerConnectionTest.prototype.run = function PCT_run() {
|
||||
PeerConnectionTest.prototype.teardown = function PCT_teardown() {
|
||||
this.close(function () {
|
||||
info("Test finished");
|
||||
SimpleTest.finish();
|
||||
if (window.SimpleTest)
|
||||
SimpleTest.finish();
|
||||
else
|
||||
finish();
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -19,10 +19,16 @@ var commandsPeerConnection = [
|
||||
}
|
||||
],
|
||||
[
|
||||
'PC_CHECK_INITIAL_SIGNALINGSTATE',
|
||||
'PC_LOCAL_CHECK_INITIAL_SIGNALINGSTATE',
|
||||
function (test) {
|
||||
is(test.pcLocal.signalingState, "stable",
|
||||
"Initial local signalingState is 'stable'");
|
||||
test.next();
|
||||
}
|
||||
],
|
||||
[
|
||||
'PC_REMOTE_CHECK_INITIAL_SIGNALINGSTATE',
|
||||
function (test) {
|
||||
is(test.pcRemote.signalingState, "stable",
|
||||
"Initial remote signalingState is 'stable'");
|
||||
test.next();
|
||||
@ -34,6 +40,10 @@ var commandsPeerConnection = [
|
||||
test.createOffer(test.pcLocal, function () {
|
||||
is(test.pcLocal.signalingState, "stable",
|
||||
"Local create offer does not change signaling state");
|
||||
if (!test.pcRemote) {
|
||||
send_message({"offer": test.pcLocal._last_offer,
|
||||
"media_constraints": test.pcLocal.constraints});
|
||||
}
|
||||
test.next();
|
||||
});
|
||||
}
|
||||
@ -48,10 +58,27 @@ var commandsPeerConnection = [
|
||||
});
|
||||
}
|
||||
],
|
||||
[
|
||||
'PC_REMOTE_GET_OFFER',
|
||||
function (test) {
|
||||
if (test.pcLocal) {
|
||||
test._local_offer = test.pcLocal._last_offer;
|
||||
test._local_constraints = test.pcLocal.constraints;
|
||||
test.next();
|
||||
} else {
|
||||
wait_for_message().then(function(message) {
|
||||
ok("offer" in message, "Got an offer message");
|
||||
test._local_offer = new mozRTCSessionDescription(message.offer);
|
||||
test._local_constraints = message.media_constraints;
|
||||
test.next();
|
||||
});
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
'PC_REMOTE_SET_REMOTE_DESCRIPTION',
|
||||
function (test) {
|
||||
test.setRemoteDescription(test.pcRemote, test.pcLocal._last_offer, function () {
|
||||
test.setRemoteDescription(test.pcRemote, test._local_offer, function () {
|
||||
is(test.pcRemote.signalingState, "have-remote-offer",
|
||||
"signalingState after remote setRemoteDescription is 'have-remote-offer'");
|
||||
test.next();
|
||||
@ -64,14 +91,35 @@ var commandsPeerConnection = [
|
||||
test.createAnswer(test.pcRemote, function () {
|
||||
is(test.pcRemote.signalingState, "have-remote-offer",
|
||||
"Remote createAnswer does not change signaling state");
|
||||
if (!test.pcLocal) {
|
||||
send_message({"answer": test.pcRemote._last_answer,
|
||||
"media_constraints": test.pcRemote.constraints});
|
||||
}
|
||||
test.next();
|
||||
});
|
||||
}
|
||||
],
|
||||
[
|
||||
'PC_LOCAL_GET_ANSWER',
|
||||
function (test) {
|
||||
if (test.pcRemote) {
|
||||
test._remote_answer = test.pcRemote._last_answer;
|
||||
test._remote_constraints = test.pcRemote.constraints;
|
||||
test.next();
|
||||
} else {
|
||||
wait_for_message().then(function(message) {
|
||||
ok("answer" in message, "Got an answer message");
|
||||
test._remote_answer = new mozRTCSessionDescription(message.answer);
|
||||
test._remote_constraints = message.media_constraints;
|
||||
test.next();
|
||||
});
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
'PC_LOCAL_SET_REMOTE_DESCRIPTION',
|
||||
function (test) {
|
||||
test.setRemoteDescription(test.pcLocal, test.pcRemote._last_answer, function () {
|
||||
test.setRemoteDescription(test.pcLocal, test._remote_answer, function () {
|
||||
is(test.pcLocal.signalingState, "stable",
|
||||
"signalingState after local setRemoteDescription is 'stable'");
|
||||
test.next();
|
||||
@ -91,14 +139,14 @@ var commandsPeerConnection = [
|
||||
[
|
||||
'PC_LOCAL_CHECK_MEDIA_STREAMS',
|
||||
function (test) {
|
||||
test.pcLocal.checkMediaStreams(test.pcRemote.constraints);
|
||||
test.pcLocal.checkMediaStreams(test._remote_constraints);
|
||||
test.next();
|
||||
}
|
||||
],
|
||||
[
|
||||
'PC_REMOTE_CHECK_MEDIA_STREAMS',
|
||||
function (test) {
|
||||
test.pcRemote.checkMediaStreams(test.pcLocal.constraints);
|
||||
test.pcRemote.checkMediaStreams(test._local_constraints);
|
||||
test.next();
|
||||
}
|
||||
],
|
||||
|
@ -17,8 +17,8 @@
|
||||
});
|
||||
|
||||
var test;
|
||||
runTest(function () {
|
||||
test = new PeerConnectionTest();
|
||||
runTest(function (options) {
|
||||
test = new PeerConnectionTest(options);
|
||||
test.setMediaConstraints([{audio: true}], [{audio: true}]);
|
||||
test.run();
|
||||
});
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
|
||||
#include "MobileMessageThread.h"
|
||||
#include "MainThreadUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "mozilla/net/PNeckoParent.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/dom/TabParent.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
|
||||
namespace IPC {
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsIPluginTag.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
class nsPluginHost;
|
||||
struct PRLibrary;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "prmem.h"
|
||||
#include "prenv.h"
|
||||
#include "prerror.h"
|
||||
#include "prio.h"
|
||||
#include <sys/stat.h>
|
||||
#include "nsString.h"
|
||||
#include "nsIFile.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "npapi.h"
|
||||
#include "npruntime.h"
|
||||
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace plugins {
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "npruntime.h"
|
||||
#include "npfunctions.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "prlog.h"
|
||||
#include "nsHashKeys.h"
|
||||
|
@ -493,19 +493,10 @@ PluginModuleParent::TerminateChildProcess(MessageLoop* aMsgLoop)
|
||||
// this must run before the error notification from the channel,
|
||||
// or not at all
|
||||
bool isFromHangUI = aMsgLoop != MessageLoop::current();
|
||||
if (isFromHangUI) {
|
||||
// If we're posting from a different thread we can't create
|
||||
// the task via mTaskFactory
|
||||
aMsgLoop->PostTask(FROM_HERE,
|
||||
NewRunnableMethod(this,
|
||||
&PluginModuleParent::CleanupFromTimeout,
|
||||
isFromHangUI));
|
||||
} else {
|
||||
aMsgLoop->PostTask(
|
||||
FROM_HERE,
|
||||
mTaskFactory.NewRunnableMethod(
|
||||
&PluginModuleParent::CleanupFromTimeout, isFromHangUI));
|
||||
}
|
||||
aMsgLoop->PostTask(
|
||||
FROM_HERE,
|
||||
mTaskFactory.NewRunnableMethod(
|
||||
&PluginModuleParent::CleanupFromTimeout, isFromHangUI));
|
||||
|
||||
if (!KillProcess(OtherProcess(), 1, false))
|
||||
NS_WARNING("failed to kill subprocess!");
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "base/process.h"
|
||||
#include "mozilla/FileUtils.h"
|
||||
#include "mozilla/PluginLibrary.h"
|
||||
#include "mozilla/plugins/ScopedMethodFactory.h"
|
||||
#include "mozilla/plugins/PluginProcessParent.h"
|
||||
#include "mozilla/plugins/PPluginModuleParent.h"
|
||||
#include "npapi.h"
|
||||
@ -302,7 +303,7 @@ private:
|
||||
const NPNetscapeFuncs* mNPNIface;
|
||||
nsDataHashtable<nsPtrHashKey<void>, PluginIdentifierParent*> mIdentifiers;
|
||||
nsNPAPIPlugin* mPlugin;
|
||||
ScopedRunnableMethodFactory<PluginModuleParent> mTaskFactory;
|
||||
ScopedMethodFactory<PluginModuleParent> mTaskFactory;
|
||||
nsString mPluginDumpID;
|
||||
nsString mBrowserDumpID;
|
||||
nsString mHangID;
|
||||
|
87
dom/plugins/ipc/ScopedMethodFactory.h
Normal file
87
dom/plugins/ipc/ScopedMethodFactory.h
Normal file
@ -0,0 +1,87 @@
|
||||
/* 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/. */
|
||||
|
||||
#ifndef mozilla_plugins_ScopedMethodFactory_h
|
||||
#define mozilla_plugins_ScopedMethodFactory_h
|
||||
|
||||
#include <base/task.h>
|
||||
|
||||
/*
|
||||
* This is based on the ScopedRunnableMethodFactory from ipc/chromium/src/base/task.h
|
||||
* Chromiums factories assert if tasks are created and run on different threads,
|
||||
* which is something we need to do in PluginModuleParent (hang UI vs. main thread).
|
||||
* ScopedMethodFactory just provides cancellable tasks that don't assert this.
|
||||
*/
|
||||
|
||||
namespace mozilla {
|
||||
namespace plugins {
|
||||
|
||||
template<class T>
|
||||
class ScopedMethodFactory : public RevocableStore
|
||||
{
|
||||
private:
|
||||
template<class TaskType>
|
||||
class TaskWrapper : public TaskType
|
||||
{
|
||||
public:
|
||||
explicit TaskWrapper(RevocableStore* store) : revocable_(store) { }
|
||||
|
||||
virtual void Run() {
|
||||
if (!revocable_.revoked())
|
||||
TaskType::Run();
|
||||
}
|
||||
|
||||
private:
|
||||
Revocable revocable_;
|
||||
};
|
||||
|
||||
public:
|
||||
explicit ScopedMethodFactory(T* object) : object_(object) { }
|
||||
|
||||
template <class Method>
|
||||
inline Task* NewRunnableMethod(Method method) {
|
||||
typedef TaskWrapper<RunnableMethod<Method, Tuple0> > TaskWrapper;
|
||||
|
||||
TaskWrapper* task = new TaskWrapper(this);
|
||||
task->Init(object_, method, MakeTuple());
|
||||
return task;
|
||||
}
|
||||
|
||||
template <class Method, class A>
|
||||
inline Task* NewRunnableMethod(Method method, const A& a) {
|
||||
typedef TaskWrapper<RunnableMethod<Method, Tuple1<A> > > TaskWrapper;
|
||||
|
||||
TaskWrapper* task = new TaskWrapper(this);
|
||||
task->Init(object_, method, MakeTuple(a));
|
||||
return task;
|
||||
}
|
||||
|
||||
protected:
|
||||
template <class Method, class Params>
|
||||
class RunnableMethod : public Task {
|
||||
public:
|
||||
RunnableMethod() { }
|
||||
|
||||
void Init(T* obj, Method meth, const Params& params) {
|
||||
obj_ = obj;
|
||||
meth_ = meth;
|
||||
params_ = params;
|
||||
}
|
||||
|
||||
virtual void Run() { DispatchToMethod(obj_, meth_, params_); }
|
||||
|
||||
private:
|
||||
T* obj_;
|
||||
Method meth_;
|
||||
Params params_;
|
||||
};
|
||||
|
||||
private:
|
||||
T* object_;
|
||||
};
|
||||
|
||||
} // namespace plugins
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_plugins_ScopedMethodFactory_h
|
@ -39,6 +39,7 @@ EXPORTS.mozilla.plugins += [
|
||||
'PluginStreamChild.h',
|
||||
'PluginStreamParent.h',
|
||||
'PluginUtilsOSX.h',
|
||||
'ScopedMethodFactory.h',
|
||||
'StreamNotifyChild.h',
|
||||
'StreamNotifyParent.h',
|
||||
]
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIPropertyBag2.h"
|
||||
|
||||
DOMCI_DATA(MozWakeLock, mozilla::dom::power::WakeLock)
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "FileStreams.h"
|
||||
|
||||
#include "QuotaManager.h"
|
||||
#include "prio.h"
|
||||
|
||||
USING_QUOTA_NAMESPACE
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
#define BEGIN_QUOTA_NAMESPACE \
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "nsIAppsService.h"
|
||||
#include "PCOMContentPermissionRequestChild.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "nsToolkitCompsCID.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "nsDOMJSUtils.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#ifdef MOZ_B2G
|
||||
#include "nsIDOMDesktopNotification.h"
|
||||
#include "nsIAppsService.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "nsIDiskSpaceWatcher.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
class nsIWorkerHolder;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "nsIVolume.h"
|
||||
#include "nsIVolumeService.h"
|
||||
#include "nsString.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
#define VOLUME_MANAGER_LOG_TAG "nsVolumeMountLock"
|
||||
#include "VolumeManagerLog.h"
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
#define BEGIN_TELEPHONY_NAMESPACE \
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsNativeCharsetUtils.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#include "WorkerPrivate.h"
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "jsfriendapi.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#include "mozilla/dom/Exceptions.h"
|
||||
#include "WorkerInlines.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "mozilla/dom/workers/bindings/DOMBindingBase.h"
|
||||
|
||||
#include "nsICharsetDetectionObserver.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsIInputStream;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "Workers.h"
|
||||
#include "mozilla/dom/workers/bindings/DOMBindingBase.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
BEGIN_WORKERS_NAMESPACE
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "nsClassHashtable.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
class nsIThread;
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsScriptLoader.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsXPCOM.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsEventQueue.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsTPriorityQueue.h"
|
||||
#include "StructuredCloneTags.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#define BEGIN_WORKERS_NAMESPACE \
|
||||
namespace mozilla { namespace dom { namespace workers {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user