| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/shell_dialogs.h" | 5 #include "chrome/browser/shell_dialogs.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <commdlg.h> | 8 #include <commdlg.h> |
| 9 #include <shlobj.h> | 9 #include <shlobj.h> |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <set> | 12 #include <set> |
| 13 | 13 |
| 14 #include "app/gfx/font.h" | 14 #include "app/gfx/font.h" |
| 15 #include "app/l10n_util.h" | 15 #include "app/l10n_util.h" |
| 16 #include "app/win_util.h" | 16 #include "app/win_util.h" |
| 17 #include "base/file_util.h" | 17 #include "base/file_util.h" |
| 18 #include "base/registry.h" | 18 #include "base/registry.h" |
| 19 #include "base/scoped_comptr_win.h" | 19 #include "base/scoped_comptr_win.h" |
| 20 #include "base/string_util.h" | |
| 21 #include "base/thread.h" | 20 #include "base/thread.h" |
| 21 #include "base/utf_string_conversions.h" |
| 22 #include "chrome/browser/chrome_thread.h" | 22 #include "chrome/browser/chrome_thread.h" |
| 23 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
| 24 | 24 |
| 25 // Helpers to show certain types of Windows shell dialogs in a way that doesn't | 25 // Helpers to show certain types of Windows shell dialogs in a way that doesn't |
| 26 // block the UI of the entire app. | 26 // block the UI of the entire app. |
| 27 | 27 |
| 28 class ShellDialogThread : public base::Thread { | 28 class ShellDialogThread : public base::Thread { |
| 29 public: | 29 public: |
| 30 ShellDialogThread() : base::Thread("Chrome_ShellDialogThread") { } | 30 ShellDialogThread() : base::Thread("Chrome_ShellDialogThread") { } |
| 31 | 31 |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 void SelectFontDialogImpl::FontNotSelected(void* params, RunState run_state) { | 753 void SelectFontDialogImpl::FontNotSelected(void* params, RunState run_state) { |
| 754 if (listener_) | 754 if (listener_) |
| 755 listener_->FontSelectionCanceled(params); | 755 listener_->FontSelectionCanceled(params); |
| 756 EndRun(run_state); | 756 EndRun(run_state); |
| 757 } | 757 } |
| 758 | 758 |
| 759 // static | 759 // static |
| 760 SelectFontDialog* SelectFontDialog::Create(Listener* listener) { | 760 SelectFontDialog* SelectFontDialog::Create(Listener* listener) { |
| 761 return new SelectFontDialogImpl(listener); | 761 return new SelectFontDialogImpl(listener); |
| 762 } | 762 } |
| OLD | NEW |