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

Side by Side Diff: chrome/browser/task_manager/task_manager.h

Issue 1861383002: Add TaskManagerEndProcessEnabled policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update supported_on to 52 Created 4 years, 8 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 (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 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_
6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 namespace net { 48 namespace net {
49 class URLRequest; 49 class URLRequest;
50 } 50 }
51 51
52 // This class is a singleton. 52 // This class is a singleton.
53 class TaskManager { 53 class TaskManager {
54 public: 54 public:
55 static void RegisterPrefs(PrefRegistrySimple* registry); 55 static void RegisterPrefs(PrefRegistrySimple* registry);
56 56
57 // Returns true if the user is allowed to end processes.
58 static bool IsEndProcessEnabled();
59
57 // Returns true if the process at the specified index is the browser process. 60 // Returns true if the process at the specified index is the browser process.
58 bool IsBrowserProcess(int index) const; 61 bool IsBrowserProcess(int index) const;
59 62
60 // Terminates the process at the specified index. 63 // Terminates the process at the specified index.
61 void KillProcess(int index); 64 void KillProcess(int index);
62 65
63 // Activates the browser tab associated with the process in the specified 66 // Activates the browser tab associated with the process in the specified
64 // index. 67 // index.
65 void ActivateProcess(int index); 68 void ActivateProcess(int index);
66 69
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // All per-Resource values are stored here. 552 // All per-Resource values are stored here.
550 mutable PerResourceCache per_resource_cache_; 553 mutable PerResourceCache per_resource_cache_;
551 554
552 // All per-Process values are stored here. 555 // All per-Process values are stored here.
553 mutable PerProcessCache per_process_cache_; 556 mutable PerProcessCache per_process_cache_;
554 557
555 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); 558 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel);
556 }; 559 };
557 560
558 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ 561 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698