Backed out changeset b06f19b95b94 (bug 1784438) for causing build bustages CLOSED...
[gecko.git] / toolkit / components / remote / nsXRemoteClient.h
blob42c98f4b269136ed484d1bda55c607d963a50b9d
1 /* -*- Mode: C++; tab-width: 8; 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 #include <X11/X.h>
7 #include <X11/Xlib.h>
9 #include "nsRemoteClient.h"
11 class nsXRemoteClient : public nsRemoteClient {
12 public:
13 explicit nsXRemoteClient(nsACString& aStartupToken);
14 ~nsXRemoteClient();
16 virtual nsresult Init() override;
17 virtual nsresult SendCommandLine(const char* aProgram, const char* aProfile,
18 int32_t argc, const char** argv,
19 bool aRaise) override;
20 void Shutdown();
22 private:
23 Window CheckWindow(Window aWindow);
24 Window CheckChildren(Window aWindow);
25 nsresult GetLock(Window aWindow, bool* aDestroyed);
26 nsresult FreeLock(Window aWindow);
27 Window FindBestWindow(const char* aProgram, const char* aProfile);
28 nsresult DoSendCommandLine(Window aWindow, int32_t argc, const char** argv,
29 const char* aStartupToken, bool* aDestroyed);
30 bool WaitForResponse(Window aWindow, char** aResponse, bool* aDestroyed,
31 Atom aCommandAtom);
33 Display* mDisplay;
35 Atom mMozVersionAtom;
36 Atom mMozLockAtom;
37 Atom mMozCommandLineAtom;
38 Atom mMozResponseAtom;
39 Atom mMozWMStateAtom;
40 Atom mMozUserAtom;
41 Atom mMozProfileAtom;
42 Atom mMozProgramAtom;
44 char* mLockData;
46 bool mInitialized;
47 nsACString& mStartupToken;