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_MOCK_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ |
6 #define CONTENT_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ | 6 #define CONTENT_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "content/public/renderer/content_renderer_client.h" | 12 #include "content/public/renderer/content_renderer_client.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 // Base class for unit tests that need to mock the ContentRendererClient. | 16 // Base class for unit tests that need to mock the ContentRendererClient. |
17 class MockContentRendererClient : public ContentRendererClient { | 17 class MockContentRendererClient : public ContentRendererClient { |
18 public: | 18 public: |
19 virtual ~MockContentRendererClient(); | 19 virtual ~MockContentRendererClient(); |
20 virtual void RenderThreadStarted() OVERRIDE; | 20 virtual void RenderThreadStarted() OVERRIDE; |
21 virtual void RenderViewCreated(RenderView* render_view) OVERRIDE; | 21 virtual void RenderViewCreated(RenderView* render_view) OVERRIDE; |
22 virtual void SetNumberOfViews(int number_of_views) OVERRIDE; | 22 virtual void SetNumberOfViews(int number_of_views) OVERRIDE; |
23 virtual SkBitmap* GetSadPluginBitmap() OVERRIDE; | 23 virtual SkBitmap* GetSadPluginBitmap() OVERRIDE; |
24 virtual std::string GetDefaultEncoding() OVERRIDE; | 24 virtual std::string GetDefaultEncoding() OVERRIDE; |
25 virtual bool OverrideCreatePlugin( | 25 virtual bool OverrideCreatePlugin( |
26 RenderView* render_view, | 26 RenderView* render_view, |
27 WebKit::WebFrame* frame, | 27 WebKit::WebFrame* frame, |
28 const WebKit::WebPluginParams& params, | 28 const WebKit::WebPluginParams& params, |
29 WebKit::WebPlugin** plugin) OVERRIDE; | 29 WebKit::WebPlugin** plugin) OVERRIDE; |
| 30 virtual WebKit::WebPlugin* CreatePluginReplacement( |
| 31 RenderView* render_view, |
| 32 const FilePath& plugin_path) OVERRIDE; |
30 virtual bool HasErrorPage(int http_status_code, | 33 virtual bool HasErrorPage(int http_status_code, |
31 std::string* error_domain) OVERRIDE; | 34 std::string* error_domain) OVERRIDE; |
32 virtual void GetNavigationErrorStrings( | 35 virtual void GetNavigationErrorStrings( |
33 const WebKit::WebURLRequest& failed_request, | 36 const WebKit::WebURLRequest& failed_request, |
34 const WebKit::WebURLError& error, | 37 const WebKit::WebURLError& error, |
35 std::string* error_html, | 38 std::string* error_html, |
36 string16* error_description) OVERRIDE; | 39 string16* error_description) OVERRIDE; |
37 virtual webkit_media::WebMediaPlayerImpl* OverrideCreateWebMediaPlayer( | 40 virtual webkit_media::WebMediaPlayerImpl* OverrideCreateWebMediaPlayer( |
38 RenderView* render_view, | 41 RenderView* render_view, |
39 WebKit::WebFrame* frame, | 42 WebKit::WebFrame* frame, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 const GURL& url, | 79 const GURL& url, |
77 const GURL& first_party_for_cookies, | 80 const GURL& first_party_for_cookies, |
78 const std::string& value) OVERRIDE; | 81 const std::string& value) OVERRIDE; |
79 virtual void RegisterPPAPIInterfaceFactories( | 82 virtual void RegisterPPAPIInterfaceFactories( |
80 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) OVERRIDE; | 83 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) OVERRIDE; |
81 }; | 84 }; |
82 | 85 |
83 } // namespace content | 86 } // namespace content |
84 | 87 |
85 #endif // CONTENT_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ | 88 #endif // CONTENT_RENDERER_MOCK_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |