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

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

Issue 2593233003: Add a task manager column that shows memory state of processes (Closed)
Patch Set: fix compile error Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_TESTER_H_ 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_TESTER_H_
6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_TESTER_H_ 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_TESTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/memory/memory_coordinator_client.h"
13 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
14 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" 15 #include "chrome/browser/task_manager/task_manager_browsertest_util.h"
15 16
16 namespace task_manager { 17 namespace task_manager {
17 18
18 class ScopedInterceptTableModelObserver; 19 class ScopedInterceptTableModelObserver;
19 class TaskManagerInterface; 20 class TaskManagerInterface;
20 class TaskManagerTableModel; 21 class TaskManagerTableModel;
21 22
22 // An adapter to simplify testing the task manager. 23 // An adapter to simplify testing the task manager.
(...skipping 20 matching lines...) Expand all
43 // necessarily gathered. 44 // necessarily gathered.
44 void ToggleColumnVisibility(ColumnSpecifier column); 45 void ToggleColumnVisibility(ColumnSpecifier column);
45 46
46 // Get the value of a column as an int64. Memory values are in bytes. 47 // Get the value of a column as an int64. Memory values are in bytes.
47 int64_t GetColumnValue(ColumnSpecifier column, int row); 48 int64_t GetColumnValue(ColumnSpecifier column, int row);
48 49
49 // If |row| is associated with a WebContents, return its SessionID. Otherwise, 50 // If |row| is associated with a WebContents, return its SessionID. Otherwise,
50 // return -1. 51 // return -1.
51 int32_t GetTabId(int row); 52 int32_t GetTabId(int row);
52 53
54 // Return the memory state of the process which is associated with |row|.
55 base::MemoryState GetMemoryState(int row);
56
53 // Kill the process of |row|. 57 // Kill the process of |row|.
54 void Kill(int row); 58 void Kill(int row);
55 59
56 // Gets the start index and length of the group to which the task at 60 // Gets the start index and length of the group to which the task at
57 // |row_index| belongs. 61 // |row_index| belongs.
58 void GetRowsGroupRange(int row, int* out_start, int* out_length); 62 void GetRowsGroupRange(int row, int* out_start, int* out_length);
59 63
60 private: 64 private:
61 explicit TaskManagerTester(const base::Closure& on_resource_change); 65 explicit TaskManagerTester(const base::Closure& on_resource_change);
62 66
63 TaskManagerInterface* task_manager(); 67 TaskManagerInterface* task_manager();
64 68
65 TaskManagerTableModel* model_; 69 TaskManagerTableModel* model_;
66 std::unique_ptr<ScopedInterceptTableModelObserver> interceptor_; 70 std::unique_ptr<ScopedInterceptTableModelObserver> interceptor_;
67 }; 71 };
68 72
69 } // namespace task_manager 73 } // namespace task_manager
70 74
71 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_TESTER_H_ 75 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_TESTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_observer.h ('k') | chrome/browser/task_manager/task_manager_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698