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

Issue 6982030: Print Preview: Detecting plugin existence before generating the preview. (Closed)

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

Description

Print Preview: Detecting plugin existence before generating the preview. In case there is no compatible pdf plugin the user is immediately notified that preview is not available instead of waiting for the preview to be generated and then being notified. BUG=82202 TEST=Load a multi-page doc in print preview, observe the error messages. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85215

Patch Set 1 #

Patch Set 2 : Minor fix #

Total comments: 4

Patch Set 3 : Addressing comments #

Total comments: 8

Patch Set 4 : Removing unnecessary checks #

Patch Set 5 : Addressing comments #

Total comments: 8

Patch Set 6 : Removing pdf string completely #

Total comments: 2

Patch Set 7 : Removing dummy plugin from the DOM #

Total comments: 2

Patch Set 8 : Fixing nit #

Total comments: 4

Patch Set 9 : Removing unnecessary else if statement #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -21 lines) Patch
M chrome/browser/resources/print_preview.html View 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/print_preview.js View 1 2 3 4 5 6 9 chunks +19 lines, -21 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
dpapad
9 years, 7 months ago (2011-05-11 17:17:04 UTC) #1
vandebo (ex-Chrome)
http://codereview.chromium.org/6982030/diff/1001/chrome/browser/resources/print_preview.html File chrome/browser/resources/print_preview.html (right): http://codereview.chromium.org/6982030/diff/1001/chrome/browser/resources/print_preview.html#newcode126 chrome/browser/resources/print_preview.html:126: src="chrome://print/dummy.pdf"/> We can probably do better than dummy.pdf. Maybe ...
9 years, 7 months ago (2011-05-11 18:00:05 UTC) #2
dpapad
http://codereview.chromium.org/6982030/diff/1001/chrome/browser/resources/print_preview.html File chrome/browser/resources/print_preview.html (right): http://codereview.chromium.org/6982030/diff/1001/chrome/browser/resources/print_preview.html#newcode126 chrome/browser/resources/print_preview.html:126: src="chrome://print/dummy.pdf"/> On 2011/05/11 18:00:05, vandebo wrote: > We can ...
9 years, 7 months ago (2011-05-11 18:35:38 UTC) #3
vandebo (ex-Chrome)
http://codereview.chromium.org/6982030/diff/4001/chrome/browser/ui/webui/print_preview_ui_html_source.cc File chrome/browser/ui/webui/print_preview_ui_html_source.cc (right): http://codereview.chromium.org/6982030/diff/4001/chrome/browser/ui/webui/print_preview_ui_html_source.cc#newcode164 chrome/browser/ui/webui/print_preview_ui_html_source.cc:164: scoped_refptr<RefCountedBytes> dummy_bytes(new RefCountedBytes); dummy_bytes != blank_pdf
9 years, 7 months ago (2011-05-11 18:37:17 UTC) #4
vandebo (ex-Chrome)
http://codereview.chromium.org/6982030/diff/4001/chrome/browser/ui/webui/print_preview_ui_html_source.cc File chrome/browser/ui/webui/print_preview_ui_html_source.cc (right): http://codereview.chromium.org/6982030/diff/4001/chrome/browser/ui/webui/print_preview_ui_html_source.cc#newcode164 chrome/browser/ui/webui/print_preview_ui_html_source.cc:164: scoped_refptr<RefCountedBytes> dummy_bytes(new RefCountedBytes); On 2011/05/11 18:37:18, vandebo wrote: > ...
9 years, 7 months ago (2011-05-11 19:04:55 UTC) #5
Lei Zhang
http://codereview.chromium.org/6982030/diff/4001/chrome/browser/resources/print_preview.html File chrome/browser/resources/print_preview.html (right): http://codereview.chromium.org/6982030/diff/4001/chrome/browser/resources/print_preview.html#newcode125 chrome/browser/resources/print_preview.html:125: <object id="dummy-viewer" type="application/pdf" does this need to be hidden? ...
9 years, 7 months ago (2011-05-11 20:27:43 UTC) #6
dpapad
http://codereview.chromium.org/6982030/diff/4001/chrome/browser/resources/print_preview.html File chrome/browser/resources/print_preview.html (right): http://codereview.chromium.org/6982030/diff/4001/chrome/browser/resources/print_preview.html#newcode125 chrome/browser/resources/print_preview.html:125: <object id="dummy-viewer" type="application/pdf" On 2011/05/11 20:27:43, Lei Zhang wrote: ...
9 years, 7 months ago (2011-05-11 22:08:19 UTC) #7
vandebo (ex-Chrome)
http://codereview.chromium.org/6982030/diff/8011/chrome/browser/resources/print_preview.js File chrome/browser/resources/print_preview.js (right): http://codereview.chromium.org/6982030/diff/8011/chrome/browser/resources/print_preview.js#newcode55 chrome/browser/resources/print_preview.js:55: Should we remove the dummy-viewer is some way so ...
9 years, 7 months ago (2011-05-11 22:13:54 UTC) #8
Lei Zhang
Otherwise LGTM with vandebo's LGTM. http://codereview.chromium.org/6982030/diff/8011/chrome/browser/resources/print_preview.js File chrome/browser/resources/print_preview.js (right): http://codereview.chromium.org/6982030/diff/8011/chrome/browser/resources/print_preview.js#newcode51 chrome/browser/resources/print_preview.js:51: if(!checkCompatiblePluginExists()) { nit: space ...
9 years, 7 months ago (2011-05-11 22:19:50 UTC) #9
dpapad
http://codereview.chromium.org/6982030/diff/8011/chrome/browser/resources/print_preview.js File chrome/browser/resources/print_preview.js (right): http://codereview.chromium.org/6982030/diff/8011/chrome/browser/resources/print_preview.js#newcode51 chrome/browser/resources/print_preview.js:51: if(!checkCompatiblePluginExists()) { On 2011/05/11 22:19:51, Lei Zhang wrote: > ...
9 years, 7 months ago (2011-05-11 23:31:03 UTC) #10
vandebo (ex-Chrome)
http://codereview.chromium.org/6982030/diff/8013/chrome/browser/resources/print_preview.html File chrome/browser/resources/print_preview.html (right): http://codereview.chromium.org/6982030/diff/8013/chrome/browser/resources/print_preview.html#newcode126 chrome/browser/resources/print_preview.html:126: src="chrome://print/blank.pdf"/> nit: this is no longer a blank pdf, ...
9 years, 7 months ago (2011-05-11 23:38:19 UTC) #11
dpapad
http://codereview.chromium.org/6982030/diff/8013/chrome/browser/resources/print_preview.html File chrome/browser/resources/print_preview.html (right): http://codereview.chromium.org/6982030/diff/8013/chrome/browser/resources/print_preview.html#newcode126 chrome/browser/resources/print_preview.html:126: src="chrome://print/blank.pdf"/> On 2011/05/11 23:38:19, vandebo wrote: > nit: this ...
9 years, 7 months ago (2011-05-12 00:04:39 UTC) #12
vandebo (ex-Chrome)
LGTM http://codereview.chromium.org/6982030/diff/6005/chrome/browser/ui/webui/print_preview_ui_html_source.cc File chrome/browser/ui/webui/print_preview_ui_html_source.cc (right): http://codereview.chromium.org/6982030/diff/6005/chrome/browser/ui/webui/print_preview_ui_html_source.cc#newcode164 chrome/browser/ui/webui/print_preview_ui_html_source.cc:164: scoped_refptr<RefCountedStaticMemory> blank_bytes( nit: blank_bytes -> dummy_bytes
9 years, 7 months ago (2011-05-12 00:07:14 UTC) #13
dpapad
http://codereview.chromium.org/6982030/diff/6005/chrome/browser/ui/webui/print_preview_ui_html_source.cc File chrome/browser/ui/webui/print_preview_ui_html_source.cc (right): http://codereview.chromium.org/6982030/diff/6005/chrome/browser/ui/webui/print_preview_ui_html_source.cc#newcode164 chrome/browser/ui/webui/print_preview_ui_html_source.cc:164: scoped_refptr<RefCountedStaticMemory> blank_bytes( On 2011/05/12 00:07:14, vandebo wrote: > nit: ...
9 years, 7 months ago (2011-05-12 00:44:08 UTC) #14
vandebo (ex-Chrome)
http://codereview.chromium.org/6982030/diff/8014/chrome/browser/ui/webui/print_preview_ui_html_source.cc File chrome/browser/ui/webui/print_preview_ui_html_source.cc (right): http://codereview.chromium.org/6982030/diff/8014/chrome/browser/ui/webui/print_preview_ui_html_source.cc#newcode163 chrome/browser/ui/webui/print_preview_ui_html_source.cc:163: } else if (path == "dummy.pdf") { It occurs ...
9 years, 7 months ago (2011-05-12 02:10:12 UTC) #15
Lei Zhang
http://codereview.chromium.org/6982030/diff/8014/chrome/browser/ui/webui/print_preview_ui_html_source.cc File chrome/browser/ui/webui/print_preview_ui_html_source.cc (right): http://codereview.chromium.org/6982030/diff/8014/chrome/browser/ui/webui/print_preview_ui_html_source.cc#newcode163 chrome/browser/ui/webui/print_preview_ui_html_source.cc:163: } else if (path == "dummy.pdf") { On 2011/05/12 ...
9 years, 7 months ago (2011-05-12 02:19:33 UTC) #16
dpapad
http://codereview.chromium.org/6982030/diff/8014/chrome/browser/ui/webui/print_preview_ui_html_source.cc File chrome/browser/ui/webui/print_preview_ui_html_source.cc (right): http://codereview.chromium.org/6982030/diff/8014/chrome/browser/ui/webui/print_preview_ui_html_source.cc#newcode163 chrome/browser/ui/webui/print_preview_ui_html_source.cc:163: } else if (path == "dummy.pdf") { On 2011/05/12 ...
9 years, 7 months ago (2011-05-12 17:26:44 UTC) #17
Lei Zhang
http://codereview.chromium.org/6982030/diff/8014/chrome/browser/ui/webui/print_preview_ui_html_source.cc File chrome/browser/ui/webui/print_preview_ui_html_source.cc (right): http://codereview.chromium.org/6982030/diff/8014/chrome/browser/ui/webui/print_preview_ui_html_source.cc#newcode163 chrome/browser/ui/webui/print_preview_ui_html_source.cc:163: } else if (path == "dummy.pdf") { On 2011/05/12 ...
9 years, 7 months ago (2011-05-12 17:50:45 UTC) #18
dpapad
On 2011/05/12 17:50:45, Lei Zhang wrote: > http://codereview.chromium.org/6982030/diff/8014/chrome/browser/ui/webui/print_preview_ui_html_source.cc > File chrome/browser/ui/webui/print_preview_ui_html_source.cc (right): > > http://codereview.chromium.org/6982030/diff/8014/chrome/browser/ui/webui/print_preview_ui_html_source.cc#newcode163 ...
9 years, 7 months ago (2011-05-12 18:12:02 UTC) #19
vandebo (ex-Chrome)
Only js left, but LGTM
9 years, 7 months ago (2011-05-12 18:50:51 UTC) #20
Lei Zhang
LGTM 2
9 years, 7 months ago (2011-05-12 21:34:03 UTC) #21
commit-bot: I haz the power
9 years, 7 months ago (2011-05-12 23:41:36 UTC) #22
Change committed as 85215

Powered by Google App Engine
This is Rietveld 408576698