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

Side by Side Diff: chrome/browser/ui/search/instant_controller.h

Issue 13905008: Merge local_omnibox_popup into local_ntp. Render the Google logo and fakebox if Google is the sear… (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Respond to Dan's comments. Created 7 years, 8 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
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_UI_SEARCH_INSTANT_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // Sends a collection of MostVisitedItems to the renderer process via 353 // Sends a collection of MostVisitedItems to the renderer process via
354 // the appropriate InstantPage subclass. 354 // the appropriate InstantPage subclass.
355 void SendMostVisitedItems( 355 void SendMostVisitedItems(
356 const std::vector<InstantMostVisitedItemIDPair>& items); 356 const std::vector<InstantMostVisitedItemIDPair>& items);
357 357
358 // If possible, tries to mutate |suggestion| to a valid suggestion. Returns 358 // If possible, tries to mutate |suggestion| to a valid suggestion. Returns
359 // true if successful. (Note that |suggestion| may be modified even if this 359 // true if successful. (Note that |suggestion| may be modified even if this
360 // returns false.) 360 // returns false.)
361 bool FixSuggestion(InstantSuggestion* suggestion) const; 361 bool FixSuggestion(InstantSuggestion* suggestion) const;
362 362
363 // Returns true if we should use |instant_tab_| instead of |overlay_| for
364 // handling suggestions.
365 // TODO(samarth|sreeram): this is brittle. Instead, we should probably just
366 // combine the two local pages into one.
367 bool UseInstantTabToShowSuggestions() const;
368
369 // Returns true if we should switch to using the local NTP. 363 // Returns true if we should switch to using the local NTP.
370 bool ShouldSwitchToLocalNTP() const; 364 bool ShouldSwitchToLocalNTP() const;
371 365
372 BrowserInstantController* const browser_; 366 BrowserInstantController* const browser_;
373 367
374 // Whether the extended API and regular API are enabled. If both are false, 368 // Whether the extended API and regular API are enabled. If both are false,
375 // Instant is effectively disabled. 369 // Instant is effectively disabled.
376 const bool extended_enabled_; 370 const bool extended_enabled_;
377 bool instant_enabled_; 371 bool instant_enabled_;
378 372
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // Used for Top Sites async retrieval. 464 // Used for Top Sites async retrieval.
471 base::WeakPtrFactory<InstantController> weak_ptr_factory_; 465 base::WeakPtrFactory<InstantController> weak_ptr_factory_;
472 466
473 // Used to get notifications about Most Visted changes. 467 // Used to get notifications about Most Visted changes.
474 content::NotificationRegistrar registrar_; 468 content::NotificationRegistrar registrar_;
475 469
476 DISALLOW_COPY_AND_ASSIGN(InstantController); 470 DISALLOW_COPY_AND_ASSIGN(InstantController);
477 }; 471 };
478 472
479 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ 473 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698