| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 { | 189 { |
| 190 return m_client->canRunBeforeUnloadConfirmPanel(); | 190 return m_client->canRunBeforeUnloadConfirmPanel(); |
| 191 } | 191 } |
| 192 | 192 |
| 193 bool Chrome::runBeforeUnloadConfirmPanel(const String& message, LocalFrame* fram
e) | 193 bool Chrome::runBeforeUnloadConfirmPanel(const String& message, LocalFrame* fram
e) |
| 194 { | 194 { |
| 195 // Defer loads in case the client method runs a new event loop that would | 195 // Defer loads in case the client method runs a new event loop that would |
| 196 // otherwise cause the load to continue while we're in the middle of executi
ng JavaScript. | 196 // otherwise cause the load to continue while we're in the middle of executi
ng JavaScript. |
| 197 ScopedPageLoadDeferrer deferrer; | 197 ScopedPageLoadDeferrer deferrer; |
| 198 | 198 |
| 199 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(frame, message); | 199 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(m_page, message); |
| 200 bool ok = m_client->runBeforeUnloadConfirmPanel(message, frame); | 200 bool ok = m_client->runBeforeUnloadConfirmPanel(message, frame); |
| 201 InspectorInstrumentation::didRunJavaScriptDialog(cookie); | 201 InspectorInstrumentation::didRunJavaScriptDialog(cookie); |
| 202 return ok; | 202 return ok; |
| 203 } | 203 } |
| 204 | 204 |
| 205 void Chrome::closeWindowSoon() | 205 void Chrome::closeWindowSoon() |
| 206 { | 206 { |
| 207 m_client->closeWindowSoon(); | 207 m_client->closeWindowSoon(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void Chrome::runJavaScriptAlert(LocalFrame* frame, const String& message) | 210 void Chrome::runJavaScriptAlert(LocalFrame* frame, const String& message) |
| 211 { | 211 { |
| 212 if (!canRunModalIfDuringPageDismissal(m_page, ChromeClient::AlertDialog, mes
sage)) | 212 if (!canRunModalIfDuringPageDismissal(m_page, ChromeClient::AlertDialog, mes
sage)) |
| 213 return; | 213 return; |
| 214 | 214 |
| 215 // Defer loads in case the client method runs a new event loop that would | 215 // Defer loads in case the client method runs a new event loop that would |
| 216 // otherwise cause the load to continue while we're in the middle of executi
ng JavaScript. | 216 // otherwise cause the load to continue while we're in the middle of executi
ng JavaScript. |
| 217 ScopedPageLoadDeferrer deferrer; | 217 ScopedPageLoadDeferrer deferrer; |
| 218 | 218 |
| 219 ASSERT(frame); | 219 ASSERT(frame); |
| 220 notifyPopupOpeningObservers(); | 220 notifyPopupOpeningObservers(); |
| 221 | 221 |
| 222 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(frame, message); | 222 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(m_page, message); |
| 223 m_client->runJavaScriptAlert(frame, message); | 223 m_client->runJavaScriptAlert(frame, message); |
| 224 InspectorInstrumentation::didRunJavaScriptDialog(cookie); | 224 InspectorInstrumentation::didRunJavaScriptDialog(cookie); |
| 225 } | 225 } |
| 226 | 226 |
| 227 bool Chrome::runJavaScriptConfirm(LocalFrame* frame, const String& message) | 227 bool Chrome::runJavaScriptConfirm(LocalFrame* frame, const String& message) |
| 228 { | 228 { |
| 229 if (!canRunModalIfDuringPageDismissal(m_page, ChromeClient::ConfirmDialog, m
essage)) | 229 if (!canRunModalIfDuringPageDismissal(m_page, ChromeClient::ConfirmDialog, m
essage)) |
| 230 return false; | 230 return false; |
| 231 | 231 |
| 232 // Defer loads in case the client method runs a new event loop that would | 232 // Defer loads in case the client method runs a new event loop that would |
| 233 // otherwise cause the load to continue while we're in the middle of executi
ng JavaScript. | 233 // otherwise cause the load to continue while we're in the middle of executi
ng JavaScript. |
| 234 ScopedPageLoadDeferrer deferrer; | 234 ScopedPageLoadDeferrer deferrer; |
| 235 | 235 |
| 236 ASSERT(frame); | 236 ASSERT(frame); |
| 237 notifyPopupOpeningObservers(); | 237 notifyPopupOpeningObservers(); |
| 238 | 238 |
| 239 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(frame, message); | 239 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(m_page, message); |
| 240 bool ok = m_client->runJavaScriptConfirm(frame, message); | 240 bool ok = m_client->runJavaScriptConfirm(frame, message); |
| 241 InspectorInstrumentation::didRunJavaScriptDialog(cookie); | 241 InspectorInstrumentation::didRunJavaScriptDialog(cookie); |
| 242 return ok; | 242 return ok; |
| 243 } | 243 } |
| 244 | 244 |
| 245 bool Chrome::runJavaScriptPrompt(LocalFrame* frame, const String& prompt, const
String& defaultValue, String& result) | 245 bool Chrome::runJavaScriptPrompt(LocalFrame* frame, const String& prompt, const
String& defaultValue, String& result) |
| 246 { | 246 { |
| 247 if (!canRunModalIfDuringPageDismissal(m_page, ChromeClient::PromptDialog, pr
ompt)) | 247 if (!canRunModalIfDuringPageDismissal(m_page, ChromeClient::PromptDialog, pr
ompt)) |
| 248 return false; | 248 return false; |
| 249 | 249 |
| 250 // Defer loads in case the client method runs a new event loop that would | 250 // Defer loads in case the client method runs a new event loop that would |
| 251 // otherwise cause the load to continue while we're in the middle of executi
ng JavaScript. | 251 // otherwise cause the load to continue while we're in the middle of executi
ng JavaScript. |
| 252 ScopedPageLoadDeferrer deferrer; | 252 ScopedPageLoadDeferrer deferrer; |
| 253 | 253 |
| 254 ASSERT(frame); | 254 ASSERT(frame); |
| 255 notifyPopupOpeningObservers(); | 255 notifyPopupOpeningObservers(); |
| 256 | 256 |
| 257 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(frame, prompt); | 257 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(m_page, prompt); |
| 258 bool ok = m_client->runJavaScriptPrompt(frame, prompt, defaultValue, result)
; | 258 bool ok = m_client->runJavaScriptPrompt(frame, prompt, defaultValue, result)
; |
| 259 InspectorInstrumentation::didRunJavaScriptDialog(cookie); | 259 InspectorInstrumentation::didRunJavaScriptDialog(cookie); |
| 260 | 260 |
| 261 return ok; | 261 return ok; |
| 262 } | 262 } |
| 263 | 263 |
| 264 void Chrome::setStatusbarText(LocalFrame* frame, const String& status) | 264 void Chrome::setStatusbarText(LocalFrame* frame, const String& status) |
| 265 { | 265 { |
| 266 ASSERT(frame); | 266 ASSERT(frame); |
| 267 m_client->setStatusbarText(status); | 267 m_client->setStatusbarText(status); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 { | 408 { |
| 409 m_client->registerViewportLayers(); | 409 m_client->registerViewportLayers(); |
| 410 } | 410 } |
| 411 | 411 |
| 412 void Chrome::willBeDestroyed() | 412 void Chrome::willBeDestroyed() |
| 413 { | 413 { |
| 414 m_client->chromeDestroyed(); | 414 m_client->chromeDestroyed(); |
| 415 } | 415 } |
| 416 | 416 |
| 417 } // namespace blink | 417 } // namespace blink |
| OLD | NEW |