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

Unified Diff: content/renderer/intents_dispatcher.cc

Issue 8680024: Add return logic calling WebFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698