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 "content/public/renderer/renderer_ppapi_host.h" | 9 #include "content/public/renderer/renderer_ppapi_host.h" |
10 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h" | 10 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 ppapi::proxy::ResourceMessageTestSink& sink() { return sink_; } | 33 ppapi::proxy::ResourceMessageTestSink& sink() { return sink_; } |
34 PP_Instance pp_instance() const { return pp_instance_; } | 34 PP_Instance pp_instance() const { return pp_instance_; } |
35 | 35 |
36 // Sets whether there is currently a user gesture. Defaults to false. | 36 // Sets whether there is currently a user gesture. Defaults to false. |
37 void set_has_user_gesture(bool gesture) { has_user_gesture_ = gesture; } | 37 void set_has_user_gesture(bool gesture) { has_user_gesture_ = gesture; } |
38 | 38 |
39 // RendererPpapiHost. | 39 // RendererPpapiHost. |
40 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; | 40 virtual ppapi::host::PpapiHost* GetPpapiHost() OVERRIDE; |
41 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; | 41 virtual bool IsValidInstance(PP_Instance instance) const OVERRIDE; |
| 42 virtual webkit::ppapi::PluginInstance* GetPluginInstance( |
| 43 PP_Instance instance) const OVERRIDE; |
42 virtual RenderView* GetRenderViewForInstance( | 44 virtual RenderView* GetRenderViewForInstance( |
43 PP_Instance instance) const OVERRIDE; | 45 PP_Instance instance) const OVERRIDE; |
44 virtual WebKit::WebPluginContainer* GetContainerForInstance( | 46 virtual WebKit::WebPluginContainer* GetContainerForInstance( |
45 PP_Instance instance) const OVERRIDE; | 47 PP_Instance instance) const OVERRIDE; |
46 virtual bool HasUserGesture(PP_Instance instance) const OVERRIDE; | 48 virtual bool HasUserGesture(PP_Instance instance) const OVERRIDE; |
| 49 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( |
| 50 base::PlatformFile handle, |
| 51 bool should_close_source) OVERRIDE; |
47 | 52 |
48 private: | 53 private: |
49 ppapi::proxy::ResourceMessageTestSink sink_; | 54 ppapi::proxy::ResourceMessageTestSink sink_; |
50 ppapi::host::PpapiHost ppapi_host_; | 55 ppapi::host::PpapiHost ppapi_host_; |
51 | 56 |
52 RenderView* render_view_; | 57 RenderView* render_view_; |
53 PP_Instance pp_instance_; | 58 PP_Instance pp_instance_; |
54 | 59 |
55 bool has_user_gesture_; | 60 bool has_user_gesture_; |
56 | 61 |
57 DISALLOW_COPY_AND_ASSIGN(MockRendererPpapiHost); | 62 DISALLOW_COPY_AND_ASSIGN(MockRendererPpapiHost); |
58 }; | 63 }; |
59 | 64 |
60 } // namespace content | 65 } // namespace content |
61 | 66 |
62 #endif // CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ | 67 #endif // CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ |
OLD | NEW |