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

Unified Diff: chrome/browser/intents/register_intent_handler_infobar_delegate.h

Issue 8469018: Provide assumed favicon for intents if service provider page was never visited. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review nits Created 9 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/intents/register_intent_handler_infobar_delegate.h
diff --git a/chrome/browser/intents/register_intent_handler_infobar_delegate.h b/chrome/browser/intents/register_intent_handler_infobar_delegate.h
index b4aa263ebfe1f8719c1a3ff73b39786569aa2938..a2a71280782208db941a35a7a64b7687ef58a888 100644
--- a/chrome/browser/intents/register_intent_handler_infobar_delegate.h
+++ b/chrome/browser/intents/register_intent_handler_infobar_delegate.h
@@ -13,6 +13,8 @@
class InfoBarTabHelper;
class WebIntentsRegistry;
+class FaviconService;
+class GURL;
// The InfoBar used to request permission for a site to be registered as an
// Intent handler.
@@ -21,7 +23,9 @@ class RegisterIntentHandlerInfoBarDelegate : public ConfirmInfoBarDelegate {
RegisterIntentHandlerInfoBarDelegate(
InfoBarTabHelper* infobar_helper,
WebIntentsRegistry* registry,
- const webkit_glue::WebIntentServiceData& service);
+ const webkit_glue::WebIntentServiceData& service,
+ FaviconService* favicon_service,
+ const GURL& origin_url);
// ConfirmInfoBarDelegate implementation.
virtual Type GetInfoBarType() const OVERRIDE;
@@ -37,10 +41,14 @@ class RegisterIntentHandlerInfoBarDelegate : public ConfirmInfoBarDelegate {
// may be shown. Must not be NULL.
// |registry| is the data source for web intents. Must not be NULL.
// |service| is the candidate service to show the infobar for.
+ // |favicon_service| is the favicon service to use. Must not be NULL.
+ // |origin_url| is the URL that the intent is registered from.
static void MaybeShowIntentInfoBar(
InfoBarTabHelper* infobar_helper,
WebIntentsRegistry* registry,
- const webkit_glue::WebIntentServiceData& service);
+ const webkit_glue::WebIntentServiceData& service,
+ FaviconService* favicon_service,
+ const GURL& origin_url);
private:
// The web intents registry to use. Weak pointer.
@@ -49,6 +57,12 @@ class RegisterIntentHandlerInfoBarDelegate : public ConfirmInfoBarDelegate {
// The cached intent service data bundle passed up from the renderer.
webkit_glue::WebIntentServiceData service_;
+ // The favicon service to use. Weak pointer.
+ FaviconService* favicon_service_;
+
+ // The URL of the page the service was originally registered from.
+ GURL origin_url_;
+
DISALLOW_COPY_AND_ASSIGN(RegisterIntentHandlerInfoBarDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698