Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / android_webview / renderer / aw_content_renderer_client.h
blobdc02cce981df11c1534969020c62b8418b647efc
1 // Copyright 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 "android_webview/renderer/aw_render_process_observer.h"
11 #include "base/compiler_specific.h"
13 namespace visitedlink {
14 class VisitedLinkSlave;
17 namespace android_webview {
19 class AwExecutionTerminationFilter;
21 class AwContentRendererClient : public content::ContentRendererClient,
22 public content::RenderProcessObserver {
23 public:
24 AwContentRendererClient();
25 virtual ~AwContentRendererClient();
27 // ContentRendererClient implementation.
28 virtual void RenderThreadStarted() OVERRIDE;
29 virtual void RenderFrameCreated(content::RenderFrame* render_frame) OVERRIDE;
30 virtual void RenderViewCreated(content::RenderView* render_view) OVERRIDE;
31 virtual std::string GetDefaultEncoding() OVERRIDE;
32 virtual bool HasErrorPage(int http_status_code,
33 std::string* error_domain) OVERRIDE;
34 virtual void GetNavigationErrorStrings(
35 content::RenderView* render_view,
36 blink::WebFrame* frame,
37 const blink::WebURLRequest& failed_request,
38 const blink::WebURLError& error,
39 std::string* error_html,
40 base::string16* error_description) OVERRIDE;
41 virtual unsigned long long VisitedLinkHash(const char* canonical_url,
42 size_t length) OVERRIDE;
43 virtual bool IsLinkVisited(unsigned long long link_hash) OVERRIDE;
44 virtual void AddKeySystems(
45 std::vector<content::KeySystemInfo>* key_systems) OVERRIDE;
47 virtual bool HandleNavigation(content::RenderFrame* render_frame,
48 content::DocumentState* document_state,
49 int opener_id,
50 blink::WebFrame* frame,
51 const blink::WebURLRequest& request,
52 blink::WebNavigationType type,
53 blink::WebNavigationPolicy default_policy,
54 bool is_redirect) OVERRIDE;
56 // content::RenderProcessObserver implementation.
57 virtual void WebKitInitialized() OVERRIDE;
59 private:
60 scoped_ptr<AwRenderProcessObserver> aw_render_process_observer_;
61 scoped_ptr<visitedlink::VisitedLinkSlave> visited_link_slave_;
62 scoped_refptr<AwExecutionTerminationFilter> execution_termination_filter_;
65 } // namespace android_webview
67 #endif // ANDROID_WEBVIEW_RENDERER_AW_CONTENT_RENDERER_CLIENT_H_