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

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

Issue 1912773002: Remove the old task manager view (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig's comments 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
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/callback_forward.h" 15 #include "base/callback_forward.h"
16 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/memory/singleton.h" 19 #include "base/memory/singleton.h"
20 #include "base/observer_list.h" 20 #include "base/observer_list.h"
21 #include "base/strings/string16.h" 21 #include "base/strings/string16.h"
22 #include "build/build_config.h" 22 #include "build/build_config.h"
23 #include "chrome/browser/task_manager/resource_provider.h" 23 #include "chrome/browser/task_manager/resource_provider.h"
24 #include "gpu/ipc/common/memory_stats.h" 24 #include "gpu/ipc/common/memory_stats.h"
25 #include "third_party/WebKit/public/web/WebCache.h" 25 #include "third_party/WebKit/public/web/WebCache.h"
26 26
27 // -----------------------------------------------------------------------------
28 // DEPRECATED:
29 // - This is currently enabled only on MacOSX, and will be removed soon (See
30 // crbug.com/528486).
31 // - Please don't add any new stuff here. See the new implementation in
32 // //src/chrome/browser/task_management.
33 // -----------------------------------------------------------------------------
34 #if !defined(OS_MACOSX)
35 #error "The old task manager is deprecated on non-macos platforms."
36 #endif // defined(OS_MACOSX)
37
38
27 class PrefRegistrySimple; 39 class PrefRegistrySimple;
28 class PrivateWorkingSetSnapshot; 40 class PrivateWorkingSetSnapshot;
29 class TaskManagerModel; 41 class TaskManagerModel;
30 class TaskManagerModelGpuDataManagerObserver; 42 class TaskManagerModelGpuDataManagerObserver;
31 43
32 namespace base { 44 namespace base {
33 class ProcessMetrics; 45 class ProcessMetrics;
34 } 46 }
35 47
36 namespace content { 48 namespace content {
37 class WebContents; 49 class WebContents;
38 } 50 }
39 51
40 namespace extensions { 52 namespace extensions {
41 class Extension; 53 class Extension;
42 } 54 }
43 55
44 namespace gfx { 56 namespace gfx {
45 class ImageSkia; 57 class ImageSkia;
46 } 58 }
47 59
48 namespace net { 60 namespace net {
49 class URLRequest; 61 class URLRequest;
50 } 62 }
51 63
52 // This class is a singleton. 64 // This class is a singleton.
53 class TaskManager { 65 class TaskManager {
54 public: 66 public:
55 static void RegisterPrefs(PrefRegistrySimple* registry);
56
57 // Returns true if the user is allowed to end processes.
58 static bool IsEndProcessEnabled();
59
60 // Returns true if the process at the specified index is the browser process. 67 // Returns true if the process at the specified index is the browser process.
61 bool IsBrowserProcess(int index) const; 68 bool IsBrowserProcess(int index) const;
62 69
63 // Terminates the process at the specified index. 70 // Terminates the process at the specified index.
64 void KillProcess(int index); 71 void KillProcess(int index);
65 72
66 // Activates the browser tab associated with the process in the specified 73 // Activates the browser tab associated with the process in the specified
67 // index. 74 // index.
68 void ActivateProcess(int index); 75 void ActivateProcess(int index);
69 76
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 // All per-Resource values are stored here. 559 // All per-Resource values are stored here.
553 mutable PerResourceCache per_resource_cache_; 560 mutable PerResourceCache per_resource_cache_;
554 561
555 // All per-Process values are stored here. 562 // All per-Process values are stored here.
556 mutable PerProcessCache per_process_cache_; 563 mutable PerProcessCache per_process_cache_;
557 564
558 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); 565 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel);
559 }; 566 };
560 567
561 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ 568 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698