OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 const WebKit::WebPluginParams& params, | 62 const WebKit::WebPluginParams& params, |
63 WebKit::WebPlugin** plugin) = 0; | 63 WebKit::WebPlugin** plugin) = 0; |
64 | 64 |
65 // Returns true if the embedder has an error page to show for the given http | 65 // Returns true if the embedder has an error page to show for the given http |
66 // status code. If so |error_domain| should be set to according to WebURLError | 66 // status code. If so |error_domain| should be set to according to WebURLError |
67 // and the embedder's GetNavigationErrorHtml will be called afterwards to get | 67 // and the embedder's GetNavigationErrorHtml will be called afterwards to get |
68 // the error html. | 68 // the error html. |
69 virtual bool HasErrorPage(int http_status_code, | 69 virtual bool HasErrorPage(int http_status_code, |
70 std::string* error_domain) = 0; | 70 std::string* error_domain) = 0; |
71 | 71 |
72 // Returns the html to display when a navigation error occurs. | 72 // Returns the information to display when a navigation error occurs. |
73 virtual std::string GetNavigationErrorHtml( | 73 // If |error_html| is not null then it may be set to a HTML page containing |
| 74 // the details of the error and maybe links to more info. |
| 75 // If |error_description| is not null it may be set to contain a brief |
| 76 // message describing the error that has occurred. |
| 77 // Either of the out parameters may be not written to in certain cases |
| 78 // (lack of information on the error code) so the caller should take care to |
| 79 // initialize the string values with safe defaults before the call. |
| 80 virtual void GetNavigationErrorStrings( |
74 const WebKit::WebURLRequest& failed_request, | 81 const WebKit::WebURLRequest& failed_request, |
75 const WebKit::WebURLError& error) = 0; | 82 const WebKit::WebURLError& error, |
| 83 std::string* error_html, |
| 84 string16* error_description) = 0; |
76 | 85 |
77 // Returns true if the renderer process should schedule the idle handler when | 86 // Returns true if the renderer process should schedule the idle handler when |
78 // all widgets are hidden. | 87 // all widgets are hidden. |
79 virtual bool RunIdleHandlerWhenWidgetsHidden() = 0; | 88 virtual bool RunIdleHandlerWhenWidgetsHidden() = 0; |
80 | 89 |
81 // Returns true if the given url can create popup windows. | 90 // Returns true if the given url can create popup windows. |
82 virtual bool AllowPopup(const GURL& creator) = 0; | 91 virtual bool AllowPopup(const GURL& creator) = 0; |
83 | 92 |
84 // Returns true if we should fork a new process for the given navigation. | 93 // Returns true if we should fork a new process for the given navigation. |
85 virtual bool ShouldFork(WebKit::WebFrame* frame, | 94 virtual bool ShouldFork(WebKit::WebFrame* frame, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 const std::string& value) = 0; | 139 const std::string& value) = 0; |
131 | 140 |
132 // True if the protocol implemented to serve |url| supports features required | 141 // True if the protocol implemented to serve |url| supports features required |
133 // by the media engine. | 142 // by the media engine. |
134 virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0; | 143 virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0; |
135 }; | 144 }; |
136 | 145 |
137 } // namespace content | 146 } // namespace content |
138 | 147 |
139 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 148 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |