本文整理汇总了C++中PassOwnPtr::handleEvent方法的典型用法代码示例。如果您正苦于以下问题:C++ PassOwnPtr::handleEvent方法的具体用法?C++ PassOwnPtr::handleEvent怎么用?C++ PassOwnPtr::handleEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PassOwnPtr
的用法示例。
在下文中一共展示了PassOwnPtr::handleEvent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: then
void MIDIAccessPromise::then(PassOwnPtr<MIDISuccessCallback> successCallback, PassOwnPtr<MIDIErrorCallback> errorCallback)
{
// Lazily request access.
if (!m_access)
m_access = MIDIAccess::create(executionContext(), this);
switch (m_state) {
case Accepted:
m_state = Invoked;
successCallback->handleEvent(m_access.get(), m_options->sysex);
clear();
break;
case Rejected:
m_state = Invoked;
errorCallback->handleEvent(m_error.get());
clear();
break;
case Pending:
m_successCallback = successCallback;
m_errorCallback = errorCallback;
break;
case Invoked:
break;
default:
ASSERT_NOT_REACHED();
}
}
示例2: addLayerOnTop
void LayerDrawLooperBuilder::addLayerOnTop(
DrawLooperLayerInfo* layer_info,
PassOwnPtr<DrawLooperAddLayerCallback> callback) {
SkPaint* sk_paint =
draw_looper_builder_.addLayerOnTop(layer_info->layer_info());
RefPtr<Paint> paint = Paint::create();
paint->setPaint(*sk_paint);
callback->handleEvent(paint.get());
*sk_paint = paint->paint();
}
示例3: reportError
void DOMFileSystemSync::reportError(PassOwnPtr<ErrorCallback> errorCallback, PassRefPtrWillBeRawPtr<FileError> fileError)
{
errorCallback->handleEvent(fileError.get());
}