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

Side by Side Diff: printing/printing_context.h

Issue 1863223002: Convert //printing to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « printing/printed_page_unittest.cc ('k') | printing/printing_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef PRINTING_PRINTING_CONTEXT_H_
6 #define PRINTING_PRINTING_CONTEXT_H_ 6 #define PRINTING_PRINTING_CONTEXT_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "printing/print_settings.h" 14 #include "printing/print_settings.h"
15 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
16 16
17 namespace base { 17 namespace base {
18 class DictionaryValue; 18 class DictionaryValue;
19 } 19 }
20 20
21 namespace printing { 21 namespace printing {
22 22
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 virtual void Cancel() = 0; 111 virtual void Cancel() = 0;
112 112
113 // Releases the native printing context. 113 // Releases the native printing context.
114 virtual void ReleaseContext() = 0; 114 virtual void ReleaseContext() = 0;
115 115
116 // Returns the native context used to print. 116 // Returns the native context used to print.
117 virtual gfx::NativeDrawingContext context() const = 0; 117 virtual gfx::NativeDrawingContext context() const = 0;
118 118
119 // Creates an instance of this object. Implementers of this interface should 119 // Creates an instance of this object. Implementers of this interface should
120 // implement this method to create an object of their implementation. 120 // implement this method to create an object of their implementation.
121 static scoped_ptr<PrintingContext> Create(Delegate* delegate); 121 static std::unique_ptr<PrintingContext> Create(Delegate* delegate);
122 122
123 void set_margin_type(MarginType type); 123 void set_margin_type(MarginType type);
124 124
125 const PrintSettings& settings() const { 125 const PrintSettings& settings() const {
126 return settings_; 126 return settings_;
127 } 127 }
128 128
129 protected: 129 protected:
130 explicit PrintingContext(Delegate* delegate); 130 explicit PrintingContext(Delegate* delegate);
131 131
(...skipping 15 matching lines...) Expand all
147 // Did the user cancel the print job. 147 // Did the user cancel the print job.
148 volatile bool abort_printing_; 148 volatile bool abort_printing_;
149 149
150 private: 150 private:
151 DISALLOW_COPY_AND_ASSIGN(PrintingContext); 151 DISALLOW_COPY_AND_ASSIGN(PrintingContext);
152 }; 152 };
153 153
154 } // namespace printing 154 } // namespace printing
155 155
156 #endif // PRINTING_PRINTING_CONTEXT_H_ 156 #endif // PRINTING_PRINTING_CONTEXT_H_
OLDNEW
« no previous file with comments | « printing/printed_page_unittest.cc ('k') | printing/printing_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698