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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "ipc/ipc_message.h" | 13 #include "ipc/ipc_message.h" |
14 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat
e.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat
e.h" |
16 | 16 |
| 17 class FilePath; |
17 class GURL; | 18 class GURL; |
18 class SkBitmap; | 19 class SkBitmap; |
19 | 20 |
20 namespace WebKit { | 21 namespace WebKit { |
21 class WebAudioSourceProvider; | 22 class WebAudioSourceProvider; |
22 class WebFrame; | 23 class WebFrame; |
23 class WebMediaPlayerClient; | 24 class WebMediaPlayerClient; |
24 class WebPlugin; | 25 class WebPlugin; |
25 class WebURLRequest; | 26 class WebURLRequest; |
26 struct WebPluginParams; | 27 struct WebPluginParams; |
27 struct WebURLError; | 28 struct WebURLError; |
28 } | 29 } |
29 | 30 |
30 namespace webkit { | 31 namespace webkit { |
31 namespace ppapi { | 32 namespace ppapi { |
32 class PpapiInterfaceFactoryManager; | 33 class PpapiInterfaceFactoryManager; |
33 } | 34 } |
| 35 struct WebPluginInfo; |
34 } | 36 } |
35 | 37 |
36 namespace media { | 38 namespace media { |
37 class FilterCollection; | 39 class FilterCollection; |
38 class MediaLog; | 40 class MediaLog; |
39 class MessageLoopFactory; | 41 class MessageLoopFactory; |
40 } | 42 } |
41 | 43 |
42 namespace webkit_media { | 44 namespace webkit_media { |
43 class MediaStreamClient; | 45 class MediaStreamClient; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 78 |
77 // Allows the embedder to override creating a plugin. If it returns true, then | 79 // Allows the embedder to override creating a plugin. If it returns true, then |
78 // |plugin| will contain the created plugin, although it could be NULL. If it | 80 // |plugin| will contain the created plugin, although it could be NULL. If it |
79 // returns false, the content layer will create the plugin. | 81 // returns false, the content layer will create the plugin. |
80 virtual bool OverrideCreatePlugin( | 82 virtual bool OverrideCreatePlugin( |
81 RenderView* render_view, | 83 RenderView* render_view, |
82 WebKit::WebFrame* frame, | 84 WebKit::WebFrame* frame, |
83 const WebKit::WebPluginParams& params, | 85 const WebKit::WebPluginParams& params, |
84 WebKit::WebPlugin** plugin) = 0; | 86 WebKit::WebPlugin** plugin) = 0; |
85 | 87 |
| 88 // Creates a replacement plug-in that is shown when the plug-in at |file_path| |
| 89 // couldn't be loaded. This allows the embedder to show a custom placeholder. |
| 90 virtual WebKit::WebPlugin* CreatePluginReplacement( |
| 91 RenderView* render_view, |
| 92 const FilePath& plugin_path) = 0; |
| 93 |
86 // Returns true if the embedder has an error page to show for the given http | 94 // Returns true if the embedder has an error page to show for the given http |
87 // status code. If so |error_domain| should be set to according to WebURLError | 95 // status code. If so |error_domain| should be set to according to WebURLError |
88 // and the embedder's GetNavigationErrorHtml will be called afterwards to get | 96 // and the embedder's GetNavigationErrorHtml will be called afterwards to get |
89 // the error html. | 97 // the error html. |
90 virtual bool HasErrorPage(int http_status_code, | 98 virtual bool HasErrorPage(int http_status_code, |
91 std::string* error_domain) = 0; | 99 std::string* error_domain) = 0; |
92 | 100 |
93 // Returns the information to display when a navigation error occurs. | 101 // Returns the information to display when a navigation error occurs. |
94 // If |error_html| is not null then it may be set to a HTML page containing | 102 // If |error_html| is not null then it may be set to a HTML page containing |
95 // the details of the error and maybe links to more info. | 103 // the details of the error and maybe links to more info. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 const GURL& first_party_for_cookies, | 180 const GURL& first_party_for_cookies, |
173 const std::string& value) = 0; | 181 const std::string& value) = 0; |
174 | 182 |
175 virtual void RegisterPPAPIInterfaceFactories( | 183 virtual void RegisterPPAPIInterfaceFactories( |
176 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) = 0; | 184 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) = 0; |
177 }; | 185 }; |
178 | 186 |
179 } // namespace content | 187 } // namespace content |
180 | 188 |
181 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 189 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |