GPU workaround to simulate Out of Memory errors with large textures
[chromium-blink-merge.git] / android_webview / renderer / aw_content_renderer_client.h
blobc16b506080c35803c3117a3538086b9e4235650b
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 AwContentRendererClient : public content::ContentRendererClient {
20 public:
21 AwContentRendererClient();
22 ~AwContentRendererClient() override;
24 // ContentRendererClient implementation.
25 void RenderThreadStarted() override;
26 void RenderFrameCreated(content::RenderFrame* render_frame) override;
27 void RenderViewCreated(content::RenderView* render_view) override;
28 bool HasErrorPage(int http_status_code, std::string* error_domain) override;
29 void GetNavigationErrorStrings(content::RenderView* render_view,
30 blink::WebFrame* frame,
31 const blink::WebURLRequest& failed_request,
32 const blink::WebURLError& error,
33 std::string* error_html,
34 base::string16* error_description) override;
35 unsigned long long VisitedLinkHash(const char* canonical_url,
36 size_t length) override;
37 bool IsLinkVisited(unsigned long long link_hash) override;
38 void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems) override;
40 bool HandleNavigation(content::RenderFrame* render_frame,
41 content::DocumentState* document_state,
42 int opener_id,
43 blink::WebFrame* frame,
44 const blink::WebURLRequest& request,
45 blink::WebNavigationType type,
46 blink::WebNavigationPolicy default_policy,
47 bool is_redirect) override;
48 bool ShouldOverridePageVisibilityState(
49 const content::RenderFrame* render_frame,
50 blink::WebPageVisibilityState* override_state) override;
52 private:
53 scoped_ptr<AwRenderProcessObserver> aw_render_process_observer_;
54 scoped_ptr<visitedlink::VisitedLinkSlave> visited_link_slave_;
57 } // namespace android_webview
59 #endif // ANDROID_WEBVIEW_RENDERER_AW_CONTENT_RENDERER_CLIENT_H_