Add support for printing selection only flag. This only adds the flag to the IPC and implements the Windows dialog interaction but does not enable this just yet.
BUG=http://crbug.com/1682
TEST=none
Review URL: http://codereview.chromium.org/118338
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17867 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/printing/win_printing_context.h b/chrome/browser/printing/win_printing_context.h
index eaacc02..320a512 100644
--- a/chrome/browser/printing/win_printing_context.h
+++ b/chrome/browser/printing/win_printing_context.h
@@ -31,7 +31,7 @@
// Asks the user what printer and format should be used to print. Updates the
// context with the select device settings.
- Result AskUserForSettings(HWND window, int max_pages);
+ Result AskUserForSettings(HWND window, int max_pages, bool has_selection);
// Selects the user's default printer and format. Updates the context with the
// default device settings.
@@ -81,10 +81,10 @@
// temporary object used during the Print... dialog display.
class CallbackHandler;
- // Does bookeeping when an error occurs.
- PrintingContext::Result OnErrror();
+ // Does bookkeeping when an error occurs.
+ PrintingContext::Result OnError();
- // Used in response to the user cancelling the printing.
+ // Used in response to the user canceling the printing.
static BOOL CALLBACK AbortProc(HDC hdc, int nCode);
// Reads the settings from the selected device context. Updates settings_ and
@@ -92,7 +92,8 @@
bool InitializeSettings(const DEVMODE& dev_mode,
const std::wstring& new_device_name,
const PRINTPAGERANGE* ranges,
- int number_ranges);
+ int number_ranges,
+ bool selection_only);
// Retrieves the printer's default low-level settings. hdc_ is allocated with
// this call.