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

Side by Side Diff: chrome/renderer/print_web_view_helper.h

Issue 7491074: Fix smelly scoped_ptr code in print_web_view_helper_win. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
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 CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 5 #ifndef CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 const gfx::Size& canvas_size, 220 const gfx::Size& canvas_size,
221 WebKit::WebFrame* frame); 221 WebKit::WebFrame* frame);
222 #endif 222 #endif
223 223
224 // Render the frame for printing. 224 // Render the frame for printing.
225 bool RenderPagesForPrint(WebKit::WebFrame* frame, WebKit::WebNode* node, 225 bool RenderPagesForPrint(WebKit::WebFrame* frame, WebKit::WebNode* node,
226 PrepareFrameAndViewForPrint* prepare); 226 PrepareFrameAndViewForPrint* prepare);
227 227
228 // Platform specific helper function for rendering page(s) to |metafile|. 228 // Platform specific helper function for rendering page(s) to |metafile|.
229 #if defined(OS_WIN) 229 #if defined(OS_WIN)
230 void RenderPage(const PrintMsg_Print_Params& params, float* scale_factor, 230 // Because of mixed support for alpha channels on printers, this method may
231 int page_number, bool is_preview, WebKit::WebFrame* frame, 231 // need to create a new metafile. The result may be either the passed
232 scoped_ptr<printing::Metafile>* metafile); 232 // |metafile| or a new one. In either case, the caller owns both |metafile|
233 // and the result.
234 printing::Metafile* RenderPage(const PrintMsg_Print_Params& params,
235 float* scale_factor, int page_number,
236 bool is_preview, WebKit::WebFrame* frame,
237 printing::Metafile* metafile);
233 #elif defined(OS_MACOSX) 238 #elif defined(OS_MACOSX)
234 void RenderPage(const gfx::Size& page_size, const gfx::Rect& content_area, 239 void RenderPage(const gfx::Size& page_size, const gfx::Rect& content_area,
235 const float& scale_factor, int page_number, 240 const float& scale_factor, int page_number,
236 WebKit::WebFrame* frame, printing::Metafile* metafile); 241 WebKit::WebFrame* frame, printing::Metafile* metafile);
237 #elif defined(OS_POSIX) 242 #elif defined(OS_POSIX)
238 bool RenderPages(const PrintMsg_PrintPages_Params& params, 243 bool RenderPages(const PrintMsg_PrintPages_Params& params,
239 WebKit::WebFrame* frame, WebKit::WebNode* node, 244 WebKit::WebFrame* frame, WebKit::WebNode* node,
240 int* page_count, PrepareFrameAndViewForPrint* prepare, 245 int* page_count, PrepareFrameAndViewForPrint* prepare,
241 printing::Metafile* metafile); 246 printing::Metafile* metafile);
242 #endif // defined(OS_WIN) 247 #endif // defined(OS_WIN)
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 394
390 State state_; 395 State state_;
391 }; 396 };
392 397
393 PrintPreviewContext print_preview_context_; 398 PrintPreviewContext print_preview_context_;
394 399
395 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 400 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
396 }; 401 };
397 402
398 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 403 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/print_web_view_helper_win.cc » ('j') | chrome/renderer/print_web_view_helper_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698