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

Unified Diff: chrome/browser/ui/android/tab_model/tab_model.cc

Issue 12387026: Expose getSearchTerms to tab_model for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again... 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/android/tab_model/tab_model.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/tab_model/tab_model.cc
diff --git a/chrome/browser/ui/android/tab_model/tab_model.cc b/chrome/browser/ui/android/tab_model/tab_model.cc
index 7bd5d7305061ebd98c912aad0ca1c378011b3cee..397043406a11bbbde665f8045ec5c212dc2f0f09 100644
--- a/chrome/browser/ui/android/tab_model/tab_model.cc
+++ b/chrome/browser/ui/android/tab_model/tab_model.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/search_engines/search_terms_data.h"
#include "chrome/browser/sync/glue/synced_window_delegate_android.h"
#include "chrome/browser/ui/toolbar/toolbar_model_impl.h"
#include "chrome/common/chrome_notification_types.h"
@@ -92,6 +93,17 @@ ToolbarModel::SecurityLevel TabModel::GetSecurityLevelForCurrentTab() {
return toolbar_model_->GetSecurityLevel();
}
+string16 TabModel::GetSearchTermsForCurrentTab() {
+ return toolbar_model_->GetText(true);
+}
+
+std::string TabModel::GetQueryExtractionParam() {
+ if (!profile_)
+ return std::string();
+ UIThreadSearchTermsData search_terms_data(profile_);
+ return search_terms_data.InstantExtendedEnabledParam();
+}
+
void TabModel::Observe(
int type,
const content::NotificationSource& source,
« no previous file with comments | « chrome/browser/ui/android/tab_model/tab_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698