Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: chrome/browser/ui/cocoa/task_manager_mac.mm

Issue 2148243004: chrome::ShowTaskManager: refine return type to eliminate a downcast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@triple_click_tm
Patch Set: Fix mac compile. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/browser_dialogs.h ('k') | chrome/browser/ui/views/browser_dialogs_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 590
591 // static 591 // static
592 void TaskManagerMac::Hide() { 592 void TaskManagerMac::Hide() {
593 if (instance_) 593 if (instance_)
594 [instance_->window_controller_ close]; 594 [instance_->window_controller_ close];
595 } 595 }
596 596
597 namespace chrome { 597 namespace chrome {
598 598
599 // Declared in browser_dialogs.h. 599 // Declared in browser_dialogs.h.
600 ui::TableModel* ShowTaskManager(Browser* browser) { 600 task_management::TaskManagerTableModel* ShowTaskManager(Browser* browser) {
601 if (chrome::ToolkitViewsDialogsEnabled()) 601 if (chrome::ToolkitViewsDialogsEnabled())
602 return chrome::ShowTaskManagerViews(browser); 602 return chrome::ShowTaskManagerViews(browser);
603 603
604 TaskManagerMac::Show(); 604 TaskManagerMac::Show();
605 return nullptr; // No ui::TableModel* to return on Mac, so return nullptr. 605 return nullptr; // No ui::TableModel* to return on Mac, so return nullptr.
606 } 606 }
607 607
608 void HideTaskManager() { 608 void HideTaskManager() {
609 if (chrome::ToolkitViewsDialogsEnabled()) { 609 if (chrome::ToolkitViewsDialogsEnabled()) {
610 chrome::HideTaskManagerViews(); 610 chrome::HideTaskManagerViews();
611 return; 611 return;
612 } 612 }
613 613
614 TaskManagerMac::Hide(); 614 TaskManagerMac::Hide();
615 } 615 }
616 616
617 bool NotifyOldTaskManagerBytesRead(const net::URLRequest& request, 617 bool NotifyOldTaskManagerBytesRead(const net::URLRequest& request,
618 int64_t bytes_read) { 618 int64_t bytes_read) {
619 if (task_management::TaskManagerInterface::IsNewTaskManagerEnabled()) 619 if (task_management::TaskManagerInterface::IsNewTaskManagerEnabled())
620 return false; 620 return false;
621 621
622 TaskManager::GetInstance()->model()->NotifyBytesRead(request, bytes_read); 622 TaskManager::GetInstance()->model()->NotifyBytesRead(request, bytes_read);
623 return true; 623 return true;
624 } 624 }
625 625
626 } // namespace chrome 626 } // namespace chrome
627 627
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_dialogs.h ('k') | chrome/browser/ui/views/browser_dialogs_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698