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

Unified Diff: ui/android/resources/resource_manager_impl.h

Issue 2406103002: [tracing] Add memory usage of Android UI resources to memory-infra (Closed)
Patch Set: Fixes. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ui/android/resources/resource_manager_impl.h
diff --git a/ui/android/resources/resource_manager_impl.h b/ui/android/resources/resource_manager_impl.h
index eef9e9d97bbb62b81fa1b605efc7c3866cc0d62e..1f055763130409826347a77c104c6649c91c8464 100644
--- a/ui/android/resources/resource_manager_impl.h
+++ b/ui/android/resources/resource_manager_impl.h
@@ -8,6 +8,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/trace_event/memory_dump_provider.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/android/resources/resource_manager.h"
#include "ui/android/ui_android_export.h"
@@ -20,7 +21,9 @@ class UIResourceManager;
namespace ui {
-class UI_ANDROID_EXPORT ResourceManagerImpl : public ResourceManager {
+class UI_ANDROID_EXPORT ResourceManagerImpl
+ : public ResourceManager,
+ public base::trace_event::MemoryDumpProvider {
public:
static ResourceManagerImpl* FromJavaObject(jobject jobj);
@@ -78,6 +81,10 @@ class UI_ANDROID_EXPORT ResourceManagerImpl : public ResourceManager {
CrushedSpriteResource::SrcDstRects ProcessCrushedSpriteFrameRects(
std::vector<std::vector<int>> frame_rects_vector);
+ // base::trace_event::MemoryDumpProvider implementation.
+ bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+ base::trace_event::ProcessMemoryDump* pmd) override;
+
private:
friend class TestResourceManagerImpl;

Powered by Google App Engine
This is Rietveld 408576698