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

Unified Diff: ppapi/proxy/resource_message_test_sink.h

Issue 10560030: Add resource message call and reply infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
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
new file mode 100644
index 0000000000000000000000000000000000000000..248d45ad3bd507ea579a05b1eafd22f118c9ba20
--- /dev/null
+++ b/ppapi/proxy/resource_message_test_sink.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_PROXY_RESOURCE_MESSAGE_TEST_SINK_H_
+#define PPAPI_PROXY_RESOURCE_MESSAGE_TEST_SINK_H_
+
+#include "ipc/ipc_test_sink.h"
+
+namespace ppapi {
+namespace proxy {
+
+class ResourceMessageCallParams;
+class ResourceMessageReplyParams;
+
+// Extends IPC::TestSink to add extra capabilities for searching for and
+// decoding resource messages.
+class ResourceMessageTestSink : public IPC::TestSink {
+ public:
+ ResourceMessageTestSink();
+ virtual ~ResourceMessageTestSink();
+
+ // 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.
+ bool GetFirstResourceCallMatching(
+ uint32 id,
+ ResourceMessageCallParams* params,
+ IPC::Message* nested_msg) const;
+
+ // Like GetFirstResourceCallMatching except for replies.
+ bool GetFirstResourceReplyMatching(
+ uint32 id,
+ ResourceMessageReplyParams* params,
+ IPC::Message* nested_msg);
+};
+
+} // namespace proxy
+} // namespace ppapi
+
+#endif // PPAPI_PROXY_RESOURCE_MESSAGE_TEST_SINK_H_

Powered by Google App Engine
This is Rietveld 408576698