summaryrefslogtreecommitdiffstats
path: root/ios/chrome/browser/memory/memory_debugger_manager.h
blob: 4cd7941b611a96d29fdbfc33d043bd3f7b42ab1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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_