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

Side by Side Diff: content/browser/process_resource_usage_impl.h

Issue 972083002: Report utility process JS memory in task manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-oop
Patch Set: Redesign. Created 5 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_PROCESS_RESOURCE_USAGE_IMPL_H_
6 #define CONTENT_BROWSER_PROCESS_RESOURCE_USAGE_IMPL_H_
7
8 #include "base/basictypes.h"
9 #include "base/threading/thread_checker.h"
10 #include "content/public/browser/process_resource_usage.h"
11 #include "content/public/common/resource_usage_reporter.mojom.h"
12
13 namespace content {
14
15 class ProcessResourceUsageImpl : public ProcessResourceUsage {
16 public:
17 // Must be called from the same thread that created |service|.
18 explicit ProcessResourceUsageImpl(ResourceUsageReporterPtr service);
19 ~ProcessResourceUsageImpl() override;
20
21 // ProcessResourceUsage implementation.
22 void Refresh() override;
23 bool ReportsV8MemoryStats() const override;
24 size_t GetV8MemoryAllocated() const override;
25 size_t GetV8MemoryUsed() const override;
26
27 private:
28 // Mojo IPC callback.
29 void OnRefreshDone(ResourceUsageDataPtr data);
30
31 ResourceUsageReporterPtr service_;
32 bool update_in_progress_;
33
34 ResourceUsageDataPtr stats_;
35
36 base::ThreadChecker thread_checker_;
37
38 DISALLOW_COPY_AND_ASSIGN(ProcessResourceUsageImpl);
39 };
40
41 } // namespace content
42
43 #endif // CONTENT_BROWSER_PROCESS_RESOURCE_USAGE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698