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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "content/public/renderer/renderer_ppapi_host.h" | 11 #include "content/public/renderer/renderer_ppapi_host.h" |
12 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h" | 12 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h" |
13 #include "ppapi/host/ppapi_host.h" | 13 #include "ppapi/host/ppapi_host.h" |
14 #include "ppapi/proxy/resource_message_test_sink.h" | 14 #include "ppapi/proxy/resource_message_test_sink.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class FakePepperPluginInstance; | 17 class FakePepperPluginInstance; |
18 class PluginModule; | |
19 | 18 |
20 // A mock RendererPpapiHost for testing resource hosts. Messages sent by | 19 // A mock RendererPpapiHost for testing resource hosts. Messages sent by |
21 // resources through this will get added to the test sink. | 20 // resources through this will get added to the test sink. |
22 class MockRendererPpapiHost : public RendererPpapiHost { | 21 class MockRendererPpapiHost : public RendererPpapiHost { |
23 public: | 22 public: |
24 // This function takes the RenderView and instance that the mock resource | 23 // This function takes the RenderView and instance that the mock resource |
25 // host will be associated with. | 24 // host will be associated with. |
26 MockRendererPpapiHost(RenderView* render_view, PP_Instance instance); | 25 MockRendererPpapiHost(RenderView* render_view, PP_Instance instance); |
27 ~MockRendererPpapiHost() override; | 26 ~MockRendererPpapiHost() override; |
28 | 27 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 bool has_user_gesture_; | 70 bool has_user_gesture_; |
72 | 71 |
73 std::unique_ptr<FakePepperPluginInstance> plugin_instance_; | 72 std::unique_ptr<FakePepperPluginInstance> plugin_instance_; |
74 | 73 |
75 DISALLOW_COPY_AND_ASSIGN(MockRendererPpapiHost); | 74 DISALLOW_COPY_AND_ASSIGN(MockRendererPpapiHost); |
76 }; | 75 }; |
77 | 76 |
78 } // namespace content | 77 } // namespace content |
79 | 78 |
80 #endif // CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ | 79 #endif // CONTENT_RENDERER_PEPPER_MOCK_RENDERER_PPAPI_HOST_H_ |
OLD | NEW |