OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 | 1015 |
1016 bool ChromeContentRendererClient::IsLinkVisited(unsigned long long link_hash) { | 1016 bool ChromeContentRendererClient::IsLinkVisited(unsigned long long link_hash) { |
1017 return visited_link_slave_->IsVisited(link_hash); | 1017 return visited_link_slave_->IsVisited(link_hash); |
1018 } | 1018 } |
1019 | 1019 |
1020 void ChromeContentRendererClient::PrefetchHostName(const char* hostname, | 1020 void ChromeContentRendererClient::PrefetchHostName(const char* hostname, |
1021 size_t length) { | 1021 size_t length) { |
1022 net_predictor_->Resolve(hostname, length); | 1022 net_predictor_->Resolve(hostname, length); |
1023 } | 1023 } |
1024 | 1024 |
| 1025 void ChromeContentRendererClient::Preconnect( |
| 1026 const GURL& url, |
| 1027 WebKit::WebPreconnectMotivation motivation, |
| 1028 uint32_t motivationVariationId) { |
| 1029 RenderThread::Get()->Send(new ChromeViewHostMsg_Preconnect( |
| 1030 url, motivation, motivationVariationId)); |
| 1031 } |
| 1032 |
1025 bool ChromeContentRendererClient::ShouldOverridePageVisibilityState( | 1033 bool ChromeContentRendererClient::ShouldOverridePageVisibilityState( |
1026 const content::RenderView* render_view, | 1034 const content::RenderView* render_view, |
1027 WebKit::WebPageVisibilityState* override_state) const { | 1035 WebKit::WebPageVisibilityState* override_state) const { |
1028 if (!prerender::PrerenderHelper::IsPrerendering(render_view)) | 1036 if (!prerender::PrerenderHelper::IsPrerendering(render_view)) |
1029 return false; | 1037 return false; |
1030 | 1038 |
1031 *override_state = WebKit::WebPageVisibilityStatePrerender; | 1039 *override_state = WebKit::WebPageVisibilityStatePrerender; |
1032 return true; | 1040 return true; |
1033 } | 1041 } |
1034 | 1042 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 | 1182 |
1175 if (container->element().shadowHost().isNull()) | 1183 if (container->element().shadowHost().isNull()) |
1176 return false; | 1184 return false; |
1177 | 1185 |
1178 WebString tag_name = container->element().shadowHost().tagName(); | 1186 WebString tag_name = container->element().shadowHost().tagName(); |
1179 return tag_name.equals(WebString::fromUTF8(kWebViewTagName)) || | 1187 return tag_name.equals(WebString::fromUTF8(kWebViewTagName)) || |
1180 tag_name.equals(WebString::fromUTF8(kAdViewTagName)); | 1188 tag_name.equals(WebString::fromUTF8(kAdViewTagName)); |
1181 } | 1189 } |
1182 | 1190 |
1183 } // namespace chrome | 1191 } // namespace chrome |
OLD | NEW |