Index: content/renderer/web_intents_host.h |
diff --git a/content/renderer/web_intents_host.h b/content/renderer/web_intents_host.h |
index 4567dcdcbf70ab0e7f4bf6d99abc2be183049b04..a991ce022ffd9f585291850244ce3210997e5408 100644 |
--- a/content/renderer/web_intents_host.h |
+++ b/content/renderer/web_intents_host.h |
@@ -6,6 +6,7 @@ |
#define CONTENT_RENDERER_WEB_INTENTS_HOST_H_ |
#pragma once |
+#include <map> |
darin (slow to review)
2012/01/19 07:23:57
nit: add a new line after this include
Greg Billock
2012/01/19 18:51:59
Done.
|
#include "base/memory/scoped_ptr.h" |
#include "content/public/renderer/render_view_observer.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
@@ -15,6 +16,7 @@ |
class RenderViewImpl; |
namespace WebKit { |
+class WebIntentRequest; |
class WebFrame; |
} |
@@ -31,6 +33,9 @@ class WebIntentsHost : public content::RenderViewObserver { |
explicit WebIntentsHost(RenderViewImpl* render_view); |
virtual ~WebIntentsHost(); |
+ // 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. |
void OnResult(const WebKit::WebString& data); |
@@ -39,6 +44,14 @@ class WebIntentsHost : public content::RenderViewObserver { |
private: |
class BoundDeliveredIntent; |
+ // A counter used to assign unique IDs to web intents invocations in this |
+ // renderer. |
+ int id_counter_; |
darin (slow to review)
2012/01/19 07:23:57
perhaps you should be using IDMap<T> here? see ba
Greg Billock
2012/01/19 18:51:59
It looks like that class really wants to store poi
|
+ |
+ // Map tracking registered Web Intent requests by assigned ID numbers to |
+ // correctly route any return data. |
+ std::map<int, WebKit::WebIntentRequest> intent_requests_; |
+ |
// RenderView::Observer implementation. |
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; |