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

Side by Side Diff: chrome/browser/task_manager/task_manager.h

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 2 Created 8 years, 7 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 unified diff | Download patch
OLDNEW
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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/memory/singleton.h" 16 #include "base/memory/singleton.h"
17 #include "base/observer_list.h" 17 #include "base/observer_list.h"
18 #include "base/process_util.h" 18 #include "base/process_util.h"
19 #include "base/string16.h" 19 #include "base/string16.h"
20 #include "base/timer.h" 20 #include "base/timer.h"
21 #include "chrome/browser/renderer_host/web_cache_manager.h" 21 #include "chrome/browser/renderer_host/web_cache_manager.h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
23 23
24 class Extension;
25 class SkBitmap; 24 class SkBitmap;
26 class TabContentsWrapper; 25 class TabContentsWrapper;
27 class TaskManagerModel; 26 class TaskManagerModel;
28 27
29 namespace base { 28 namespace base {
30 class ProcessMetrics; 29 class ProcessMetrics;
31 } 30 }
31
32 namespace extensions {
33 class Extension;
34 }
35
32 namespace net { 36 namespace net {
33 class URLRequest; 37 class URLRequest;
34 } 38 }
35 39
36 #define TASKMANAGER_RESOURCE_TYPE_LIST(def) \ 40 #define TASKMANAGER_RESOURCE_TYPE_LIST(def) \
37 def(BROWSER) /* The main browser process. */ \ 41 def(BROWSER) /* The main browser process. */ \
38 def(RENDERER) /* A normal WebContents renderer process. */ \ 42 def(RENDERER) /* A normal WebContents renderer process. */ \
39 def(EXTENSION) /* An extension or app process. */ \ 43 def(EXTENSION) /* An extension or app process. */ \
40 def(NOTIFICATION) /* A notification process. */ \ 44 def(NOTIFICATION) /* A notification process. */ \
41 def(PLUGIN) /* A plugin process. */ \ 45 def(PLUGIN) /* A plugin process. */ \
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 82 }
79 83
80 virtual bool ReportsFPS() const { return false; } 84 virtual bool ReportsFPS() const { return false; }
81 virtual float GetFPS() const { return 0.0f; } 85 virtual float GetFPS() const { return 0.0f; }
82 86
83 virtual bool ReportsSqliteMemoryUsed() const { return false; } 87 virtual bool ReportsSqliteMemoryUsed() const { return false; }
84 virtual size_t SqliteMemoryUsedBytes() const { return 0; } 88 virtual size_t SqliteMemoryUsedBytes() const { return 0; }
85 89
86 // Return extension associated with the resource, or NULL 90 // Return extension associated with the resource, or NULL
87 // if not applicable. 91 // if not applicable.
88 virtual const Extension* GetExtension() const { return NULL; } 92 virtual const extensions::Extension* GetExtension() const { return NULL; }
89 93
90 virtual bool ReportsV8MemoryStats() const { return false; } 94 virtual bool ReportsV8MemoryStats() const { return false; }
91 virtual size_t GetV8MemoryAllocated() const { return 0; } 95 virtual size_t GetV8MemoryAllocated() const { return 0; }
92 virtual size_t GetV8MemoryUsed() const { return 0; } 96 virtual size_t GetV8MemoryUsed() const { return 0; }
93 97
94 // Returns true if this resource can be inspected using developer tools. 98 // Returns true if this resource can be inspected using developer tools.
95 virtual bool CanInspect() const { return false; } 99 virtual bool CanInspect() const { return false; }
96 100
97 // Invokes or reveals developer tools window for this resource. 101 // Invokes or reveals developer tools window for this resource.
98 virtual void Inspect() const {} 102 virtual void Inspect() const {}
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 // extensions. It is not meant to be displayed to the user. 386 // extensions. It is not meant to be displayed to the user.
383 int GetUniqueChildProcessId(int index) const; 387 int GetUniqueChildProcessId(int index) const;
384 388
385 // Returns the type of the given resource. 389 // Returns the type of the given resource.
386 TaskManager::Resource::Type GetResourceType(int index) const; 390 TaskManager::Resource::Type GetResourceType(int index) const;
387 391
388 // Returns TabContentsWrapper of given resource or NULL if not applicable. 392 // Returns TabContentsWrapper of given resource or NULL if not applicable.
389 TabContentsWrapper* GetResourceTabContents(int index) const; 393 TabContentsWrapper* GetResourceTabContents(int index) const;
390 394
391 // Returns Extension of given resource or NULL if not applicable. 395 // Returns Extension of given resource or NULL if not applicable.
392 const Extension* GetResourceExtension(int index) const; 396 const extensions::Extension* GetResourceExtension(int index) const;
393 397
394 void AddResource(TaskManager::Resource* resource); 398 void AddResource(TaskManager::Resource* resource);
395 void RemoveResource(TaskManager::Resource* resource); 399 void RemoveResource(TaskManager::Resource* resource);
396 400
397 void StartUpdating(); 401 void StartUpdating();
398 void StopUpdating(); 402 void StopUpdating();
399 403
400 void Clear(); // Removes all items. 404 void Clear(); // Removes all items.
401 405
402 // Sends OnModelChanged() to all observers to inform them of significant 406 // Sends OnModelChanged() to all observers to inform them of significant
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 // A salt lick for the goats. 552 // A salt lick for the goats.
549 uint64 goat_salt_; 553 uint64 goat_salt_;
550 554
551 // Resource identifier that is unique within single session. 555 // Resource identifier that is unique within single session.
552 int last_unique_id_; 556 int last_unique_id_;
553 557
554 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); 558 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel);
555 }; 559 };
556 560
557 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ 561 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698