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

Unified Diff: chrome/browser/ui/webui/print_preview_ui.cc

Issue 8761014: Print Preview: Set source modifiable bit for scripted printing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove logging statement Created 9 years, 1 month 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 | « chrome/browser/ui/webui/print_preview_ui.h ('k') | chrome/common/print_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_ui.cc
===================================================================
--- chrome/browser/ui/webui/print_preview_ui.cc (revision 112365)
+++ chrome/browser/ui/webui/print_preview_ui.cc (working copy)
@@ -73,6 +73,7 @@
PrintPreviewUI::PrintPreviewUI(TabContents* contents)
: ConstrainedHtmlUI(contents),
initial_preview_start_time_(base::TimeTicks::Now()),
+ source_is_modifiable_(true),
tab_closed_(false) {
// WebUI owns |handler_|.
handler_ = new PrintPreviewHandler();
@@ -121,8 +122,15 @@
initiator_tab_title_ = job_title;
}
-void PrintPreviewUI::SetSourceIsModifiable(bool source_is_modifiable) {
- source_is_modifiable_ = source_is_modifiable;
+// static
+void PrintPreviewUI::SetSourceIsModifiable(
+ TabContentsWrapper* print_preview_tab,
+ bool source_is_modifiable) {
+ if (!print_preview_tab || !print_preview_tab->web_ui())
+ return;
+ PrintPreviewUI* print_preview_ui =
+ static_cast<PrintPreviewUI*>(print_preview_tab->web_ui());
+ print_preview_ui->source_is_modifiable_ = source_is_modifiable;
}
// static
« no previous file with comments | « chrome/browser/ui/webui/print_preview_ui.h ('k') | chrome/common/print_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698