xpfe/appshell/src/nsWebShellWindow.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpfe/appshell/src/nsWebShellWindow.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,80 @@
     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 nsWebShellWindow_h__
    1.10 +#define nsWebShellWindow_h__
    1.11 +
    1.12 +#include "mozilla/Mutex.h"
    1.13 +#include "nsIWebProgressListener.h"
    1.14 +#include "nsITimer.h"
    1.15 +#include "nsCOMPtr.h"
    1.16 +#include "nsXULWindow.h"
    1.17 +#include "nsIWidgetListener.h"
    1.18 +
    1.19 +/* Forward declarations.... */
    1.20 +class nsIURI;
    1.21 +
    1.22 +struct nsWidgetInitData;
    1.23 +
    1.24 +namespace mozilla {
    1.25 +class WebShellWindowTimerCallback;
    1.26 +} // namespace mozilla
    1.27 +
    1.28 +class nsWebShellWindow : public nsXULWindow,
    1.29 +                         public nsIWebProgressListener,
    1.30 +                         public nsIWidgetListener
    1.31 +{
    1.32 +public:
    1.33 +  nsWebShellWindow(uint32_t aChromeFlags);
    1.34 +
    1.35 +  // nsISupports interface...
    1.36 +  NS_DECL_ISUPPORTS_INHERITED
    1.37 +
    1.38 +  // nsWebShellWindow methods...
    1.39 +  nsresult Initialize(nsIXULWindow * aParent, nsIXULWindow * aOpener,
    1.40 +                      nsIURI* aUrl,
    1.41 +                      int32_t aInitialWidth, int32_t aInitialHeight,
    1.42 +                      bool aIsHiddenWindow,
    1.43 +                      nsWidgetInitData& widgetInitData);
    1.44 +
    1.45 +  nsresult Toolbar();
    1.46 +
    1.47 +  // nsIWebProgressListener
    1.48 +  NS_DECL_NSIWEBPROGRESSLISTENER
    1.49 +
    1.50 +  // nsIBaseWindow
    1.51 +  NS_IMETHOD Destroy();
    1.52 +
    1.53 +  // nsIWidgetListener
    1.54 +  virtual nsIXULWindow* GetXULWindow() { return this; }
    1.55 +  virtual nsIPresShell* GetPresShell();
    1.56 +  virtual bool WindowMoved(nsIWidget* aWidget, int32_t x, int32_t y);
    1.57 +  virtual bool WindowResized(nsIWidget* aWidget, int32_t aWidth, int32_t aHeight);
    1.58 +  virtual bool RequestWindowClose(nsIWidget* aWidget);
    1.59 +  virtual void SizeModeChanged(nsSizeMode sizeMode);
    1.60 +  virtual void OSToolbarButtonPressed();
    1.61 +  virtual bool ZLevelChanged(bool aImmediate, nsWindowZ *aPlacement,
    1.62 +                             nsIWidget* aRequestBelow, nsIWidget** aActualBelow);
    1.63 +  virtual void WindowActivated();
    1.64 +  virtual void WindowDeactivated();
    1.65 +
    1.66 +protected:
    1.67 +  friend class mozilla::WebShellWindowTimerCallback;
    1.68 +  
    1.69 +  virtual ~nsWebShellWindow();
    1.70 +
    1.71 +  void                     LoadContentAreas();
    1.72 +  bool                     ExecuteCloseHandler();
    1.73 +  void                     ConstrainToOpenerScreen(int32_t* aX, int32_t* aY);
    1.74 +
    1.75 +  nsCOMPtr<nsITimer>      mSPTimer;
    1.76 +  mozilla::Mutex          mSPTimerLock;
    1.77 +
    1.78 +  void        SetPersistenceTimer(uint32_t aDirtyFlags);
    1.79 +  void        FirePersistenceTimer();
    1.80 +};
    1.81 +
    1.82 +
    1.83 +#endif /* nsWebShellWindow_h__ */

mercurial