| Index: content/renderer/pepper/content_instance_glue_impl.h
|
| diff --git a/content/renderer/pepper/content_instance_glue_impl.h b/content/renderer/pepper/content_instance_glue_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b74ebc14f257cd554e74bf4ad971f98ad4abaecb
|
| --- /dev/null
|
| +++ b/content/renderer/pepper/content_instance_glue_impl.h
|
| @@ -0,0 +1,45 @@
|
| +// 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 CONTENT_RENDERER_PEPPER_CONTENT_INSTANCE_GLUE_IMPL_H_
|
| +#define CONTENT_RENDERER_PEPPER_CONTENT_INSTANCE_GLUE_IMPL_H_
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "content/renderer/pepper/content_instance_glue.h"
|
| +
|
| +namespace webkit {
|
| +namespace ppapi {
|
| +class PluginInstance;
|
| +class PluginModule;
|
| +}
|
| +}
|
| +
|
| +namespace content {
|
| +
|
| +class ContentInstanceGlueImpl : public ContentInstanceGlue {
|
| + public:
|
| + ContentInstanceGlueImpl(webkit::ppapi::PluginModule* module);
|
| + virtual ~ContentInstanceGlueImpl();
|
| +
|
| + // ContentInstanceGlue implmentation.
|
| + virtual bool IsValidInstance(PP_Instance instance) OVERRIDE;
|
| + virtual bool HasUserGesture(PP_Instance pp_instance) OVERRIDE;
|
| +
|
| + private:
|
| + // Retrieves the plugin instance object associated with the given PP_Instance
|
| + // and validates that it is one of the instances associated with our module.
|
| + // Returns NULL on failure.
|
| + //
|
| + // We use this to security check the PP_Instance values sent from a plugin to
|
| + // make sure it's not trying to spoof another instance.
|
| + webkit::ppapi::PluginInstance* GetAndValidateInstance(PP_Instance instance);
|
| +
|
| + webkit::ppapi::PluginModule* module_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ContentInstanceGlueImpl);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_RENDERER_PEPPER_CONTENT_INSTANCE_GLUE_IMPL_H_
|
|
|