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
3 // found in the LICENSE file.
5 #ifndef ANDROID_WEBVIEW_RENDERER_AW_CONTENT_RENDERER_CLIENT_H_
6 #define ANDROID_WEBVIEW_RENDERER_AW_CONTENT_RENDERER_CLIENT_H_
8 #include "content/public/renderer/content_renderer_client.h"
10 #include "base/compiler_specific.h"
11 #include "android_webview/renderer/aw_render_process_observer.h"
13 namespace android_webview
{
15 class AwContentRendererClient
: public content::ContentRendererClient
{
17 AwContentRendererClient();
18 virtual ~AwContentRendererClient();
20 // ContentRendererClient implementation.
21 virtual void RenderThreadStarted() OVERRIDE
;
22 virtual void RenderViewCreated(content::RenderView
* render_view
) OVERRIDE
;
23 virtual std::string
GetDefaultEncoding() OVERRIDE
;
24 virtual WebKit::WebPlugin
* CreatePluginReplacement(
25 content::RenderView
* render_view
,
26 const FilePath
& plugin_path
) OVERRIDE
;
27 virtual bool HasErrorPage(int http_status_code
,
28 std::string
* error_domain
) OVERRIDE
;
29 virtual void GetNavigationErrorStrings(
30 const WebKit::WebURLRequest
& failed_request
,
31 const WebKit::WebURLError
& error
,
32 std::string
* error_html
,
33 string16
* error_description
) OVERRIDE
;
34 virtual unsigned long long VisitedLinkHash(const char* canonical_url
,
35 size_t length
) OVERRIDE
;
36 virtual bool IsLinkVisited(unsigned long long link_hash
) OVERRIDE
;
37 virtual void PrefetchHostName(const char* hostname
, size_t length
) OVERRIDE
;
40 scoped_ptr
<AwRenderProcessObserver
> aw_render_process_observer_
;
43 } // namespace android_webview
45 #endif // ANDROID_WEBVIEW_RENDERER_AW_CONTENT_RENDERER_CLIENT_H_