本文整理汇总了C++中PlatformWebView::didInitializeClients方法的典型用法代码示例。如果您正苦于以下问题:C++ PlatformWebView::didInitializeClients方法的具体用法?C++ PlatformWebView::didInitializeClients怎么用?C++ PlatformWebView::didInitializeClients使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlatformWebView
的用法示例。
在下文中一共展示了PlatformWebView::didInitializeClients方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createOtherPage
WKPageRef TestController::createOtherPage(WKPageRef oldPage, WKURLRequestRef, WKDictionaryRef, WKEventModifiers, WKEventMouseButton, const void* clientInfo)
{
PlatformWebView* parentView = static_cast<PlatformWebView*>(const_cast<void*>(clientInfo));
PlatformWebView* view = new PlatformWebView(WKPageGetContext(oldPage), WKPageGetPageGroup(oldPage), oldPage, parentView->options());
WKPageRef newPage = view->page();
view->resizeTo(800, 600);
WKPageUIClient otherPageUIClient = {
kWKPageUIClientCurrentVersion,
view,
0, // createNewPage_deprecatedForUseWithV0
0, // showPage
closeOtherPage,
0, // takeFocus
focus,
unfocus,
0, // runJavaScriptAlert
0, // runJavaScriptConfirm
0, // runJavaScriptPrompt
0, // setStatusText
0, // mouseDidMoveOverElement_deprecatedForUseWithV0
0, // missingPluginButtonClicked
0, // didNotHandleKeyEvent
0, // didNotHandleWheelEvent
0, // toolbarsAreVisible
0, // setToolbarsAreVisible
0, // menuBarIsVisible
0, // setMenuBarIsVisible
0, // statusBarIsVisible
0, // setStatusBarIsVisible
0, // isResizable
0, // setIsResizable
getWindowFrame,
setWindowFrame,
runBeforeUnloadConfirmPanel,
0, // didDraw
0, // pageDidScroll
exceededDatabaseQuota,
0, // runOpenPanel
decidePolicyForGeolocationPermissionRequest,
0, // headerHeight
0, // footerHeight
0, // drawHeader
0, // drawFooter
0, // printFrame
runModal,
0, // didCompleteRubberBandForMainFrame
0, // saveDataToFileInDownloadsFolder
0, // shouldInterruptJavaScript
createOtherPage,
0, // mouseDidMoveOverElement
0, // decidePolicyForNotificationPermissionRequest
0, // unavailablePluginButtonClicked_deprecatedForUseWithV1
0, // showColorPicker
0, // hideColorPicker
0, // unavailablePluginButtonClicked
};
WKPageSetPageUIClient(newPage, &otherPageUIClient);
view->didInitializeClients();
WKRetain(newPage);
return newPage;
}