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

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

Issue 2553053002: Use ReloadMainResource for per-frame reload (Closed)
Patch Set: rf Created 4 years 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 | content/renderer/render_frame_impl.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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 is_interstitial_page_ = true; 438 is_interstitial_page_ = true;
439 } 439 }
440 440
441 void ContentSettingsObserver::OnSetAllowRunningInsecureContent(bool allow) { 441 void ContentSettingsObserver::OnSetAllowRunningInsecureContent(bool allow) {
442 allow_running_insecure_content_ = allow; 442 allow_running_insecure_content_ = allow;
443 } 443 }
444 444
445 void ContentSettingsObserver::OnReloadFrame() { 445 void ContentSettingsObserver::OnReloadFrame() {
446 DCHECK(!render_frame()->GetWebFrame()->parent()) << 446 DCHECK(!render_frame()->GetWebFrame()->parent()) <<
447 "Should only be called on the main frame"; 447 "Should only be called on the main frame";
448 render_frame()->GetWebFrame()->reload(); 448 render_frame()->GetWebFrame()->reload(
449 blink::WebFrameLoadType::ReloadMainResource);
449 } 450 }
450 451
451 void ContentSettingsObserver::OnRequestFileSystemAccessAsyncResponse( 452 void ContentSettingsObserver::OnRequestFileSystemAccessAsyncResponse(
452 int request_id, 453 int request_id,
453 bool allowed) { 454 bool allowed) {
454 PermissionRequestMap::iterator it = permission_requests_.find(request_id); 455 PermissionRequestMap::iterator it = permission_requests_.find(request_id);
455 if (it == permission_requests_.end()) 456 if (it == permission_requests_.end())
456 return; 457 return;
457 458
458 WebContentSettingCallbacks callbacks = it->second; 459 WebContentSettingCallbacks callbacks = it->second;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 535
535 // If the scheme is file:, an empty file name indicates a directory listing, 536 // If the scheme is file:, an empty file name indicates a directory listing,
536 // which requires JavaScript to function properly. 537 // which requires JavaScript to function properly.
537 if (base::EqualsASCII(protocol, url::kFileScheme)) { 538 if (base::EqualsASCII(protocol, url::kFileScheme)) {
538 return document_url.SchemeIs(url::kFileScheme) && 539 return document_url.SchemeIs(url::kFileScheme) &&
539 document_url.ExtractFileName().empty(); 540 document_url.ExtractFileName().empty();
540 } 541 }
541 542
542 return false; 543 return false;
543 } 544 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698