OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RESOURCE_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_RESOURCE_PROVIDER_H_ |
6 #define CHROME_BROWSER_TASK_MANAGER_RESOURCE_PROVIDER_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_RESOURCE_PROVIDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 virtual bool ReportsCacheStats() const; | 67 virtual bool ReportsCacheStats() const; |
68 virtual blink::WebCache::ResourceTypeStats GetWebCoreCacheStats() const; | 68 virtual blink::WebCache::ResourceTypeStats GetWebCoreCacheStats() const; |
69 | 69 |
70 virtual bool ReportsSqliteMemoryUsed() const; | 70 virtual bool ReportsSqliteMemoryUsed() const; |
71 virtual size_t SqliteMemoryUsedBytes() const; | 71 virtual size_t SqliteMemoryUsedBytes() const; |
72 | 72 |
73 virtual bool ReportsV8MemoryStats() const; | 73 virtual bool ReportsV8MemoryStats() const; |
74 virtual size_t GetV8MemoryAllocated() const; | 74 virtual size_t GetV8MemoryAllocated() const; |
75 virtual size_t GetV8MemoryUsed() const; | 75 virtual size_t GetV8MemoryUsed() const; |
76 | 76 |
77 // Returns true if this resource can be inspected using developer tools. | |
78 virtual bool CanInspect() const; | |
79 | |
80 // Invokes or reveals developer tools window for this resource. | |
81 virtual void Inspect() const {} | |
82 | |
83 // A helper function for ActivateProcess when selected resource refers | 77 // A helper function for ActivateProcess when selected resource refers |
84 // to a Tab or other window containing web contents. Returns NULL by | 78 // to a Tab or other window containing web contents. Returns NULL by |
85 // default because not all resources have an associated web contents. | 79 // default because not all resources have an associated web contents. |
86 virtual content::WebContents* GetWebContents() const; | 80 virtual content::WebContents* GetWebContents() const; |
87 | 81 |
88 // Whether this resource does report the network usage accurately. | 82 // Whether this resource does report the network usage accurately. |
89 // This controls whether 0 or N/A is displayed when no bytes have been | 83 // This controls whether 0 or N/A is displayed when no bytes have been |
90 // reported as being read. This is because some plugins do not report the | 84 // reported as being read. This is because some plugins do not report the |
91 // bytes read and we don't want to display a misleading 0 value in that | 85 // bytes read and we don't want to display a misleading 0 value in that |
92 // case. | 86 // case. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 141 |
148 protected: | 142 protected: |
149 friend class base::RefCountedThreadSafe<ResourceProvider>; | 143 friend class base::RefCountedThreadSafe<ResourceProvider>; |
150 | 144 |
151 virtual ~ResourceProvider() {} | 145 virtual ~ResourceProvider() {} |
152 }; | 146 }; |
153 | 147 |
154 } // namespace task_manager | 148 } // namespace task_manager |
155 | 149 |
156 #endif // CHROME_BROWSER_TASK_MANAGER_RESOURCE_PROVIDER_H_ | 150 #endif // CHROME_BROWSER_TASK_MANAGER_RESOURCE_PROVIDER_H_ |
OLD | NEW |