Home | History | Annotate | Download | only in pepper
      1 // Copyright (c) 2013 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 CONTENT_RENDERER_PEPPER_FAKE_PEPPER_PLUGIN_INSTANCE_H_
      6 #define CONTENT_RENDERER_PEPPER_FAKE_PEPPER_PLUGIN_INSTANCE_H_
      7 
      8 #include "content/public/renderer/pepper_plugin_instance.h"
      9 #include "url/gurl.h"
     10 
     11 namespace content {
     12 
     13 class FakePepperPluginInstance : public PepperPluginInstance {
     14  public:
     15   virtual ~FakePepperPluginInstance();
     16 
     17   // PepperPluginInstance overrides.
     18   virtual content::RenderView* GetRenderView() OVERRIDE;
     19   virtual blink::WebPluginContainer* GetContainer() OVERRIDE;
     20   virtual v8::Isolate* GetIsolate() const OVERRIDE;
     21   virtual ppapi::VarTracker* GetVarTracker() OVERRIDE;
     22   virtual const GURL& GetPluginURL() OVERRIDE;
     23   virtual base::FilePath GetModulePath() OVERRIDE;
     24   virtual PP_Resource CreateImage(gfx::ImageSkia* source_image,
     25                                   float scale) OVERRIDE;
     26   virtual PP_ExternalPluginResult SwitchToOutOfProcessProxy(
     27       const base::FilePath& file_path,
     28       ppapi::PpapiPermissions permissions,
     29       const IPC::ChannelHandle& channel_handle,
     30       base::ProcessId plugin_pid,
     31       int plugin_child_id) OVERRIDE;
     32   virtual void SetAlwaysOnTop(bool on_top) OVERRIDE;
     33   virtual bool IsFullPagePlugin() OVERRIDE;
     34   virtual bool FlashSetFullscreen(bool fullscreen, bool delay_report) OVERRIDE;
     35   virtual bool IsRectTopmost(const gfx::Rect& rect) OVERRIDE;
     36   virtual int32_t Navigate(const ppapi::URLRequestInfoData& request,
     37                            const char* target,
     38                            bool from_user_action) OVERRIDE;
     39   virtual int MakePendingFileRefRendererHost(const base::FilePath& path)
     40       OVERRIDE;
     41   virtual void SetEmbedProperty(PP_Var key, PP_Var value) OVERRIDE;
     42   virtual void SetSelectedText(const base::string16& selected_text) OVERRIDE;
     43   virtual void SetLinkUnderCursor(const std::string& url) OVERRIDE;
     44   virtual void SetTextInputType(ui::TextInputType type) OVERRIDE;
     45   virtual void PostMessageToJavaScript(PP_Var message) OVERRIDE;
     46 
     47  private:
     48   GURL gurl_;
     49 };
     50 
     51 }  // namespace content
     52 
     53 #endif  // CONTENT_RENDERER_PEPPER_FAKE_PEPPER_PLUGIN_INSTANCE_H_
     54