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

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: Fix win compile 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
« no previous file with comments | « no previous file | chrome/renderer/print_web_view_helper_win.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 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 const gfx::Size& canvas_size, 221 const gfx::Size& canvas_size,
222 WebKit::WebFrame* frame); 222 WebKit::WebFrame* frame);
223 #endif 223 #endif
224 224
225 // Render the frame for printing. 225 // Render the frame for printing.
226 bool RenderPagesForPrint(WebKit::WebFrame* frame, WebKit::WebNode* node, 226 bool RenderPagesForPrint(WebKit::WebFrame* frame, WebKit::WebNode* node,
227 PrepareFrameAndViewForPrint* prepare); 227 PrepareFrameAndViewForPrint* prepare);
228 228
229 // Platform specific helper function for rendering page(s) to |metafile|. 229 // Platform specific helper function for rendering page(s) to |metafile|.
230 #if defined(OS_WIN) 230 #if defined(OS_WIN)
231 void RenderPage(const PrintMsg_Print_Params& params, float* scale_factor, 231 // Because of mixed support for alpha channels on printers, this method may
232 int page_number, bool is_preview, WebKit::WebFrame* frame, 232 // need to create a new metafile. The result may be either the passed
233 scoped_ptr<printing::Metafile>* metafile); 233 // |metafile| or a new one. In either case, the caller owns both |metafile|
234 // and the result.
235 printing::Metafile* RenderPage(const PrintMsg_Print_Params& params,
236 float* scale_factor, int page_number,
237 bool is_preview, WebKit::WebFrame* frame,
238 printing::Metafile* metafile);
234 #elif defined(OS_MACOSX) 239 #elif defined(OS_MACOSX)
235 void RenderPage(const gfx::Size& page_size, const gfx::Rect& content_area, 240 void RenderPage(const gfx::Size& page_size, const gfx::Rect& content_area,
236 const float& scale_factor, int page_number, 241 const float& scale_factor, int page_number,
237 WebKit::WebFrame* frame, printing::Metafile* metafile); 242 WebKit::WebFrame* frame, printing::Metafile* metafile);
238 #elif defined(OS_POSIX) 243 #elif defined(OS_POSIX)
239 bool RenderPages(const PrintMsg_PrintPages_Params& params, 244 bool RenderPages(const PrintMsg_PrintPages_Params& params,
240 WebKit::WebFrame* frame, WebKit::WebNode* node, 245 WebKit::WebFrame* frame, WebKit::WebNode* node,
241 int* page_count, PrepareFrameAndViewForPrint* prepare, 246 int* page_count, PrepareFrameAndViewForPrint* prepare,
242 printing::Metafile* metafile); 247 printing::Metafile* metafile);
243 #endif // defined(OS_WIN) 248 #endif // defined(OS_WIN)
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 395
391 State state_; 396 State state_;
392 }; 397 };
393 398
394 PrintPreviewContext print_preview_context_; 399 PrintPreviewContext print_preview_context_;
395 400
396 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 401 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
397 }; 402 };
398 403
399 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 404 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698