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

Side by Side Diff: chrome/service/cloud_print/print_system_win.cc

Issue 599733002: StartPage/EndPage from spooling code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tue Sep 23 18:18:33 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
« no previous file with comments | « no previous file | printing/emf_win.h » ('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/service/cloud_print/print_system.h" 5 #include "chrome/service/cloud_print/print_system.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 xform.eDy = static_cast<float>(-offset_y); 328 xform.eDy = static_cast<float>(-offset_y);
329 xform.eM11 = xform.eM22 = 1.0 / scale_factor; 329 xform.eM11 = xform.eM22 = 1.0 / scale_factor;
330 SetWorldTransform(printer_dc_.Get(), &xform); 330 SetWorldTransform(printer_dc_.Get(), &xform);
331 } 331 }
332 332
333 // ServiceUtilityProcessHost::Client implementation. 333 // ServiceUtilityProcessHost::Client implementation.
334 virtual void OnRenderPDFPagesToMetafilePageDone( 334 virtual void OnRenderPDFPagesToMetafilePageDone(
335 double scale_factor, 335 double scale_factor,
336 const printing::MetafilePlayer& emf) OVERRIDE { 336 const printing::MetafilePlayer& emf) OVERRIDE {
337 PreparePageDCForPrinting(printer_dc_.Get(), scale_factor); 337 PreparePageDCForPrinting(printer_dc_.Get(), scale_factor);
338 ::StartPage(printer_dc_.Get());
338 emf.SafePlayback(printer_dc_.Get()); 339 emf.SafePlayback(printer_dc_.Get());
340 ::EndPage(printer_dc_.Get());
339 } 341 }
340 342
341 // ServiceUtilityProcessHost::Client implementation. 343 // ServiceUtilityProcessHost::Client implementation.
342 virtual void OnRenderPDFPagesToMetafileDone(bool success) OVERRIDE { 344 virtual void OnRenderPDFPagesToMetafileDone(bool success) OVERRIDE {
343 PrintJobDone(success); 345 PrintJobDone(success);
344 } 346 }
345 347
346 virtual void OnChildDied() OVERRIDE { PrintJobDone(false); } 348 virtual void OnChildDied() OVERRIDE { PrintJobDone(false); }
347 349
348 // base::win::ObjectWatcher::Delegate implementation. 350 // base::win::ObjectWatcher::Delegate implementation.
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 } 819 }
818 820
819 } // namespace 821 } // namespace
820 822
821 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( 823 scoped_refptr<PrintSystem> PrintSystem::CreateInstance(
822 const base::DictionaryValue* print_system_settings) { 824 const base::DictionaryValue* print_system_settings) {
823 return new PrintSystemWin; 825 return new PrintSystemWin;
824 } 826 }
825 827
826 } // namespace cloud_print 828 } // namespace cloud_print
OLDNEW
« no previous file with comments | « no previous file | printing/emf_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698