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

Unified Diff: ios/web/navigation/navigation_manager_util.h

Issue 2875153003: Added web::GetCommittedItemWithUniqueID function. (Closed)
Patch Set: Added GetCommittedItemIndexWithUniqueID Created 3 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
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/navigation/navigation_manager_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/navigation/navigation_manager_util.h
diff --git a/ios/web/navigation/navigation_manager_util.h b/ios/web/navigation/navigation_manager_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..0c22977528f5381d3eb34d19d105173155c77c31
--- /dev/null
+++ b/ios/web/navigation/navigation_manager_util.h
@@ -0,0 +1,31 @@
+// Copyright 2017 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_WEB_NAVIGATION_NAVIGATION_MANAGER_UTIL_H_
+#define IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_UTIL_H_
+
+// This file contains extensions for web::NavigationManager API without making
+// them part of ios/web/public.
+
+namespace web {
+
+class NavigationItem;
+class NavigationManager;
+
+// Returns committed navigation item with given |unique_id| or null if item
+// is not found or it is pending or transient. Item's unique id is retrieved
+// via GetUniqueID method.
+NavigationItem* GetCommittedItemWithUniqueID(
+ NavigationManager* navigation_manager,
+ int unique_id);
+
+// Returns committed navigation item index with given |unique_id| or -1 if item
+// is not found or it is pending or transient. Item's unique id is retrieved
+// via GetUniqueID method.
+int GetCommittedItemIndexWithUniqueID(NavigationManager* navigation_manager,
+ int unique_id);
+
+} // namespace web
+
+#endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_UTIL_H_
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/navigation/navigation_manager_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698