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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1799163002: Remove swapped out state from RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 3828 matching lines...) Expand 10 before | Expand all | Expand 10 after
3839 RenderFrameHost* render_frame_host, 3839 RenderFrameHost* render_frame_host,
3840 const base::string16& message, 3840 const base::string16& message,
3841 const base::string16& default_prompt, 3841 const base::string16& default_prompt,
3842 const GURL& frame_url, 3842 const GURL& frame_url,
3843 JavaScriptMessageType javascript_message_type, 3843 JavaScriptMessageType javascript_message_type,
3844 IPC::Message* reply_msg) { 3844 IPC::Message* reply_msg) {
3845 // Suppress JavaScript dialogs when requested. Also suppress messages when 3845 // Suppress JavaScript dialogs when requested. Also suppress messages when
3846 // showing an interstitial as it's shown over the previous page and we don't 3846 // showing an interstitial as it's shown over the previous page and we don't
3847 // want the hidden page's dialogs to interfere with the interstitial. 3847 // want the hidden page's dialogs to interfere with the interstitial.
3848 bool suppress_this_message = 3848 bool suppress_this_message =
3849 static_cast<RenderFrameHostImpl*>(render_frame_host)->is_swapped_out() ||
3850 ShowingInterstitialPage() || !delegate_ || 3849 ShowingInterstitialPage() || !delegate_ ||
3851 delegate_->ShouldSuppressDialogs(this) || 3850 delegate_->ShouldSuppressDialogs(this) ||
3852 !delegate_->GetJavaScriptDialogManager(this); 3851 !delegate_->GetJavaScriptDialogManager(this);
3853 3852
3854 if (!suppress_this_message) { 3853 if (!suppress_this_message) {
3855 std::string accept_lang = GetContentClient()->browser()-> 3854 std::string accept_lang = GetContentClient()->browser()->
3856 GetAcceptLangs(GetBrowserContext()); 3855 GetAcceptLangs(GetBrowserContext());
3857 dialog_manager_ = delegate_->GetJavaScriptDialogManager(this); 3856 dialog_manager_ = delegate_->GetJavaScriptDialogManager(this);
3858 dialog_manager_->RunJavaScriptDialog( 3857 dialog_manager_->RunJavaScriptDialog(
3859 this, frame_url, accept_lang, javascript_message_type, message, 3858 this, frame_url, accept_lang, javascript_message_type, message,
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
4846 else 4845 else
4847 WasHidden(); 4846 WasHidden();
4848 } 4847 }
4849 4848
4850 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 4849 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
4851 JavaScriptDialogManager* dialog_manager) { 4850 JavaScriptDialogManager* dialog_manager) {
4852 dialog_manager_ = dialog_manager; 4851 dialog_manager_ = dialog_manager;
4853 } 4852 }
4854 4853
4855 } // namespace content 4854 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698