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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 #include "chrome/renderer/searchbox/search_bouncer.h" | 65 #include "chrome/renderer/searchbox/search_bouncer.h" |
66 #include "chrome/renderer/searchbox/searchbox.h" | 66 #include "chrome/renderer/searchbox/searchbox.h" |
67 #include "chrome/renderer/searchbox/searchbox_extension.h" | 67 #include "chrome/renderer/searchbox/searchbox_extension.h" |
68 #include "chrome/renderer/tts_dispatcher.h" | 68 #include "chrome/renderer/tts_dispatcher.h" |
69 #include "chrome/renderer/worker_permission_client_proxy.h" | 69 #include "chrome/renderer/worker_permission_client_proxy.h" |
70 #include "components/autofill/content/renderer/autofill_agent.h" | 70 #include "components/autofill/content/renderer/autofill_agent.h" |
71 #include "components/autofill/content/renderer/password_autofill_agent.h" | 71 #include "components/autofill/content/renderer/password_autofill_agent.h" |
72 #include "components/autofill/content/renderer/password_generation_agent.h" | 72 #include "components/autofill/content/renderer/password_generation_agent.h" |
73 #include "components/dom_distiller/core/url_constants.h" | 73 #include "components/dom_distiller/core/url_constants.h" |
74 #include "components/nacl/renderer/ppb_nacl_private_impl.h" | 74 #include "components/nacl/renderer/ppb_nacl_private_impl.h" |
| 75 #include "components/password_manager/content/renderer/credential_manager_dispat
cher.h" |
75 #include "components/plugins/renderer/mobile_youtube_plugin.h" | 76 #include "components/plugins/renderer/mobile_youtube_plugin.h" |
76 #include "components/signin/core/common/profile_management_switches.h" | 77 #include "components/signin/core/common/profile_management_switches.h" |
77 #include "components/visitedlink/renderer/visitedlink_slave.h" | 78 #include "components/visitedlink/renderer/visitedlink_slave.h" |
78 #include "content/public/common/content_constants.h" | 79 #include "content/public/common/content_constants.h" |
79 #include "content/public/renderer/render_frame.h" | 80 #include "content/public/renderer/render_frame.h" |
80 #include "content/public/renderer/render_thread.h" | 81 #include "content/public/renderer/render_thread.h" |
81 #include "content/public/renderer/render_view.h" | 82 #include "content/public/renderer/render_view.h" |
82 #include "content/public/renderer/render_view_visitor.h" | 83 #include "content/public/renderer/render_view_visitor.h" |
83 #include "extensions/common/constants.h" | 84 #include "extensions/common/constants.h" |
84 #include "extensions/common/extension.h" | 85 #include "extensions/common/extension.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 #if defined(FULL_SAFE_BROWSING) | 298 #if defined(FULL_SAFE_BROWSING) |
298 phishing_classifier_.reset(safe_browsing::PhishingClassifierFilter::Create()); | 299 phishing_classifier_.reset(safe_browsing::PhishingClassifierFilter::Create()); |
299 #endif | 300 #endif |
300 prerender_dispatcher_.reset(new prerender::PrerenderDispatcher()); | 301 prerender_dispatcher_.reset(new prerender::PrerenderDispatcher()); |
301 #if defined(ENABLE_WEBRTC) | 302 #if defined(ENABLE_WEBRTC) |
302 webrtc_logging_message_filter_ = new WebRtcLoggingMessageFilter( | 303 webrtc_logging_message_filter_ = new WebRtcLoggingMessageFilter( |
303 content::RenderThread::Get()->GetIOMessageLoopProxy()); | 304 content::RenderThread::Get()->GetIOMessageLoopProxy()); |
304 #endif | 305 #endif |
305 search_bouncer_.reset(new SearchBouncer()); | 306 search_bouncer_.reset(new SearchBouncer()); |
306 | 307 |
| 308 credential_manager_dispatcher_.reset(new password_manager::CredentialManagerDi
spatcher()); |
| 309 |
307 thread->AddObserver(chrome_observer_.get()); | 310 thread->AddObserver(chrome_observer_.get()); |
308 thread->AddObserver(extension_dispatcher_.get()); | 311 thread->AddObserver(extension_dispatcher_.get()); |
309 #if defined(FULL_SAFE_BROWSING) | 312 #if defined(FULL_SAFE_BROWSING) |
310 thread->AddObserver(phishing_classifier_.get()); | 313 thread->AddObserver(phishing_classifier_.get()); |
311 #endif | 314 #endif |
312 thread->AddObserver(visited_link_slave_.get()); | 315 thread->AddObserver(visited_link_slave_.get()); |
313 thread->AddObserver(prerender_dispatcher_.get()); | 316 thread->AddObserver(prerender_dispatcher_.get()); |
314 thread->AddObserver(search_bouncer_.get()); | 317 thread->AddObserver(search_bouncer_.get()); |
315 | 318 |
316 #if defined(ENABLE_WEBRTC) | 319 #if defined(ENABLE_WEBRTC) |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 | 1287 |
1285 bool ChromeContentRendererClient::IsLinkVisited(unsigned long long link_hash) { | 1288 bool ChromeContentRendererClient::IsLinkVisited(unsigned long long link_hash) { |
1286 return visited_link_slave_->IsVisited(link_hash); | 1289 return visited_link_slave_->IsVisited(link_hash); |
1287 } | 1290 } |
1288 | 1291 |
1289 blink::WebPrescientNetworking* | 1292 blink::WebPrescientNetworking* |
1290 ChromeContentRendererClient::GetPrescientNetworking() { | 1293 ChromeContentRendererClient::GetPrescientNetworking() { |
1291 return prescient_networking_dispatcher_.get(); | 1294 return prescient_networking_dispatcher_.get(); |
1292 } | 1295 } |
1293 | 1296 |
| 1297 blink::WebCredentialManager* |
| 1298 ChromeContentRendererClient::GetCredentialManager() { |
| 1299 return credential_manager_dispatcher_.get(); |
| 1300 } |
| 1301 |
1294 bool ChromeContentRendererClient::ShouldOverridePageVisibilityState( | 1302 bool ChromeContentRendererClient::ShouldOverridePageVisibilityState( |
1295 const content::RenderFrame* render_frame, | 1303 const content::RenderFrame* render_frame, |
1296 blink::WebPageVisibilityState* override_state) { | 1304 blink::WebPageVisibilityState* override_state) { |
1297 if (!prerender::PrerenderHelper::IsPrerendering(render_frame)) | 1305 if (!prerender::PrerenderHelper::IsPrerendering(render_frame)) |
1298 return false; | 1306 return false; |
1299 | 1307 |
1300 *override_state = blink::WebPageVisibilityStatePrerender; | 1308 *override_state = blink::WebPageVisibilityStatePrerender; |
1301 return true; | 1309 return true; |
1302 } | 1310 } |
1303 | 1311 |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1501 | 1509 |
1502 if (IsExtensionOrSharedModuleWhitelisted(url, allowed_video_decode_origins_)) | 1510 if (IsExtensionOrSharedModuleWhitelisted(url, allowed_video_decode_origins_)) |
1503 return true; | 1511 return true; |
1504 | 1512 |
1505 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 1513 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
1506 return channel <= chrome::VersionInfo::CHANNEL_DEV; | 1514 return channel <= chrome::VersionInfo::CHANNEL_DEV; |
1507 #else | 1515 #else |
1508 return false; | 1516 return false; |
1509 #endif | 1517 #endif |
1510 } | 1518 } |
OLD | NEW |