/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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/. */ #ifndef mozilla_dom_TabContext_h #define mozilla_dom_TabContext_h #include "mozIApplication.h" #include "nsCOMPtr.h" #include "mozilla/BasePrincipal.h" #include "nsPIDOMWindow.h" #include "nsPIWindowRoot.h" namespace mozilla { namespace dom { class IPCTabContext; /** * TabContext encapsulates information about an iframe that may be a mozbrowser * or mozapp. You can ask whether a TabContext corresponds to a mozbrowser or * mozapp, get the app that contains the browser, and so on. * * TabParent and TabChild both inherit from TabContext, and you can also have * standalone TabContext objects. * * This class is immutable except by calling one of the protected * SetTabContext*() methods (and those methods can only be called once). See * also MutableTabContext. */ class TabContext { public: TabContext(); /* (The implicit copy-constructor and operator= are fine.) */ /** * Generates IPCTabContext of type BrowserFrameIPCTabContext or * AppFrameIPCTabContext from this TabContext's information. */ IPCTabContext AsIPCTabContext() const; /** * Does this TabContext correspond to a mozbrowser? * *