xpfe/appshell/src/nsWebShellWindow.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsWebShellWindow_h__
     7 #define nsWebShellWindow_h__
     9 #include "mozilla/Mutex.h"
    10 #include "nsIWebProgressListener.h"
    11 #include "nsITimer.h"
    12 #include "nsCOMPtr.h"
    13 #include "nsXULWindow.h"
    14 #include "nsIWidgetListener.h"
    16 /* Forward declarations.... */
    17 class nsIURI;
    19 struct nsWidgetInitData;
    21 namespace mozilla {
    22 class WebShellWindowTimerCallback;
    23 } // namespace mozilla
    25 class nsWebShellWindow : public nsXULWindow,
    26                          public nsIWebProgressListener,
    27                          public nsIWidgetListener
    28 {
    29 public:
    30   nsWebShellWindow(uint32_t aChromeFlags);
    32   // nsISupports interface...
    33   NS_DECL_ISUPPORTS_INHERITED
    35   // nsWebShellWindow methods...
    36   nsresult Initialize(nsIXULWindow * aParent, nsIXULWindow * aOpener,
    37                       nsIURI* aUrl,
    38                       int32_t aInitialWidth, int32_t aInitialHeight,
    39                       bool aIsHiddenWindow,
    40                       nsWidgetInitData& widgetInitData);
    42   nsresult Toolbar();
    44   // nsIWebProgressListener
    45   NS_DECL_NSIWEBPROGRESSLISTENER
    47   // nsIBaseWindow
    48   NS_IMETHOD Destroy();
    50   // nsIWidgetListener
    51   virtual nsIXULWindow* GetXULWindow() { return this; }
    52   virtual nsIPresShell* GetPresShell();
    53   virtual bool WindowMoved(nsIWidget* aWidget, int32_t x, int32_t y);
    54   virtual bool WindowResized(nsIWidget* aWidget, int32_t aWidth, int32_t aHeight);
    55   virtual bool RequestWindowClose(nsIWidget* aWidget);
    56   virtual void SizeModeChanged(nsSizeMode sizeMode);
    57   virtual void OSToolbarButtonPressed();
    58   virtual bool ZLevelChanged(bool aImmediate, nsWindowZ *aPlacement,
    59                              nsIWidget* aRequestBelow, nsIWidget** aActualBelow);
    60   virtual void WindowActivated();
    61   virtual void WindowDeactivated();
    63 protected:
    64   friend class mozilla::WebShellWindowTimerCallback;
    66   virtual ~nsWebShellWindow();
    68   void                     LoadContentAreas();
    69   bool                     ExecuteCloseHandler();
    70   void                     ConstrainToOpenerScreen(int32_t* aX, int32_t* aY);
    72   nsCOMPtr<nsITimer>      mSPTimer;
    73   mozilla::Mutex          mSPTimerLock;
    75   void        SetPersistenceTimer(uint32_t aDirtyFlags);
    76   void        FirePersistenceTimer();
    77 };
    80 #endif /* nsWebShellWindow_h__ */

mercurial