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

Side by Side Diff: printing/printing_context_win.h

Issue 1083433003: Fix crash from ipc_fuzzer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fri Apr 10 16:31:41 PDT 2015 Created 5 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef PRINTING_PRINTING_CONTEXT_WIN_H_ 5 #ifndef PRINTING_PRINTING_CONTEXT_WIN_H_
6 #define PRINTING_PRINTING_CONTEXT_WIN_H_ 6 #define PRINTING_PRINTING_CONTEXT_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Reads the settings from the selected device context. Updates settings_ and 45 // Reads the settings from the selected device context. Updates settings_ and
46 // its margins. 46 // its margins.
47 virtual Result InitializeSettings(const base::string16& device_name, 47 virtual Result InitializeSettings(const base::string16& device_name,
48 DEVMODE* dev_mode); 48 DEVMODE* dev_mode);
49 49
50 HDC contest() const { return context_; } 50 HDC contest() const { return context_; }
51 51
52 void set_context(HDC context) { context_ = context; } 52 void set_context(HDC context) { context_ = context; }
53 53
54 private: 54 private:
55 virtual scoped_ptr<DEVMODE, base::FreeDeleter> ShowPrintDialog( 55 scoped_ptr<DEVMODE, base::FreeDeleter> ShowPrintDialog(
56 HANDLE printer, 56 HANDLE printer,
57 gfx::NativeView parent_view, 57 gfx::NativeView parent_view,
58 DEVMODE* dev_mode); 58 DEVMODE* dev_mode);
59 59
60 // Used in response to the user canceling the printing. 60 // Used in response to the user canceling the printing.
61 static BOOL CALLBACK AbortProc(HDC hdc, int nCode); 61 static BOOL CALLBACK AbortProc(HDC hdc, int nCode);
62 62
63 // The selected printer context. 63 // The selected printer context.
64 HDC context_; 64 HDC context_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(PrintingContextWin); 66 DISALLOW_COPY_AND_ASSIGN(PrintingContextWin);
67 }; 67 };
68 68
69 } // namespace printing 69 } // namespace printing
70 70
71 #endif // PRINTING_PRINTING_CONTEXT_WIN_H_ 71 #endif // PRINTING_PRINTING_CONTEXT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698