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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 798723004: Fix copying from interstitial pages on OSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address more comments. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 05f980664b463b1a958203d03c01e31495ab56ac..7be448fb503a64055f047f7fe96af8b6c996809d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -645,6 +645,11 @@ RenderFrameHostImpl* WebContentsImpl::GetMainFrame() {
}
RenderFrameHost* WebContentsImpl::GetFocusedFrame() {
+ if (ShowingInterstitialPage()) {
+ InterstitialPageImpl* interstitial_page =
+ static_cast<InterstitialPageImpl*>(GetInterstitialPage());
+ return interstitial_page->GetMainFrame();
Charlie Reis 2015/04/27 23:39:26 This is mildly scary to me. We're returning a fra
+ }
if (!frame_tree_.GetFocusedFrame())
return NULL;
return frame_tree_.GetFocusedFrame()->current_frame_host();

Powered by Google App Engine
This is Rietveld 408576698