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

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

Issue 702603004: Renamed DISABLE_BASIC_PRINTING and ENABLE_FULL_PRINTING. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wed Nov 5 02:31:54 PST 2014 Created 6 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 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 "content/public/browser/content_browser_client.h" 8 #include "content/public/browser/content_browser_client.h"
9 #include "content/public/common/content_client.h" 9 #include "content/public/common/content_client.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
11 #include "printing/printing_context.h" 11 #include "printing/printing_context.h"
12 #include "printing/units.h" 12 #include "printing/units.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 namespace { 16 namespace {
17 17
18 #if defined(ENABLE_FULL_PRINTING) 18 #if defined(ENABLE_PRINT_PREVIEW)
19 // Print units conversion functions. 19 // Print units conversion functions.
20 int32_t DeviceUnitsInPoints(int32_t device_units, 20 int32_t DeviceUnitsInPoints(int32_t device_units,
21 int32_t device_units_per_inch) { 21 int32_t device_units_per_inch) {
22 return printing::ConvertUnit( 22 return printing::ConvertUnit(
23 device_units, device_units_per_inch, printing::kPointsPerInch); 23 device_units, device_units_per_inch, printing::kPointsPerInch);
24 } 24 }
25 25
26 PP_Size PrintSizeToPPPrintSize(const gfx::Size& print_size, 26 PP_Size PrintSizeToPPPrintSize(const gfx::Size& print_size,
27 int32_t device_units_per_inch) { 27 int32_t device_units_per_inch) {
28 PP_Size result; 28 PP_Size result;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void PepperPrintSettingsManagerImpl::GetDefaultPrintSettings( 108 void PepperPrintSettingsManagerImpl::GetDefaultPrintSettings(
109 PepperPrintSettingsManager::Callback callback) { 109 PepperPrintSettingsManager::Callback callback) {
110 BrowserThread::PostTaskAndReplyWithResult( 110 BrowserThread::PostTaskAndReplyWithResult(
111 BrowserThread::UI, 111 BrowserThread::UI,
112 FROM_HERE, 112 FROM_HERE,
113 base::Bind(ComputeDefaultPrintSettings), 113 base::Bind(ComputeDefaultPrintSettings),
114 callback); 114 callback);
115 } 115 }
116 116
117 } // namespace content 117 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698