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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 m_client->show(policy); | 151 m_client->show(policy); |
152 } | 152 } |
153 | 153 |
154 bool Chrome::canRunModal() const | 154 bool Chrome::canRunModal() const |
155 { | 155 { |
156 return m_client->canRunModal(); | 156 return m_client->canRunModal(); |
157 } | 157 } |
158 | 158 |
159 static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogTyp
e dialog, const String& message) | 159 static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogTyp
e dialog, const String& message) |
160 { | 160 { |
161 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->travers
eNext()) { | 161 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverse
Next()) { |
162 Document::PageDismissalType dismissal = frame->document()->pageDismissal
EventBeingDispatched(); | 162 Document::PageDismissalType dismissal = frame->document()->pageDismissal
EventBeingDispatched(); |
163 if (dismissal != Document::NoDismissal) | 163 if (dismissal != Document::NoDismissal) |
164 return page->chrome().client().shouldRunModalDialogDuringPageDismiss
al(dialog, message, dismissal); | 164 return page->chrome().client().shouldRunModalDialogDuringPageDismiss
al(dialog, message, dismissal); |
165 } | 165 } |
166 return true; | 166 return true; |
167 } | 167 } |
168 | 168 |
169 bool Chrome::canRunModalNow() const | 169 bool Chrome::canRunModalNow() const |
170 { | 170 { |
171 return canRunModal() && canRunModalIfDuringPageDismissal(m_page, ChromeClien
t::HTMLDialog, String()); | 171 return canRunModal() && canRunModalIfDuringPageDismissal(m_page, ChromeClien
t::HTMLDialog, String()); |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 } | 407 } |
408 | 408 |
409 void Chrome::notifyPopupOpeningObservers() const | 409 void Chrome::notifyPopupOpeningObservers() const |
410 { | 410 { |
411 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); | 411 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); |
412 for (size_t i = 0; i < observers.size(); ++i) | 412 for (size_t i = 0; i < observers.size(); ++i) |
413 observers[i]->willOpenPopup(); | 413 observers[i]->willOpenPopup(); |
414 } | 414 } |
415 | 415 |
416 } // namespace WebCore | 416 } // namespace WebCore |
OLD | NEW |