diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-21 21:46:26 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-21 21:46:26 +0000 |
commit | 077ecfd462a0dc97e2042275cf770a5b3d447ee3 (patch) | |
tree | 01395a25a92d97683b84d9048e54f6fa5c5365bc /ppapi/proxy/resource_message_test_sink.h | |
parent | c290833eb0eb7e8d6316672d6f9ec59d22d0a5a8 (diff) | |
download | chromium_src-077ecfd462a0dc97e2042275cf770a5b3d447ee3.zip chromium_src-077ecfd462a0dc97e2042275cf770a5b3d447ee3.tar.gz chromium_src-077ecfd462a0dc97e2042275cf770a5b3d447ee3.tar.bz2 |
Add resource message call and reply infrastructure.
These messages are not yet used. They will allow us to route messages directly to a resource implementation in the proxy or the host using information in a common header. The actual content of the message (as interpreted by the specifi resource in the plugin or class in the host) is a nested message.
TEST=none
BUT=none
Review URL: https://chromiumcodereview.appspot.com/10560030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/resource_message_test_sink.h')
-rw-r--r-- | ppapi/proxy/resource_message_test_sink.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ppapi/proxy/resource_message_test_sink.h b/ppapi/proxy/resource_message_test_sink.h new file mode 100644 index 0000000..bf74bec --- /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_ |