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

Unified Diff: ios/chrome/browser/ui/tabs/target_frame_cache.h

Issue 2588733002: Upstream Chrome on iOS source code [9/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/ui/tabs/tab_view.mm ('k') | ios/chrome/browser/ui/tabs/target_frame_cache.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/tabs/target_frame_cache.h
diff --git a/ios/chrome/browser/ui/tabs/target_frame_cache.h b/ios/chrome/browser/ui/tabs/target_frame_cache.h
new file mode 100644
index 0000000000000000000000000000000000000000..ec0c25fd27a87867ad3126b6a0a805a2886f70b2
--- /dev/null
+++ b/ios/chrome/browser/ui/tabs/target_frame_cache.h
@@ -0,0 +1,32 @@
+// Copyright 2012 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_UI_TABS_TARGET_FRAME_CACHE_H_
+#define IOS_CHROME_BROWSER_UI_TABS_TARGET_FRAME_CACHE_H_
+
+#import <UIKit/UIKit.h>
+
+#include <map>
+
+// Stores target frames for a set of UIViews.
+class TargetFrameCache {
+ public:
+ TargetFrameCache();
+ ~TargetFrameCache();
+
+ // Add or remove the target frame for a view.
+ void AddFrame(UIView* view, CGRect rect);
+ void RemoveFrame(UIView* view);
+
+ // Gets the cached target frame for |view|.
+ CGRect GetFrame(UIView* view);
+
+ // Returns whether |view| has a cached target frame.
+ bool HasFrame(UIView* view);
+
+ private:
+ std::map<UIView*, CGRect> targetFrames_;
+};
+
+#endif // IOS_CHROME_BROWSER_UI_TABS_TARGET_FRAME_CACHE_H_
« no previous file with comments | « ios/chrome/browser/ui/tabs/tab_view.mm ('k') | ios/chrome/browser/ui/tabs/target_frame_cache.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698