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_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 namespace webkit_media { | 46 namespace webkit_media { |
47 class MediaStreamClient; | 47 class MediaStreamClient; |
48 class WebMediaPlayerDelegate; | 48 class WebMediaPlayerDelegate; |
49 class WebMediaPlayerImpl; | 49 class WebMediaPlayerImpl; |
50 } | 50 } |
51 | 51 |
52 namespace content { | 52 namespace content { |
53 | 53 |
54 class RenderView; | 54 class RenderView; |
| 55 class RenderViewImpl; |
| 56 struct RenderViewImplParams; |
55 | 57 |
56 // Embedder API for participating in renderer logic. | 58 // Embedder API for participating in renderer logic. |
57 class CONTENT_EXPORT ContentRendererClient { | 59 class CONTENT_EXPORT ContentRendererClient { |
58 public: | 60 public: |
59 virtual ~ContentRendererClient() {} | 61 virtual ~ContentRendererClient() {} |
60 | 62 |
61 // Notifies us that the RenderThread has been created. | 63 // Notifies us that the RenderThread has been created. |
62 virtual void RenderThreadStarted() {} | 64 virtual void RenderThreadStarted() {} |
63 | 65 |
64 // Notifies that a new RenderView has been created. | 66 // Notifies that a new RenderView has been created. |
65 virtual void RenderViewCreated(RenderView* render_view) {} | 67 virtual void RenderViewCreated(RenderView* render_view) {} |
66 | 68 |
67 // Sets a number of views/tabs opened in this process. | 69 // Sets a number of views/tabs opened in this process. |
68 virtual void SetNumberOfViews(int number_of_views) {} | 70 virtual void SetNumberOfViews(int number_of_views) {} |
69 | 71 |
70 // Returns the bitmap to show when a plugin crashed, or NULL for none. | 72 // Returns the bitmap to show when a plugin crashed, or NULL for none. |
71 virtual SkBitmap* GetSadPluginBitmap(); | 73 virtual SkBitmap* GetSadPluginBitmap(); |
72 | 74 |
73 // Returns the default text encoding. | 75 // Returns the default text encoding. |
74 virtual std::string GetDefaultEncoding(); | 76 virtual std::string GetDefaultEncoding(); |
75 | 77 |
| 78 // Allows the embedder to override creating a RenderViewImpl. The only way an |
| 79 // embedder can achieve this is by using the layout tests support library. |
| 80 virtual bool OverrideCreateRenderViewImpl( |
| 81 RenderViewImplParams* params, |
| 82 RenderViewImpl** render_view_impl); |
| 83 |
76 // Allows the embedder to override creating a plugin. If it returns true, then | 84 // Allows the embedder to override creating a plugin. If it returns true, then |
77 // |plugin| will contain the created plugin, although it could be NULL. If it | 85 // |plugin| will contain the created plugin, although it could be NULL. If it |
78 // returns false, the content layer will create the plugin. | 86 // returns false, the content layer will create the plugin. |
79 virtual bool OverrideCreatePlugin( | 87 virtual bool OverrideCreatePlugin( |
80 RenderView* render_view, | 88 RenderView* render_view, |
81 WebKit::WebFrame* frame, | 89 WebKit::WebFrame* frame, |
82 const WebKit::WebPluginParams& params, | 90 const WebKit::WebPluginParams& params, |
83 WebKit::WebPlugin** plugin); | 91 WebKit::WebPlugin** plugin); |
84 | 92 |
85 // Creates a replacement plug-in that is shown when the plug-in at |file_path| | 93 // Creates a replacement plug-in that is shown when the plug-in at |file_path| |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 const GURL& first_party_for_cookies, | 187 const GURL& first_party_for_cookies, |
180 const std::string& value); | 188 const std::string& value); |
181 | 189 |
182 virtual void RegisterPPAPIInterfaceFactories( | 190 virtual void RegisterPPAPIInterfaceFactories( |
183 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {} | 191 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {} |
184 }; | 192 }; |
185 | 193 |
186 } // namespace content | 194 } // namespace content |
187 | 195 |
188 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 196 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |