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

Side by Side Diff: Source/core/page/Chrome.cpp

Issue 302213002: Convert page-level classes to handle RemoteFrames from FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: bug fix Created 6 years, 6 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 | Source/core/page/CreateWindow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 m_client->show(policy); 134 m_client->show(policy);
135 } 135 }
136 136
137 bool Chrome::canRunModal() const 137 bool Chrome::canRunModal() const
138 { 138 {
139 return m_client->canRunModal(); 139 return m_client->canRunModal();
140 } 140 }
141 141
142 static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogTyp e dialog, const String& message) 142 static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogTyp e dialog, const String& message)
143 { 143 {
144 for (LocalFrame* frame = page->mainFrame(); frame; frame = frame->tree().tra verseNext()) { 144 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverse Next()) {
145 Document::PageDismissalType dismissal = frame->document()->pageDismissal EventBeingDispatched(); 145 if (!frame->isLocalFrame())
146 continue;
147 Document::PageDismissalType dismissal = toLocalFrame(frame)->document()- >pageDismissalEventBeingDispatched();
146 if (dismissal != Document::NoDismissal) 148 if (dismissal != Document::NoDismissal)
147 return page->chrome().client().shouldRunModalDialogDuringPageDismiss al(dialog, message, dismissal); 149 return page->chrome().client().shouldRunModalDialogDuringPageDismiss al(dialog, message, dismissal);
148 } 150 }
149 return true; 151 return true;
150 } 152 }
151 153
152 bool Chrome::canRunModalNow() const 154 bool Chrome::canRunModalNow() const
153 { 155 {
154 return canRunModal() && canRunModalIfDuringPageDismissal(m_page, ChromeClien t::HTMLDialog, String()); 156 return canRunModal() && canRunModalIfDuringPageDismissal(m_page, ChromeClien t::HTMLDialog, String());
155 } 157 }
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 for (size_t i = 0; i < observers.size(); ++i) 407 for (size_t i = 0; i < observers.size(); ++i)
406 observers[i]->willOpenPopup(); 408 observers[i]->willOpenPopup();
407 } 409 }
408 410
409 void Chrome::willBeDestroyed() 411 void Chrome::willBeDestroyed()
410 { 412 {
411 m_client->chromeDestroyed(); 413 m_client->chromeDestroyed();
412 } 414 }
413 415
414 } // namespace WebCore 416 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/CreateWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698