OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/printing/printer_manager_dialog.h" | 5 #include "chrome/browser/printing/printer_manager_dialog.h" |
6 | 6 |
7 #include "base/environment.h" | 7 #include "base/environment.h" |
8 #include "base/nix/xdg_util.h" | 8 #include "base/nix/xdg_util.h" |
9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
10 #include "content/common/process_watcher.h" | 10 #include "content/common/process_watcher.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 | 12 |
13 using base::Environment; | 13 using base::Environment; |
| 14 using content::BrowserThread; |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 // KDE printer config command ("system-config-printer-kde") causes the | 18 // KDE printer config command ("system-config-printer-kde") causes the |
18 // OptionWidget to crash (https://bugs.kde.org/show_bug.cgi?id=271957). | 19 // OptionWidget to crash (https://bugs.kde.org/show_bug.cgi?id=271957). |
19 // Therefore, use GNOME printer config command for KDE. | 20 // Therefore, use GNOME printer config command for KDE. |
20 const char kGNOMEPrinterConfigCommand[] = "system-config-printer"; | 21 const char kGNOMEPrinterConfigCommand[] = "system-config-printer"; |
21 | 22 |
22 // Detect the command based on the deskop environment and open the printer | 23 // Detect the command based on the deskop environment and open the printer |
23 // manager dialog. | 24 // manager dialog. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } // anonymous namespace | 59 } // anonymous namespace |
59 | 60 |
60 namespace printing { | 61 namespace printing { |
61 | 62 |
62 void PrinterManagerDialog::ShowPrinterManagerDialog() { | 63 void PrinterManagerDialog::ShowPrinterManagerDialog() { |
63 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 64 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
64 NewRunnableFunction(&DetectAndOpenPrinterConfigDialog)); | 65 NewRunnableFunction(&DetectAndOpenPrinterConfigDialog)); |
65 } | 66 } |
66 | 67 |
67 } // namespace printing | 68 } // namespace printing |
OLD | NEW |