本文整理汇总了C++中ProxyAccessible::Shutdown方法的典型用法代码示例。如果您正苦于以下问题:C++ ProxyAccessible::Shutdown方法的具体用法?C++ ProxyAccessible::Shutdown怎么用?C++ ProxyAccessible::Shutdown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProxyAccessible
的用法示例。
在下文中一共展示了ProxyAccessible::Shutdown方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool
DocAccessibleParent::RecvHideEvent(const uint64_t& aRootID)
{
if (mShutdown)
return true;
MOZ_DIAGNOSTIC_ASSERT(CheckDocTree());
// We shouldn't actually need this because mAccessibles shouldn't have an
// entry for the document itself, but it doesn't hurt to be explicit.
if (!aRootID) {
NS_ERROR("trying to hide entire document?");
return false;
}
ProxyEntry* rootEntry = mAccessibles.GetEntry(aRootID);
if (!rootEntry) {
NS_ERROR("invalid root being removed!");
return true;
}
ProxyAccessible* root = rootEntry->mProxy;
if (!root) {
NS_ERROR("invalid root being removed!");
return true;
}
ProxyAccessible* parent = root->Parent();
parent->RemoveChild(root);
root->Shutdown();
MOZ_DIAGNOSTIC_ASSERT(CheckDocTree());
return true;
}
示例2: ProxyShowHideEvent
bool
DocAccessibleParent::RecvHideEvent(const uint64_t& aRootID,
const bool& aFromUser)
{
if (mShutdown)
return true;
MOZ_DIAGNOSTIC_ASSERT(CheckDocTree());
// We shouldn't actually need this because mAccessibles shouldn't have an
// entry for the document itself, but it doesn't hurt to be explicit.
if (!aRootID) {
NS_ERROR("trying to hide entire document?");
return false;
}
ProxyEntry* rootEntry = mAccessibles.GetEntry(aRootID);
if (!rootEntry) {
NS_ERROR("invalid root being removed!");
return true;
}
ProxyAccessible* root = rootEntry->mProxy;
if (!root) {
NS_ERROR("invalid root being removed!");
return true;
}
ProxyAccessible* parent = root->Parent();
ProxyShowHideEvent(root, parent, false, aFromUser);
RefPtr<xpcAccHideEvent> event = nullptr;
if (nsCoreUtils::AccEventObserversExist()) {
uint32_t type = nsIAccessibleEvent::EVENT_HIDE;
xpcAccessibleGeneric* xpcAcc = GetXPCAccessible(root);
xpcAccessibleGeneric* xpcParent = GetXPCAccessible(parent);
ProxyAccessible* next = root->NextSibling();
xpcAccessibleGeneric* xpcNext = next ? GetXPCAccessible(next) : nullptr;
ProxyAccessible* prev = root->PrevSibling();
xpcAccessibleGeneric* xpcPrev = prev ? GetXPCAccessible(prev) : nullptr;
xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this);
nsIDOMNode* node = nullptr;
event = new xpcAccHideEvent(type, xpcAcc, doc, node, aFromUser, xpcParent,
xpcNext, xpcPrev);
}
parent->RemoveChild(root);
root->Shutdown();
MOZ_DIAGNOSTIC_ASSERT(CheckDocTree());
if (event) {
nsCoreUtils::DispatchAccEvent(Move(event));
}
return true;
}
示例3:
bool
DocAccessibleParent::RecvHideEvent(const uint64_t& aRootID)
{
ProxyEntry* rootEntry = mAccessibles.GetEntry(aRootID);
if (!rootEntry) {
NS_ERROR("invalid root being removed!");
return true;
}
ProxyAccessible* root = rootEntry->mProxy;
if (!root) {
NS_ERROR("invalid root being removed!");
return true;
}
ProxyAccessible* parent = root->Parent();
parent->RemoveChild(root);
root->Shutdown();
return true;
}