Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4687)

Unified Diff: chrome/browser/printing/print_job_worker.cc

Issue 2906133004: JavaScript dialogs cause a page to lose fullscreen. (Closed)
Patch Set: matt Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/printing/print_view_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..07850f544b6aafceacd85de0a666881fd2ad06b9 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(true);
+
// weak_factory_ creates pointers valid only on owner_ thread.
printing_context_->AskUserForSettings(
document_page_count, has_selection, is_scripted,
« no previous file with comments | « no previous file | chrome/browser/printing/print_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698