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

Unified Diff: chrome/browser/ui/cocoa/task_manager_mac.mm

Issue 2724923004: cocoa: add --use-views-task-manager (Closed)
Patch Set: add histogram enum entries Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_features.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/task_manager_mac.mm
diff --git a/chrome/browser/ui/cocoa/task_manager_mac.mm b/chrome/browser/ui/cocoa/task_manager_mac.mm
index 178681ab230a6f625c119ebee54dc5451fbf01e1..47d6757764980fc7482f4513bb1f184d7214bbee 100644
--- a/chrome/browser/ui/cocoa/task_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/task_manager_mac.mm
@@ -9,6 +9,7 @@
#include <algorithm>
#include <vector>
+#include "base/feature_list.h"
#include "base/mac/bundle_locations.h"
#include "base/macros.h"
#include "base/strings/sys_string_conversions.h"
@@ -19,6 +20,7 @@
#include "chrome/browser/ui/browser_dialogs.h"
#import "chrome/browser/ui/cocoa/window_size_autosaver.h"
#include "chrome/browser/ui/task_manager/task_manager_columns.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "components/prefs/pref_service.h"
@@ -35,6 +37,10 @@ NSString* ColumnIdentifier(int id) {
return [NSString stringWithFormat:@"%d", id];
}
+bool ShouldUseViewsTaskManager() {
+ return base::FeatureList::IsEnabled(features::kViewsTaskManager);
+}
+
} // namespace
@interface TaskManagerWindowController (Private)
@@ -639,10 +645,14 @@ namespace chrome {
// Declared in browser_dialogs.h.
task_manager::TaskManagerTableModel* ShowTaskManager(Browser* browser) {
+ if (ShouldUseViewsTaskManager())
+ return chrome::ShowTaskManagerViews(browser);
return task_manager::TaskManagerMac::Show();
}
void HideTaskManager() {
+ if (ShouldUseViewsTaskManager())
+ return chrome::HideTaskManagerViews();
task_manager::TaskManagerMac::Hide();
}
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698