コード例 #1
0
ファイル: ChromeClient.cpp プロジェクト: ollie314/chromium
void ChromeClient::print(LocalFrame* frame) {
  // Defer loads in case the client method runs a new event loop that would
  // otherwise cause the load to continue while we're in the middle of
  // executing JavaScript.
  ScopedPageLoadDeferrer deferrer;

  printDelegate(frame);
}
コード例 #2
0
ファイル: ChromeClient.cpp プロジェクト: mirror/chromium
bool ChromeClient::print(LocalFrame* frame) {
  if (frame->document()->isSandboxed(SandboxModals)) {
    UseCounter::count(frame, UseCounter::DialogInSandboxedContext);
    frame->console().addMessage(ConsoleMessage::create(
        SecurityMessageSource, ErrorMessageLevel,
        "Ignored call to 'print()'. The document is sandboxed, and the "
        "'allow-modals' keyword is not set."));
    return false;
  }

  // Defer loads in case the client method runs a new event loop that would
  // otherwise cause the load to continue while we're in the middle of
  // executing JavaScript.
  ScopedPageLoadDeferrer deferrer;

  printDelegate(frame);
  return true;
}