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

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

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/target_frame_cache.h ('k') | ios/chrome/browser/ui/toolbar/README.md » ('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.mm
diff --git a/ios/chrome/browser/ui/tabs/target_frame_cache.mm b/ios/chrome/browser/ui/tabs/target_frame_cache.mm
new file mode 100644
index 0000000000000000000000000000000000000000..12f6308cf5aa38505787197e57cdd16d7ff247c4
--- /dev/null
+++ b/ios/chrome/browser/ui/tabs/target_frame_cache.mm
@@ -0,0 +1,29 @@
+// 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.
+
+#include "ios/chrome/browser/ui/tabs/target_frame_cache.h"
+
+TargetFrameCache::TargetFrameCache() {}
+
+TargetFrameCache::~TargetFrameCache() {}
+
+void TargetFrameCache::AddFrame(UIView* view, CGRect frame) {
+ targetFrames_[view] = frame;
+}
+
+void TargetFrameCache::RemoveFrame(UIView* view) {
+ targetFrames_.erase(view);
+}
+
+CGRect TargetFrameCache::GetFrame(UIView* view) {
+ std::map<UIView*, CGRect>::iterator it = targetFrames_.find(view);
+ if (it != targetFrames_.end())
+ return it->second;
+
+ return CGRectZero;
+}
+
+bool TargetFrameCache::HasFrame(UIView* view) {
+ return targetFrames_.find(view) != targetFrames_.end();
+}
« no previous file with comments | « ios/chrome/browser/ui/tabs/target_frame_cache.h ('k') | ios/chrome/browser/ui/toolbar/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698