| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MOCK_RENDERER_PPAPI_HOST_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ | 6 #define CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/renderer/renderer_ppapi_host.h" | 10 #include "content/public/renderer/renderer_ppapi_host.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 blink::WebPluginContainer* GetContainerForInstance( | 40 blink::WebPluginContainer* GetContainerForInstance( |
| 41 PP_Instance instance) const override; | 41 PP_Instance instance) const override; |
| 42 base::ProcessId GetPluginPID() const override; | 42 base::ProcessId GetPluginPID() const override; |
| 43 bool HasUserGesture(PP_Instance instance) const override; | 43 bool HasUserGesture(PP_Instance instance) const override; |
| 44 int GetRoutingIDForWidget(PP_Instance instance) const override; | 44 int GetRoutingIDForWidget(PP_Instance instance) const override; |
| 45 gfx::Point PluginPointToRenderFrame(PP_Instance instance, | 45 gfx::Point PluginPointToRenderFrame(PP_Instance instance, |
| 46 const gfx::Point& pt) const override; | 46 const gfx::Point& pt) const override; |
| 47 IPC::PlatformFileForTransit ShareHandleWithRemote( | 47 IPC::PlatformFileForTransit ShareHandleWithRemote( |
| 48 base::PlatformFile handle, | 48 base::PlatformFile handle, |
| 49 bool should_close_source) override; | 49 bool should_close_source) override; |
| 50 base::SharedMemoryHandle ShareSharedMemoryHandleWithRemote( |
| 51 const base::SharedMemoryHandle& handle) override; |
| 50 bool IsRunningInProcess() const override; | 52 bool IsRunningInProcess() const override; |
| 51 std::string GetPluginName() const override; | 53 std::string GetPluginName() const override; |
| 52 void SetToExternalPluginHost() override; | 54 void SetToExternalPluginHost() override; |
| 53 void CreateBrowserResourceHosts( | 55 void CreateBrowserResourceHosts( |
| 54 PP_Instance instance, | 56 PP_Instance instance, |
| 55 const std::vector<IPC::Message>& nested_msgs, | 57 const std::vector<IPC::Message>& nested_msgs, |
| 56 const base::Callback<void(const std::vector<int>&)>& callback) | 58 const base::Callback<void(const std::vector<int>&)>& callback) |
| 57 const override; | 59 const override; |
| 58 GURL GetDocumentURL(PP_Instance instance) const override; | 60 GURL GetDocumentURL(PP_Instance instance) const override; |
| 59 | 61 |
| 60 private: | 62 private: |
| 61 ppapi::proxy::ResourceMessageTestSink sink_; | 63 ppapi::proxy::ResourceMessageTestSink sink_; |
| 62 ppapi::host::PpapiHost ppapi_host_; | 64 ppapi::host::PpapiHost ppapi_host_; |
| 63 | 65 |
| 64 RenderView* render_view_; | 66 RenderView* render_view_; |
| 65 PP_Instance pp_instance_; | 67 PP_Instance pp_instance_; |
| 66 | 68 |
| 67 bool has_user_gesture_; | 69 bool has_user_gesture_; |
| 68 | 70 |
| 69 scoped_ptr<FakePepperPluginInstance> plugin_instance_; | 71 scoped_ptr<FakePepperPluginInstance> plugin_instance_; |
| 70 | 72 |
| 71 DISALLOW_COPY_AND_ASSIGN(MockRendererPpapiHost); | 73 DISALLOW_COPY_AND_ASSIGN(MockRendererPpapiHost); |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 } // namespace content | 76 } // namespace content |
| 75 | 77 |
| 76 #endif // CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ | 78 #endif // CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ |
| OLD | NEW |