1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/embedding/components/windowwatcher/src/nsAutoWindowStateHelper.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,38 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef __nsAutoWindowStateHelper_h 1.10 +#define __nsAutoWindowStateHelper_h 1.11 + 1.12 +#include "nsCOMPtr.h" 1.13 +#include "nsPIDOMWindow.h" 1.14 + 1.15 +/** 1.16 + * Helper class for dealing with notifications around opening modal 1.17 + * windows. 1.18 + */ 1.19 + 1.20 +class nsPIDOMWindow; 1.21 + 1.22 +class nsAutoWindowStateHelper 1.23 +{ 1.24 +public: 1.25 + nsAutoWindowStateHelper(nsPIDOMWindow *aWindow); 1.26 + ~nsAutoWindowStateHelper(); 1.27 + 1.28 + bool DefaultEnabled() 1.29 + { 1.30 + return mDefaultEnabled; 1.31 + } 1.32 + 1.33 +protected: 1.34 + bool DispatchEventToChrome(const char *aEventName); 1.35 + 1.36 + nsCOMPtr<nsPIDOMWindow> mWindow; 1.37 + bool mDefaultEnabled; 1.38 +}; 1.39 + 1.40 + 1.41 +#endif