Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Attributes | Private Attributes
nsScrollbarsProp Class Reference

#include <nsBarProps.h>

Inheritance diagram for nsScrollbarsProp:
Inheritance graph
[legend]
Collaboration diagram for nsScrollbarsProp:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsScrollbarsProp (nsGlobalWindow *aWindow)
virtual ~nsScrollbarsProp ()
NS_DECL_ISUPPORTS NS_IMETHOD SetWebBrowserChrome (nsIWebBrowserChrome *aBrowserChrome)
NS_IMETHOD GetVisibleByFlag (PRBool *aVisible, PRUint32 aChromeFlag)
NS_IMETHOD SetVisibleByFlag (PRBool aVisible, PRUint32 aChromeFlag)

Public Attributes

attribute boolean visible

Protected Attributes

nsIWebBrowserChromemBrowserChrome

Private Attributes

nsGlobalWindowmDOMWindow
nsCOMPtr< nsIWeakReferencemDOMWindowWeakref

Detailed Description

Definition at line 125 of file nsBarProps.h.


Constructor & Destructor Documentation

Definition at line 264 of file nsBarProps.cpp.

{
  mDOMWindow = aWindow;
  nsISupports *supwin = NS_STATIC_CAST(nsIScriptGlobalObject *, aWindow);
  mDOMWindowWeakref = do_GetWeakReference(supwin);
}

Here is the call graph for this function:

Definition at line 271 of file nsBarProps.cpp.

{
}

Member Function Documentation

NS_IMETHODIMP nsBarProp::GetVisibleByFlag ( PRBool aVisible,
PRUint32  aChromeFlag 
) [inherited]

Definition at line 83 of file nsBarProps.cpp.

{
  NS_ENSURE_TRUE(mBrowserChrome, NS_ERROR_FAILURE);

  PRUint32 chromeFlags;
  *aVisible = PR_FALSE;

  NS_ENSURE_SUCCESS(mBrowserChrome->GetChromeFlags(&chromeFlags),
                    NS_ERROR_FAILURE);
  if(chromeFlags & aChromeFlag)
    *aVisible = PR_TRUE;

  return NS_OK;
}
NS_IMETHODIMP nsBarProp::SetVisibleByFlag ( PRBool  aVisible,
PRUint32  aChromeFlag 
) [inherited]

Definition at line 99 of file nsBarProps.cpp.

{
  NS_ENSURE_TRUE(mBrowserChrome, NS_ERROR_FAILURE);

  PRBool   enabled = PR_FALSE;

  nsCOMPtr<nsIScriptSecurityManager>
           securityManager(do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID));
  if (securityManager)
    securityManager->IsCapabilityEnabled("UniversalBrowserWrite", &enabled);
  if (!enabled)
    return NS_OK;

  PRUint32 chromeFlags;

  NS_ENSURE_SUCCESS(mBrowserChrome->GetChromeFlags(&chromeFlags),
                    NS_ERROR_FAILURE);
  if(aVisible)
    chromeFlags |= aChromeFlag;
  else
    chromeFlags &= ~aChromeFlag;
  NS_ENSURE_SUCCESS(mBrowserChrome->SetChromeFlags(chromeFlags),
                    NS_ERROR_FAILURE);

  return NS_OK;
}

Here is the call graph for this function:

Definition at line 76 of file nsBarProps.cpp.

{
  mBrowserChrome = aBrowserChrome;
  return NS_OK;
}

Member Data Documentation

Definition at line 71 of file nsBarProps.h.

Definition at line 133 of file nsBarProps.h.

Definition at line 134 of file nsBarProps.h.

Definition at line 53 of file nsIDOMBarProp.idl.


The documentation for this class was generated from the following files: