embedding/components/printingui/src/win/nsPrintProgress.h
author Kartikaya Gupta <kgupta@mozilla.com>
Wed, 06 Jun 2012 13:50:01 -0400
changeset 100800 eaa56496dcf3340a18a052da989022eb65f60a41
parent 98529 f4157e8c410708d76703f19e4dfb61859bfe32d8
child 108463 a16372ce30b5f6b747246b01fcd215a4bf3b6342
child 112525 80e4ab0d24bc64ceaa7693ab5def36faffde7a40
permissions -rw-r--r--
Bug 745250 - Prevent crash from NPE in TouchEventHandler. r=wesj

/* -*- Mode: C++; tab-width: 2; 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 __nsPrintProgress_h
#define __nsPrintProgress_h

#include "nsIPrintProgress.h"

#include "nsCOMPtr.h"
#include "nsISupportsArray.h"
#include "nsIDOMWindow.h"
#include "nsIPrintStatusFeedback.h"
#include "nsString.h"
#include "nsIWindowWatcher.h"
#include "nsIObserver.h"

class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
{
public: 
	NS_DECL_ISUPPORTS
  NS_DECL_NSIPRINTPROGRESS
  NS_DECL_NSIWEBPROGRESSLISTENER
  NS_DECL_NSIPRINTSTATUSFEEDBACK

	nsPrintProgress();
	virtual ~nsPrintProgress();

private:
  nsresult ReleaseListeners();

  bool                              m_closeProgress;
  bool                              m_processCanceled;
  nsString                          m_pendingStatus;
  PRInt32                           m_pendingStateFlags;
  PRInt32                           m_pendingStateValue;
  nsCOMPtr<nsIDOMWindow>            m_dialog;
  nsCOMPtr<nsISupportsArray>        m_listenerList;
  nsCOMPtr<nsIObserver>             m_observer;
};

#endif