OLD | NEW |
---|---|
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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 | 61 |
62 enum Type { | 62 enum Type { |
63 UNKNOWN = 0, | 63 UNKNOWN = 0, |
64 TASKMANAGER_RESOURCE_TYPE_LIST(TASKMANAGER_RESOURCE_TYPE_LIST_ENUM) | 64 TASKMANAGER_RESOURCE_TYPE_LIST(TASKMANAGER_RESOURCE_TYPE_LIST_ENUM) |
65 }; | 65 }; |
66 | 66 |
67 virtual string16 GetTitle() const = 0; | 67 virtual string16 GetTitle() const = 0; |
68 virtual string16 GetProfileName() const = 0; | 68 virtual string16 GetProfileName() const = 0; |
69 virtual SkBitmap GetIcon() const = 0; | 69 virtual SkBitmap GetIcon() const = 0; |
70 virtual base::ProcessHandle GetProcess() const = 0; | 70 virtual base::ProcessHandle GetProcess() const = 0; |
71 virtual int GetUniqueChildProcessId() const = 0; | |
71 virtual Type GetType() const = 0; | 72 virtual Type GetType() const = 0; |
72 virtual int GetRoutingID() const { return 0; } | 73 virtual int GetRoutingID() const { return 0; } |
73 | 74 |
74 virtual bool ReportsCacheStats() const { return false; } | 75 virtual bool ReportsCacheStats() const { return false; } |
75 virtual WebKit::WebCache::ResourceTypeStats GetWebCoreCacheStats() const { | 76 virtual WebKit::WebCache::ResourceTypeStats GetWebCoreCacheStats() const { |
76 return WebKit::WebCache::ResourceTypeStats(); | 77 return WebKit::WebCache::ResourceTypeStats(); |
77 } | 78 } |
78 | 79 |
79 virtual bool ReportsFPS() const { return false; } | 80 virtual bool ReportsFPS() const { return false; } |
80 virtual float GetFPS() const { return 0.0f; } | 81 virtual float GetFPS() const { return 0.0f; } |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
369 int GetResourceIndexForGroup(int group_index, int index_in_group) const; | 370 int GetResourceIndexForGroup(int group_index, int index_in_group) const; |
370 | 371 |
371 // Compares values in column |col_id| and rows |row1|, |row2|. | 372 // Compares values in column |col_id| and rows |row1|, |row2|. |
372 // Returns -1 if value in |row1| is less than value in |row2|, | 373 // Returns -1 if value in |row1| is less than value in |row2|, |
373 // 0 if they are equal, and 1 otherwise. | 374 // 0 if they are equal, and 1 otherwise. |
374 int CompareValues(int row1, int row2, int col_id) const; | 375 int CompareValues(int row1, int row2, int col_id) const; |
375 | 376 |
376 // Returns process handle for given resource. | 377 // Returns process handle for given resource. |
377 base::ProcessHandle GetResourceProcessHandle(int index) const; | 378 base::ProcessHandle GetResourceProcessHandle(int index) const; |
378 | 379 |
380 // Returns the unique child process ID. | |
Charlie Reis
2012/04/04 17:53:40
This needs more of a description to distinguish it
nasko
2012/04/04 18:13:19
Done.
| |
381 int GetUniqueChildProcessId(int index) const; | |
382 | |
379 // Returns the type of the given resource. | 383 // Returns the type of the given resource. |
380 TaskManager::Resource::Type GetResourceType(int index) const; | 384 TaskManager::Resource::Type GetResourceType(int index) const; |
381 | 385 |
382 // Returns TabContents of given resource or NULL if not applicable. | 386 // Returns TabContents of given resource or NULL if not applicable. |
383 TabContentsWrapper* GetResourceTabContents(int index) const; | 387 TabContentsWrapper* GetResourceTabContents(int index) const; |
384 | 388 |
385 // Returns Extension of given resource or NULL if not applicable. | 389 // Returns Extension of given resource or NULL if not applicable. |
386 const Extension* GetResourceExtension(int index) const; | 390 const Extension* GetResourceExtension(int index) const; |
387 | 391 |
388 void AddResource(TaskManager::Resource* resource); | 392 void AddResource(TaskManager::Resource* resource); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
542 // A salt lick for the goats. | 546 // A salt lick for the goats. |
543 uint64 goat_salt_; | 547 uint64 goat_salt_; |
544 | 548 |
545 // Resource identifier that is unique within single session. | 549 // Resource identifier that is unique within single session. |
546 int last_unique_id_; | 550 int last_unique_id_; |
547 | 551 |
548 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 552 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
549 }; | 553 }; |
550 | 554 |
551 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 555 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
OLD | NEW |