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

Unified Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper.cc

Issue 7624012: First pass on intents options UI. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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/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,

Powered by Google App Engine
This is Rietveld 408576698