PagePopup* ChromeClientBlackBerry::openPagePopup(PagePopupClient* client, const IntRect& originBoundsInRootView) { closePagePopup(0); PagePopupBlackBerry* webPopup = new PagePopupBlackBerry(m_webPagePrivate, client, rootViewToScreen(originBoundsInRootView)); m_webPagePrivate->m_webPage->popupOpened(webPopup); if (webPopup->sendCreatePopupWebViewRequest()) return webPopup; closePagePopup(0); return 0; }
PagePopup* MockPagePopupDriver::openPagePopup(PagePopupClient* client, const IntRect& originBoundsInRootView) { if (m_mockPagePopup) closePagePopup(m_mockPagePopup.get()); if (!client || !m_mainFrame) return 0; m_pagePopupController = PagePopupController::create(client); m_mockPagePopup = MockPagePopup::create(client, originBoundsInRootView, m_mainFrame); return m_mockPagePopup.get(); }
void ChromeClientBlackBerry::chromeDestroyed() { // Destroy popup if we have. closePagePopup(0); delete this; }
MockPagePopupDriver::~MockPagePopupDriver() { closePagePopup(m_mockPagePopup.get()); }