| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "app/gfx/color_utils.h" | 11 #include "app/gfx/color_utils.h" |
| (...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1863 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 1863 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 1864 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { | 1864 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { |
| 1865 // Add the chrome specific audio renderer. | 1865 // Add the chrome specific audio renderer. |
| 1866 factory->AddFactory( | 1866 factory->AddFactory( |
| 1867 AudioRendererImpl::CreateFactory(audio_message_filter())); | 1867 AudioRendererImpl::CreateFactory(audio_message_filter())); |
| 1868 } | 1868 } |
| 1869 | 1869 |
| 1870 // TODO(hclam): obtain the following parameters from |client|. | 1870 // TODO(hclam): obtain the following parameters from |client|. |
| 1871 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory = | 1871 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory = |
| 1872 new webkit_glue::MediaResourceLoaderBridgeFactory( | 1872 new webkit_glue::MediaResourceLoaderBridgeFactory( |
| 1873 GURL::EmptyGURL(), // referrer | 1873 GURL(), // referrer |
| 1874 "null", // frame origin | 1874 "null", // frame origin |
| 1875 "null", // main_frame_origin | 1875 "null", // main_frame_origin |
| 1876 base::GetCurrentProcId(), | 1876 base::GetCurrentProcId(), |
| 1877 appcache::kNoHostId, | 1877 appcache::kNoHostId, |
| 1878 routing_id()); | 1878 routing_id()); |
| 1879 | 1879 |
| 1880 // A simple data source that keeps all data in memory. | 1880 // A simple data source that keeps all data in memory. |
| 1881 media::FilterFactory* simple_data_source_factory = | 1881 media::FilterFactory* simple_data_source_factory = |
| 1882 webkit_glue::SimpleDataSource::CreateFactory(MessageLoop::current(), | 1882 webkit_glue::SimpleDataSource::CreateFactory(MessageLoop::current(), |
| 1883 bridge_factory); | 1883 bridge_factory); |
| 1884 // A sophisticated data source that does memory caching. | 1884 // A sophisticated data source that does memory caching. |
| 1885 media::FilterFactory* buffered_data_source_factory = | 1885 media::FilterFactory* buffered_data_source_factory = |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2825 } | 2825 } |
| 2826 | 2826 |
| 2827 GURL RenderView::GetAlternateErrorPageURL(const GURL& failed_url, | 2827 GURL RenderView::GetAlternateErrorPageURL(const GURL& failed_url, |
| 2828 ErrorPageType error_type) { | 2828 ErrorPageType error_type) { |
| 2829 if (failed_url.SchemeIsSecure()) { | 2829 if (failed_url.SchemeIsSecure()) { |
| 2830 // If the URL that failed was secure, then the embedding web page was not | 2830 // If the URL that failed was secure, then the embedding web page was not |
| 2831 // expecting a network attacker to be able to manipulate its contents. As | 2831 // expecting a network attacker to be able to manipulate its contents. As |
| 2832 // we fetch alternate error pages over HTTP, we would be allowing a network | 2832 // we fetch alternate error pages over HTTP, we would be allowing a network |
| 2833 // attacker to manipulate the contents of the response if we tried to use | 2833 // attacker to manipulate the contents of the response if we tried to use |
| 2834 // the link doctor here. | 2834 // the link doctor here. |
| 2835 return GURL::EmptyGURL(); | 2835 return GURL(); |
| 2836 } | 2836 } |
| 2837 | 2837 |
| 2838 // Grab the base URL from the browser process. | 2838 // Grab the base URL from the browser process. |
| 2839 if (!alternate_error_page_url_.is_valid()) | 2839 if (!alternate_error_page_url_.is_valid()) |
| 2840 return GURL::EmptyGURL(); | 2840 return GURL(); |
| 2841 | 2841 |
| 2842 // Strip query params from the failed URL. | 2842 // Strip query params from the failed URL. |
| 2843 GURL::Replacements remove_params; | 2843 GURL::Replacements remove_params; |
| 2844 remove_params.ClearUsername(); | 2844 remove_params.ClearUsername(); |
| 2845 remove_params.ClearPassword(); | 2845 remove_params.ClearPassword(); |
| 2846 remove_params.ClearQuery(); | 2846 remove_params.ClearQuery(); |
| 2847 remove_params.ClearRef(); | 2847 remove_params.ClearRef(); |
| 2848 const GURL url_to_send = failed_url.ReplaceComponents(remove_params); | 2848 const GURL url_to_send = failed_url.ReplaceComponents(remove_params); |
| 2849 | 2849 |
| 2850 // Construct the query params to send to link doctor. | 2850 // Construct the query params to send to link doctor. |
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3929 new PluginMsg_SignalModalDialogEvent(host_window_)); | 3929 new PluginMsg_SignalModalDialogEvent(host_window_)); |
| 3930 | 3930 |
| 3931 message->EnableMessagePumping(); // Runs a nested message loop. | 3931 message->EnableMessagePumping(); // Runs a nested message loop. |
| 3932 bool rv = Send(message); | 3932 bool rv = Send(message); |
| 3933 | 3933 |
| 3934 PluginChannelHost::Broadcast( | 3934 PluginChannelHost::Broadcast( |
| 3935 new PluginMsg_ResetModalDialogEvent(host_window_)); | 3935 new PluginMsg_ResetModalDialogEvent(host_window_)); |
| 3936 | 3936 |
| 3937 return rv; | 3937 return rv; |
| 3938 } | 3938 } |
| OLD | NEW |