Index: ppapi/proxy/resource_message_test_sink.h |
diff --git a/ppapi/proxy/resource_message_test_sink.h b/ppapi/proxy/resource_message_test_sink.h |
index ff6fa7d7db4bd9e9a126ca89a2b31a6df99d4dba..2593aaae22165da6bf7b06a1520174fde9aaf453 100644 |
--- a/ppapi/proxy/resource_message_test_sink.h |
+++ b/ppapi/proxy/resource_message_test_sink.h |
@@ -33,7 +33,7 @@ class ResourceMessageTestSink : public IPC::TestSink { |
// Searches the queue for the first resource call message with a nested |
// message matching the given ID. On success, returns true and populates the |
- // givem params and nested message. |
+ // given params and nested message. |
bool GetFirstResourceCallMatching( |
uint32 id, |
ResourceMessageCallParams* params, |
@@ -45,25 +45,19 @@ class ResourceMessageTestSink : public IPC::TestSink { |
ResourceMessageReplyParams* params, |
IPC::Message* nested_msg); |
- // Searches the queue for the next resource call message with a nested |
- // message matching the given ID. On success, returns true and populates the |
- // givem params and nested message. The first time this is called, it is |
- // equivalent to GetFirstResourceCallMatching. |
- bool GetNextResourceCallMatching( |
- uint32 id, |
- ResourceMessageCallParams* params, |
- IPC::Message* nested_msg); |
+ // Searches the queue for all resource call messages with a nested message |
+ // matching the given ID. |
+ typedef std::pair<ResourceMessageCallParams, IPC::Message> ResourceCall; |
+ typedef std::vector<ResourceCall> ResourceCallVector; |
+ ResourceCallVector GetAllResourceCallsMatching(uint32 id); |
- // Like GetNextResourceCallMatching except for replies. |
- bool GetNextResourceReplyMatching( |
- uint32 id, |
- ResourceMessageReplyParams* params, |
- IPC::Message* nested_msg); |
+ // Like GetAllResourceCallsMatching except for replies. |
+ typedef std::pair<ResourceMessageReplyParams, IPC::Message> ResourceReply; |
+ typedef std::vector<ResourceReply> ResourceReplyVector; |
+ ResourceReplyVector GetAllResourceRepliesMatching(uint32 id); |
private: |
scoped_ptr<IPC::Message> sync_reply_msg_; |
- int next_resource_call_; |
- int next_resource_reply_; |
}; |
// This is a message handler which generates reply messages for synchronous |