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