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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" | 52 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" |
53 #include "chrome/renderer/searchbox/search_bouncer.h" | 53 #include "chrome/renderer/searchbox/search_bouncer.h" |
54 #include "chrome/renderer/searchbox/searchbox.h" | 54 #include "chrome/renderer/searchbox/searchbox.h" |
55 #include "chrome/renderer/searchbox/searchbox_extension.h" | 55 #include "chrome/renderer/searchbox/searchbox_extension.h" |
56 #include "chrome/renderer/tts_dispatcher.h" | 56 #include "chrome/renderer/tts_dispatcher.h" |
57 #include "chrome/renderer/worker_content_settings_client_proxy.h" | 57 #include "chrome/renderer/worker_content_settings_client_proxy.h" |
58 #include "components/autofill/content/renderer/autofill_agent.h" | 58 #include "components/autofill/content/renderer/autofill_agent.h" |
59 #include "components/autofill/content/renderer/password_autofill_agent.h" | 59 #include "components/autofill/content/renderer/password_autofill_agent.h" |
60 #include "components/autofill/content/renderer/password_generation_agent.h" | 60 #include "components/autofill/content/renderer/password_generation_agent.h" |
61 #include "components/content_settings/core/common/content_settings_pattern.h" | 61 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 62 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" |
62 #include "components/dom_distiller/core/url_constants.h" | 63 #include "components/dom_distiller/core/url_constants.h" |
63 #include "components/nacl/renderer/ppb_nacl_private.h" | 64 #include "components/nacl/renderer/ppb_nacl_private.h" |
64 #include "components/nacl/renderer/ppb_nacl_private_impl.h" | 65 #include "components/nacl/renderer/ppb_nacl_private_impl.h" |
65 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" | 66 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" |
66 #include "components/password_manager/content/renderer/credential_manager_client
.h" | 67 #include "components/password_manager/content/renderer/credential_manager_client
.h" |
67 #include "components/pdf/renderer/pepper_pdf_host.h" | 68 #include "components/pdf/renderer/pepper_pdf_host.h" |
68 #include "components/plugins/renderer/mobile_youtube_plugin.h" | 69 #include "components/plugins/renderer/mobile_youtube_plugin.h" |
69 #include "components/signin/core/common/profile_management_switches.h" | 70 #include "components/signin/core/common/profile_management_switches.h" |
70 #include "components/visitedlink/renderer/visitedlink_slave.h" | 71 #include "components/visitedlink/renderer/visitedlink_slave.h" |
71 #include "components/web_cache/renderer/web_cache_render_process_observer.h" | 72 #include "components/web_cache/renderer/web_cache_render_process_observer.h" |
72 #include "content/public/common/content_constants.h" | 73 #include "content/public/common/content_constants.h" |
73 #include "content/public/renderer/plugin_instance_throttler.h" | 74 #include "content/public/renderer/plugin_instance_throttler.h" |
74 #include "content/public/renderer/render_frame.h" | 75 #include "content/public/renderer/render_frame.h" |
75 #include "content/public/renderer/render_thread.h" | 76 #include "content/public/renderer/render_thread.h" |
76 #include "content/public/renderer/render_view.h" | 77 #include "content/public/renderer/render_view.h" |
77 #include "content/public/renderer/render_view_visitor.h" | 78 #include "content/public/renderer/render_view_visitor.h" |
78 #include "extensions/common/constants.h" | 79 #include "extensions/common/constants.h" |
79 #include "ipc/ipc_sync_channel.h" | 80 #include "ipc/ipc_sync_channel.h" |
80 #include "net/base/net_errors.h" | 81 #include "net/base/net_errors.h" |
81 #include "ppapi/c/private/ppb_pdf.h" | 82 #include "ppapi/c/private/ppb_pdf.h" |
82 #include "ppapi/shared_impl/ppapi_switches.h" | 83 #include "ppapi/shared_impl/ppapi_switches.h" |
83 #include "third_party/WebKit/public/platform/WebURL.h" | 84 #include "third_party/WebKit/public/platform/WebURL.h" |
84 #include "third_party/WebKit/public/platform/WebURLError.h" | 85 #include "third_party/WebKit/public/platform/WebURLError.h" |
85 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 86 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 87 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
86 #include "third_party/WebKit/public/web/WebCache.h" | 88 #include "third_party/WebKit/public/web/WebCache.h" |
87 #include "third_party/WebKit/public/web/WebDataSource.h" | 89 #include "third_party/WebKit/public/web/WebDataSource.h" |
88 #include "third_party/WebKit/public/web/WebDocument.h" | 90 #include "third_party/WebKit/public/web/WebDocument.h" |
89 #include "third_party/WebKit/public/web/WebElement.h" | 91 #include "third_party/WebKit/public/web/WebElement.h" |
90 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 92 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
91 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 93 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
92 #include "third_party/WebKit/public/web/WebPluginParams.h" | 94 #include "third_party/WebKit/public/web/WebPluginParams.h" |
93 #include "third_party/WebKit/public/web/WebPluginPlaceholder.h" | 95 #include "third_party/WebKit/public/web/WebPluginPlaceholder.h" |
94 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 96 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
95 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 97 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 const GURL& url) { | 1648 const GURL& url) { |
1647 RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRapporURL(metric, url)); | 1649 RenderThread::Get()->Send(new ChromeViewHostMsg_RecordRapporURL(metric, url)); |
1648 } | 1650 } |
1649 | 1651 |
1650 scoped_ptr<blink::WebAppBannerClient> | 1652 scoped_ptr<blink::WebAppBannerClient> |
1651 ChromeContentRendererClient::CreateAppBannerClient( | 1653 ChromeContentRendererClient::CreateAppBannerClient( |
1652 content::RenderFrame* render_frame) { | 1654 content::RenderFrame* render_frame) { |
1653 return scoped_ptr<blink::WebAppBannerClient>( | 1655 return scoped_ptr<blink::WebAppBannerClient>( |
1654 new AppBannerClient(render_frame)); | 1656 new AppBannerClient(render_frame)); |
1655 } | 1657 } |
| 1658 |
| 1659 void ChromeContentRendererClient::AddImageContextMenuProperties( |
| 1660 const blink::WebURLResponse& response, |
| 1661 std::map<std::string, std::string>* properties) { |
| 1662 DCHECK(properties); |
| 1663 WebString header_key(ASCIIToUTF16( |
| 1664 data_reduction_proxy::chrome_proxy_header())); |
| 1665 if (!response.httpHeaderField(header_key).isNull() && |
| 1666 response.httpHeaderField(header_key).utf8().find( |
| 1667 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != |
| 1668 std::string::npos) { |
| 1669 (*properties)[data_reduction_proxy::chrome_proxy_header()] = |
| 1670 data_reduction_proxy::chrome_proxy_lo_fi_directive(); |
| 1671 } |
| 1672 } |
OLD | NEW |