Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef nsPrintPreviewListener_h__ |
michael@0 | 8 | #define nsPrintPreviewListener_h__ |
michael@0 | 9 | |
michael@0 | 10 | // Interfaces needed to be included |
michael@0 | 11 | #include "nsIDOMEventListener.h" |
michael@0 | 12 | // Helper Classes |
michael@0 | 13 | #include "nsCOMPtr.h" |
michael@0 | 14 | #include "mozilla/Attributes.h" |
michael@0 | 15 | |
michael@0 | 16 | namespace mozilla { |
michael@0 | 17 | namespace dom { |
michael@0 | 18 | class EventTarget; |
michael@0 | 19 | } |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | // |
michael@0 | 23 | // class nsPrintPreviewListener |
michael@0 | 24 | // |
michael@0 | 25 | // The class that listens to the chrome events and tells the embedding |
michael@0 | 26 | // chrome to show context menus, as appropriate. Handles registering itself |
michael@0 | 27 | // with the DOM with AddChromeListeners() and removing itself with |
michael@0 | 28 | // RemoveChromeListeners(). |
michael@0 | 29 | // |
michael@0 | 30 | class nsPrintPreviewListener MOZ_FINAL : public nsIDOMEventListener |
michael@0 | 31 | |
michael@0 | 32 | { |
michael@0 | 33 | public: |
michael@0 | 34 | NS_DECL_ISUPPORTS |
michael@0 | 35 | NS_DECL_NSIDOMEVENTLISTENER |
michael@0 | 36 | |
michael@0 | 37 | nsPrintPreviewListener(mozilla::dom::EventTarget* aTarget); |
michael@0 | 38 | ~nsPrintPreviewListener(); |
michael@0 | 39 | |
michael@0 | 40 | // Add/remove the relevant listeners, based on what interfaces |
michael@0 | 41 | // the embedding chrome implements. |
michael@0 | 42 | nsresult AddListeners(); |
michael@0 | 43 | nsresult RemoveListeners(); |
michael@0 | 44 | |
michael@0 | 45 | private: |
michael@0 | 46 | |
michael@0 | 47 | nsCOMPtr<mozilla::dom::EventTarget> mEventTarget; |
michael@0 | 48 | |
michael@0 | 49 | }; // class nsPrintPreviewListener |
michael@0 | 50 | |
michael@0 | 51 | |
michael@0 | 52 | |
michael@0 | 53 | #endif /* nsPrintPreviewListener_h__ */ |