Index: content/renderer/intents_dispatcher.cc |
diff --git a/content/renderer/intents_dispatcher.cc b/content/renderer/intents_dispatcher.cc |
index 1c8abaff652dceba3f424ce359bd54318a73c9dd..11cec77897259c6c5e42240c9db3d731925f8fd9 100644 |
--- a/content/renderer/intents_dispatcher.cc |
+++ b/content/renderer/intents_dispatcher.cc |
@@ -4,13 +4,16 @@ |
#include "content/renderer/intents_dispatcher.h" |
+#include "base/command_line.h" |
#include "content/common/intents_messages.h" |
+#include "content/public/common/content_switches.h" |
#include "content/renderer/render_view_impl.h" |
#include "ipc/ipc_message.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptValue.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
#include "v8/include/v8.h" |
#include "webkit/glue/cpp_bound_class.h" |
@@ -147,6 +150,16 @@ void IntentsDispatcher::OnWebIntentReply( |
const WebKit::WebString& data, |
int intent_id) { |
LOG(INFO) << "RenderView got reply to intent type " << reply_type; |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents)) |
James Hawkins
2011/11/23 21:23:18
Eh, just leave this out. We'll enable it soon eno
Greg Billock
2011/11/23 22:29:48
Done.
|
+ NOTREACHED(); |
+ |
+ if (reply_type == webkit_glue::WEB_INTENT_REPLY_SUCCESS) { |
+ render_view()->GetWebView()->mainFrame()->handleIntentResult( |
+ intent_id, data); |
+ } else { |
+ render_view()->GetWebView()->mainFrame()->handleIntentFailure( |
+ intent_id, data); |
+ } |
} |
void IntentsDispatcher::OnResult(const WebKit::WebString& data) { |