| 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 23 matching lines...) Expand all Loading... |
| 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 RenderView* GetRenderViewForInstance( | 42 virtual RenderView* GetRenderViewForInstance( |
| 43 PP_Instance instance) const OVERRIDE; | 43 PP_Instance instance) const OVERRIDE; |
| 44 virtual WebKit::WebPluginContainer* GetContainerForInstance( |
| 45 PP_Instance instance) const OVERRIDE; |
| 44 virtual bool HasUserGesture(PP_Instance instance) const OVERRIDE; | 46 virtual bool HasUserGesture(PP_Instance instance) const OVERRIDE; |
| 45 | 47 |
| 46 private: | 48 private: |
| 47 ppapi::proxy::ResourceMessageTestSink sink_; | 49 ppapi::proxy::ResourceMessageTestSink sink_; |
| 48 ppapi::host::PpapiHost ppapi_host_; | 50 ppapi::host::PpapiHost ppapi_host_; |
| 49 | 51 |
| 50 RenderView* render_view_; | 52 RenderView* render_view_; |
| 51 PP_Instance pp_instance_; | 53 PP_Instance pp_instance_; |
| 52 | 54 |
| 53 bool has_user_gesture_; | 55 bool has_user_gesture_; |
| 54 | 56 |
| 55 DISALLOW_COPY_AND_ASSIGN(MockRendererPpapiHost); | 57 DISALLOW_COPY_AND_ASSIGN(MockRendererPpapiHost); |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 } // namespace content | 60 } // namespace content |
| 59 | 61 |
| 60 #endif // CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ | 62 #endif // CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ |
| 61 | |
| OLD | NEW |