Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef nsBaseCommandController_h__ |
michael@0 | 7 | #define nsBaseCommandController_h__ |
michael@0 | 8 | |
michael@0 | 9 | #define NS_BASECOMMANDCONTROLLER_CID \ |
michael@0 | 10 | { 0xbf88b48c, 0xfd8e, 0x40b4, { 0xba, 0x36, 0xc7, 0xc3, 0xad, 0x6d, 0x8a, 0xc9 } } |
michael@0 | 11 | #define NS_BASECOMMANDCONTROLLER_CONTRACTID \ |
michael@0 | 12 | "@mozilla.org/embedcomp/base-command-controller;1" |
michael@0 | 13 | |
michael@0 | 14 | |
michael@0 | 15 | #include "nsIController.h" |
michael@0 | 16 | #include "nsIControllerContext.h" |
michael@0 | 17 | #include "nsIControllerCommandTable.h" |
michael@0 | 18 | #include "nsIInterfaceRequestor.h" |
michael@0 | 19 | #include "nsIWeakReferenceUtils.h" |
michael@0 | 20 | |
michael@0 | 21 | // The base editor controller is used for both text widgets, |
michael@0 | 22 | // and all other text and html editing |
michael@0 | 23 | class nsBaseCommandController : public nsIController, |
michael@0 | 24 | public nsIControllerContext, |
michael@0 | 25 | public nsIInterfaceRequestor, |
michael@0 | 26 | public nsICommandController |
michael@0 | 27 | { |
michael@0 | 28 | public: |
michael@0 | 29 | |
michael@0 | 30 | nsBaseCommandController(); |
michael@0 | 31 | virtual ~nsBaseCommandController(); |
michael@0 | 32 | |
michael@0 | 33 | // nsISupports |
michael@0 | 34 | NS_DECL_ISUPPORTS |
michael@0 | 35 | |
michael@0 | 36 | // nsIController |
michael@0 | 37 | NS_DECL_NSICONTROLLER |
michael@0 | 38 | |
michael@0 | 39 | // nsICommandController |
michael@0 | 40 | NS_DECL_NSICOMMANDCONTROLLER |
michael@0 | 41 | |
michael@0 | 42 | //nsIControllerContext |
michael@0 | 43 | NS_DECL_NSICONTROLLERCONTEXT |
michael@0 | 44 | |
michael@0 | 45 | // nsIInterfaceRequestor |
michael@0 | 46 | NS_DECL_NSIINTERFACEREQUESTOR |
michael@0 | 47 | |
michael@0 | 48 | private: |
michael@0 | 49 | |
michael@0 | 50 | nsWeakPtr mCommandContextWeakPtr; |
michael@0 | 51 | nsISupports* mCommandContextRawPtr; |
michael@0 | 52 | |
michael@0 | 53 | // Our reference to the command manager |
michael@0 | 54 | nsCOMPtr<nsIControllerCommandTable> mCommandTable; |
michael@0 | 55 | }; |
michael@0 | 56 | |
michael@0 | 57 | #endif /* nsBaseCommandController_h_ */ |
michael@0 | 58 |