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