OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "android_webview/renderer/aw_content_renderer_client.h" | 5 #include "android_webview/renderer/aw_content_renderer_client.h" |
6 | 6 |
7 #include "android_webview/common/aw_resource.h" | 7 #include "android_webview/common/aw_resource.h" |
8 #include "android_webview/common/url_constants.h" | 8 #include "android_webview/common/url_constants.h" |
9 #include "android_webview/renderer/aw_render_view_ext.h" | 9 #include "android_webview/renderer/aw_render_view_ext.h" |
10 #include "android_webview/renderer/view_renderer.h" | |
11 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
12 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
13 #include "components/visitedlink/renderer/visitedlink_slave.h" | 12 #include "components/visitedlink/renderer/visitedlink_slave.h" |
14 #include "content/public/renderer/render_thread.h" | 13 #include "content/public/renderer/render_thread.h" |
15 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
16 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
17 #include "third_party/WebKit/public/platform/WebString.h" | 16 #include "third_party/WebKit/public/platform/WebString.h" |
18 #include "third_party/WebKit/public/platform/WebURL.h" | 17 #include "third_party/WebKit/public/platform/WebURL.h" |
19 #include "third_party/WebKit/public/platform/WebURLError.h" | 18 #include "third_party/WebKit/public/platform/WebURLError.h" |
20 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 19 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
(...skipping 17 matching lines...) Expand all Loading... |
38 aw_render_process_observer_.reset(new AwRenderProcessObserver); | 37 aw_render_process_observer_.reset(new AwRenderProcessObserver); |
39 thread->AddObserver(aw_render_process_observer_.get()); | 38 thread->AddObserver(aw_render_process_observer_.get()); |
40 | 39 |
41 visited_link_slave_.reset(new visitedlink::VisitedLinkSlave); | 40 visited_link_slave_.reset(new visitedlink::VisitedLinkSlave); |
42 thread->AddObserver(visited_link_slave_.get()); | 41 thread->AddObserver(visited_link_slave_.get()); |
43 } | 42 } |
44 | 43 |
45 void AwContentRendererClient::RenderViewCreated( | 44 void AwContentRendererClient::RenderViewCreated( |
46 content::RenderView* render_view) { | 45 content::RenderView* render_view) { |
47 AwRenderViewExt::RenderViewCreated(render_view); | 46 AwRenderViewExt::RenderViewCreated(render_view); |
48 ViewRenderer::RenderViewCreated(render_view); | |
49 } | 47 } |
50 | 48 |
51 std::string AwContentRendererClient::GetDefaultEncoding() { | 49 std::string AwContentRendererClient::GetDefaultEncoding() { |
52 return AwResource::GetDefaultTextEncoding(); | 50 return AwResource::GetDefaultTextEncoding(); |
53 } | 51 } |
54 | 52 |
55 bool AwContentRendererClient::HasErrorPage(int http_status_code, | 53 bool AwContentRendererClient::HasErrorPage(int http_status_code, |
56 std::string* error_domain) { | 54 std::string* error_domain) { |
57 return http_status_code >= 400; | 55 return http_status_code >= 400; |
58 } | 56 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 return visited_link_slave_->IsVisited(link_hash); | 94 return visited_link_slave_->IsVisited(link_hash); |
97 } | 95 } |
98 | 96 |
99 void AwContentRendererClient::PrefetchHostName(const char* hostname, | 97 void AwContentRendererClient::PrefetchHostName(const char* hostname, |
100 size_t length) { | 98 size_t length) { |
101 // TODO(boliu): Implement hostname prefetch for Android WebView. | 99 // TODO(boliu): Implement hostname prefetch for Android WebView. |
102 // Perhaps componentize chrome implementation or move to content/? | 100 // Perhaps componentize chrome implementation or move to content/? |
103 } | 101 } |
104 | 102 |
105 } // namespace android_webview | 103 } // namespace android_webview |
OLD | NEW |