本文整理汇总了C++中SharedArray::length方法的典型用法代码示例。如果您正苦于以下问题:C++ SharedArray::length方法的具体用法?C++ SharedArray::length怎么用?C++ SharedArray::length使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharedArray
的用法示例。
在下文中一共展示了SharedArray::length方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runOpenPanel
void ChromeClientBlackBerry::runOpenPanel(Frame*, PassRefPtr<FileChooser> chooser)
{
SharedArray<BlackBerry::Platform::String> initialFiles;
unsigned numberOfInitialFiles = chooser->settings().selectedFiles.size();
if (numberOfInitialFiles > 0)
initialFiles.reset(new BlackBerry::Platform::String[numberOfInitialFiles], numberOfInitialFiles);
for (unsigned i = 0; i < numberOfInitialFiles; ++i)
initialFiles[i] = chooser->settings().selectedFiles[i];
SharedArray<BlackBerry::Platform::String> acceptMIMETypes;
unsigned numberOfTypes = chooser->settings().acceptMIMETypes.size();
if (numberOfTypes > 0)
acceptMIMETypes.reset(new BlackBerry::Platform::String[numberOfTypes], numberOfTypes);
for (unsigned i = 0; i < numberOfTypes; ++i)
acceptMIMETypes[i] = chooser->settings().acceptMIMETypes[i];
BlackBerry::Platform::String capture;
#if ENABLE(MEDIA_CAPTURE)
capture = chooser->settings().capture;
#endif
SharedArray<BlackBerry::Platform::String> chosenFiles;
{
PageGroupLoadDeferrer deferrer(m_webPagePrivate->m_page, true);
TimerBase::fireTimersInNestedEventLoop();
if (!m_webPagePrivate->m_client->chooseFilenames(chooser->settings().allowsMultipleFiles, acceptMIMETypes, initialFiles, capture, chosenFiles))
return;
}
Vector<String> files(chosenFiles.length());
for (unsigned i = 0; i < chosenFiles.length(); ++i)
files[i] = chosenFiles[i];
chooser->chooseFiles(files);
}
示例2: webHistoryItemCount
size_t TestRunner::webHistoryItemCount()
{
SharedArray<BlackBerry::WebKit::WebPage::BackForwardEntry> backForwardList;
BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->getBackForwardList(backForwardList);
return backForwardList.length();
}