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/content_settings_observer.h" | 5 #include "chrome/renderer/content_settings_observer.h" |
6 | 6 |
7 #include "chrome/common/render_messages.h" | 7 #include "chrome/common/render_messages.h" |
8 #include "chrome/common/ssl_insecure_content.h" | 8 #include "chrome/common/ssl_insecure_content.h" |
9 #include "content/public/common/url_constants.h" | 9 #include "content/public/common/url_constants.h" |
10 #include "content/public/renderer/document_state.h" | 10 #include "content/public/renderer/document_state.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 void ContentSettingsObserver::OnDestruct() { | 206 void ContentSettingsObserver::OnDestruct() { |
207 delete this; | 207 delete this; |
208 } | 208 } |
209 | 209 |
210 void ContentSettingsObserver::SetAllowRunningInsecureContent() { | 210 void ContentSettingsObserver::SetAllowRunningInsecureContent() { |
211 allow_running_insecure_content_ = true; | 211 allow_running_insecure_content_ = true; |
212 | 212 |
213 // Reload if we are the main frame. | 213 // Reload if we are the main frame. |
214 blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); | 214 blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); |
215 if (!frame->parent()) | 215 if (!frame->parent()) |
216 frame->reload(blink::WebFrameLoadType::ReloadMainResource); | 216 frame->reload(blink::WebFrameLoadType::Reload); |
217 } | 217 } |
218 | 218 |
219 void ContentSettingsObserver::OnInsecureContentRendererRequest( | 219 void ContentSettingsObserver::OnInsecureContentRendererRequest( |
220 chrome::mojom::InsecureContentRendererRequest request) { | 220 chrome::mojom::InsecureContentRendererRequest request) { |
221 insecure_content_renderer_bindings_.AddBinding(this, std::move(request)); | 221 insecure_content_renderer_bindings_.AddBinding(this, std::move(request)); |
222 } | 222 } |
223 | 223 |
224 bool ContentSettingsObserver::allowDatabase(const WebString& name, | 224 bool ContentSettingsObserver::allowDatabase(const WebString& name, |
225 const WebString& display_name, | 225 const WebString& display_name, |
226 unsigned estimated_size) { | 226 unsigned estimated_size) { |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 #endif | 539 #endif |
540 | 540 |
541 // If the scheme is file:, an empty file name indicates a directory listing, | 541 // If the scheme is file:, an empty file name indicates a directory listing, |
542 // which requires JavaScript to function properly. | 542 // which requires JavaScript to function properly. |
543 if (protocol == url::kFileScheme && | 543 if (protocol == url::kFileScheme && |
544 document_url.protocolIs(url::kFileScheme)) { | 544 document_url.protocolIs(url::kFileScheme)) { |
545 return GURL(document_url).ExtractFileName().empty(); | 545 return GURL(document_url).ExtractFileName().empty(); |
546 } | 546 } |
547 return false; | 547 return false; |
548 } | 548 } |
OLD | NEW |