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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_PROXY_RESOURCE_MESSAGE_TEST_SINK_H_
6 #define PPAPI_PROXY_RESOURCE_MESSAGE_TEST_SINK_H_
7
8 #include "ipc/ipc_test_sink.h"
9
10 namespace ppapi {
11 namespace proxy {
12
13 class ResourceMessageCallParams;
14 class ResourceMessageReplyParams;
15
16 // Extends IPC::TestSink to add extra capabilities for searching for and
17 // decoding resource messages.
18 class ResourceMessageTestSink : public IPC::TestSink {
19 public:
20 ResourceMessageTestSink();
21 virtual ~ResourceMessageTestSink();
22
23 // Searches the queue for the first resource call message with a nested
24 // message matching the given ID. On success, returns true and populates the
25 // givem params and nested message.
26 bool GetFirstResourceCallMatching(
27 uint32 id,
28 ResourceMessageCallParams* params,
29 IPC::Message* nested_msg) const;
30
31 // Like GetFirstResourceCallMatching except for replies.
32 bool GetFirstResourceReplyMatching(
33 uint32 id,
34 ResourceMessageReplyParams* params,
35 IPC::Message* nested_msg);
36 };
37
38 } // namespace proxy
39 } // namespace ppapi
40
41 #endif // PPAPI_PROXY_RESOURCE_MESSAGE_TEST_SINK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698