forked from mirrors/gecko-dev
		
	 515ac7b992
			
		
	
	
		515ac7b992
		
	
	
	
	
		
			
			We don't have profile name available when running with default profile. With this patch Firefox looks for existing DBus interfaces and tries to pick one instead of creating a new instance. MozReview-Commit-ID: 223rRcEvTWv --HG-- extra : rebase_source : ba8fdd8447a8c66291b748fa0b71c975105b2662
		
			
				
	
	
		
			38 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 | |
| /* This Source Code Form is subject to the terms of the Mozilla Public
 | |
|  * License, v. 2.0. If a copy of the MPL was not distributed with this
 | |
|  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 | |
| 
 | |
|  #ifndef DBusRemoteClient_h__
 | |
|  #define DBusRemoteClient_h__
 | |
| 
 | |
| #include "nsRemoteClient.h"
 | |
| #include "mozilla/StaticPtr.h"
 | |
| #include "mozilla/DBusHelpers.h"
 | |
| #include "nsString.h"
 | |
| 
 | |
| class DBusRemoteClient : public nsRemoteClient
 | |
| {
 | |
| public:
 | |
|   DBusRemoteClient();
 | |
|   ~DBusRemoteClient();
 | |
| 
 | |
|   virtual nsresult Init() override;
 | |
|   virtual nsresult SendCommandLine(const char *aProgram, const char *aUsername,
 | |
|                                    const char *aProfile,
 | |
|                                    int32_t argc, char **argv,
 | |
|                                    const char* aDesktopStartupID,
 | |
|                                    char **aResponse, bool *aSucceeded) override;
 | |
|   void Shutdown();
 | |
| 
 | |
| private:
 | |
|   bool             GetRemoteDestinationName(const char *aProgram,
 | |
|                                             const char *aProfile,
 | |
|                                             nsCString &aDestinationName);
 | |
|   nsresult         DoSendDBusCommandLine(const char *aProgram,
 | |
|                                          const char *aProfile,
 | |
|                                          const char* aBuffer, int aLength);
 | |
|   RefPtr<DBusConnection> mConnection;
 | |
| };
 | |
| 
 | |
| #endif // DBusRemoteClient_h__
 |