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

Side by Side Diff: chrome/browser/task_management/task_manager_interface.h

Issue 2197483003: Move the Mac Task Manager to the new backend code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark Created 4 years, 4 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
OLDNEW
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 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_
6 #define CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ 6 #define CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 27 matching lines...) Expand all
38 // Concrete implementations have no control over the refresh rate nor the 38 // Concrete implementations have no control over the refresh rate nor the
39 // enabled calculations of the usage of the various resources. 39 // enabled calculations of the usage of the various resources.
40 class TaskManagerInterface { 40 class TaskManagerInterface {
41 public: 41 public:
42 // Registers the task manager related prefs. 42 // Registers the task manager related prefs.
43 static void RegisterPrefs(PrefRegistrySimple* registry); 43 static void RegisterPrefs(PrefRegistrySimple* registry);
44 44
45 // Returns true if the user is allowed to end processes. 45 // Returns true if the user is allowed to end processes.
46 static bool IsEndProcessEnabled(); 46 static bool IsEndProcessEnabled();
47 47
48 #if defined(OS_MACOSX)
49 // On Mac OS, the old task manager is still being used on cocoa.
50 static bool IsNewTaskManagerEnabled();
51 #endif // defined(OS_MACOSX)
52
53 // Gets the existing instance of the task manager if any, otherwise it will 48 // Gets the existing instance of the task manager if any, otherwise it will
54 // create it first. Must be called on the UI thread. 49 // create it first. Must be called on the UI thread.
55 static TaskManagerInterface* GetTaskManager(); 50 static TaskManagerInterface* GetTaskManager();
56 51
57 // This notification will be received on the IO thread from 52 // This notification will be received on the IO thread from
58 // ChromeNetworkDelegate to update the task manager with network usage. 53 // ChromeNetworkDelegate to update the task manager with network usage.
59 static void OnRawBytesRead(const net::URLRequest& request, 54 static void OnRawBytesRead(const net::URLRequest& request,
60 int64_t bytes_read); 55 int64_t bytes_read);
61 56
62 void AddObserver(TaskManagerObserver* observer); 57 void AddObserver(TaskManagerObserver* observer);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 270
276 // The flags containing the enabled resources types calculations. 271 // The flags containing the enabled resources types calculations.
277 int64_t enabled_resources_flags_; 272 int64_t enabled_resources_flags_;
278 273
279 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface); 274 DISALLOW_COPY_AND_ASSIGN(TaskManagerInterface);
280 }; 275 };
281 276
282 } // namespace task_management 277 } // namespace task_management
283 278
284 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_ 279 #endif // CHROME_BROWSER_TASK_MANAGEMENT_TASK_MANAGER_INTERFACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/task_management/task_manager_browsertest.cc ('k') | chrome/browser/task_management/task_manager_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698