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

Unified Diff: ios/chrome/app/application_delegate/memory_warning_helper.h

Issue 1989873002: Create Memory Helper for memory warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add OWNERS Created 4 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/app/application_delegate/memory_warning_helper.h
diff --git a/ios/chrome/app/application_delegate/memory_warning_helper.h b/ios/chrome/app/application_delegate/memory_warning_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..dbdb2ba1a27835dd58d16e3fa8d8fe0333402ae2
--- /dev/null
+++ b/ios/chrome/app/application_delegate/memory_warning_helper.h
@@ -0,0 +1,26 @@
+// Copyright 2016 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_APP_APPLICATION_DELEGATE_MEMORY_RECOVERY_HELPER_H_
+#define IOS_CHROME_APP_APPLICATION_DELEGATE_MEMORY_RECOVERY_HELPER_H_
+
+#import <Foundation/Foundation.h>
+
+// Helper for handling memory warnings.
+@interface MemoryWarningHelper : NSObject
+
+// The number of memory warnings that have been received in this
+// foreground session.
+@property(nonatomic, readonly) NSInteger foregroundMemoryWarningCount;
+
+// Frees as much memory as possible and registers that there was a memory
+// pressure.
+- (void)handleMemoryPressure;
+
+// Resets the foregroundMemoryWarningCount property, setting its value to 0.
+- (void)resetForegroundMemoryWarningCount;
+
+@end
+
+#endif // IOS_CHROME_APP_APPLICATION_DELEGATE_MEMORY_RECOVERY_HELPER_H_
« no previous file with comments | « ios/chrome/app/application_delegate/OWNERS ('k') | ios/chrome/app/application_delegate/memory_warning_helper.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698