| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 case SELECT_OPEN_MULTI_FILE: | 206 case SELECT_OPEN_MULTI_FILE: |
| 207 string_id = IDS_OPEN_FILE_DIALOG_TITLE; | 207 string_id = IDS_OPEN_FILE_DIALOG_TITLE; |
| 208 break; | 208 break; |
| 209 case SELECT_SAVEAS_FILE: | 209 case SELECT_SAVEAS_FILE: |
| 210 string_id = IDS_SAVE_AS_DIALOG_TITLE; | 210 string_id = IDS_SAVE_AS_DIALOG_TITLE; |
| 211 break; | 211 break; |
| 212 default: | 212 default: |
| 213 NOTREACHED(); | 213 NOTREACHED(); |
| 214 return; | 214 return; |
| 215 } | 215 } |
| 216 title_string = l10n_util::GetString(string_id); | 216 title_string = UTF16ToWide(l10n_util::GetStringUTF16(string_id)); |
| 217 } else { | 217 } else { |
| 218 title_string = UTF16ToWide(title); | 218 title_string = UTF16ToWide(title); |
| 219 } | 219 } |
| 220 | 220 |
| 221 if (owning_window) | 221 if (owning_window) |
| 222 parents_.insert(owning_window); | 222 parents_.insert(owning_window); |
| 223 | 223 |
| 224 FileBrowseDelegate* file_browse_delegate = new FileBrowseDelegate(this, | 224 FileBrowseDelegate* file_browse_delegate = new FileBrowseDelegate(this, |
| 225 type, title_string, default_path, file_types, file_type_index, | 225 type, title_string, default_path, file_types, file_type_index, |
| 226 default_extension, owning_window, params); | 226 default_extension, owning_window, params); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // TODO(xiyuan): Change this when the infrastructure is improved. | 478 // TODO(xiyuan): Change this when the infrastructure is improved. |
| 479 HtmlDialogUIDelegate** delegate = HtmlDialogUI::GetPropertyAccessor(). | 479 HtmlDialogUIDelegate** delegate = HtmlDialogUI::GetPropertyAccessor(). |
| 480 GetProperty(dom_ui_->tab_contents()->property_bag()); | 480 GetProperty(dom_ui_->tab_contents()->property_bag()); |
| 481 HtmlDialogView* containing_view = static_cast<HtmlDialogView*>(*delegate); | 481 HtmlDialogView* containing_view = static_cast<HtmlDialogView*>(*delegate); |
| 482 DCHECK(containing_view); | 482 DCHECK(containing_view); |
| 483 | 483 |
| 484 containing_view->GetWindow()->UpdateWindowTitle(); | 484 containing_view->GetWindow()->UpdateWindowTitle(); |
| 485 containing_view->GetWindow()->GetNonClientView()->SchedulePaint(); | 485 containing_view->GetWindow()->GetNonClientView()->SchedulePaint(); |
| 486 } | 486 } |
| 487 } | 487 } |
| OLD | NEW |