/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* 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/. */
class nsGlobalWindowOuter; class nsGlobalWindowInner; class nsIPrincipal; class nsIURI;
namespace mozilla { class ErrorResult;
namespace dom {
class BrowsingContext; class Event; class EventTarget;
/** * Class used to represent events generated by calls to Window.postMessage, * which asynchronously creates and dispatches events.
*/ class PostMessageEvent final : public Runnable { public:
NS_DECL_NSIRUNNABLE
// TODO: Convert this to MOZ_CAN_RUN_SCRIPT (bug 1415230)
MOZ_CAN_RUN_SCRIPT_BOUNDARY void DispatchError(
JSContext* aCx, nsGlobalWindowInner* aTargetWindow,
mozilla::dom::EventTarget* aEventTarget);
RefPtr<BrowsingContext> mSource;
nsString mCallerOrigin;
RefPtr<nsGlobalWindowOuter> mTargetWindow;
nsCOMPtr<nsIPrincipal> mProvidedPrincipal; // If the postMessage call was made on a WindowProxy whose Window lives in a // separate process then mHolder will contain a StructuredCloneData, else // it'll contain a StructuredCloneHolder.
MaybeOneOf<StructuredCloneHolder, ipc::StructuredCloneData> mHolder;
uint64_t mCallerWindowID; const Maybe<nsID> mCallerAgentClusterId;
nsCOMPtr<nsIURI> mCallerURI; // if callerURI is null, then we can use script location for reporting errors // to console const Maybe<nsCString> mScriptLocation; // This is only set to a relevant value if mCallerWindowID doesn't contain a // value. bool mIsFromPrivateWindow;
};
} // namespace dom
} // namespace mozilla
#endif// mozilla_dom_PostMessageEvent_h
¤ Dauer der Verarbeitung: 0.21 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.