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

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

Issue 12732005: Most visited thumbnails and favicons need id-based urls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address estade's comments. 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
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 const content::WebContents* contents) OVERRIDE; 242 const content::WebContents* contents) OVERRIDE;
243 virtual void StopCapturingKeyStrokes(content::WebContents* contents) OVERRIDE; 243 virtual void StopCapturingKeyStrokes(content::WebContents* contents) OVERRIDE;
244 virtual void NavigateToURL( 244 virtual void NavigateToURL(
245 const content::WebContents* contents, 245 const content::WebContents* contents,
246 const GURL& url, 246 const GURL& url,
247 content::PageTransition transition, 247 content::PageTransition transition,
248 WindowOpenDisposition disposition) OVERRIDE; 248 WindowOpenDisposition disposition) OVERRIDE;
249 249
250 // Invoked by the InstantLoader when the Instant page wants to delete a 250 // Invoked by the InstantLoader when the Instant page wants to delete a
251 // Most Visited item. 251 // Most Visited item.
252 virtual void DeleteMostVisitedItem(const GURL& url) OVERRIDE; 252 virtual void DeleteMostVisitedItem(uint64 most_visited_item_id) OVERRIDE;
253 253
254 // Invoked by the InstantLoader when the Instant page wants to undo a 254 // Invoked by the InstantLoader when the Instant page wants to undo a
255 // Most Visited deletion. 255 // Most Visited deletion.
256 virtual void UndoMostVisitedDeletion(const GURL& url) OVERRIDE; 256 virtual void UndoMostVisitedDeletion(uint64 most_visited_item_id) OVERRIDE;
257 257
258 // Invoked by the InstantLoader when the Instant page wants to undo all 258 // Invoked by the InstantLoader when the Instant page wants to undo all
259 // Most Visited deletions. 259 // Most Visited deletions.
260 virtual void UndoAllMostVisitedDeletions() OVERRIDE; 260 virtual void UndoAllMostVisitedDeletions() OVERRIDE;
261 261
262 // Helper for OmniboxFocusChanged. Commit or discard the overlay. 262 // Helper for OmniboxFocusChanged. Commit or discard the overlay.
263 void OmniboxLostFocus(gfx::NativeView view_gaining_focus); 263 void OmniboxLostFocus(gfx::NativeView view_gaining_focus);
264 264
265 // Creates a new NTP, using the instant_url property of the default 265 // Creates a new NTP, using the instant_url property of the default
266 // TemplateURL. 266 // TemplateURL.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // Fire off an async request for most visited items to the TopNav code. 340 // Fire off an async request for most visited items to the TopNav code.
341 void RequestMostVisitedItems(); 341 void RequestMostVisitedItems();
342 342
343 // Called when we get new most visited items from the TopNav code, 343 // Called when we get new most visited items from the TopNav code,
344 // registered as an async callback. Parses them and sends them to the 344 // registered as an async callback. Parses them and sends them to the
345 // renderer via SendMostVisitedItems. 345 // renderer via SendMostVisitedItems.
346 void OnMostVisitedItemsReceived(const history::MostVisitedURLList& data); 346 void OnMostVisitedItemsReceived(const history::MostVisitedURLList& data);
347 347
348 // Sends a collection of MostVisitedItems to the renderer process via 348 // Sends a collection of MostVisitedItems to the renderer process via
349 // the appropriate InstantPage subclass. 349 // the appropriate InstantPage subclass.
350 void SendMostVisitedItems(const std::vector<MostVisitedItem>& items); 350 void SendMostVisitedItems(const std::vector<InstantMostVisitedItem>& items);
351 351
352 chrome::BrowserInstantController* const browser_; 352 chrome::BrowserInstantController* const browser_;
353 353
354 // Whether the extended API and regular API are enabled. If both are false, 354 // Whether the extended API and regular API are enabled. If both are false,
355 // Instant is effectively disabled. 355 // Instant is effectively disabled.
356 const bool extended_enabled_; 356 const bool extended_enabled_;
357 bool instant_enabled_; 357 bool instant_enabled_;
358 358
359 // If true, the Instant URL is set to kLocalOmniboxPopupURL. 359 // If true, the Instant URL is set to kLocalOmniboxPopupURL.
360 bool use_local_overlay_only_; 360 bool use_local_overlay_only_;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // Used for Top Sites async retrieval. 445 // Used for Top Sites async retrieval.
446 base::WeakPtrFactory<InstantController> weak_ptr_factory_; 446 base::WeakPtrFactory<InstantController> weak_ptr_factory_;
447 447
448 // Used to get notifications about Most Visted changes. 448 // Used to get notifications about Most Visted changes.
449 content::NotificationRegistrar registrar_; 449 content::NotificationRegistrar registrar_;
450 450
451 DISALLOW_COPY_AND_ASSIGN(InstantController); 451 DISALLOW_COPY_AND_ASSIGN(InstantController);
452 }; 452 };
453 453
454 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 454 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698