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

Unified Diff: ppapi/proxy/resource_message_test_sink.h

Issue 127243002: Pepper: Change ResourceMessageTestSink API for getting multiple messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implement GetFirst* methods in terms of GetAll* ones. Created 6 years, 11 months 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 | « ppapi/proxy/file_system_resource_unittest.cc ('k') | ppapi/proxy/resource_message_test_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ppapi/proxy/file_system_resource_unittest.cc ('k') | ppapi/proxy/resource_message_test_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698