Bug 1690340 - Part 4: Insert the "Page Source" before the "Extensions for Developers...
[gecko.git] / xpcom / base / nsClassInfoImpl.cpp
blob2189863a98fe02f348a0b1a9e694fe2668502305
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsIClassInfoImpl.h"
8 #include "nsString.h"
10 NS_IMETHODIMP_(MozExternalRefCountType)
11 GenericClassInfo::AddRef() { return 2; }
13 NS_IMETHODIMP_(MozExternalRefCountType)
14 GenericClassInfo::Release() { return 1; }
16 NS_IMPL_QUERY_INTERFACE(GenericClassInfo, nsIClassInfo)
18 NS_IMETHODIMP
19 GenericClassInfo::GetInterfaces(nsTArray<nsIID>& aArray) {
20 return mData->getinterfaces(aArray);
23 NS_IMETHODIMP
24 GenericClassInfo::GetScriptableHelper(nsIXPCScriptable** aHelper) {
25 if (mData->getscriptablehelper) {
26 return mData->getscriptablehelper(aHelper);
28 return NS_ERROR_NOT_IMPLEMENTED;
31 NS_IMETHODIMP
32 GenericClassInfo::GetContractID(nsACString& aContractID) {
33 NS_ERROR("GetContractID not implemented");
34 aContractID.SetIsVoid(true);
35 return NS_ERROR_NOT_IMPLEMENTED;
38 NS_IMETHODIMP
39 GenericClassInfo::GetClassDescription(nsACString& aDescription) {
40 aDescription.SetIsVoid(true);
41 return NS_ERROR_NOT_IMPLEMENTED;
44 NS_IMETHODIMP
45 GenericClassInfo::GetClassID(nsCID** aClassID) {
46 NS_ERROR("GetClassID not implemented");
47 *aClassID = nullptr;
48 return NS_ERROR_NOT_IMPLEMENTED;
51 NS_IMETHODIMP
52 GenericClassInfo::GetFlags(uint32_t* aFlags) {
53 *aFlags = mData->flags;
54 return NS_OK;
57 NS_IMETHODIMP
58 GenericClassInfo::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) {
59 *aClassIDNoAlloc = mData->cid;
60 return NS_OK;