Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_CommandEvent_h_
7 #define mozilla_dom_CommandEvent_h_
9 #include "mozilla/EventForwards.h"
10 #include "mozilla/dom/CommandEventBinding.h"
11 #include "mozilla/dom/Event.h"
12 #include "nsIDOMCommandEvent.h"
14 namespace mozilla {
15 namespace dom {
17 class CommandEvent : public Event,
18 public nsIDOMCommandEvent
19 {
20 public:
21 CommandEvent(EventTarget* aOwner,
22 nsPresContext* aPresContext,
23 WidgetCommandEvent* aEvent);
25 NS_DECL_ISUPPORTS_INHERITED
27 NS_DECL_NSIDOMCOMMANDEVENT
29 // Forward to base class
30 NS_FORWARD_TO_EVENT
32 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE
33 {
34 return CommandEventBinding::Wrap(aCx, this);
35 }
37 void InitCommandEvent(const nsAString& aType,
38 bool aCanBubble,
39 bool aCancelable,
40 const nsAString& aCommand,
41 ErrorResult& aRv)
42 {
43 aRv = InitCommandEvent(aType, aCanBubble, aCancelable, aCommand);
44 }
45 };
47 } // namespace dom
48 } // namespace mozilla
50 #endif // mozilla_dom_CommandEvent_h_