OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 { | 297 { |
298 if (!m_page) | 298 if (!m_page) |
299 return; | 299 return; |
300 m_page->focusController()->setFocused(enable); | 300 m_page->focusController()->setFocused(enable); |
301 if (enable) | 301 if (enable) |
302 m_page->focusController()->setActive(true); | 302 m_page->focusController()->setActive(true); |
303 } | 303 } |
304 | 304 |
305 void WebPagePopupImpl::close() | 305 void WebPagePopupImpl::close() |
306 { | 306 { |
| 307 m_closing = true; |
307 if (m_page && m_page->mainFrame()) | 308 if (m_page && m_page->mainFrame()) |
308 m_page->mainFrame()->loader()->frameDetached(); | 309 m_page->mainFrame()->loader()->frameDetached(); |
309 m_page.clear(); | 310 m_page.clear(); |
310 m_widgetClient = 0; | 311 m_widgetClient = 0; |
311 deref(); | 312 deref(); |
312 } | 313 } |
313 | 314 |
314 void WebPagePopupImpl::closePopup() | 315 void WebPagePopupImpl::closePopup() |
315 { | 316 { |
316 if (m_page) { | 317 if (m_page) { |
(...skipping 28 matching lines...) Expand all Loading... |
345 // We need them because the closing operation is asynchronous and the widget | 346 // We need them because the closing operation is asynchronous and the widget |
346 // can be closed while the WebViewImpl is unaware of it. | 347 // can be closed while the WebViewImpl is unaware of it. |
347 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 348 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
348 #else | 349 #else |
349 UNUSED_PARAM(client); | 350 UNUSED_PARAM(client); |
350 return 0; | 351 return 0; |
351 #endif | 352 #endif |
352 } | 353 } |
353 | 354 |
354 } // namespace WebKit | 355 } // namespace WebKit |
OLD | NEW |