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

Issue 6544028: Create a Factory for NativeMetafile. (Closed)

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

Description

Applying factory pattern (through NativeMetafileFactory class). It is used to retrieve different printing contexts (based on the platform and user preferences). BUG=NONE TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=76553 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=76555 Recommitted: http://src.chromium.org/viewvc/chrome?view=rev&revision=76581

Patch Set 1 #

Total comments: 9

Patch Set 2 : Fixed styling issues (naming, 80cols) #

Total comments: 65

Patch Set 3 : Moved friend declarations to private section #

Patch Set 4 : Renamed to NativeMetafileFactory, fixed header names #

Patch Set 5 : Fixed NativeMetafileFactory class comments #

Total comments: 52

Patch Set 6 : Fixed styiling, removed unnecessary scoped_ptr. #

Patch Set 7 : Minor style fixes #

Total comments: 1

Patch Set 8 : Fixes for Mac #

Total comments: 18

Patch Set 9 : Merged fixes for windows #

Patch Set 10 : Removed NativeMetafileFactory from Linux, Win unittests #

Patch Set 11 : Ficed Mac unit tests, removed unnecessary include. #

Total comments: 25

Patch Set 12 : Added missing include, updated copyright year. #

Patch Set 13 : Fixed style issues, clarified comments, fixed inlcudes ordering #

Patch Set 14 : Fixed common_param_traits_unittest #

Patch Set 15 : Fixed common_param_traits_unittest.cc again #

Patch Set 16 : Minor style fix #

Total comments: 12

Patch Set 17 : Fixed common_param_traits_unittest.cc and style issues (indentation, includes ordering) #

Patch Set 18 : Fixed indentation #

Total comments: 16

Patch Set 19 : Nits, fixed per platform invcludes #

Patch Set 20 : ARM compile failure fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+621 lines, -214 lines) Patch
M chrome/browser/printing/print_view_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -1 line 0 comments Download
M chrome/common/common_param_traits_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +23 lines, -16 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 16 17 18 4 chunks +14 lines, -8 lines 0 comments Download
M chrome/renderer/mock_printer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -3 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 16 17 18 19 7 chunks +13 lines, -9 lines 0 comments Download
M chrome/renderer/print_web_view_helper_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +18 lines, -13 lines 0 comments Download
M chrome/renderer/print_web_view_helper_win.cc View 1 2 3 4 5 4 chunks +7 lines, -3 lines 0 comments Download
M chrome/renderer/webplugin_delegate_pepper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +20 lines, -20 lines 0 comments Download
M chrome/renderer/webplugin_delegate_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +11 lines, -5 lines 0 comments Download
M chrome/service/service_utility_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +9 lines, -5 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 16 17 18 3 chunks +11 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_view_host.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M printing/emf_win.h View 1 2 3 4 5 6 7 8 9 10 14 15 16 5 chunks +33 lines, -21 lines 0 comments Download
M printing/emf_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -0 lines 0 comments Download
M printing/image.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -4 lines 0 comments Download
M printing/native_metafile.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -36 lines 0 comments Download
A printing/native_metafile_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +30 lines, -0 lines 0 comments Download
A printing/native_metafile_factory.cc View 1 2 3 4 5 6 7 8 1 chunk +28 lines, -0 lines 0 comments Download
A printing/native_metafile_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +81 lines, -0 lines 0 comments Download
A printing/native_metafile_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +90 lines, -0 lines 0 comments Download
A printing/native_metafile_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +103 lines, -0 lines 0 comments Download
M printing/pdf_metafile_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +26 lines, -19 lines 0 comments Download
M printing/pdf_metafile_mac_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 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 3 chunks +24 lines, -17 lines 0 comments Download
M printing/pdf_ps_metafile_cairo_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -0 lines 0 comments Download
M printing/print_settings_initializer_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +14 lines, -14 lines 0 comments Download
M printing/printed_document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +1 line, -1 line 0 comments Download
M printing/printing.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +6 lines, -1 line 0 comments Download
M printing/printing_context_cairo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +9 lines, -7 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +14 lines, -5 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
dpapad
9 years, 10 months ago (2011-02-22 17:14:47 UTC) #1
Avi (use Gerrit)
Drive-by style complaints. Please re-read the style guide: http://www.corp.google.com/eng/doc/cppguide.xml Notable issues found in multiple files: ...
9 years, 10 months ago (2011-02-22 17:33:42 UTC) #2
dpapad
http://codereview.chromium.org/6544028/diff/1/chrome/renderer/print_web_view_helper_win.cc File chrome/renderer/print_web_view_helper_win.cc (right): http://codereview.chromium.org/6544028/diff/1/chrome/renderer/print_web_view_helper_win.cc#newcode72 chrome/renderer/print_web_view_helper_win.cc:72: printing::MetafileFactory::GetMetafile()); On 2011/02/22 17:33:42, Avi wrote: > For example, ...
9 years, 10 months ago (2011-02-22 18:09:30 UTC) #3
Avi (use Gerrit)
http://codereview.chromium.org/6544028/diff/7001/printing/emf_win.h File printing/emf_win.h (right): http://codereview.chromium.org/6544028/diff/7001/printing/emf_win.h#newcode26 printing/emf_win.h:26: friend class MetafileFactory; friends need to be in the ...
9 years, 10 months ago (2011-02-22 19:00:06 UTC) #4
dpapad
http://codereview.chromium.org/6544028/diff/7001/printing/emf_win.h File printing/emf_win.h (right): http://codereview.chromium.org/6544028/diff/7001/printing/emf_win.h#newcode26 printing/emf_win.h:26: friend class MetafileFactory; On 2011/02/22 19:00:07, Avi wrote: > ...
9 years, 10 months ago (2011-02-22 19:29:10 UTC) #5
Avi (use Gerrit)
Style gremlin is satisfied. Back to your scheduled reviewer.
9 years, 10 months ago (2011-02-22 19:31:43 UTC) #6
vandebo (ex-Chrome)
CL description should be improved. Subject something like "Create and use a factory class for ...
9 years, 10 months ago (2011-02-22 22:18:16 UTC) #7
dpapad
http://codereview.chromium.org/6544028/diff/7001/chrome/browser/printing/print_view_manager.cc File chrome/browser/printing/print_view_manager.cc (right): http://codereview.chromium.org/6544028/diff/7001/chrome/browser/printing/print_view_manager.cc#newcode127 chrome/browser/printing/print_view_manager.cc:127: scoped_ptr<NativeMetafile> metafile(printing::MetafileFactory::GetMetafile()); On 2011/02/22 22:18:16, vandebo wrote: > We're ...
9 years, 10 months ago (2011-02-23 00:44:38 UTC) #8
dpapad
Still working on webplugin_delegate_pepper.cc:1225 (cairo specific)
9 years, 10 months ago (2011-02-23 01:09:29 UTC) #9
vandebo (ex-Chrome)
You might as well update the copyright year for every file you touched. http://codereview.chromium.org/6544028/diff/4064/chrome/browser/printing/print_view_manager.cc File ...
9 years, 10 months ago (2011-02-23 02:01:41 UTC) #10
dpapad
http://codereview.chromium.org/6544028/diff/4064/chrome/browser/printing/print_view_manager.cc File chrome/browser/printing/print_view_manager.cc (left): http://codereview.chromium.org/6544028/diff/4064/chrome/browser/printing/print_view_manager.cc#oldcode21 chrome/browser/printing/print_view_manager.cc:21: #include "printing/native_metafile.h" On 2011/02/23 02:01:41, vandebo wrote: > Still ...
9 years, 10 months ago (2011-02-24 20:56:59 UTC) #11
vandebo (ex-Chrome)
Getting close. A better subject for this issue would be: "Create a Factory for NativeMetafile." ...
9 years, 10 months ago (2011-02-24 22:42:50 UTC) #12
dpapad
Fixed style issues, removed NativeMetafileFactory from unittests, tested on linux, mac, win. http://codereview.chromium.org/6544028/diff/28001/chrome/renderer/webplugin_delegate_pepper.cc File chrome/renderer/webplugin_delegate_pepper.cc ...
9 years, 10 months ago (2011-02-26 01:42:29 UTC) #13
dpapad
Fixed mac unittests and removed include "native_metafile_factory.h" from emf_win.h pdf_ps_metafile_cairo.h and pdf_metafile_mac.h
9 years, 9 months ago (2011-02-28 17:59:38 UTC) #14
vandebo (ex-Chrome)
http://codereview.chromium.org/6544028/diff/35006/printing/native_metafile.h File printing/native_metafile.h (right): http://codereview.chromium.org/6544028/diff/35006/printing/native_metafile.h#newcode8 printing/native_metafile.h:8: #include "base/basictypes.h" nit: should stay build/build_config.h no? http://codereview.chromium.org/6544028/diff/35006/printing/pdf_metafile_mac.h File ...
9 years, 9 months ago (2011-02-28 21:43:59 UTC) #15
dpapad
http://codereview.chromium.org/6544028/diff/35006/printing/native_metafile.h File printing/native_metafile.h (right): http://codereview.chromium.org/6544028/diff/35006/printing/native_metafile.h#newcode8 printing/native_metafile.h:8: #include "base/basictypes.h" On 2011/02/28 21:44:00, vandebo wrote: > nit: ...
9 years, 9 months ago (2011-02-28 22:03:38 UTC) #16
James Hawkins
Is there a design somewhere where I can read the changes that are happening to ...
9 years, 9 months ago (2011-02-28 22:26:45 UTC) #17
vandebo (ex-Chrome)
On 2011/02/28 22:26:45, James Hawkins wrote: > Is there a design somewhere where I can ...
9 years, 9 months ago (2011-02-28 22:36:47 UTC) #18
James Hawkins
On 2011/02/28 22:36:47, vandebo wrote: > On 2011/02/28 22:26:45, James Hawkins wrote: > > Is ...
9 years, 9 months ago (2011-02-28 22:38:29 UTC) #19
dpapad
http://codereview.chromium.org/6544028/diff/35006/chrome/browser/printing/print_view_manager.cc File chrome/browser/printing/print_view_manager.cc (right): http://codereview.chromium.org/6544028/diff/35006/chrome/browser/printing/print_view_manager.cc#newcode22 chrome/browser/printing/print_view_manager.cc:22: #include "printing/native_metafile_factory.h" On 2011/02/28 22:26:45, James Hawkins wrote: > ...
9 years, 9 months ago (2011-02-28 23:50:58 UTC) #20
dpapad
Patch 13 passed the Mac trybots, Patch 15 passed win, linux. Patch 16 is a ...
9 years, 9 months ago (2011-03-01 17:38:11 UTC) #21
vandebo (ex-Chrome)
http://codereview.chromium.org/6544028/diff/33020/chrome/common/common_param_traits_unittest.cc File chrome/common/common_param_traits_unittest.cc (right): http://codereview.chromium.org/6544028/diff/33020/chrome/common/common_param_traits_unittest.cc#newcode235 chrome/common/common_param_traits_unittest.cc:235: // Tests printing::Emf serialization. This is trying to tests ...
9 years, 9 months ago (2011-03-01 19:01:00 UTC) #22
kmadhusu
http://codereview.chromium.org/6544028/diff/33020/chrome/common/common_param_traits_unittest.cc File chrome/common/common_param_traits_unittest.cc (right): http://codereview.chromium.org/6544028/diff/33020/chrome/common/common_param_traits_unittest.cc#newcode17 chrome/common/common_param_traits_unittest.cc:17: #if defined(OS_WIN) Platform-specific headers needs to follow the cross ...
9 years, 9 months ago (2011-03-01 19:42:38 UTC) #23
dpapad
http://codereview.chromium.org/6544028/diff/33020/chrome/common/common_param_traits_unittest.cc File chrome/common/common_param_traits_unittest.cc (right): http://codereview.chromium.org/6544028/diff/33020/chrome/common/common_param_traits_unittest.cc#newcode17 chrome/common/common_param_traits_unittest.cc:17: #if defined(OS_WIN) On 2011/03/01 19:42:38, kmadhusu wrote: > Platform-specific ...
9 years, 9 months ago (2011-03-01 22:41:24 UTC) #24
vandebo (ex-Chrome)
LGTM
9 years, 9 months ago (2011-03-01 22:50:50 UTC) #25
Lei Zhang
LGTM with nits below. http://codereview.chromium.org/6544028/diff/38071/chrome/plugin/webplugin_delegate_stub.cc File chrome/plugin/webplugin_delegate_stub.cc (right): http://codereview.chromium.org/6544028/diff/38071/chrome/plugin/webplugin_delegate_stub.cc#newcode18 chrome/plugin/webplugin_delegate_stub.cc:18: #include "printing/native_metafile_factory.h" nit: new includes ...
9 years, 9 months ago (2011-03-02 00:05:15 UTC) #26
dpapad
http://codereview.chromium.org/6544028/diff/38071/chrome/plugin/webplugin_delegate_stub.cc File chrome/plugin/webplugin_delegate_stub.cc (right): http://codereview.chromium.org/6544028/diff/38071/chrome/plugin/webplugin_delegate_stub.cc#newcode18 chrome/plugin/webplugin_delegate_stub.cc:18: #include "printing/native_metafile_factory.h" On 2011/03/02 00:05:15, Lei Zhang wrote: > ...
9 years, 9 months ago (2011-03-02 01:17:18 UTC) #27
vandebo (ex-Chrome)
9 years, 9 months ago (2011-03-02 19:18:33 UTC) #28
LG

Powered by Google App Engine
This is Rietveld 408576698