diff options
author | petersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-10 22:12:19 +0000 |
---|---|---|
committer | petersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-10 22:12:19 +0000 |
commit | b7937d5ba2a47d0016933fae4f856e83e5a57afb (patch) | |
tree | d8d77aa380b72a5d92a810ebe41e9fb312808a4d /chrome/browser/task_manager.h | |
parent | 2f668e22a495259d53772c6cc055547cd26cd7f1 (diff) | |
download | chromium_src-b7937d5ba2a47d0016933fae4f856e83e5a57afb.zip chromium_src-b7937d5ba2a47d0016933fae4f856e83e5a57afb.tar.gz chromium_src-b7937d5ba2a47d0016933fae4f856e83e5a57afb.tar.bz2 |
Double clicking on an item in the task manager should bring the relevant tab forward.
Review URL: http://codereview.chromium.org/1822
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2026 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager.h')
-rw-r--r-- | chrome/browser/task_manager.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/task_manager.h b/chrome/browser/task_manager.h index 9b8687f..d35b1c2 100644 --- a/chrome/browser/task_manager.h +++ b/chrome/browser/task_manager.h @@ -5,6 +5,9 @@ #ifndef CHROME_BROWSER_TASK_MANAGER_H__ #define CHROME_BROWSER_TASK_MANAGER_H__ +#include <map> +#include <vector> + #include "base/lock.h" #include "base/singleton.h" #include "base/ref_counted.h" @@ -12,6 +15,7 @@ #include "chrome/views/dialog_delegate.h" #include "chrome/views/group_table_view.h" #include "chrome/browser/cache_manager_host.h" +#include "chrome/browser/tab_contents.h" #include "net/url_request/url_request_job_tracker.h" class MessageLoop; @@ -42,10 +46,16 @@ class TaskManager : public ChromeViews::DialogDelegate { // Resources from similar processes are grouped together by the task manager. class Resource { public: + virtual ~Resource() {} + virtual std::wstring GetTitle() const = 0; virtual SkBitmap GetIcon() const = 0; virtual HANDLE GetProcess() const = 0; + // A helper function for ActivateFocusedTab. Returns NULL by default + // because not all resources have an assoiciated tab. + virtual TabContents* GetTabContents() const {return NULL;} + // Whether this resource does report the network usage accurately. // This controls whether 0 or N/A is displayed when no bytes have been // reported as being read. This is because some plugins do not report the @@ -99,6 +109,10 @@ class TaskManager : public ChromeViews::DialogDelegate { // 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); |