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

Unified Diff: chrome/browser/ui/android/infobars/search_geolocation_disclosure_infobar.cc

Issue 2482023002: Put a Settings link on the new Google Search geolocation disclosure. (Closed)
Patch Set: Feedback Created 4 years, 1 month 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/infobars/search_geolocation_disclosure_infobar.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/infobars/search_geolocation_disclosure_infobar.cc
diff --git a/chrome/browser/ui/android/infobars/search_geolocation_disclosure_infobar.cc b/chrome/browser/ui/android/infobars/search_geolocation_disclosure_infobar.cc
index c8291a58778fea67816c2b185eaf61ad7e639713..8dee33290054b05a051d914a67849a18016ed439 100644
--- a/chrome/browser/ui/android/infobars/search_geolocation_disclosure_infobar.cc
+++ b/chrome/browser/ui/android/infobars/search_geolocation_disclosure_infobar.cc
@@ -22,9 +22,24 @@ ScopedJavaLocalRef<jobject>
SearchGeolocationDisclosureInfoBar::CreateRenderInfoBar(JNIEnv* env) {
ScopedJavaLocalRef<jstring> message_text =
base::android::ConvertUTF16ToJavaString(
- env, GetDelegate()->GetMessageText());
+ env, GetDelegate()->message_text());
return Java_SearchGeolocationDisclosureInfoBar_show(
- env, GetEnumeratedIconId(), message_text);
+ env, GetEnumeratedIconId(), message_text,
+ GetDelegate()->inline_link_range().start(),
+ GetDelegate()->inline_link_range().end());
+}
+
+void SearchGeolocationDisclosureInfoBar::OnLinkClicked(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj) {
+ if (!owner())
+ return; // We're closing; don't call anything, it might access the owner.
+
+ ScopedJavaLocalRef<jstring> search_url =
+ base::android::ConvertUTF8ToJavaString(
+ env, GetDelegate()->search_url().spec());
+ Java_SearchGeolocationDisclosureInfoBar_showSettingsPage(env, search_url);
+ RemoveSelf();
}
void SearchGeolocationDisclosureInfoBar::ProcessButton(int action) {
« no previous file with comments | « chrome/browser/ui/android/infobars/search_geolocation_disclosure_infobar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698