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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_print_settings_manager.cc

Issue 22577010: Printing: Add a basic printing mode without print preview and cloud print. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 4 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
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 "content/browser/renderer_host/pepper/pepper_print_settings_manager.h" 5 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h"
6 6
7 #include "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "printing/printing_context.h" 9 #include "printing/printing_context.h"
10 #include "printing/units.h" 10 #include "printing/units.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 namespace { 14 namespace {
15 15
16 #if defined(ENABLE_PRINTING) 16 #if defined(ENABLE_FULL_PRINTING)
17 // Print units conversion functions. 17 // Print units conversion functions.
18 int32_t DeviceUnitsInPoints(int32_t device_units, 18 int32_t DeviceUnitsInPoints(int32_t device_units,
19 int32_t device_units_per_inch) { 19 int32_t device_units_per_inch) {
20 return printing::ConvertUnit(device_units, device_units_per_inch, 20 return printing::ConvertUnit(device_units, device_units_per_inch,
21 printing::kPointsPerInch); 21 printing::kPointsPerInch);
22 } 22 }
23 23
24 PP_Size PrintSizeToPPPrintSize(const gfx::Size& print_size, 24 PP_Size PrintSizeToPPPrintSize(const gfx::Size& print_size,
25 int32_t device_units_per_inch) { 25 int32_t device_units_per_inch) {
26 PP_Size result; 26 PP_Size result;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 } // namespace 93 } // namespace
94 94
95 void PepperPrintSettingsManagerImpl::GetDefaultPrintSettings( 95 void PepperPrintSettingsManagerImpl::GetDefaultPrintSettings(
96 PepperPrintSettingsManager::Callback callback) { 96 PepperPrintSettingsManager::Callback callback) {
97 BrowserThread::PostTaskAndReplyWithResult(BrowserThread::UI, FROM_HERE, 97 BrowserThread::PostTaskAndReplyWithResult(BrowserThread::UI, FROM_HERE,
98 base::Bind(ComputeDefaultPrintSettings), callback); 98 base::Bind(ComputeDefaultPrintSettings), callback);
99 } 99 }
100 100
101 } // namespace content 101 } // namespace content
OLDNEW
« no previous file with comments | « chrome/utility/chrome_content_utility_client.cc ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698