summaryrefslogtreecommitdiffstats
path: root/ios/chrome/browser/memory/memory_debugger_manager.h
diff options
context:
space:
mode:
authordroger <droger@chromium.org>2015-04-08 04:59:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-08 12:00:19 +0000
commita7b5e669bd7b9cf14a5b409d39d6673ea512f2f2 (patch)
treed0be93b2b82c48c4ab37826fe7ec62cef3c5eab6 /ios/chrome/browser/memory/memory_debugger_manager.h
parent303b4f842223724c710b89cd342e9382e5c2b7a5 (diff)
downloadchromium_src-a7b5e669bd7b9cf14a5b409d39d6673ea512f2f2.zip
chromium_src-a7b5e669bd7b9cf14a5b409d39d6673ea512f2f2.tar.gz
chromium_src-a7b5e669bd7b9cf14a5b409d39d6673ea512f2f2.tar.bz2
[iOS] Upstream //ios/chrome/browser/memory
Review URL: https://codereview.chromium.org/1057933002 Cr-Commit-Position: refs/heads/master@{#324216}
Diffstat (limited to 'ios/chrome/browser/memory/memory_debugger_manager.h')
-rw-r--r--ios/chrome/browser/memory/memory_debugger_manager.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/ios/chrome/browser/memory/memory_debugger_manager.h b/ios/chrome/browser/memory/memory_debugger_manager.h
new file mode 100644
index 0000000..4cd7941
--- /dev/null
+++ b/ios/chrome/browser/memory/memory_debugger_manager.h
@@ -0,0 +1,26 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_MEMORY_MEMORY_DEBUGGER_MANAGER_H_
+#define IOS_CHROME_BROWSER_MEMORY_MEMORY_DEBUGGER_MANAGER_H_
+
+#import <Foundation/Foundation.h>
+
+class PrefRegistrySimple;
+class PrefService;
+@class UIView;
+
+// A class to manage the life cycle of a MemoryDebugger instance.
+//
+// A MemoryDebugger's existence is controlled by a pref in local state, so the
+// MemoryDebuggerManager listens for changes to that pref and instantiates or
+// frees the debugger as appropriate.
+@interface MemoryDebuggerManager : NSObject
+// Designated initializer.
+- (instancetype)initWithView:(UIView*)view prefs:(PrefService*)prefs;
+// Registers local state preferences.
++ (void)registerLocalState:(PrefRegistrySimple*)registry;
+@end
+
+#endif // IOS_CHROME_BROWSER_MEMORY_MEMORY_DEBUGGER_MANAGER_H_