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

Unified Diff: ios/chrome/browser/metrics/size_class_recorder.h

Issue 2585233003: Upstream Chrome on iOS source code [2/11]. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « ios/chrome/browser/metrics/new_tab_page_uma.mm ('k') | ios/chrome/browser/metrics/size_class_recorder.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/metrics/size_class_recorder.h
diff --git a/ios/chrome/browser/metrics/size_class_recorder.h b/ios/chrome/browser/metrics/size_class_recorder.h
new file mode 100644
index 0000000000000000000000000000000000000000..fa5807d4fef3f69a02ebf0b02142762ede85f922
--- /dev/null
+++ b/ios/chrome/browser/metrics/size_class_recorder.h
@@ -0,0 +1,28 @@
+// Copyright 2015 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_METRICS_SIZE_CLASS_RECORDER_H_
+#define IOS_CHROME_BROWSER_METRICS_SIZE_CLASS_RECORDER_H_
+
+#import <UIKit/UIKit.h>
+
+// Reports metrics for the size classes uses on iPad iOS 9+.
+@interface SizeClassRecorder : NSObject
+
+- (instancetype)initWithHorizontalSizeClass:(UIUserInterfaceSizeClass)sizeClass
+ NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// Call this method upon horizontal size class changes to report the used size
+// class to UMA. It will be reported under Tab.HorizontalSizeClassUsed.
+- (void)horizontalSizeClassDidChange:(UIUserInterfaceSizeClass)newSizeClass;
+
+// Call this class method when a page has loaded to record the size class at
+// that time. It will be reported inder Tab.PageLoadInHorizontalSizeClass.
+- (void)pageLoadedWithHorizontalSizeClass:(UIUserInterfaceSizeClass)sizeClass;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_METRICS_SIZE_CLASS_RECORDER_H_
« no previous file with comments | « ios/chrome/browser/metrics/new_tab_page_uma.mm ('k') | ios/chrome/browser/metrics/size_class_recorder.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698