diff options
author | gbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-08 17:34:09 +0000 |
---|---|---|
committer | gbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-08 17:34:09 +0000 |
commit | ad388f1b6e52ae720e45db47240baa1ea8dd2aac (patch) | |
tree | f241226713ae184fd555ab681a1b5effe44e4c2d /content/renderer/web_intents_host.h | |
parent | 6db332da819bbf2da85bf20ece26ec01173f9166 (diff) | |
download | chromium_src-ad388f1b6e52ae720e45db47240baa1ea8dd2aac.zip chromium_src-ad388f1b6e52ae720e45db47240baa1ea8dd2aac.tar.gz chromium_src-ad388f1b6e52ae720e45db47240baa1ea8dd2aac.tar.bz2 |
Change to use webkit intent delivery.
BUG=None
TEST=None
Review URL: https://chromiumcodereview.appspot.com/10412058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/web_intents_host.h')
-rw-r--r-- | content/renderer/web_intents_host.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/content/renderer/web_intents_host.h b/content/renderer/web_intents_host.h index a90fa52..7299cbe 100644 --- a/content/renderer/web_intents_host.h +++ b/content/renderer/web_intents_host.h @@ -10,6 +10,7 @@ #include "base/memory/scoped_ptr.h" #include "content/public/renderer/render_view_observer.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebBlob.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" #include "webkit/glue/web_intent_data.h" #include "webkit/glue/web_intent_reply_data.h" @@ -17,6 +18,7 @@ class RenderViewImpl; namespace WebKit { +class WebDeliveredIntentClient; class WebIntentRequest; class WebFrame; } @@ -37,14 +39,12 @@ class WebIntentsHost : public content::RenderViewObserver { // Called by the RenderView to register a new Web Intent invocation. int RegisterWebIntent(const WebKit::WebIntentRequest& request); - // Called by the bound intent object to register the result from the service - // page. + // Called into when the delivered intent object gets a postResult call. void OnResult(const WebKit::WebString& data); + // Called into when the delivered intent object gets a postFailure call. void OnFailure(const WebKit::WebString& data); private: - class BoundDeliveredIntent; - // A counter used to assign unique IDs to web intents invocations in this // renderer. int id_counter_; @@ -65,7 +65,8 @@ class WebIntentsHost : public content::RenderViewObserver { void OnSetIntent(const webkit_glue::WebIntentData& intent); // On the client page, handler method for the IntentsMsg_WebIntentReply - // message. + // message. Forwards the reply |data| to the registered WebIntentRequest + // (found by |intent_id|), where it is dispatched to the client JS callback. void OnWebIntentReply(webkit_glue::WebIntentReplyType reply_type, const WebKit::WebString& data, int intent_id); @@ -73,9 +74,13 @@ class WebIntentsHost : public content::RenderViewObserver { // Delivered intent data from the caller. scoped_ptr<webkit_glue::WebIntentData> intent_; - // Representation of the intent data as a C++ bound NPAPI object to be - // injected into the Javascript context. - scoped_ptr<BoundDeliveredIntent> delivered_intent_; + // The client object which will receive callback notifications from the + // delivered intent. + scoped_ptr<WebKit::WebDeliveredIntentClient> delivered_intent_client_; + + // If we deliver a browser-originated blob intent to the client, + // this is that Blob. + WebKit::WebBlob web_blob_; DISALLOW_COPY_AND_ASSIGN(WebIntentsHost); }; |