| OLD | NEW |
| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 bool Chrome::canRunModal() const | 181 bool Chrome::canRunModal() const |
| 182 { | 182 { |
| 183 return m_client->canRunModal(); | 183 return m_client->canRunModal(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogTyp
e dialog, const String& message) | 186 static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogTyp
e dialog, const String& message) |
| 187 { | 187 { |
| 188 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->travers
eNext()) { | 188 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->travers
eNext()) { |
| 189 FrameLoader::PageDismissalType dismissal = frame->loader()->pageDismissa
lEventBeingDispatched(); | 189 FrameLoader::PageDismissalType dismissal = frame->loader()->pageDismissa
lEventBeingDispatched(); |
| 190 if (dismissal != FrameLoader::NoDismissal) | 190 if (dismissal != FrameLoader::NoDismissal) |
| 191 return page->chrome()->client()->shouldRunModalDialogDuringPageDismi
ssal(dialog, message, dismissal); | 191 return page->chrome().client()->shouldRunModalDialogDuringPageDismis
sal(dialog, message, dismissal); |
| 192 } | 192 } |
| 193 return true; | 193 return true; |
| 194 } | 194 } |
| 195 | 195 |
| 196 bool Chrome::canRunModalNow() const | 196 bool Chrome::canRunModalNow() const |
| 197 { | 197 { |
| 198 return canRunModal() && canRunModalIfDuringPageDismissal(m_page, ChromeClien
t::HTMLDialog, String()); | 198 return canRunModal() && canRunModalIfDuringPageDismissal(m_page, ChromeClien
t::HTMLDialog, String()); |
| 199 } | 199 } |
| 200 | 200 |
| 201 void Chrome::runModal() const | 201 void Chrome::runModal() const |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 } | 464 } |
| 465 | 465 |
| 466 void Chrome::notifyPopupOpeningObservers() const | 466 void Chrome::notifyPopupOpeningObservers() const |
| 467 { | 467 { |
| 468 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); | 468 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); |
| 469 for (size_t i = 0; i < observers.size(); ++i) | 469 for (size_t i = 0; i < observers.size(); ++i) |
| 470 observers[i]->willOpenPopup(); | 470 observers[i]->willOpenPopup(); |
| 471 } | 471 } |
| 472 | 472 |
| 473 } // namespace WebCore | 473 } // namespace WebCore |
| OLD | NEW |