#ifndef CONTENT_PUBLIC_RENDERER_PEPPER_PLUGIN_INSTANCE_H_
#define CONTENT_PUBLIC_RENDERER_PEPPER_PLUGIN_INSTANCE_H_
#include "base/basictypes.h"
#include "base/process/process_handle.h"
#include "base/strings/string16.h"
#include "content/common/content_export.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_var.h"
#include "ppapi/c/private/ppb_instance_private.h"
class GURL;
namespace base {
class FilePath;
}
namespace gfx {
class ImageSkia;
class Rect;
}
namespace ppapi {
class PpapiPermissions;
class VarTracker;
struct URLRequestInfoData;
}
namespace IPC {
struct ChannelHandle;
}
namespace blink {
class WebPluginContainer;
}
namespace v8 {
class Isolate;
}
namespace content {
class RenderView;
class PepperPluginInstance {
public:
static CONTENT_EXPORT PepperPluginInstance* Get(PP_Instance instance_id);
virtual ~PepperPluginInstance() {}
virtual content::RenderView* GetRenderView() = 0;
virtual blink::WebPluginContainer* GetContainer() = 0;
virtual v8::Isolate* GetIsolate() const = 0;
virtual ppapi::VarTracker* GetVarTracker() = 0;
virtual const GURL& GetPluginURL() = 0;
virtual base::FilePath GetModulePath() = 0;
virtual PP_Resource CreateImage(gfx::ImageSkia* source_image,
float scale) = 0;
virtual PP_ExternalPluginResult SwitchToOutOfProcessProxy(
const base::FilePath& file_path,
ppapi::PpapiPermissions permissions,
const IPC::ChannelHandle& channel_handle,
base::ProcessId plugin_pid,
int plugin_child_id) = 0;
virtual void SetAlwaysOnTop(bool on_top) = 0;
virtual bool IsFullPagePlugin() = 0;
virtual bool FlashSetFullscreen(bool fullscreen, bool delay_report) = 0;
virtual bool IsRectTopmost(const gfx::Rect& rect) = 0;
virtual int32_t Navigate(const ppapi::URLRequestInfoData& request,
const char* target,
bool from_user_action) = 0;
virtual int MakePendingFileRefRendererHost(const base::FilePath& path) = 0;
virtual void SetEmbedProperty(PP_Var key, PP_Var value) = 0;
virtual void SetSelectedText(const base::string16& selected_text) = 0;
virtual void SetLinkUnderCursor(const std::string& url) = 0;
};
}
#endif