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

Unified Diff: chrome/browser/task_manager.h

Issue 140044: Reorganize the way the task manager is constructed.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/gtk/task_manager_gtk.cc ('k') | chrome/browser/task_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager.h
===================================================================
--- chrome/browser/task_manager.h (revision 18919)
+++ chrome/browser/task_manager.h (working copy)
@@ -24,7 +24,6 @@
class MessageLoop;
class SkBitmap;
class TaskManager;
-class TaskManagerView;
class TaskManagerModel;
struct BytesReadParam;
@@ -89,25 +88,16 @@
static void RegisterPrefs(PrefService* prefs);
- // Call this method to show the Task Manager.
- // Only one instance of Task Manager is created, so if the Task Manager has
- // already be opened, it is reopened. If it is currently opened, then it is
- // moved to the front.
- static void Open();
+ // Returns true if the process at the specified index is the browser process.
+ bool IsBrowserProcess(int index) const;
- // Close the task manager if it's currently opened.
- static void Close();
+ // Terminates the process at the specified index.
+ void KillProcess(int index);
- // Returns true if the current selection includes the browser process.
- bool BrowserProcessIsSelected();
+ // Activates the browser tab associated with the process in the specified
+ // index.
+ void ActivateProcess(int index);
- // Terminates the selected tab(s) in the list.
- void KillSelectedProcesses();
-
- // Activates the browser tab associated with the focused row in the task
- // manager table. This happens when the user double clicks or hits return.
- void ActivateFocusedTab();
-
void AddResourceProvider(ResourceProvider* provider);
void RemoveResourceProvider(ResourceProvider* provider);
@@ -120,6 +110,11 @@
void OnWindowClosed();
+ // Returns the singleton instance (and initializes it if necessary).
+ static TaskManager* GetInstance();
+
+ TaskManagerModel* model() const { return model_.get(); }
+
private:
FRIEND_TEST(TaskManagerTest, Basic);
FRIEND_TEST(TaskManagerTest, Resources);
@@ -130,18 +125,10 @@
~TaskManager();
- void CreateView();
-
- // Returns the singleton instance (and initializes it if necessary).
- static TaskManager* GetInstance();
-
// The model used for gathering and processing task data. It is ref counted
// because it is passed as a parameter to MessageLoop::InvokeLater().
scoped_refptr<TaskManagerModel> model_;
- // A container containing the buttons and table.
- TaskManagerView* view_;
-
DISALLOW_COPY_AND_ASSIGN(TaskManager);
};
@@ -348,16 +335,4 @@
DISALLOW_COPY_AND_ASSIGN(TaskManagerModel);
};
-class TaskManagerView {
- public:
- virtual ~TaskManagerView() {}
-
- virtual void GetSelection(std::vector<int>* selection) = 0;
- virtual void GetFocused(std::vector<int>* focused) = 0;
-
- virtual void OpenWindow() = 0;
- virtual void ActivateWindow() = 0;
- virtual void CloseWindow() = 0;
-};
-
#endif // CHROME_BROWSER_TASK_MANAGER_H_
« no previous file with comments | « chrome/browser/gtk/task_manager_gtk.cc ('k') | chrome/browser/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698