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

Side by Side Diff: chrome/browser/instant/instant_page.h

Issue 12498002: InstantExtended: Adding InstantRestrictedIDCache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merging David's and Sreeram's changes. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_ 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_
6 #define CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_ 6 #define CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Called when the page wants to navigate to |url|. Usually used by the 83 // Called when the page wants to navigate to |url|. Usually used by the
84 // page to navigate to privileged destinations (e.g. chrome:// URLs) or to 84 // page to navigate to privileged destinations (e.g. chrome:// URLs) or to
85 // navigate to URLs that are hidden from the page using Restricted IDs (rid 85 // navigate to URLs that are hidden from the page using Restricted IDs (rid
86 // in the API). 86 // in the API).
87 virtual void NavigateToURL(const content::WebContents* contents, 87 virtual void NavigateToURL(const content::WebContents* contents,
88 const GURL& url, 88 const GURL& url,
89 content::PageTransition transition, 89 content::PageTransition transition,
90 WindowOpenDisposition disposition) = 0; 90 WindowOpenDisposition disposition) = 0;
91 91
92 // Called when the SearchBox wants to delete a Most Visited item. 92 // Called when the SearchBox wants to delete a Most Visited item.
93 virtual void DeleteMostVisitedItem(uint64 most_visited_item_id) = 0; 93 virtual void DeleteMostVisitedItem(InstantRestrictedID restricted_id) = 0;
94 94
95 // Called when the SearchBox wants to undo a Most Visited deletion. 95 // Called when the SearchBox wants to undo a Most Visited deletion.
96 virtual void UndoMostVisitedDeletion(uint64 most_visited_item_id) = 0; 96 virtual void UndoMostVisitedDeletion(InstantRestrictedID restricted_id) = 0;
97 97
98 // Called when the SearchBox wants to undo all Most Visited deletions. 98 // Called when the SearchBox wants to undo all Most Visited deletions.
99 virtual void UndoAllMostVisitedDeletions() = 0; 99 virtual void UndoAllMostVisitedDeletions() = 0;
100 100
101 protected: 101 protected:
102 virtual ~Delegate(); 102 virtual ~Delegate();
103 }; 103 };
104 104
105 virtual ~InstantPage(); 105 virtual ~InstantPage();
106 106
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Tells the page about the current theme background. 164 // Tells the page about the current theme background.
165 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info); 165 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info);
166 166
167 // Tells the page whether it is allowed to display Instant results. 167 // Tells the page whether it is allowed to display Instant results.
168 void SetDisplayInstantResults(bool display_instant_results); 168 void SetDisplayInstantResults(bool display_instant_results);
169 169
170 // Tells the page whether the browser is capturing user key strokes. 170 // Tells the page whether the browser is capturing user key strokes.
171 void KeyCaptureChanged(bool is_key_capture_enabled); 171 void KeyCaptureChanged(bool is_key_capture_enabled);
172 172
173 // Tells the page about new Most Visited data. 173 // Tells the page about new Most Visited data.
174 void SendMostVisitedItems(const std::vector<InstantMostVisitedItem>& items); 174 void SendMostVisitedItems(
175 const std::vector<InstantMostVisitedItemIDPair>& items);
175 176
176 protected: 177 protected:
177 explicit InstantPage(Delegate* delegate); 178 explicit InstantPage(Delegate* delegate);
178 179
179 // Sets |contents| as the page to communicate with. |contents| may be NULL, 180 // Sets |contents| as the page to communicate with. |contents| may be NULL,
180 // which effectively stops all communication. 181 // which effectively stops all communication.
181 void SetContents(content::WebContents* contents); 182 void SetContents(content::WebContents* contents);
182 183
183 Delegate* delegate() const { return delegate_; } 184 Delegate* delegate() const { return delegate_; }
184 185
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 InstantShownReason reason, 222 InstantShownReason reason,
222 int height, 223 int height,
223 InstantSizeUnits units); 224 InstantSizeUnits units);
224 void OnFocusOmnibox(int page_id); 225 void OnFocusOmnibox(int page_id);
225 void OnStartCapturingKeyStrokes(int page_id); 226 void OnStartCapturingKeyStrokes(int page_id);
226 void OnStopCapturingKeyStrokes(int page_id); 227 void OnStopCapturingKeyStrokes(int page_id);
227 void OnSearchBoxNavigate(int page_id, 228 void OnSearchBoxNavigate(int page_id,
228 const GURL& url, 229 const GURL& url,
229 content::PageTransition transition, 230 content::PageTransition transition,
230 WindowOpenDisposition disposition); 231 WindowOpenDisposition disposition);
231 void OnDeleteMostVisitedItem(uint64 most_visited_item_id); 232 void OnDeleteMostVisitedItem(InstantRestrictedID restricted_id);
232 void OnUndoMostVisitedDeletion(uint64 most_visited_item_id); 233 void OnUndoMostVisitedDeletion(InstantRestrictedID restricted_id);
233 void OnUndoAllMostVisitedDeletions(); 234 void OnUndoAllMostVisitedDeletions();
234 235
235 Delegate* const delegate_; 236 Delegate* const delegate_;
236 bool supports_instant_; 237 bool supports_instant_;
237 238
238 DISALLOW_COPY_AND_ASSIGN(InstantPage); 239 DISALLOW_COPY_AND_ASSIGN(InstantPage);
239 }; 240 };
240 241
241 #endif // CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_ 242 #endif // CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698