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

Unified Diff: chrome/browser/android/search_geolocation_disclosure_infobar_delegate.h

Issue 2482023002: Put a Settings link on the new Google Search geolocation disclosure. (Closed)
Patch Set: Update comment 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
Index: chrome/browser/android/search_geolocation_disclosure_infobar_delegate.h
diff --git a/chrome/browser/android/search_geolocation_disclosure_infobar_delegate.h b/chrome/browser/android/search_geolocation_disclosure_infobar_delegate.h
index 87001a920fb6d6a48affac68956e0ae8401b8015..d4e753ad24a690b1164932bb4c29670cb042e616 100644
--- a/chrome/browser/android/search_geolocation_disclosure_infobar_delegate.h
+++ b/chrome/browser/android/search_geolocation_disclosure_infobar_delegate.h
@@ -18,6 +18,8 @@
#include "base/strings/string16.h"
#include "build/build_config.h"
#include "components/infobars/core/infobar_delegate.h"
+#include "ui/gfx/range/range.h"
+#include "url/gurl.h"
namespace content {
class WebContents;
@@ -29,19 +31,35 @@ class SearchGeolocationDisclosureInfoBarDelegate
~SearchGeolocationDisclosureInfoBarDelegate() override;
// Create and show the infobar.
- static void Create(content::WebContents* web_contents);
+ static void Create(content::WebContents* web_contents,
+ const GURL& search_url);
- // Gets the message to display in the infobar.
- base::string16 GetMessageText() const;
+ // The translated text of the message to display.
+ const base::string16& message_text() const { return message_text_; }
+
+ // The range of the message that should be a link.
+ const gfx::Range& inline_link_range() const { return inline_link_range_; }
+
+ // The search URL that caused this infobar to be displayed.
+ const GURL& search_url() const { return search_url_; }
private:
- SearchGeolocationDisclosureInfoBarDelegate();
+ explicit SearchGeolocationDisclosureInfoBarDelegate(const GURL& search_url);
// InfoBarDelegate:
Type GetInfoBarType() const override;
infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
int GetIconId() const override;
+ // The translated text of the message to display.
+ base::string16 message_text_;
+
+ // The range of the message that should be a link.
+ gfx::Range inline_link_range_;
+
+ // The search URL that caused this infobar to be displayed.
+ GURL search_url_;
+
DISALLOW_COPY_AND_ASSIGN(SearchGeolocationDisclosureInfoBarDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698