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

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

Issue 215733002: Add support to enable EmbeddedSearch API in Android Chrome search results page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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
« no previous file with comments | « chrome/browser/search/search_android_unittest.cc ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_tab_helper.cc
diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc
index 1dc0cf6694007399dac4a83f14a129e35e36c8e8..16e6ce488c4e123a203632bba59571742cf8fc36 100644
--- a/chrome/browser/ui/search/search_tab_helper.cc
+++ b/chrome/browser/ui/search/search_tab_helper.cc
@@ -398,6 +398,8 @@ void SearchTabHelper::MaybeRemoveMostVisitedItems(
}
void SearchTabHelper::FocusOmnibox(OmniboxFocusState state) {
+// TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef.
+#if !defined(OS_ANDROID)
OmniboxView* omnibox = GetOmniboxView();
if (!omnibox)
return;
@@ -433,6 +435,7 @@ void SearchTabHelper::FocusOmnibox(OmniboxFocusState state) {
web_contents()->GetView()->Focus();
break;
}
+#endif
}
void SearchTabHelper::NavigateToURL(const GURL& url,
@@ -482,10 +485,11 @@ void SearchTabHelper::OnLogMostVisitedNavigation(
}
void SearchTabHelper::PasteIntoOmnibox(const base::string16& text) {
+// TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef.
+#if !defined(OS_ANDROID)
OmniboxView* omnibox = GetOmniboxView();
if (!omnibox)
return;
-
// The first case is for right click to paste, where the text is retrieved
// from the clipboard already sanitized. The second case is needed to handle
// drag-and-drop value and it has to be sanitazed before setting it into the
@@ -503,6 +507,7 @@ void SearchTabHelper::PasteIntoOmnibox(const base::string16& text) {
omnibox->model()->OnPaste();
omnibox->SetUserText(text_to_paste);
omnibox->OnAfterPossibleChange();
+#endif
}
void SearchTabHelper::OnChromeIdentityCheck(const base::string16& identity) {
« no previous file with comments | « chrome/browser/search/search_android_unittest.cc ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698