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

Issue 6611032: Unifying NativeMetafile class interface (as much as possible) for Linux, Mac, Win (Closed)

Created:
9 years, 9 months ago by dpapad
Modified:
9 years, 7 months ago
CC:
chromium-reviews, pam+watch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Unifying NativeMetafile class interface (as much as possible) for Linux, Mac, Win BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78320

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fixed include ordering, some comments and style #

Total comments: 22

Patch Set 3 : Fixed style and comments, from suggestions #

Patch Set 4 : Implementing TODO comment about SaveTo(...) #

Patch Set 5 : Restored pdf_ps_metafile_cairo.h class comment #

Total comments: 43

Patch Set 6 : Addressing reviewer's comments (function ordering, ifdefs structure) #

Patch Set 7 : Removing dead code, using gfx::Size in PdfPsMetafile::StartPage #

Total comments: 1

Patch Set 8 : Fixed a typo in function parameter type #

Patch Set 9 : Restored deleted function. Using gfx::NativeDrawingContext instead of PlatformContext. #

Total comments: 1

Patch Set 10 : Fixing linux unittests #

Patch Set 11 : Fixes for CHROMEOS #

Total comments: 26

Patch Set 12 : Addressing reviewer's comments #

Total comments: 33

Patch Set 13 : Fixed win unittests, style changes, cleaned up StartPage parameters for cairo. #

Total comments: 13

Patch Set 14 : Nits, reordered some functions. #

Total comments: 2

Patch Set 15 : Re-enabled DCHECK in pdf_ps_metafile_cairo.cc #

Total comments: 16

Patch Set 16 : Addressing reviewer's comments, fixed misplaced function comments #

Total comments: 2

Patch Set 17 : Changed DCHECK to count partial writes as failures. #

Total comments: 5

Patch Set 18 : Nits #

Patch Set 19 : Making virtual methods not virtual (for clang bots) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+363 lines, -535 lines) Patch
M chrome/browser/printing/print_dialog_gtk.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -9 lines 0 comments Download
M chrome/common/common_param_traits_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/plugin/webplugin_delegate_stub.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/renderer/print_web_view_helper_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -5 lines 0 comments Download
M chrome/renderer/print_web_view_helper_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +10 lines, -10 lines 0 comments Download
M chrome/utility/utility_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -5 lines 0 comments Download
M printing/emf_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +28 lines, -60 lines 0 comments Download
M printing/emf_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +8 lines, -8 lines 0 comments Download
M printing/emf_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -9 lines 0 comments Download
M printing/image_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M printing/native_metafile.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +173 lines, -3 lines 0 comments Download
D printing/native_metafile_linux.h View 1 chunk +0 lines, -81 lines 0 comments Download
D printing/native_metafile_mac.h View 1 chunk +0 lines, -90 lines 0 comments Download
D printing/native_metafile_win.h View 1 chunk +0 lines, -103 lines 0 comments Download
M printing/pdf_metafile_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +25 lines, -55 lines 0 comments Download
M printing/pdf_metafile_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 7 chunks +13 lines, -6 lines 0 comments Download
M printing/pdf_metafile_mac_unittest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M printing/pdf_ps_metafile_cairo.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +19 lines, -49 lines 0 comments Download
M printing/pdf_ps_metafile_cairo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +40 lines, -18 lines 0 comments Download
M printing/pdf_ps_metafile_cairo_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +7 lines, -10 lines 0 comments Download
M printing/printed_document.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -3 lines 0 comments Download
M printing/printing.gyp View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
dpapad
http://codereview.chromium.org/6611032/diff/1/printing/emf_win.cc File printing/emf_win.cc (right): http://codereview.chromium.org/6611032/diff/1/printing/emf_win.cc#newcode129 printing/emf_win.cc:129: I added this private function as an alias of ...
9 years, 9 months ago (2011-03-03 23:54:06 UTC) #1
dpapad
9 years, 9 months ago (2011-03-04 03:04:24 UTC) #2
Lei Zhang
http://codereview.chromium.org/6611032/diff/4003/chrome/browser/printing/print_dialog_gtk.cc File chrome/browser/printing/print_dialog_gtk.cc (right): http://codereview.chromium.org/6611032/diff/4003/chrome/browser/printing/print_dialog_gtk.cc#newcode159 chrome/browser/printing/print_dialog_gtk.cc:159: if ((!error) && (!metafile->SaveTo(path_to_pdf_))) { nit: no need to ...
9 years, 9 months ago (2011-03-04 12:02:36 UTC) #3
dpapad
http://codereview.chromium.org/6611032/diff/4003/chrome/browser/printing/print_dialog_gtk.cc File chrome/browser/printing/print_dialog_gtk.cc (right): http://codereview.chromium.org/6611032/diff/4003/chrome/browser/printing/print_dialog_gtk.cc#newcode159 chrome/browser/printing/print_dialog_gtk.cc:159: if ((!error) && (!metafile->SaveTo(path_to_pdf_))) { On 2011/03/04 12:02:36, Lei ...
9 years, 9 months ago (2011-03-04 19:19:43 UTC) #4
Lei Zhang
http://codereview.chromium.org/6611032/diff/4003/printing/pdf_ps_metafile_cairo.h File printing/pdf_ps_metafile_cairo.h (right): http://codereview.chromium.org/6611032/diff/4003/printing/pdf_ps_metafile_cairo.h#newcode16 printing/pdf_ps_metafile_cairo.h:16: // Implementing NativeMetafile On 2011/03/04 19:19:43, dpapad wrote: > ...
9 years, 9 months ago (2011-03-04 19:36:40 UTC) #5
dpapad
http://codereview.chromium.org/6611032/diff/4003/printing/pdf_ps_metafile_cairo.h File printing/pdf_ps_metafile_cairo.h (right): http://codereview.chromium.org/6611032/diff/4003/printing/pdf_ps_metafile_cairo.h#newcode16 printing/pdf_ps_metafile_cairo.h:16: // Implementing NativeMetafile On 2011/03/04 19:36:40, Lei Zhang wrote: ...
9 years, 9 months ago (2011-03-04 21:48:19 UTC) #6
vandebo (ex-Chrome)
http://codereview.chromium.org/6611032/diff/10024/printing/emf_win.h File printing/emf_win.h (right): http://codereview.chromium.org/6611032/diff/10024/printing/emf_win.h#newcode1 printing/emf_win.h:1: // Copyright (c) 2011 The Chromium Authors. All rights ...
9 years, 9 months ago (2011-03-08 00:39:35 UTC) #7
dpapad
http://codereview.chromium.org/6611032/diff/10024/printing/emf_win.h File printing/emf_win.h (right): http://codereview.chromium.org/6611032/diff/10024/printing/emf_win.h#newcode19 printing/emf_win.h:19: // Implementing NativeMetafile On 2011/03/08 00:39:35, vandebo wrote: > ...
9 years, 9 months ago (2011-03-08 19:39:22 UTC) #8
vandebo (ex-Chrome)
http://codereview.chromium.org/6611032/diff/10024/printing/native_metafile.h File printing/native_metafile.h (right): http://codereview.chromium.org/6611032/diff/10024/printing/native_metafile.h#newcode86 printing/native_metafile.h:86: virtual bool CreateDc(HDC sibling, const RECT* rect) = 0; ...
9 years, 9 months ago (2011-03-08 20:16:53 UTC) #9
dpapad
http://codereview.chromium.org/6611032/diff/10024/printing/native_metafile.h File printing/native_metafile.h (right): http://codereview.chromium.org/6611032/diff/10024/printing/native_metafile.h#newcode86 printing/native_metafile.h:86: virtual bool CreateDc(HDC sibling, const RECT* rect) = 0; ...
9 years, 9 months ago (2011-03-08 22:17:19 UTC) #10
dpapad
http://codereview.chromium.org/6611032/diff/10024/printing/native_metafile.h File printing/native_metafile.h (right): http://codereview.chromium.org/6611032/diff/10024/printing/native_metafile.h#newcode93 printing/native_metafile.h:93: // TODO(maruel): CreateFromFile(). If ever used. Maybe users would ...
9 years, 9 months ago (2011-03-10 19:32:34 UTC) #11
dpapad
9 years, 9 months ago (2011-03-11 22:21:39 UTC) #12
vandebo (ex-Chrome)
http://codereview.chromium.org/6611032/diff/33023/printing/emf_win.cc File printing/emf_win.cc (right): http://codereview.chromium.org/6611032/diff/33023/printing/emf_win.cc#newcode62 printing/emf_win.cc:62: } I don't remember if I specifically said to ...
9 years, 9 months ago (2011-03-12 01:21:06 UTC) #13
dpapad
http://codereview.chromium.org/6611032/diff/33023/printing/emf_win.cc File printing/emf_win.cc (right): http://codereview.chromium.org/6611032/diff/33023/printing/emf_win.cc#newcode62 printing/emf_win.cc:62: } On 2011/03/12 01:21:06, vandebo wrote: > I don't ...
9 years, 9 months ago (2011-03-14 18:02:38 UTC) #14
dpapad
http://codereview.chromium.org/6611032/diff/33026/printing/pdf_metafile_mac.h File printing/pdf_metafile_mac.h (right): http://codereview.chromium.org/6611032/diff/33026/printing/pdf_metafile_mac.h#newcode47 printing/pdf_metafile_mac.h:47: & file_path) const; Accidental break line. I will fix ...
9 years, 9 months ago (2011-03-14 19:00:35 UTC) #15
vandebo (ex-Chrome)
http://codereview.chromium.org/6611032/diff/33026/printing/emf_win.cc File printing/emf_win.cc (right): http://codereview.chromium.org/6611032/diff/33026/printing/emf_win.cc#newcode71 printing/emf_win.cc:71: bool Emf::CreateFileBackedDc(HDC sibling, Extra line break. http://codereview.chromium.org/6611032/diff/33026/printing/emf_win.cc#newcode131 printing/emf_win.cc:131: DCHECK(emf_ ...
9 years, 9 months ago (2011-03-14 20:24:25 UTC) #16
dpapad
http://codereview.chromium.org/6611032/diff/33026/printing/emf_win.cc File printing/emf_win.cc (right): http://codereview.chromium.org/6611032/diff/33026/printing/emf_win.cc#newcode71 printing/emf_win.cc:71: bool Emf::CreateFileBackedDc(HDC sibling, On 2011/03/14 20:24:25, vandebo wrote: > ...
9 years, 9 months ago (2011-03-14 22:15:12 UTC) #17
vandebo (ex-Chrome)
http://codereview.chromium.org/6611032/diff/33026/printing/emf_win.cc File printing/emf_win.cc (right): http://codereview.chromium.org/6611032/diff/33026/printing/emf_win.cc#newcode198 printing/emf_win.cc:198: bool Emf::StartPage() { The CR still shows them moved. ...
9 years, 9 months ago (2011-03-14 22:55:04 UTC) #18
Lei Zhang
http://codereview.chromium.org/6611032/diff/42004/printing/pdf_ps_metafile_cairo.cc File printing/pdf_ps_metafile_cairo.cc (right): http://codereview.chromium.org/6611032/diff/42004/printing/pdf_ps_metafile_cairo.cc#newcode154 printing/pdf_ps_metafile_cairo.cc:154: //DCHECK_GT(page_size.width(), 0) << page_size.width(); Please don't do this. I ...
9 years, 9 months ago (2011-03-15 05:12:29 UTC) #19
dpapad
http://codereview.chromium.org/6611032/diff/33026/printing/emf_win.h File printing/emf_win.h (left): http://codereview.chromium.org/6611032/diff/33026/printing/emf_win.h#oldcode23 printing/emf_win.h:23: // Simple wrapper class that manage an EMF data ...
9 years, 9 months ago (2011-03-15 16:11:06 UTC) #20
vandebo (ex-Chrome)
http://codereview.chromium.org/6611032/diff/45025/printing/emf_win.cc File printing/emf_win.cc (right): http://codereview.chromium.org/6611032/diff/45025/printing/emf_win.cc#newcode131 printing/emf_win.cc:131: DCHECK_EQ(page_number, 1U); According to unwritten (as far as I ...
9 years, 9 months ago (2011-03-15 20:33:01 UTC) #21
dpapad
http://codereview.chromium.org/6611032/diff/45025/printing/emf_win.cc File printing/emf_win.cc (right): http://codereview.chromium.org/6611032/diff/45025/printing/emf_win.cc#newcode131 printing/emf_win.cc:131: DCHECK_EQ(page_number, 1U); On 2011/03/15 20:33:01, vandebo wrote: > According ...
9 years, 9 months ago (2011-03-15 21:41:07 UTC) #22
Lei Zhang
http://codereview.chromium.org/6611032/diff/45025/printing/pdf_ps_metafile_cairo.cc File printing/pdf_ps_metafile_cairo.cc (right): http://codereview.chromium.org/6611032/diff/45025/printing/pdf_ps_metafile_cairo.cc#newcode218 printing/pdf_ps_metafile_cairo.cc:218: if (file_util::WriteFile(file_path, data_.data(), GetDataSize()) < 0) { On 2011/03/15 ...
9 years, 9 months ago (2011-03-15 21:53:32 UTC) #23
vandebo (ex-Chrome)
LGTM! http://codereview.chromium.org/6611032/diff/45025/printing/pdf_ps_metafile_cairo.cc File printing/pdf_ps_metafile_cairo.cc (right): http://codereview.chromium.org/6611032/diff/45025/printing/pdf_ps_metafile_cairo.cc#newcode218 printing/pdf_ps_metafile_cairo.cc:218: if (file_util::WriteFile(file_path, data_.data(), GetDataSize()) < 0) { On ...
9 years, 9 months ago (2011-03-15 21:54:05 UTC) #24
dpapad
Linux, ChromeOS failed the tests because the LKGR was before Lei's mock printer fix (r78266). ...
9 years, 9 months ago (2011-03-15 23:39:34 UTC) #25
Lei Zhang
LGTM with minor nits below. Also, since this change touches a lot of stuff, I ...
9 years, 9 months ago (2011-03-16 00:25:26 UTC) #26
dpapad
http://codereview.chromium.org/6611032/diff/46008/printing/emf_win.h File printing/emf_win.h (right): http://codereview.chromium.org/6611032/diff/46008/printing/emf_win.h#newcode32 printing/emf_win.h:32: //NativeMetafile methods. On 2011/03/16 00:25:26, Lei Zhang wrote: > ...
9 years, 9 months ago (2011-03-16 00:35:57 UTC) #27
dpapad
The last patch should be named "Making virtual methods not inline (or else clang bots ...
9 years, 9 months ago (2011-03-16 01:20:38 UTC) #28
Lei Zhang
9 years, 9 months ago (2011-03-16 01:26:21 UTC) #29
LGTM if the CLANG bots go green.

Powered by Google App Engine
This is Rietveld 408576698