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

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

Issue 12732005: Most visited thumbnails and favicons need id-based urls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase with Sreeram's MV clicks change 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(const GURL& url) = 0; 93 virtual void DeleteMostVisitedItem(uint64 most_visited_item_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(const GURL& url) = 0; 96 virtual void UndoMostVisitedDeletion(uint64 most_visited_item_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<MostVisitedItem>& items); 174 void SendMostVisitedItems(const std::vector<InstantMostVisitedItem>& items);
175 175
176 protected: 176 protected:
177 explicit InstantPage(Delegate* delegate); 177 explicit InstantPage(Delegate* delegate);
178 178
179 // Sets |contents| as the page to communicate with. |contents| may be NULL, 179 // Sets |contents| as the page to communicate with. |contents| may be NULL,
180 // which effectively stops all communication. 180 // which effectively stops all communication.
181 void SetContents(content::WebContents* contents); 181 void SetContents(content::WebContents* contents);
182 182
183 Delegate* delegate() const { return delegate_; } 183 Delegate* delegate() const { return delegate_; }
184 184
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 InstantShownReason reason, 221 InstantShownReason reason,
222 int height, 222 int height,
223 InstantSizeUnits units); 223 InstantSizeUnits units);
224 void OnFocusOmnibox(int page_id); 224 void OnFocusOmnibox(int page_id);
225 void OnStartCapturingKeyStrokes(int page_id); 225 void OnStartCapturingKeyStrokes(int page_id);
226 void OnStopCapturingKeyStrokes(int page_id); 226 void OnStopCapturingKeyStrokes(int page_id);
227 void OnSearchBoxNavigate(int page_id, 227 void OnSearchBoxNavigate(int page_id,
228 const GURL& url, 228 const GURL& url,
229 content::PageTransition transition, 229 content::PageTransition transition,
230 WindowOpenDisposition disposition); 230 WindowOpenDisposition disposition);
231 void OnDeleteMostVisitedItem(const GURL& url); 231 void OnDeleteMostVisitedItem(uint64 most_visited_item_id);
232 void OnUndoMostVisitedDeletion(const GURL& url); 232 void OnUndoMostVisitedDeletion(uint64 most_visited_item_id);
233 void OnUndoAllMostVisitedDeletions(); 233 void OnUndoAllMostVisitedDeletions();
234 234
235 Delegate* const delegate_; 235 Delegate* const delegate_;
236 bool supports_instant_; 236 bool supports_instant_;
237 237
238 DISALLOW_COPY_AND_ASSIGN(InstantPage); 238 DISALLOW_COPY_AND_ASSIGN(InstantPage);
239 }; 239 };
240 240
241 #endif // CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_ 241 #endif // CHROME_BROWSER_INSTANT_INSTANT_PAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698