| 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/ui/shell_dialogs.h" | 5 #include "chrome/browser/ui/shell_dialogs.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/sys_string_conversions.h" | 12 #include "base/sys_string_conversions.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
| 16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
| 17 #include "chrome/browser/ui/browser_dialogs.h" | 17 #include "chrome/browser/ui/browser_dialogs.h" |
| 18 #include "chrome/browser/ui/browser_list.h" | 18 #include "chrome/browser/ui/browser_list.h" |
| 19 #include "chrome/browser/ui/views/html_dialog_view.h" | 19 #include "chrome/browser/ui/views/html_dialog_view.h" |
| 20 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 20 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
| 21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
| 22 #include "content/browser/tab_contents/tab_contents.h" | 22 #include "content/browser/tab_contents/tab_contents.h" |
| 23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 24 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
| 25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
| 26 #include "views/window/non_client_view.h" | 26 #include "views/window/non_client_view.h" |
| 27 | 27 |
| 28 using content::BrowserThread; |
| 29 |
| 28 namespace { | 30 namespace { |
| 29 | 31 |
| 30 const char kKeyNamePath[] = "path"; | 32 const char kKeyNamePath[] = "path"; |
| 31 const int kSaveCompletePageIndex = 2; | 33 const int kSaveCompletePageIndex = 2; |
| 32 | 34 |
| 33 } // namespace | 35 } // namespace |
| 34 | 36 |
| 35 // Implementation of SelectFileDialog that shows an UI for choosing a file | 37 // Implementation of SelectFileDialog that shows an UI for choosing a file |
| 36 // or folder. | 38 // or folder. |
| 37 class SelectFileDialogImpl : public SelectFileDialog { | 39 class SelectFileDialogImpl : public SelectFileDialog { |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 HtmlDialogUIDelegate** delegate = HtmlDialogUI::GetPropertyAccessor(). | 478 HtmlDialogUIDelegate** delegate = HtmlDialogUI::GetPropertyAccessor(). |
| 477 GetProperty(web_ui_->tab_contents()->property_bag()); | 479 GetProperty(web_ui_->tab_contents()->property_bag()); |
| 478 HtmlDialogView* containing_view = static_cast<HtmlDialogView*>(*delegate); | 480 HtmlDialogView* containing_view = static_cast<HtmlDialogView*>(*delegate); |
| 479 DCHECK(containing_view); | 481 DCHECK(containing_view); |
| 480 | 482 |
| 481 containing_view->GetWindow()->UpdateWindowTitle(); | 483 containing_view->GetWindow()->UpdateWindowTitle(); |
| 482 containing_view->GetWindow()->non_client_view()->SchedulePaint(); | 484 containing_view->GetWindow()->non_client_view()->SchedulePaint(); |
| 483 } | 485 } |
| 484 #endif | 486 #endif |
| 485 } | 487 } |
| OLD | NEW |