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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2128 } | 2128 } |
2129 | 2129 |
2130 void WebContentsImpl::OnDocumentLoadedInFrame(int64 frame_id) { | 2130 void WebContentsImpl::OnDocumentLoadedInFrame(int64 frame_id) { |
2131 controller_.DocumentLoadedInFrame(); | 2131 controller_.DocumentLoadedInFrame(); |
2132 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2132 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2133 DocumentLoadedInFrame(frame_id, message_source_)); | 2133 DocumentLoadedInFrame(frame_id, message_source_)); |
2134 } | 2134 } |
2135 | 2135 |
2136 void WebContentsImpl::OnDidFinishLoad( | 2136 void WebContentsImpl::OnDidFinishLoad( |
2137 int64 frame_id, | 2137 int64 frame_id, |
2138 const GURL& validated_url, | 2138 const GURL& url, |
2139 bool is_main_frame) { | 2139 bool is_main_frame) { |
| 2140 GURL validated_url(url); |
| 2141 RenderProcessHost* render_process_host = message_source_->GetProcess(); |
| 2142 RenderViewHost::FilterURL(render_process_host, false, &validated_url); |
2140 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2143 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2141 DidFinishLoad(frame_id, validated_url, is_main_frame, | 2144 DidFinishLoad(frame_id, validated_url, is_main_frame, |
2142 message_source_)); | 2145 message_source_)); |
2143 } | 2146 } |
2144 | 2147 |
2145 void WebContentsImpl::OnDidFailLoadWithError( | 2148 void WebContentsImpl::OnDidFailLoadWithError( |
2146 int64 frame_id, | 2149 int64 frame_id, |
2147 const GURL& validated_url, | 2150 const GURL& url, |
2148 bool is_main_frame, | 2151 bool is_main_frame, |
2149 int error_code, | 2152 int error_code, |
2150 const string16& error_description) { | 2153 const string16& error_description) { |
| 2154 GURL validated_url(url); |
| 2155 RenderProcessHost* render_process_host = message_source_->GetProcess(); |
| 2156 RenderViewHost::FilterURL(render_process_host, false, &validated_url); |
2151 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2157 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2152 DidFailLoad(frame_id, validated_url, is_main_frame, | 2158 DidFailLoad(frame_id, validated_url, is_main_frame, |
2153 error_code, error_description, | 2159 error_code, error_description, |
2154 message_source_)); | 2160 message_source_)); |
2155 } | 2161 } |
2156 | 2162 |
2157 void WebContentsImpl::OnUpdateContentRestrictions(int restrictions) { | 2163 void WebContentsImpl::OnUpdateContentRestrictions(int restrictions) { |
2158 content_restrictions_ = restrictions; | 2164 content_restrictions_ = restrictions; |
2159 if (delegate_) | 2165 if (delegate_) |
2160 delegate_->ContentRestrictionsChanged(this); | 2166 delegate_->ContentRestrictionsChanged(this); |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3382 | 3388 |
3383 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3389 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
3384 return browser_plugin_guest_.get(); | 3390 return browser_plugin_guest_.get(); |
3385 } | 3391 } |
3386 | 3392 |
3387 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3393 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
3388 return browser_plugin_embedder_.get(); | 3394 return browser_plugin_embedder_.get(); |
3389 } | 3395 } |
3390 | 3396 |
3391 } // namespace content | 3397 } // namespace content |
OLD | NEW |