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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
245 | 245 |
246 // Invoked when the model has been completely changed. | 246 // Invoked when the model has been completely changed. |
247 virtual void OnModelChanged() = 0; | 247 virtual void OnModelChanged() = 0; |
248 | 248 |
249 // Invoked when a range of items has changed. | 249 // Invoked when a range of items has changed. |
250 virtual void OnItemsChanged(int start, int length) = 0; | 250 virtual void OnItemsChanged(int start, int length) = 0; |
251 | 251 |
252 // Invoked when new items are added. | 252 // Invoked when new items are added. |
253 virtual void OnItemsAdded(int start, int length) = 0; | 253 virtual void OnItemsAdded(int start, int length) = 0; |
254 | 254 |
255 // Invoked when a range of items is to be immediately removed. | |
Charlie Reis
2012/04/23 22:19:51
Worthwhile to add a comment saying why this is use
nasko
2012/04/24 18:14:29
Done.
| |
256 virtual void OnItemsToBeRemoved(int start, int length) = 0; | |
Charlie Reis
2012/04/23 22:19:51
Should we make this an empty implementation (like
nasko
2012/04/24 18:14:29
This is a good point. I've made it non-virtual wit
| |
257 | |
255 // Invoked when a range of items has been removed. | 258 // Invoked when a range of items has been removed. |
256 virtual void OnItemsRemoved(int start, int length) = 0; | 259 virtual void OnItemsRemoved(int start, int length) = 0; |
257 | 260 |
258 // Invoked when the initialization of the model has been finished and | 261 // Invoked when the initialization of the model has been finished and |
259 // periodical updates is started. The first periodical update will be done | 262 // periodical updates is started. The first periodical update will be done |
260 // in a few seconds. (depending on platform) | 263 // in a few seconds. (depending on platform) |
261 virtual void OnReadyPeriodicalUpdate() {} | 264 virtual void OnReadyPeriodicalUpdate() {} |
262 }; | 265 }; |
263 | 266 |
264 // The model that the TaskManager is using. | 267 // The model that the TaskManager is using. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
327 bool GetFPS(int index, float* result) const; | 330 bool GetFPS(int index, float* result) const; |
328 | 331 |
329 // Gets the sqlite memory (in byte). Return false if the resource for the | 332 // Gets the sqlite memory (in byte). Return false if the resource for the |
330 // given row doesn't report information. | 333 // given row doesn't report information. |
331 bool GetSqliteMemoryUsedBytes(int index, size_t* result) const; | 334 bool GetSqliteMemoryUsedBytes(int index, size_t* result) const; |
332 | 335 |
333 // Gets the amount of memory allocated for javascript. Returns false if the | 336 // Gets the amount of memory allocated for javascript. Returns false if the |
334 // resource for the given row isn't a renderer. | 337 // resource for the given row isn't a renderer. |
335 bool GetV8Memory(int index, size_t* result) const; | 338 bool GetV8Memory(int index, size_t* result) const; |
336 | 339 |
340 // Gets the amount of memory used for javascript. Returns false if the | |
341 // resource for the given row isn't a renderer. | |
342 bool GetV8MemoryUsed(int index, size_t* result) const; | |
343 | |
337 // Returns true if resource for the given row can be activated. | 344 // Returns true if resource for the given row can be activated. |
338 bool CanActivate(int index) const; | 345 bool CanActivate(int index) const; |
339 | 346 |
340 // Returns true if resource for the given row can be inspected using developer | 347 // Returns true if resource for the given row can be inspected using developer |
341 // tools. | 348 // tools. |
342 bool CanInspect(int index) const; | 349 bool CanInspect(int index) const; |
343 | 350 |
344 // Invokes or reveals developer tools window for resource in the given row. | 351 // Invokes or reveals developer tools window for resource in the given row. |
345 void Inspect(int index) const; | 352 void Inspect(int index) const; |
346 | 353 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
548 // A salt lick for the goats. | 555 // A salt lick for the goats. |
549 uint64 goat_salt_; | 556 uint64 goat_salt_; |
550 | 557 |
551 // Resource identifier that is unique within single session. | 558 // Resource identifier that is unique within single session. |
552 int last_unique_id_; | 559 int last_unique_id_; |
553 | 560 |
554 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 561 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
555 }; | 562 }; |
556 | 563 |
557 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 564 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
OLD | NEW |