| 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_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| 6 #define CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 6 #define CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Returns the default text encoding. | 44 // Returns the default text encoding. |
| 45 virtual std::string GetDefaultEncoding(); | 45 virtual std::string GetDefaultEncoding(); |
| 46 | 46 |
| 47 // Create a plugin in the given frame. Can return NULL, in which case | 47 // Create a plugin in the given frame. Can return NULL, in which case |
| 48 // RenderView will create a plugin itself. | 48 // RenderView will create a plugin itself. |
| 49 virtual WebKit::WebPlugin* CreatePlugin( | 49 virtual WebKit::WebPlugin* CreatePlugin( |
| 50 RenderView* render_view, | 50 RenderView* render_view, |
| 51 WebKit::WebFrame* frame, | 51 WebKit::WebFrame* frame, |
| 52 const WebKit::WebPluginParams& params); | 52 const WebKit::WebPluginParams& params); |
| 53 | 53 |
| 54 // Give the embedder the ability to set an error page. |
| 55 virtual void ShowErrorPage(RenderView* render_view, |
| 56 WebKit::WebFrame* frame, |
| 57 int http_status_code); |
| 58 |
| 54 // Returns the html to display when a navigation error occurs. | 59 // Returns the html to display when a navigation error occurs. |
| 55 virtual std::string GetNavigationErrorHtml( | 60 virtual std::string GetNavigationErrorHtml( |
| 56 const WebKit::WebURLRequest& failed_request, | 61 const WebKit::WebURLRequest& failed_request, |
| 57 const WebKit::WebURLError& error); | 62 const WebKit::WebURLError& error); |
| 58 | 63 |
| 59 // Returns true if the renderer process should schedule the idle handler when | 64 // Returns true if the renderer process should schedule the idle handler when |
| 60 // all widgets are hidden. | 65 // all widgets are hidden. |
| 61 virtual bool RunIdleHandlerWhenWidgetsHidden(); | 66 virtual bool RunIdleHandlerWhenWidgetsHidden(); |
| 62 | 67 |
| 63 // Returns true if the given url can create popup windows. | 68 // Returns true if the given url can create popup windows. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 90 // See WebKit::WebKitClient. | 95 // See WebKit::WebKitClient. |
| 91 virtual unsigned long long VisitedLinkHash(const char* canonical_url, | 96 virtual unsigned long long VisitedLinkHash(const char* canonical_url, |
| 92 size_t length); | 97 size_t length); |
| 93 virtual bool IsLinkVisited(unsigned long long link_hash); | 98 virtual bool IsLinkVisited(unsigned long long link_hash); |
| 94 virtual void PrefetchHostName(const char* hostname, size_t length); | 99 virtual void PrefetchHostName(const char* hostname, size_t length); |
| 95 }; | 100 }; |
| 96 | 101 |
| 97 } // namespace content | 102 } // namespace content |
| 98 | 103 |
| 99 #endif // CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 104 #endif // CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |