| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/cocoa/task_manager_mac.h" | 5 #include "chrome/browser/ui/cocoa/task_manager_mac.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 | 587 |
| 588 // static | 588 // static |
| 589 void TaskManagerMac::Hide() { | 589 void TaskManagerMac::Hide() { |
| 590 if (instance_) | 590 if (instance_) |
| 591 [instance_->window_controller_ close]; | 591 [instance_->window_controller_ close]; |
| 592 } | 592 } |
| 593 | 593 |
| 594 namespace chrome { | 594 namespace chrome { |
| 595 | 595 |
| 596 // Declared in browser_dialogs.h. | 596 // Declared in browser_dialogs.h. |
| 597 void ShowTaskManager(Browser* browser) { | 597 ui::TableModel* ShowTaskManager(Browser* browser) { |
| 598 if (chrome::ToolkitViewsDialogsEnabled()) { | 598 if (chrome::ToolkitViewsDialogsEnabled()) |
| 599 chrome::ShowTaskManagerViews(browser); | 599 return chrome::ShowTaskManagerViews(browser); |
| 600 return; | |
| 601 } | |
| 602 | 600 |
| 603 TaskManagerMac::Show(); | 601 TaskManagerMac::Show(); |
| 602 return nullptr; // No ui::TableModel* to return on Mac, so return nullptr. |
| 604 } | 603 } |
| 605 | 604 |
| 606 void HideTaskManager() { | 605 void HideTaskManager() { |
| 607 if (chrome::ToolkitViewsDialogsEnabled()) { | 606 if (chrome::ToolkitViewsDialogsEnabled()) { |
| 608 chrome::HideTaskManagerViews(); | 607 chrome::HideTaskManagerViews(); |
| 609 return; | 608 return; |
| 610 } | 609 } |
| 611 | 610 |
| 612 TaskManagerMac::Hide(); | 611 TaskManagerMac::Hide(); |
| 613 } | 612 } |
| 614 | 613 |
| 615 } // namespace chrome | 614 } // namespace chrome |
| 616 | 615 |
| OLD | NEW |