Chromium Code Reviews| Index: chrome/common/instant_types.h |
| diff --git a/chrome/common/instant_types.h b/chrome/common/instant_types.h |
| index ae371c9a2a3d27687e26878c7b28fe707c7ce9a7..5e98c47bd8d36905e48aa0d012906bc6c06dacf0 100644 |
| --- a/chrome/common/instant_types.h |
| +++ b/chrome/common/instant_types.h |
| @@ -11,6 +11,10 @@ |
| #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 |
| +// visisted items) that the Instant page needs access to. |
|
dhollowa
2013/03/14 00:02:43
nit: "Autocomplete results", "Most Visited items"
Shishir
2013/03/14 19:53:03
Done.
|
| +typedef int InstantRestrictedID; |
|
palmer
2013/03/13 23:50:37
This should be an unsigned int (it never goes < 0,
dhollowa
2013/03/14 00:02:43
unsigned int
Shishir
2013/03/14 19:53:03
From "base/basictypes.h"
// NOTE: unsigned types
Shishir
2013/03/14 19:53:03
Ditto.
dhollowa
2013/03/14 23:40:00
I'm fine with int.
palmer
2013/03/15 01:47:53
That comment is wrong. The problem is when you com
Shishir
2013/03/15 17:31:15
With the current code there is no strict requireme
|
| + |
| // Ways that the Instant suggested text is autocompleted into the omnibox. |
| enum InstantCompleteBehavior { |
| // Autocomplete the suggestion immediately. |
| @@ -72,6 +76,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. |
| @@ -153,11 +161,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; |
| @@ -166,4 +169,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_ |