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

Issue 7063030: PrintPreview: Print Preview is not staying associated with initiator renderer. (Closed)

Created:
9 years, 7 months ago by kmadhusu
Modified:
9 years, 6 months ago
CC:
chromium-reviews, arv (Not doing code reviews)
Visibility:
Public.

Description

PrintPreview: Print Preview is not staying associated with initiator renderer. Created a PrintPreviewDataService class to manage the data for all preview tabs. Renamed PrintPreviewUIHTMLSource class to PrintPreviewDataSource class. PrintPreviewDataSource is responsible for serving the data from PrintPreviewDataSrervice to the corresponding PrintPreviewUI data requests. BUG=83151 TEST=Refer to bug report. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=87213

Patch Set 1 #

Patch Set 2 : Added more code. #

Patch Set 3 : '' #

Patch Set 4 : Updated the CL #

Total comments: 19

Patch Set 5 : Addressed review comments. #

Patch Set 6 : Fix win compile error #

Total comments: 18

Patch Set 7 : Addressed review comments #

Patch Set 8 : '' #

Total comments: 8

Patch Set 9 : Addressed review comments. #

Patch Set 10 : '' #

Patch Set 11 : '' #

Total comments: 34

Patch Set 12 : Addressed review comments. #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Total comments: 8

Patch Set 16 : '' #

Patch Set 17 : Addressed thestig@ comments. #

Total comments: 8

Patch Set 18 : Addressed thestig@ comments. #

Total comments: 2

Patch Set 19 : '' #

Total comments: 4

Patch Set 20 : '' #

Patch Set 21 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -372 lines) Patch
A chrome/browser/printing/print_preview_data_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +56 lines, -0 lines 0 comments Download
A chrome/browser/printing/print_preview_data_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +39 lines, -0 lines 0 comments Download
M chrome/browser/printing/print_preview_message_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +12 lines, -4 lines 0 comments Download
M chrome/browser/resources/print_preview.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +6 lines, -5 lines 0 comments Download
A chrome/browser/ui/webui/print_preview_data_source.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +41 lines, -0 lines 0 comments Download
A + chrome/browser/ui/webui/print_preview_data_source.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +22 lines, -36 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_ui.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +16 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +26 lines, -9 lines 0 comments Download
D chrome/browser/ui/webui/print_preview_ui_html_source.h View 1 chunk +0 lines, -51 lines 0 comments Download
D chrome/browser/ui/webui/print_preview_ui_html_source.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -178 lines 0 comments Download
D chrome/browser/ui/webui/print_preview_ui_html_source_unittest.cc View 1 1 chunk +0 lines, -60 lines 0 comments Download
A + chrome/browser/ui/webui/print_preview_ui_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +22 lines, -16 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
kmadhusu
thestig:[WIP] I have uploaded the CL for your reference. Thanks for your help.
9 years, 7 months ago (2011-05-25 00:17:39 UTC) #1
kmadhusu
sky: Please review print_preview_data_source code. thestig: Please review Print Preview UI code. Thanks.
9 years, 7 months ago (2011-05-25 19:54:32 UTC) #2
sky
http://codereview.chromium.org/7063030/diff/4014/chrome/browser/ui/webui/print_preview_data_source.cc File chrome/browser/ui/webui/print_preview_data_source.cc (right): http://codereview.chromium.org/7063030/diff/4014/chrome/browser/ui/webui/print_preview_data_source.cc#newcode126 chrome/browser/ui/webui/print_preview_data_source.cc:126: : DataSource(chrome::kChromeUIPrintHost, NULL) { Passing in NULL means StartDataRequest ...
9 years, 7 months ago (2011-05-25 20:57:35 UTC) #3
kmadhusu
sky: Addressed review comments. I am still working on 1. PrintPreviewTabController unittest failures. 2. Rather ...
9 years, 7 months ago (2011-05-25 23:45:20 UTC) #4
sky
On Wed, May 25, 2011 at 4:45 PM, <kmadhusu@chromium.org> wrote: > sky: Addressed review comments. ...
9 years, 7 months ago (2011-05-25 23:59:32 UTC) #5
Lei Zhang
http://codereview.chromium.org/7063030/diff/8015/chrome/browser/resources/print_preview.js File chrome/browser/resources/print_preview.js (right): http://codereview.chromium.org/7063030/diff/8015/chrome/browser/resources/print_preview.js#newcode34 chrome/browser/resources/print_preview.js:34: var previewUIIdentifier = null; This doesn't need to be ...
9 years, 7 months ago (2011-05-26 01:48:31 UTC) #6
kmadhusu
Created a PrintPreviewDataManager class to manage the data for all preview tabs. PrintPreviewDataManager is profile ...
9 years, 7 months ago (2011-05-26 15:51:22 UTC) #7
sky
http://codereview.chromium.org/7063030/diff/4014/chrome/browser/ui/webui/print_preview_data_source.h File chrome/browser/ui/webui/print_preview_data_source.h (right): http://codereview.chromium.org/7063030/diff/4014/chrome/browser/ui/webui/print_preview_data_source.h#newcode43 chrome/browser/ui/webui/print_preview_data_source.h:43: typedef std::pair<base::SharedMemory*, uint32> PrintPreviewData; On 2011/05/25 23:45:21, kmadhusu wrote: ...
9 years, 7 months ago (2011-05-26 17:40:41 UTC) #8
kmadhusu
sky: Addressed review comments. Discussed with Elliot regarding the profile specific code and made code ...
9 years, 7 months ago (2011-05-27 16:49:22 UTC) #9
kmadhusu
erg: Please review print_preview_data_service, print_preview_data_service_factory and other profile related code. Thanks.
9 years, 7 months ago (2011-05-27 16:51:30 UTC) #10
sky
On Fri, May 27, 2011 at 9:49 AM, <kmadhusu@chromium.org> wrote: > sky: Addressed review comments. ...
9 years, 7 months ago (2011-05-27 17:06:39 UTC) #11
Lei Zhang
http://codereview.chromium.org/7063030/diff/18001/chrome/browser/printing/print_preview_message_handler.cc File chrome/browser/printing/print_preview_message_handler.cc (right): http://codereview.chromium.org/7063030/diff/18001/chrome/browser/printing/print_preview_message_handler.cc#newcode88 chrome/browser/printing/print_preview_message_handler.cc:88: char* preview_data = reinterpret_cast<char*>(shared_buf->memory()); nit: static_cast http://codereview.chromium.org/7063030/diff/18001/chrome/browser/profiles/profile.cc File chrome/browser/profiles/profile.cc ...
9 years, 7 months ago (2011-05-27 17:26:53 UTC) #12
Elliot Glaysher
http://codereview.chromium.org/7063030/diff/18001/chrome/browser/printing/print_preview_data_service.h File chrome/browser/printing/print_preview_data_service.h (right): http://codereview.chromium.org/7063030/diff/18001/chrome/browser/printing/print_preview_data_service.h#newcode30 chrome/browser/printing/print_preview_data_service.h:30: PreviewDataSourceMap; Why is this public? http://codereview.chromium.org/7063030/diff/18001/chrome/browser/profiles/profile.cc File chrome/browser/profiles/profile.cc (right): ...
9 years, 7 months ago (2011-05-27 17:45:50 UTC) #13
kmadhusu
Addressed review comments. sky: Please review print_preview_data_source, print_preview_data_service. PrintPreviewDataService cannot be a singleton class(discussed with ...
9 years, 7 months ago (2011-05-27 23:44:42 UTC) #14
Lei Zhang
http://codereview.chromium.org/7063030/diff/18001/chrome/browser/ui/webui/print_preview_ui_data_source_unittest.cc File chrome/browser/ui/webui/print_preview_ui_data_source_unittest.cc (right): http://codereview.chromium.org/7063030/diff/18001/chrome/browser/ui/webui/print_preview_ui_data_source_unittest.cc#newcode1 chrome/browser/ui/webui/print_preview_ui_data_source_unittest.cc:1: // Copyright (c) 2011 The Chromium Authors. All rights ...
9 years, 7 months ago (2011-05-28 00:12:38 UTC) #15
sky
LGTM, but as voiced on IM I think we're better served by making PrintPreviewDataService a ...
9 years, 7 months ago (2011-05-28 00:13:40 UTC) #16
kmadhusu
sky: Made code changes to make PrintPreviewDataService a singleton (not extending ProfileKeyedService). Deleted the PrintPreviewDataServiceFactory. ...
9 years, 7 months ago (2011-05-28 01:33:27 UTC) #17
kmadhusu
thestig: Renamed print_preview_ui_data_source_unittest.cc to print_prevew_ui_unittest.cc. Addressed review comments. http://codereview.chromium.org/7063030/diff/23040/chrome/browser/printing/print_preview_data_service.h File chrome/browser/printing/print_preview_data_service.h (right): http://codereview.chromium.org/7063030/diff/23040/chrome/browser/printing/print_preview_data_service.h#newcode25 chrome/browser/printing/print_preview_data_service.h:25: // ...
9 years, 6 months ago (2011-05-29 00:04:26 UTC) #18
Lei Zhang
http://codereview.chromium.org/7063030/diff/20063/chrome/browser/printing/print_preview_data_service.h File chrome/browser/printing/print_preview_data_service.h (right): http://codereview.chromium.org/7063030/diff/20063/chrome/browser/printing/print_preview_data_service.h#newcode21 chrome/browser/printing/print_preview_data_service.h:21: // a) there is a new data. nit: There ...
9 years, 6 months ago (2011-05-29 00:24:23 UTC) #19
kmadhusu
thestig: Addressed review comments. http://codereview.chromium.org/7063030/diff/20063/chrome/browser/printing/print_preview_data_service.h File chrome/browser/printing/print_preview_data_service.h (right): http://codereview.chromium.org/7063030/diff/20063/chrome/browser/printing/print_preview_data_service.h#newcode21 chrome/browser/printing/print_preview_data_service.h:21: // a) there is a ...
9 years, 6 months ago (2011-05-29 00:45:39 UTC) #20
Lei Zhang
LGTM with minor problem below http://codereview.chromium.org/7063030/diff/21027/chrome/browser/ui/webui/print_preview_data_source.cc File chrome/browser/ui/webui/print_preview_data_source.cc (right): http://codereview.chromium.org/7063030/diff/21027/chrome/browser/ui/webui/print_preview_data_source.cc#newcode125 chrome/browser/ui/webui/print_preview_data_source.cc:125: size_t index = path.find("/print.pdf"); ...
9 years, 6 months ago (2011-05-29 00:48:02 UTC) #21
kmadhusu
http://codereview.chromium.org/7063030/diff/21027/chrome/browser/ui/webui/print_preview_data_source.cc File chrome/browser/ui/webui/print_preview_data_source.cc (right): http://codereview.chromium.org/7063030/diff/21027/chrome/browser/ui/webui/print_preview_data_source.cc#newcode125 chrome/browser/ui/webui/print_preview_data_source.cc:125: size_t index = path.find("/print.pdf"); On 2011/05/29 00:48:02, Lei Zhang ...
9 years, 6 months ago (2011-05-29 00:57:49 UTC) #22
Lei Zhang
http://codereview.chromium.org/7063030/diff/20067/chrome/browser/ui/webui/print_preview_data_source.h File chrome/browser/ui/webui/print_preview_data_source.h (right): http://codereview.chromium.org/7063030/diff/20067/chrome/browser/ui/webui/print_preview_data_source.h#newcode27 chrome/browser/ui/webui/print_preview_data_source.h:27: PrintPreviewDataSource(); Have you thought about changing this to: PrintPreviewDataSource(PrintPreviewUI* ...
9 years, 6 months ago (2011-05-29 10:12:02 UTC) #23
kmadhusu
http://codereview.chromium.org/7063030/diff/20067/chrome/browser/ui/webui/print_preview_data_source.h File chrome/browser/ui/webui/print_preview_data_source.h (right): http://codereview.chromium.org/7063030/diff/20067/chrome/browser/ui/webui/print_preview_data_source.h#newcode27 chrome/browser/ui/webui/print_preview_data_source.h:27: PrintPreviewDataSource(); On 2011/05/29 10:12:02, Lei Zhang wrote: > Have ...
9 years, 6 months ago (2011-05-29 16:38:04 UTC) #24
Lei Zhang
Ah, ok, I see how we arrived at this design. Makes sense now. LGTM.
9 years, 6 months ago (2011-05-29 21:00:39 UTC) #25
kmadhusu
sky: Give the time constraint of M13 branch cut, I am committing this CL with ...
9 years, 6 months ago (2011-05-30 03:40:04 UTC) #26
sky
9 years, 6 months ago (2011-05-31 15:55:54 UTC) #27
Yes, SLGTM.
Thanks for converting to a singleton!

Powered by Google App Engine
This is Rietveld 408576698