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

Side by Side Diff: chrome/browser/printing/print_view_manager.cc

Issue 480303002: Use document from preview for System Dialog printing on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue Aug 26 01:11:31 PDT 2014 Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/printing/printing_message_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/printing/print_view_manager.h" 5 #include "chrome/browser/printing/print_view_manager.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 30 matching lines...) Expand all
41 observer_(NULL), 41 observer_(NULL),
42 print_preview_state_(NOT_PREVIEWING), 42 print_preview_state_(NOT_PREVIEWING),
43 scripted_print_preview_rph_(NULL) { 43 scripted_print_preview_rph_(NULL) {
44 } 44 }
45 45
46 PrintViewManager::~PrintViewManager() { 46 PrintViewManager::~PrintViewManager() {
47 DCHECK_EQ(NOT_PREVIEWING, print_preview_state_); 47 DCHECK_EQ(NOT_PREVIEWING, print_preview_state_);
48 } 48 }
49 49
50 bool PrintViewManager::PrintForSystemDialogNow() { 50 bool PrintViewManager::PrintForSystemDialogNow() {
51 #if defined(OS_WIN)
52 NOTREACHED();
53 #endif
51 return PrintNowInternal(new PrintMsg_PrintForSystemDialog(routing_id())); 54 return PrintNowInternal(new PrintMsg_PrintForSystemDialog(routing_id()));
52 } 55 }
53 56
54 bool PrintViewManager::AdvancedPrintNow() { 57 bool PrintViewManager::AdvancedPrintNow() {
55 PrintPreviewDialogController* dialog_controller = 58 PrintPreviewDialogController* dialog_controller =
56 PrintPreviewDialogController::GetInstance(); 59 PrintPreviewDialogController::GetInstance();
57 if (!dialog_controller) 60 if (!dialog_controller)
58 return false; 61 return false;
59 content::WebContents* print_preview_dialog = 62 content::WebContents* print_preview_dialog =
60 dialog_controller->GetPrintPreviewForContents(web_contents()); 63 dialog_controller->GetPrintPreviewForContents(web_contents());
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 OnSetupScriptedPrintPreview) 200 OnSetupScriptedPrintPreview)
198 IPC_MESSAGE_HANDLER(PrintHostMsg_ShowScriptedPrintPreview, 201 IPC_MESSAGE_HANDLER(PrintHostMsg_ShowScriptedPrintPreview,
199 OnShowScriptedPrintPreview) 202 OnShowScriptedPrintPreview)
200 IPC_MESSAGE_UNHANDLED(handled = false) 203 IPC_MESSAGE_UNHANDLED(handled = false)
201 IPC_END_MESSAGE_MAP() 204 IPC_END_MESSAGE_MAP()
202 205
203 return handled ? true : PrintViewManagerBase::OnMessageReceived(message); 206 return handled ? true : PrintViewManagerBase::OnMessageReceived(message);
204 } 207 }
205 208
206 } // namespace printing 209 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/printing/printing_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698