OLD | NEW |
1 // Copyright (c) 2010 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/browser/renderer_host/render_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1159 } | 1159 } |
1160 | 1160 |
1161 void RenderViewHost::OnMsgDidRunInsecureContent( | 1161 void RenderViewHost::OnMsgDidRunInsecureContent( |
1162 const std::string& security_origin) { | 1162 const std::string& security_origin) { |
1163 RenderViewHostDelegate::Resource* resource_delegate = | 1163 RenderViewHostDelegate::Resource* resource_delegate = |
1164 delegate_->GetResourceDelegate(); | 1164 delegate_->GetResourceDelegate(); |
1165 if (resource_delegate) | 1165 if (resource_delegate) |
1166 resource_delegate->DidRunInsecureContent(security_origin); | 1166 resource_delegate->DidRunInsecureContent(security_origin); |
1167 } | 1167 } |
1168 | 1168 |
1169 void RenderViewHost::OnMsgDidStartProvisionalLoadForFrame(bool is_main_frame, | 1169 void RenderViewHost::OnMsgDidStartProvisionalLoadForFrame(long long frame_id, |
| 1170 bool is_main_frame, |
1170 const GURL& url) { | 1171 const GURL& url) { |
1171 GURL validated_url(url); | 1172 GURL validated_url(url); |
1172 FilterURL(ChildProcessSecurityPolicy::GetInstance(), | 1173 FilterURL(ChildProcessSecurityPolicy::GetInstance(), |
1173 process()->id(), &validated_url); | 1174 process()->id(), &validated_url); |
1174 | 1175 |
1175 RenderViewHostDelegate::Resource* resource_delegate = | 1176 RenderViewHostDelegate::Resource* resource_delegate = |
1176 delegate_->GetResourceDelegate(); | 1177 delegate_->GetResourceDelegate(); |
1177 if (resource_delegate) { | 1178 if (resource_delegate) { |
1178 resource_delegate->DidStartProvisionalLoadForFrame(this, is_main_frame, | 1179 resource_delegate->DidStartProvisionalLoadForFrame( |
1179 validated_url); | 1180 this, frame_id, is_main_frame, validated_url); |
1180 } | 1181 } |
1181 } | 1182 } |
1182 | 1183 |
1183 void RenderViewHost::OnMsgDidFailProvisionalLoadWithError( | 1184 void RenderViewHost::OnMsgDidFailProvisionalLoadWithError( |
| 1185 long long frame_id, |
1184 bool is_main_frame, | 1186 bool is_main_frame, |
1185 int error_code, | 1187 int error_code, |
1186 const GURL& url, | 1188 const GURL& url, |
1187 bool showing_repost_interstitial) { | 1189 bool showing_repost_interstitial) { |
1188 LOG(INFO) << "Failed Provisional Load: " << url.possibly_invalid_spec() | 1190 LOG(INFO) << "Failed Provisional Load: " << url.possibly_invalid_spec() |
1189 << ", error_code: " << error_code | 1191 << ", error_code: " << error_code |
1190 << " is_main_frame: " << is_main_frame | 1192 << " is_main_frame: " << is_main_frame |
1191 << " showing_repost_interstitial: " << showing_repost_interstitial; | 1193 << " showing_repost_interstitial: " << showing_repost_interstitial |
| 1194 << " frame_id: " << frame_id; |
1192 GURL validated_url(url); | 1195 GURL validated_url(url); |
1193 FilterURL(ChildProcessSecurityPolicy::GetInstance(), | 1196 FilterURL(ChildProcessSecurityPolicy::GetInstance(), |
1194 process()->id(), &validated_url); | 1197 process()->id(), &validated_url); |
1195 | 1198 |
1196 RenderViewHostDelegate::Resource* resource_delegate = | 1199 RenderViewHostDelegate::Resource* resource_delegate = |
1197 delegate_->GetResourceDelegate(); | 1200 delegate_->GetResourceDelegate(); |
1198 if (resource_delegate) { | 1201 if (resource_delegate) { |
1199 resource_delegate->DidFailProvisionalLoadWithError( | 1202 resource_delegate->DidFailProvisionalLoadWithError( |
1200 this, is_main_frame, error_code, validated_url, | 1203 this, frame_id, is_main_frame, error_code, validated_url, |
1201 showing_repost_interstitial); | 1204 showing_repost_interstitial); |
1202 } | 1205 } |
1203 } | 1206 } |
1204 | 1207 |
1205 void RenderViewHost::OnMsgFindReply(int request_id, | 1208 void RenderViewHost::OnMsgFindReply(int request_id, |
1206 int number_of_matches, | 1209 int number_of_matches, |
1207 const gfx::Rect& selection_rect, | 1210 const gfx::Rect& selection_rect, |
1208 int active_match_ordinal, | 1211 int active_match_ordinal, |
1209 bool final_update) { | 1212 bool final_update) { |
1210 RenderViewHostDelegate::BrowserIntegration* integration_delegate = | 1213 RenderViewHostDelegate::BrowserIntegration* integration_delegate = |
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2118 } | 2121 } |
2119 | 2122 |
2120 void RenderViewHost::OnScriptEvalResponse(int id, bool result) { | 2123 void RenderViewHost::OnScriptEvalResponse(int id, bool result) { |
2121 scoped_ptr<Value> result_value(Value::CreateBooleanValue(result)); | 2124 scoped_ptr<Value> result_value(Value::CreateBooleanValue(result)); |
2122 std::pair<int, Value*> details(id, result_value.get()); | 2125 std::pair<int, Value*> details(id, result_value.get()); |
2123 NotificationService::current()->Notify( | 2126 NotificationService::current()->Notify( |
2124 NotificationType::EXECUTE_JAVASCRIPT_RESULT, | 2127 NotificationType::EXECUTE_JAVASCRIPT_RESULT, |
2125 Source<RenderViewHost>(this), | 2128 Source<RenderViewHost>(this), |
2126 Details<std::pair<int, Value*> >(&details)); | 2129 Details<std::pair<int, Value*> >(&details)); |
2127 } | 2130 } |
OLD | NEW |