Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: chrome/renderer/content_settings_observer.cc

Issue 2772753002: Change FrameLoadTypeReload to take FrameLoadTypeReloadMainResource's behavior (Closed)
Patch Set: rebase error fix (replace newly added ReloadMainResource) Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/net/net_error_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/net/net_error_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698