mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
b=634719 Add a helper to get the nsDragService r=roc
--HG-- extra : rebase_source : cd811aee525b1675b47573e313f6804112d78ef0
This commit is contained in:
parent
1f645ea274
commit
3eb6a4c206
@ -179,6 +179,15 @@ nsDragService::~nsDragService()
|
||||
NS_IMPL_ISUPPORTS_INHERITED2(nsDragService, nsBaseDragService,
|
||||
nsIDragSessionGTK, nsIObserver)
|
||||
|
||||
/* static */ nsDragService*
|
||||
nsDragService::GetInstance()
|
||||
{
|
||||
static const nsIID iid = NS_DRAGSERVICE_CID;
|
||||
nsCOMPtr<nsIDragService> dragService = do_GetService(iid);
|
||||
return static_cast<nsDragService*>(dragService.get());
|
||||
// We rely on XPCOM keeping a reference to the service.
|
||||
}
|
||||
|
||||
// nsIObserver
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -98,6 +98,8 @@ public:
|
||||
|
||||
NS_IMETHOD TargetSetTimeCallback (nsIDragSessionGTKTimeCB aCallback);
|
||||
|
||||
static nsDragService* GetInstance();
|
||||
|
||||
// END PUBLIC API
|
||||
|
||||
// These methods are public only so that they can be called from functions
|
||||
|
Loading…
x
Reference in New Issue
Block a user