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

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

Issue 10830102: [Web Intents] Add ability to dispatch intents from extension-caused code (i.e. context menus) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to scoped_ptr Created 8 years, 4 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/web_intents_util.cc
diff --git a/chrome/browser/intents/web_intents_util.cc b/chrome/browser/intents/web_intents_util.cc
index 319335bfd3e46ca5feedefe5f057783ffaf9ee98..c49ce556ab24fa6de8e3f46b88f96259c0a5c71b 100644
--- a/chrome/browser/intents/web_intents_util.cc
+++ b/chrome/browser/intents/web_intents_util.cc
@@ -28,4 +28,11 @@ bool IsWebIntentsEnabledForProfile(Profile* profile) {
return IsWebIntentsEnabled(profile->GetPrefs());
}
+Browser* GetWebIntentDeliveryBrowser(Profile* profile) {
+ Browser* browser = BrowserList::GetLastActive();
+ if (browser && profile && browser->profile() != profile)
+ return NULL;
+ return browser;
+}
+
} // namespace web_intents

Powered by Google App Engine
This is Rietveld 408576698