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

Unified Diff: printing/printing_context_win.h

Issue 557663002: Restored printing windows context for builds without preview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mon Sep 8 23:36:56 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 side-by-side diff with in-line comments
Download patch
Index: printing/printing_context_win.h
diff --git a/printing/printing_context_win.h b/printing/printing_context_win.h
index 99a7e3ef2b0c076964f92234973605b6185a69a2..e7869dc7087e2e1ee96f2e6e88e9d6846341178c 100644
--- a/printing/printing_context_win.h
+++ b/printing/printing_context_win.h
@@ -5,18 +5,16 @@
#ifndef PRINTING_PRINTING_CONTEXT_WIN_H_
#define PRINTING_PRINTING_CONTEXT_WIN_H_
-#include <ocidl.h>
-#include <commdlg.h>
-
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "build/build_config.h"
#include "printing/printing_context.h"
#include "ui/gfx/native_widget_types.h"
namespace printing {
+class PrintSettings;
+
class PRINTING_EXPORT PrintingContextWin : public PrintingContext {
public:
explicit PrintingContextWin(Delegate* delegate);
@@ -41,20 +39,26 @@ class PRINTING_EXPORT PrintingContextWin : public PrintingContext {
virtual gfx::NativeDrawingContext context() const OVERRIDE;
protected:
+ static HWND GetRootWindow(gfx::NativeView view);
+
+ // Reads the settings from the selected device context. Updates settings_ and
+ // its margins.
+ virtual Result InitializeSettings(const base::string16& device_name,
+ DEVMODE* dev_mode);
+
+ HDC contest() const { return context_; }
+
+ void set_context(HDC context) { context_ = context; }
+
+ private:
virtual scoped_ptr<DEVMODE, base::FreeDeleter> ShowPrintDialog(
HANDLE printer,
gfx::NativeView parent_view,
DEVMODE* dev_mode);
- private:
// 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
- // its margins.
- virtual Result InitializeSettings(const base::string16& device_name,
- DEVMODE* dev_mode);
-
// The selected printer context.
HDC context_;

Powered by Google App Engine
This is Rietveld 408576698