toolkit/components/remote/nsGTKRemoteService.h

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim:expandtab:shiftwidth=2:tabstop=2:
     3  */
     4 /* This Source Code Form is subject to the terms of the Mozilla Public
     5  * License, v. 2.0. If a copy of the MPL was not distributed with this
     6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     8 #ifndef __nsGTKRemoteService_h__
     9 #define __nsGTKRemoteService_h__
    11 #include <gdk/gdk.h>
    12 #include <gdk/gdkx.h>
    13 #include <gtk/gtk.h>
    15 #include "nsInterfaceHashtable.h"
    16 #include "nsXRemoteService.h"
    17 #include "mozilla/Attributes.h"
    19 class nsGTKRemoteService MOZ_FINAL : public nsXRemoteService
    20 {
    21 public:
    22   // We will be a static singleton, so don't use the ordinary methods.
    23   NS_DECL_ISUPPORTS
    24   NS_DECL_NSIREMOTESERVICE
    27   nsGTKRemoteService() :
    28     mServerWindow(nullptr) { }
    30 private:
    31   ~nsGTKRemoteService() { }
    33   void HandleCommandsFor(GtkWidget* aWidget,
    34                          nsIWeakReference* aWindow);
    37   static PLDHashOperator StartupHandler(GtkWidget* aKey,
    38                                         nsIWeakReference* aData,
    39                                         void* aClosure);
    42   static gboolean HandlePropertyChange(GtkWidget *widget,
    43                                        GdkEventProperty *event,
    44                                        nsIWeakReference* aThis);
    47   virtual void SetDesktopStartupIDOrTimestamp(const nsACString& aDesktopStartupID,
    48                                               uint32_t aTimestamp);
    50   nsInterfaceHashtable<nsPtrHashKey<GtkWidget>, nsIWeakReference> mWindows;
    51   GtkWidget* mServerWindow;  
    52 };
    54 #endif // __nsGTKRemoteService_h__

mercurial