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

Issue 6903083: PrintPreview:[MAC & WIN] Added code to show the native printer management dialog. (Closed)

Created:
9 years, 8 months ago by kmadhusu
Modified:
9 years, 7 months ago
Reviewers:
Lei Zhang, csilv
CC:
chromium-reviews, arv (Not doing code reviews), pam+watch_chromium.org
Visibility:
Public.

Description

PrintPreview:[MAC & WIN] Added code to show the native printer management dialog. BUG=none TEST=Enable print preview flag. Preview a webpage. Select the "Manage Printers..." option in the destination list. Native printer management dialog is displayed. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=83339

Patch Set 1 #

Patch Set 2 : fix win build error #

Patch Set 3 : '' #

Total comments: 10

Patch Set 4 : Addressed review comments. #

Total comments: 6

Patch Set 5 : Addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -10 lines) Patch
M chrome/app/generated_resources.grd View 1 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/printing/printer_manager_dialog.h View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/browser/printing/printer_manager_dialog_linux.cc View 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/browser/printing/printer_manager_dialog_mac.mm View 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/browser/printing/printer_manager_dialog_win.cc View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download
M chrome/browser/resources/print_preview.js View 1 2 3 4 4 chunks +29 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_handler.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_handler.cc View 3 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_ui_html_source.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
kmadhusu
thestig: Added code to show the native printer management dialog on mac and windows. If ...
9 years, 8 months ago (2011-04-27 22:57:56 UTC) #1
Lei Zhang
http://codereview.chromium.org/6903083/diff/22/chrome/browser/printing/printer_manager_dialog.h File chrome/browser/printing/printer_manager_dialog.h (right): http://codereview.chromium.org/6903083/diff/22/chrome/browser/printing/printer_manager_dialog.h#newcode13 chrome/browser/printing/printer_manager_dialog.h:13: // UI to manage the network printers. Can you ...
9 years, 8 months ago (2011-04-27 23:46:36 UTC) #2
kmadhusu
Chris: Please review the mac code.
9 years, 8 months ago (2011-04-27 23:54:52 UTC) #3
kmadhusu
thestig: Addressed review comments. http://codereview.chromium.org/6903083/diff/22/chrome/browser/printing/printer_manager_dialog.h File chrome/browser/printing/printer_manager_dialog.h (right): http://codereview.chromium.org/6903083/diff/22/chrome/browser/printing/printer_manager_dialog.h#newcode13 chrome/browser/printing/printer_manager_dialog.h:13: // UI to manage the ...
9 years, 8 months ago (2011-04-28 00:08:26 UTC) #4
csilv
LGTM (mac specific code)
9 years, 8 months ago (2011-04-28 00:28:37 UTC) #5
Lei Zhang
LGTM with nits below: http://codereview.chromium.org/6903083/diff/2006/chrome/browser/printing/printer_manager_dialog_win.cc File chrome/browser/printing/printer_manager_dialog_win.cc (right): http://codereview.chromium.org/6903083/diff/2006/chrome/browser/printing/printer_manager_dialog_win.cc#newcode10 chrome/browser/printing/printer_manager_dialog_win.cc:10: #include "base/file_util.h" nit: you only ...
9 years, 8 months ago (2011-04-28 01:14:12 UTC) #6
kmadhusu
9 years, 8 months ago (2011-04-28 15:44:21 UTC) #7
thestig: Fixed nits.

Thanks.

http://codereview.chromium.org/6903083/diff/2006/chrome/browser/printing/prin...
File chrome/browser/printing/printer_manager_dialog_win.cc (right):

http://codereview.chromium.org/6903083/diff/2006/chrome/browser/printing/prin...
chrome/browser/printing/printer_manager_dialog_win.cc:10: #include
"base/file_util.h"
On 2011/04/28 01:14:12, Lei Zhang wrote:
> nit: you only need file_path.h.

Done.

http://codereview.chromium.org/6903083/diff/2006/chrome/browser/printing/prin...
chrome/browser/printing/printer_manager_dialog_win.cc:28:
PathService::Get(base::DIR_SYSTEM, &shell32dll);
On 2011/04/28 01:14:12, Lei Zhang wrote:
> only need to call PathService::Get() once:
> 
> FilePath sys_dir;
> PathService::Get(base::DIR_SYSTEM, &sys_dir);
> FilePath rundll32 = sys_dir.AppendASCII("rundll32.exe");
> FilePath shell32dll = sys_dir.AppendASCII("shell32.dll");

Done.

http://codereview.chromium.org/6903083/diff/2006/chrome/browser/printing/prin...
chrome/browser/printing/printer_manager_dialog_win.cc:43: DCHECK(thread);
On 2011/04/28 01:14:12, Lei Zhang wrote:
> nit: you don't need this DCHECK. If |thread| is null, You'll crash immediately
> afterwards anyway. You can just call
> g_browser_process->file_thread()->message_loop()...

Done.

Powered by Google App Engine
This is Rietveld 408576698