| Index: chrome/browser/printing/print_job_worker.cc
|
| diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
|
| index d06b61aaf6193e83ca91c3d8865317ca21096148..9faecd1874cb7882e68aabc25edb0bfdfda00eb6 100644
|
| --- a/chrome/browser/printing/print_job_worker.cc
|
| +++ b/chrome/browser/printing/print_job_worker.cc
|
| @@ -216,12 +216,13 @@ void PrintJobWorker::GetSettingsWithUI(
|
| bool is_scripted) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|
| + PrintingContextDelegate* printing_context_delegate =
|
| + static_cast<PrintingContextDelegate*>(printing_context_delegate_.get());
|
| + content::WebContents* web_contents =
|
| + printing_context_delegate->GetWebContents();
|
| +
|
| #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;
|
|
|
| @@ -233,6 +234,11 @@ void PrintJobWorker::GetSettingsWithUI(
|
| }
|
| #endif
|
|
|
| + // Running a dialog causes an exit to webpage-initiated fullscreen.
|
| + // http://crbug.com/728276
|
| + if (web_contents->IsFullscreenForCurrentTab())
|
| + web_contents->ExitFullscreen(false);
|
| +
|
| // weak_factory_ creates pointers valid only on owner_ thread.
|
| printing_context_->AskUserForSettings(
|
| document_page_count, has_selection, is_scripted,
|
|
|