summaryrefslogtreecommitdiffstats
path: root/printing/print_settings_initializer_win.h
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 17:57:52 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 17:57:52 +0000
commit4993f34cdf20cf9e1124656164e2c647efba6989 (patch)
tree272b55c8054c6a79444efafe55ad2311e89fa5dd /printing/print_settings_initializer_win.h
parentcaf706f870d1d9d576277110ab1df022b2756203 (diff)
downloadchromium_src-4993f34cdf20cf9e1124656164e2c647efba6989.zip
chromium_src-4993f34cdf20cf9e1124656164e2c647efba6989.tar.gz
chromium_src-4993f34cdf20cf9e1124656164e2c647efba6989.tar.bz2
Printing: Refactor PrintSettings::Init into a PrintSettingsFactory class
per-platform. BUG=none TEST=none Review URL: http://codereview.chromium.org/4040001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63907 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/print_settings_initializer_win.h')
-rw-r--r--printing/print_settings_initializer_win.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/printing/print_settings_initializer_win.h b/printing/print_settings_initializer_win.h
new file mode 100644
index 0000000..9ed68e9
--- /dev/null
+++ b/printing/print_settings_initializer_win.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PRINTING_PRINTING_SETTINGS_INITIALIZER_WIN_H_
+#define PRINTING_PRINTING_SETTINGS_INITIALIZER_WIN_H_
+
+#include <string>
+
+#include "base/logging.h"
+#include "printing/page_range.h"
+
+typedef struct HDC__* HDC;
+typedef struct _devicemodeW DEVMODE;
+
+namespace printing {
+
+class PrintSettings;
+
+// Initializes a PrintSettings object from the provided device context.
+class PrintSettingsInitializerWin {
+ public:
+ static void InitPrintSettings(HDC hdc,
+ const DEVMODE& dev_mode,
+ const PageRanges& new_ranges,
+ const std::wstring& new_device_name,
+ bool print_selection_only,
+ PrintSettings* print_settings);
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(PrintSettingsInitializerWin);
+};
+
+} // namespace printing
+
+#endif // PRINTING_PRINTING_SETTINGS_INITIALIZER_WIN_H_