| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser_dialogs.h" | 5 #include "chrome/browser/ui/browser_dialogs.h" |
| 6 | 6 |
| 7 #include <memory> |
| 8 |
| 7 #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" | 9 #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" |
| 8 #include "chrome/browser/extensions/chrome_extension_chooser_dialog.h" | 10 #include "chrome/browser/extensions/chrome_extension_chooser_dialog.h" |
| 9 #include "chrome/browser/extensions/extension_install_prompt.h" | 11 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 10 #include "chrome/browser/ui/login/login_handler.h" | 12 #include "chrome/browser/ui/login/login_handler.h" |
| 11 #include "chrome/browser/ui/views/new_task_manager_view.h" | 13 #include "chrome/browser/ui/views/new_task_manager_view.h" |
| 14 #include "components/chooser_controller/chooser_controller.h" |
| 12 | 15 |
| 13 // This file provides definitions of desktop browser dialog-creation methods for | 16 // This file provides definitions of desktop browser dialog-creation methods for |
| 14 // all toolkit-views platforms other than Mac. It also provides the definitions | 17 // all toolkit-views platforms other than Mac. It also provides the definitions |
| 15 // on Mac when mac_views_browser=1 is specified in GYP_DEFINES. The file is | 18 // on Mac when mac_views_browser=1 is specified in GYP_DEFINES. The file is |
| 16 // excluded in a Mac Cocoa build: definitions under chrome/browser/ui/cocoa may | 19 // excluded in a Mac Cocoa build: definitions under chrome/browser/ui/cocoa may |
| 17 // select at runtime whether to show a Cocoa dialog, or the toolkit-views dialog | 20 // select at runtime whether to show a Cocoa dialog, or the toolkit-views dialog |
| 18 // provided by browser_dialogs.h. | 21 // provided by browser_dialogs.h. |
| 19 | 22 |
| 20 // static | 23 // static |
| 21 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, | 24 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 36 ExtensionInstallPrompt::ShowDialogCallback | 39 ExtensionInstallPrompt::ShowDialogCallback |
| 37 ExtensionInstallPrompt::GetDefaultShowDialogCallback() { | 40 ExtensionInstallPrompt::GetDefaultShowDialogCallback() { |
| 38 return ExtensionInstallPrompt::GetViewsShowDialogCallback(); | 41 return ExtensionInstallPrompt::GetViewsShowDialogCallback(); |
| 39 } | 42 } |
| 40 | 43 |
| 41 void ChromeDevicePermissionsPrompt::ShowDialog() { | 44 void ChromeDevicePermissionsPrompt::ShowDialog() { |
| 42 ShowDialogViews(); | 45 ShowDialogViews(); |
| 43 } | 46 } |
| 44 | 47 |
| 45 void ChromeExtensionChooserDialog::ShowDialog( | 48 void ChromeExtensionChooserDialog::ShowDialog( |
| 46 ChooserController* chooser_controller) const { | 49 std::unique_ptr<ChooserController> chooser_controller) const { |
| 47 ShowDialogImpl(chooser_controller); | 50 ShowDialogImpl(std::move(chooser_controller)); |
| 48 } | 51 } |
| 49 | 52 |
| 50 namespace chrome { | 53 namespace chrome { |
| 51 | 54 |
| 52 ui::TableModel* ShowTaskManager(Browser* browser) { | 55 ui::TableModel* ShowTaskManager(Browser* browser) { |
| 53 return task_management::NewTaskManagerView::Show(browser); | 56 return task_management::NewTaskManagerView::Show(browser); |
| 54 } | 57 } |
| 55 | 58 |
| 56 void HideTaskManager() { | 59 void HideTaskManager() { |
| 57 task_management::NewTaskManagerView::Hide(); | 60 task_management::NewTaskManagerView::Hide(); |
| 58 } | 61 } |
| 59 | 62 |
| 60 bool NotifyOldTaskManagerBytesRead(const net::URLRequest& request, | 63 bool NotifyOldTaskManagerBytesRead(const net::URLRequest& request, |
| 61 int64_t bytes_read) { | 64 int64_t bytes_read) { |
| 62 return false; | 65 return false; |
| 63 } | 66 } |
| 64 | 67 |
| 65 } // namespace chrome | 68 } // namespace chrome |
| OLD | NEW |