michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim:expandtab:shiftwidth=2:tabstop=2: michael@0: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef __nsGTKRemoteService_h__ michael@0: #define __nsGTKRemoteService_h__ michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: #include "nsInterfaceHashtable.h" michael@0: #include "nsXRemoteService.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: class nsGTKRemoteService MOZ_FINAL : public nsXRemoteService michael@0: { michael@0: public: michael@0: // We will be a static singleton, so don't use the ordinary methods. michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIREMOTESERVICE michael@0: michael@0: michael@0: nsGTKRemoteService() : michael@0: mServerWindow(nullptr) { } michael@0: michael@0: private: michael@0: ~nsGTKRemoteService() { } michael@0: michael@0: void HandleCommandsFor(GtkWidget* aWidget, michael@0: nsIWeakReference* aWindow); michael@0: michael@0: michael@0: static PLDHashOperator StartupHandler(GtkWidget* aKey, michael@0: nsIWeakReference* aData, michael@0: void* aClosure); michael@0: michael@0: michael@0: static gboolean HandlePropertyChange(GtkWidget *widget, michael@0: GdkEventProperty *event, michael@0: nsIWeakReference* aThis); michael@0: michael@0: michael@0: virtual void SetDesktopStartupIDOrTimestamp(const nsACString& aDesktopStartupID, michael@0: uint32_t aTimestamp); michael@0: michael@0: nsInterfaceHashtable, nsIWeakReference> mWindows; michael@0: GtkWidget* mServerWindow; michael@0: }; michael@0: michael@0: #endif // __nsGTKRemoteService_h__