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.

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

mercurial