当前位置: 首页>>代码示例>>C++>>正文


C++ DOMWindow::showModalDialog方法代码示例

本文整理汇总了C++中DOMWindow::showModalDialog方法的典型用法代码示例。如果您正苦于以下问题:C++ DOMWindow::showModalDialog方法的具体用法?C++ DOMWindow::showModalDialog怎么用?C++ DOMWindow::showModalDialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DOMWindow的用法示例。


在下文中一共展示了DOMWindow::showModalDialog方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: handler

void V8Window::showModalDialogMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
{
    DOMWindow* impl = V8Window::toNative(args.Holder());
    if (!BindingSecurity::shouldAllowAccessToFrame(impl->frame()))
        return;

    // FIXME: Handle exceptions properly.
    String urlString = toWebCoreStringWithUndefinedOrNullCheck(args[0]);
    DialogHandler handler(args[1]);
    String dialogFeaturesString = toWebCoreStringWithUndefinedOrNullCheck(args[2]);

    impl->showModalDialog(urlString, dialogFeaturesString, activeDOMWindow(), firstDOMWindow(), setUpDialog, &handler);

    v8SetReturnValue(args, handler.returnValue());
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:15,代码来源:V8WindowCustom.cpp

示例2: exceptionState

void V8Window::showModalDialogMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    DOMWindow* impl = V8Window::toNative(info.Holder());
    ExceptionState exceptionState(ExceptionState::ExecutionContext, "showModalDialog", "Window", info.Holder(), info.GetIsolate());
    if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->frame(), exceptionState)) {
        exceptionState.throwIfNeeded();
        return;
    }

    TOSTRING_VOID(V8StringResource<WithUndefinedOrNullCheck>, urlString, info[0]);
    DialogHandler handler(info[1]);
    TOSTRING_VOID(V8StringResource<WithUndefinedOrNullCheck>, dialogFeaturesString, info[2]);

    impl->showModalDialog(urlString, dialogFeaturesString, callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), setUpDialog, &handler);

    v8SetReturnValue(info, handler.returnValue(info.GetIsolate()));
}
开发者ID:jeremyroman,项目名称:blink,代码行数:17,代码来源:V8WindowCustom.cpp

示例3: exceptionState

void V8Window::showModalDialogMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    DOMWindow* impl = V8Window::toNative(info.Holder());
    ExceptionState exceptionState(ExceptionState::ExecutionContext, "showModalDialog", "Window", info.Holder(), info.GetIsolate());
    if (!BindingSecurity::shouldAllowAccessToFrame(impl->frame(), exceptionState)) {
        exceptionState.throwIfNeeded();
        return;
    }

    // FIXME: Handle exceptions properly.
    String urlString = toCoreStringWithUndefinedOrNullCheck(info[0]);
    DialogHandler handler(info[1]);
    String dialogFeaturesString = toCoreStringWithUndefinedOrNullCheck(info[2]);

    impl->showModalDialog(urlString, dialogFeaturesString, activeDOMWindow(), firstDOMWindow(), setUpDialog, &handler);

    v8SetReturnValue(info, handler.returnValue(info.GetIsolate()));
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例4: handler

v8::Handle<v8::Value> V8DOMWindow::showModalDialogCallback(const v8::Arguments& args)
{
    INC_STATS("DOM.DOMWindow.showModalDialog()");
    DOMWindow* impl = V8DOMWindow::toNative(args.Holder());

    V8BindingState* state = V8BindingState::Only();

    DOMWindow* activeWindow = state->activeWindow();
    DOMWindow* firstWindow = state->firstWindow();

    // FIXME: Handle exceptions properly.
    String urlString = toWebCoreStringWithNullOrUndefinedCheck(args[0]);
    String dialogFeaturesString = toWebCoreStringWithNullOrUndefinedCheck(args[2]);

    DialogHandler handler(args[1]);

    impl->showModalDialog(urlString, dialogFeaturesString, activeWindow, firstWindow, setUpDialog, &handler);

    return handler.returnValue();
}
开发者ID:,项目名称:,代码行数:20,代码来源:


注:本文中的DOMWindow::showModalDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。