Code: void PrintJobWorker::GetSettingsWithUI(
    int document_page_count,
    bool has_selection,
     bool is_scripted) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
 #if defined(OS_ANDROID)
   if (is_scripted) {
    PrintingContextDelegate* printing_context_delegate =
        static_cast<PrintingContextDelegate*>(printing_context_delegate_.get());
    content::WebContents* web_contents =
        printing_context_delegate->GetWebContents();
     TabAndroid* tab =
         web_contents ? TabAndroid::FromWebContents(web_contents) : nullptr;
 
    if (tab)
      tab->SetPendingPrint();
   }
 #endif
 
   printing_context_->AskUserForSettings(
       document_page_count, has_selection, is_scripted,
      base::Bind(&PostOnOwnerThread, make_scoped_refptr(owner_),
                 base::Bind(&PrintJobWorker::GetSettingsDone,
                            weak_factory_.GetWeakPtr())));
}

Vulnerability Type: 
CWE ID: CWE-20
Summary: Inappropriate implementation in modal dialog handling in Blink in Google Chrome prior to 60.0.3112.78 for Mac, Windows, Linux, and Android allowed a remote attacker to prevent a full screen warning from being displayed via a crafted HTML page.
Commit Message: If JavaScript shows a dialog, cause the page to lose fullscreen.

BUG=670135, 550017, 726761, 728276

Review-Url: https://codereview.chromium.org/2906133004
Cr-Commit-Position: refs/heads/master@{#478884}