| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 3763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3774 request.url(), | 3774 request.url(), |
| 3775 frame->securityOrigin().toString().utf8(), | 3775 frame->securityOrigin().toString().utf8(), |
| 3776 frame->top()->securityOrigin().toString().utf8(), | 3776 frame->top()->securityOrigin().toString().utf8(), |
| 3777 response.securityInfo())); | 3777 response.securityInfo())); |
| 3778 } | 3778 } |
| 3779 | 3779 |
| 3780 void RenderView::didDisplayInsecureContent(WebFrame* frame) { | 3780 void RenderView::didDisplayInsecureContent(WebFrame* frame) { |
| 3781 Send(new ViewHostMsg_DidDisplayInsecureContent(routing_id_)); | 3781 Send(new ViewHostMsg_DidDisplayInsecureContent(routing_id_)); |
| 3782 } | 3782 } |
| 3783 | 3783 |
| 3784 // We have two didRunInsecureContent's with the same name. That's because |
| 3785 // we're in the process of adding an argument and one of them will be correct. |
| 3786 // Once the WebKit change is in, the first should be removed. |
| 3784 void RenderView::didRunInsecureContent( | 3787 void RenderView::didRunInsecureContent( |
| 3785 WebFrame* frame, const WebSecurityOrigin& origin) { | 3788 WebFrame* frame, const WebSecurityOrigin& origin) { |
| 3789 didRunInsecureContent(frame, origin, ""); |
| 3790 } |
| 3791 |
| 3792 void RenderView::didRunInsecureContent( |
| 3793 WebFrame* frame, const WebSecurityOrigin& origin, const WebString& target) { |
| 3786 Send(new ViewHostMsg_DidRunInsecureContent( | 3794 Send(new ViewHostMsg_DidRunInsecureContent( |
| 3787 routing_id_, | 3795 routing_id_, |
| 3788 origin.toString().utf8())); | 3796 origin.toString().utf8(), |
| 3797 target.utf8())); |
| 3789 } | 3798 } |
| 3790 | 3799 |
| 3791 bool RenderView::allowScript(WebFrame* frame, bool enabled_per_settings) { | 3800 bool RenderView::allowScript(WebFrame* frame, bool enabled_per_settings) { |
| 3792 if (enabled_per_settings && | 3801 if (enabled_per_settings && |
| 3793 AllowContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT)) | 3802 AllowContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT)) |
| 3794 return true; | 3803 return true; |
| 3795 | 3804 |
| 3796 if (IsWhitelistedForContentSettings(frame)) | 3805 if (IsWhitelistedForContentSettings(frame)) |
| 3797 return true; | 3806 return true; |
| 3798 | 3807 |
| (...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5787 } | 5796 } |
| 5788 #endif | 5797 #endif |
| 5789 | 5798 |
| 5790 void RenderView::OnJavaScriptStressTestControl(int cmd, int param) { | 5799 void RenderView::OnJavaScriptStressTestControl(int cmd, int param) { |
| 5791 if (cmd == kJavaScriptStressTestSetStressRunType) { | 5800 if (cmd == kJavaScriptStressTestSetStressRunType) { |
| 5792 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param)); | 5801 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param)); |
| 5793 } else if (cmd == kJavaScriptStressTestPrepareStressRun) { | 5802 } else if (cmd == kJavaScriptStressTestPrepareStressRun) { |
| 5794 v8::Testing::PrepareStressRun(param); | 5803 v8::Testing::PrepareStressRun(param); |
| 5795 } | 5804 } |
| 5796 } | 5805 } |
| OLD | NEW |