Index: chrome/common/instant_types.h |
diff --git a/chrome/common/instant_types.h b/chrome/common/instant_types.h |
index 9f646bae449ea039cd145ba49ff38b561764eb43..880aef74d49bbdf9045e008a075576f82ada8092 100644 |
--- a/chrome/common/instant_types.h |
+++ b/chrome/common/instant_types.h |
@@ -6,11 +6,19 @@ |
#define CHROME_COMMON_INSTANT_TYPES_H_ |
#include <string> |
+#include <utility> |
#include "base/string16.h" |
#include "content/public/common/page_transition_types.h" |
#include "googleurl/src/gurl.h" |
+// ID used by Instant code to refer to objects (e.g. Autocomplete results, Most |
+// Visited items) that the Instant page needs access to. |
+typedef int InstantRestrictedID; |
+ |
+// The size of the InstantMostVisitedItem cache. |
+const size_t kMaxInstantMostVisitedItemCacheSize = 100; |
+ |
// Ways that the Instant suggested text is autocompleted into the omnibox. |
enum InstantCompleteBehavior { |
// Autocomplete the suggestion immediately. |
@@ -81,6 +89,10 @@ struct InstantAutocompleteResult { |
int relevance; |
}; |
+// An InstantAutocompleteResult along with its assigned restricted ID. |
+typedef std::pair<InstantRestrictedID, InstantAutocompleteResult> |
+ InstantAutocompleteResultIDPair; |
+ |
// How to interpret the size (height or width) of the Instant overlay (preview). |
enum InstantSizeUnits { |
// As an absolute number of pixels. |
@@ -143,11 +155,6 @@ struct ThemeBackgroundInfo { |
}; |
struct InstantMostVisitedItem { |
- InstantMostVisitedItem() : most_visited_item_id(0) {} |
- |
- // A private identifier used on the browser side when retrieving assets. |
- uint64 most_visited_item_id; |
- |
// The URL of the Most Visited item. |
GURL url; |
@@ -156,4 +163,8 @@ struct InstantMostVisitedItem { |
string16 title; |
}; |
+// An InstantMostVisitedItem along with its assigned restricted ID. |
+typedef std::pair<InstantRestrictedID, InstantMostVisitedItem> |
+ InstantMostVisitedItemIDPair; |
+ |
#endif // CHROME_COMMON_INSTANT_TYPES_H_ |