embedding/components/commandhandler/src/nsCommandManager.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     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 nsCommandManager_h__
     7 #define nsCommandManager_h__
    10 #include "nsString.h"
    11 #include "nsClassHashtable.h"
    12 #include "nsWeakReference.h"
    14 #include "nsICommandManager.h"
    15 #include "nsPICommandUpdater.h"
    16 #include "nsCycleCollectionParticipant.h"
    18 class nsIController;
    19 template<class E> class nsCOMArray;
    22 class nsCommandManager :  public nsICommandManager,
    23                           public nsPICommandUpdater,
    24                           public nsSupportsWeakReference
    26 {
    27 public:
    28   typedef nsTArray<nsCOMPtr<nsIObserver> > ObserverList;
    30                         nsCommandManager();
    31   virtual               ~nsCommandManager();
    33   // nsISupports
    34   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    35   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsCommandManager, nsICommandManager)
    37   // nsICommandManager
    38   NS_DECL_NSICOMMANDMANAGER
    40   // nsPICommandUpdater
    41   NS_DECL_NSPICOMMANDUPDATER
    44 protected:
    47   nsresult  IsCallerChrome(bool *aIsCallerChrome);
    48   nsresult  GetControllerForCommand(const char * aCommand,
    49                                     nsIDOMWindow *aDirectedToThisWindow,
    50                                     nsIController** outController);
    53 protected:
    54   nsClassHashtable<nsCharPtrHashKey, ObserverList> mObserversTable;
    56   nsIDOMWindow*         mWindow;      // weak ptr. The window should always outlive us
    57 };
    60 #endif // nsCommandManager_h__

mercurial