| 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" | |
| 15 #include "app/l10n_util.h" | 14 #include "app/l10n_util.h" |
| 16 #include "app/win_util.h" | 15 #include "app/win_util.h" |
| 17 #include "base/file_util.h" | 16 #include "base/file_util.h" |
| 18 #include "base/registry.h" | 17 #include "base/registry.h" |
| 19 #include "base/scoped_comptr_win.h" | 18 #include "base/scoped_comptr_win.h" |
| 20 #include "base/thread.h" | 19 #include "base/thread.h" |
| 21 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
| 22 #include "base/win_util.h" | 21 #include "base/win_util.h" |
| 23 #include "chrome/browser/chrome_thread.h" | 22 #include "chrome/browser/chrome_thread.h" |
| 23 #include "gfx/font.h" |
| 24 #include "grit/app_strings.h" | 24 #include "grit/app_strings.h" |
| 25 #include "grit/generated_resources.h" | 25 #include "grit/generated_resources.h" |
| 26 #include "net/base/mime_util.h" | 26 #include "net/base/mime_util.h" |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 // This function takes the output of a SaveAs dialog: a filename, a filter and | 30 // This function takes the output of a SaveAs dialog: a filename, a filter and |
| 31 // the extension originally suggested to the user (shown in the dialog box) and | 31 // the extension originally suggested to the user (shown in the dialog box) and |
| 32 // returns back the filename with the appropriate extension tacked on. For | 32 // returns back the filename with the appropriate extension tacked on. For |
| 33 // example, if you pass in 'foo' as filename with filter '*.jpg' this function | 33 // example, if you pass in 'foo' as filename with filter '*.jpg' this function |
| (...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 void SelectFontDialogImpl::FontNotSelected(void* params, RunState run_state) { | 1101 void SelectFontDialogImpl::FontNotSelected(void* params, RunState run_state) { |
| 1102 if (listener_) | 1102 if (listener_) |
| 1103 listener_->FontSelectionCanceled(params); | 1103 listener_->FontSelectionCanceled(params); |
| 1104 EndRun(run_state); | 1104 EndRun(run_state); |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 // static | 1107 // static |
| 1108 SelectFontDialog* SelectFontDialog::Create(Listener* listener) { | 1108 SelectFontDialog* SelectFontDialog::Create(Listener* listener) { |
| 1109 return new SelectFontDialogImpl(listener); | 1109 return new SelectFontDialogImpl(listener); |
| 1110 } | 1110 } |
| OLD | NEW |