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

Unified Diff: chrome/browser/intents/register_intent_handler_helper.cc

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
Index: chrome/browser/intents/register_intent_handler_helper.cc
===================================================================
--- chrome/browser/intents/register_intent_handler_helper.cc (revision 175396)
+++ chrome/browser/intents/register_intent_handler_helper.cc (working copy)
@@ -1,42 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <string>
-
-#include "chrome/browser/api/infobars/infobar_service.h"
-#include "chrome/browser/favicon/favicon_service.h"
-#include "chrome/browser/favicon/favicon_service_factory.h"
-#include "chrome/browser/intents/register_intent_handler_infobar_delegate.h"
-#include "chrome/browser/intents/web_intents_registry_factory.h"
-#include "chrome/browser/intents/web_intents_util.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/browser.h"
-#include "content/public/browser/web_contents.h"
-#include "webkit/glue/web_intent_service_data.h"
-
-using content::WebContents;
-
-// static
-void Browser::RegisterIntentHandlerHelper(
- WebContents* web_contents,
- const webkit_glue::WebIntentServiceData& data,
- bool user_gesture) {
- Profile* profile =
- Profile::FromBrowserContext(web_contents->GetBrowserContext());
- if (profile->IsOffTheRecord())
- return;
-
- if (!web_intents::IsWebIntentsEnabledForProfile(profile))
- return;
-
- FaviconService* favicon_service = FaviconServiceFactory::GetForProfile(
- profile, Profile::EXPLICIT_ACCESS);
-
- RegisterIntentHandlerInfoBarDelegate::MaybeShowIntentInfoBar(
- InfoBarService::FromWebContents(web_contents),
- WebIntentsRegistryFactory::GetForProfile(profile),
- data,
- favicon_service,
- web_contents->GetURL());
-}

Powered by Google App Engine
This is Rietveld 408576698