| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 10 #include <string> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 virtual size_t SqliteMemoryUsedBytes() const { return 0; } | 78 virtual size_t SqliteMemoryUsedBytes() const { return 0; } |
| 79 | 79 |
| 80 // Return extension associated with the resource, or NULL | 80 // Return extension associated with the resource, or NULL |
| 81 // if not applicable. | 81 // if not applicable. |
| 82 virtual const Extension* GetExtension() const { return NULL; } | 82 virtual const Extension* GetExtension() const { return NULL; } |
| 83 | 83 |
| 84 virtual bool ReportsV8MemoryStats() const { return false; } | 84 virtual bool ReportsV8MemoryStats() const { return false; } |
| 85 virtual size_t GetV8MemoryAllocated() const { return 0; } | 85 virtual size_t GetV8MemoryAllocated() const { return 0; } |
| 86 virtual size_t GetV8MemoryUsed() const { return 0; } | 86 virtual size_t GetV8MemoryUsed() const { return 0; } |
| 87 | 87 |
| 88 // Returns true if this resource can be inspected using developer tools. |
| 89 virtual bool CanInspect() const { return false; } |
| 90 |
| 91 // Invokes or reveals developer tools window for this resource. |
| 92 virtual void Inspect() const {} |
| 93 |
| 88 // A helper function for ActivateFocusedTab. Returns NULL by default | 94 // A helper function for ActivateFocusedTab. Returns NULL by default |
| 89 // because not all resources have an associated tab. | 95 // because not all resources have an associated tab. |
| 90 virtual TabContentsWrapper* GetTabContents() const { return NULL; } | 96 virtual TabContentsWrapper* GetTabContents() const { return NULL; } |
| 91 | 97 |
| 92 // Whether this resource does report the network usage accurately. | 98 // Whether this resource does report the network usage accurately. |
| 93 // This controls whether 0 or N/A is displayed when no bytes have been | 99 // This controls whether 0 or N/A is displayed when no bytes have been |
| 94 // reported as being read. This is because some plugins do not report the | 100 // reported as being read. This is because some plugins do not report the |
| 95 // bytes read and we don't want to display a misleading 0 value in that | 101 // bytes read and we don't want to display a misleading 0 value in that |
| 96 // case. | 102 // case. |
| 97 virtual bool SupportNetworkUsage() const = 0; | 103 virtual bool SupportNetworkUsage() const = 0; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 bool GetFPS(int index, float* result) const; | 286 bool GetFPS(int index, float* result) const; |
| 281 | 287 |
| 282 // Gets the sqlite memory (in byte). Return false if the resource for the | 288 // Gets the sqlite memory (in byte). Return false if the resource for the |
| 283 // given row doesn't report information. | 289 // given row doesn't report information. |
| 284 bool GetSqliteMemoryUsedBytes(int index, size_t* result) const; | 290 bool GetSqliteMemoryUsedBytes(int index, size_t* result) const; |
| 285 | 291 |
| 286 // Gets the amount of memory allocated for javascript. Returns false if the | 292 // Gets the amount of memory allocated for javascript. Returns false if the |
| 287 // resource for the given row isn't a renderer. | 293 // resource for the given row isn't a renderer. |
| 288 bool GetV8Memory(int index, size_t* result) const; | 294 bool GetV8Memory(int index, size_t* result) const; |
| 289 | 295 |
| 296 // Returns true if resource for the given row can be inspected using developer |
| 297 // tools. |
| 298 bool CanInspect(int index) const; |
| 299 |
| 300 // Invokes or reveals developer tools window for resource in the given row. |
| 301 void Inspect(int index) const; |
| 302 |
| 290 // See design doc at http://go/at-teleporter for more information. | 303 // See design doc at http://go/at-teleporter for more information. |
| 291 int GetGoatsTeleported(int index) const; | 304 int GetGoatsTeleported(int index) const; |
| 292 | 305 |
| 293 // Returns true if the resource is first/last in its group (resources | 306 // Returns true if the resource is first/last in its group (resources |
| 294 // rendered by the same process are groupped together). | 307 // rendered by the same process are groupped together). |
| 295 bool IsResourceFirstInGroup(int index) const; | 308 bool IsResourceFirstInGroup(int index) const; |
| 296 bool IsResourceLastInGroup(int index) const; | 309 bool IsResourceLastInGroup(int index) const; |
| 297 | 310 |
| 298 // Returns true if the resource runs in the background (not visible to the | 311 // Returns true if the resource runs in the background (not visible to the |
| 299 // user, e.g. extension background pages and BackgroundContents). | 312 // user, e.g. extension background pages and BackgroundContents). |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 // Whether we are currently in the process of updating. | 494 // Whether we are currently in the process of updating. |
| 482 UpdateState update_state_; | 495 UpdateState update_state_; |
| 483 | 496 |
| 484 // A salt lick for the goats. | 497 // A salt lick for the goats. |
| 485 int goat_salt_; | 498 int goat_salt_; |
| 486 | 499 |
| 487 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 500 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
| 488 }; | 501 }; |
| 489 | 502 |
| 490 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 503 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
| OLD | NEW |