Index: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc |
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc |
index 8d749c2f191a07305d767fac0687a971b2cfd336..23d9d467a9c00b37fa2ed66988adc3e02c8f514a 100644 |
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc |
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc |
@@ -421,6 +421,8 @@ bool TabContentsWrapper::OnMessageReceived(const IPC::Message& message) { |
OnRegisterProtocolHandler) |
IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterIntentHandler, |
OnRegisterIntentHandler) |
+ IPC_MESSAGE_HANDLER(ViewHostMsg_WebIntentDispatch, |
+ OnWebIntentDispatch) |
IPC_MESSAGE_HANDLER(ViewHostMsg_Snapshot, OnSnapshot) |
IPC_MESSAGE_HANDLER(ViewHostMsg_PDFHasUnsupportedFeature, |
OnPDFHasUnsupportedFeature) |
@@ -621,6 +623,22 @@ void TabContentsWrapper::OnRegisterIntentHandler(const string16& action, |
AddInfoBar(new RegisterIntentHandlerInfoBarDelegate(tab_contents(), intent)); |
} |
+void TabContentsWrapper::OnWebIntentDispatch(int routing_id, |
+ const string16& action, |
+ const string16& type, |
+ const string16& data, |
+ int intent_id) { |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents)) |
+ return; |
+ |
+ LOG(INFO) << "Browser tab contents received intent:" |
+ << "\naction=" << UTF16ToASCII(action) |
+ << "\ntype=" << UTF16ToASCII(type) |
+ << "\ndata=" << UTF16ToUTF8(data) |
+ << "\nrenderer_id=" << routing_id |
+ << "\nid=" << intent_id; |
+} |
+ |
void TabContentsWrapper::OnSnapshot(const SkBitmap& bitmap) { |
NotificationService::current()->Notify( |
chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN, |