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

Unified Diff: chrome/browser/ui/search/instant_controller.cc

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: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/search/instant_controller.cc
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 83f1e345833a15ef85e88f0bd2df06d9dfbae3a5..15f6413bdeccf1ec3492f253cadd8c4d51142e2a 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -462,7 +462,7 @@ bool InstantController::Update(const AutocompleteMatch& match,
// to a backup loader.
if (extended_enabled_ && !overlay_->supports_instant() &&
!overlay_->IsLocalOverlay() && browser_->GetActiveWebContents()) {
- CreateOverlay(chrome::kChromeSearchLocalOmniboxPopupURL,
+ CreateOverlay(chrome::kChromeSearchLocalNtpUrl,
samarth 2013/04/15 19:01:34 Replace this (and below) with a GetLocalInstantURL
jeremycho 2013/04/16 01:42:37 Done.
browser_->GetActiveWebContents());
}
@@ -670,6 +670,7 @@ bool InstantController::CommitIfPossible(InstantCommitType type) {
// to the page, but otherwise, nothing else to do.
if (UseInstantTabToShowSuggestions()) {
if (type == INSTANT_COMMIT_PRESSED_ENTER &&
+ !instant_tab_->IsLocalNTP() &&
(last_match_was_search_ ||
last_suggestion_.behavior == INSTANT_COMPLETE_NEVER)) {
last_suggestion_.text.clear();
@@ -1287,7 +1288,7 @@ bool InstantController::EnsureOverlayIsCurrent(bool ignore_blacklist) {
if (!GetInstantURL(profile, ignore_blacklist, &instant_url)) {
// If we are in extended mode, fallback to the local overlay.
if (extended_enabled_)
- instant_url = chrome::kChromeSearchLocalOmniboxPopupURL;
+ instant_url = chrome::kChromeSearchLocalNtpUrl;
samarth 2013/04/15 19:01:34 Use the GetLocalInstantURL() function here too.
jeremycho 2013/04/16 01:42:37 Done.
else
return false;
}
@@ -1615,7 +1616,7 @@ bool InstantController::FixSuggestion(InstantSuggestion* suggestion) const {
}
bool InstantController::UseInstantTabToShowSuggestions() const {
samarth 2013/04/15 19:01:34 You can just inline this check wherever this funct
jeremycho 2013/04/16 01:42:37 Done.
- return instant_tab_ && !instant_tab_->IsLocalNTP();
+ return instant_tab_;
}
bool InstantController::ShouldSwitchToLocalNTP() const {
« chrome/browser/search/local_ntp_source.cc ('K') | « chrome/browser/search/local_ntp_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698