diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 22:52:48 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 22:52:48 +0000 |
commit | 1054c07eebc637b448f0126bbffdf36075124b9e (patch) | |
tree | 1a0d5c7230dd7888e0ac998fffe2baf545250885 /ppapi/proxy/ppb_testing_proxy.h | |
parent | 6f472b61b02e472c67b35181030a8ea36408e482 (diff) | |
download | chromium_src-1054c07eebc637b448f0126bbffdf36075124b9e.zip chromium_src-1054c07eebc637b448f0126bbffdf36075124b9e.tar.gz chromium_src-1054c07eebc637b448f0126bbffdf36075124b9e.tar.bz2 |
Add proxies for URLResponseInfo, URLRequestInfo, and Testing. The URLLoader
tests now pass, except for the one that uses FileRef which isn't implemented
yet.
BUG=none
TEST=URLLoader pepper test
Review URL: http://codereview.chromium.org/4605001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65268 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_testing_proxy.h')
-rw-r--r-- | ppapi/proxy/ppb_testing_proxy.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ppapi/proxy/ppb_testing_proxy.h b/ppapi/proxy/ppb_testing_proxy.h new file mode 100644 index 0000000..3f4013e --- /dev/null +++ b/ppapi/proxy/ppb_testing_proxy.h @@ -0,0 +1,49 @@ +// Copyright (c) 2010 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_PPB_TESTING_PROXY_H_ +#define PPAPI_PROXY_PPB_TESTING_PROXY_H_ + +#include "base/basictypes.h" +#include "ppapi/c/pp_module.h" +#include "ppapi/c/pp_resource.h" +#include "ppapi/proxy/interface_proxy.h" + +struct PP_Point; +struct PPB_Testing_Dev; + +namespace pp { +namespace proxy { + +class PPB_Testing_Proxy : public InterfaceProxy { + public: + PPB_Testing_Proxy(Dispatcher* dispatcher, const void* target_interface); + virtual ~PPB_Testing_Proxy(); + + const PPB_Testing_Dev* ppb_testing_target() const { + return static_cast<const PPB_Testing_Dev*>(target_interface()); + } + + // InterfaceProxy implementation. + virtual const void* GetSourceInterface() const; + virtual InterfaceID GetInterfaceId() const; + virtual void OnMessageReceived(const IPC::Message& msg); + + private: + // Message handlers. + void OnMsgReadImageData(PP_Resource device_context_2d, + PP_Resource image, + const PP_Point& top_left, + bool* result); + void OnMsgRunMessageLoop(bool* dummy); + void OnMsgQuitMessageLoop(); + void OnMsgGetLiveObjectCount(PP_Module module_id, uint32_t* result); + + DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy); +}; + +} // namespace proxy +} // namespace pp + +#endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_ |