2010-01-08 Luiz Agostini <luiz.agostini@openbossa.org>
[WebKit-https.git] / WebCore / platform / qt / QtAbstractWebPopup.cpp
index cbe7174..75d8fb5 100644 (file)
 #include "QtAbstractWebPopup.h"
 
 #include "PopupMenuClient.h"
-#include "QtFallbackWebPopup.h"
 
 
 namespace WebCore {
 
-QtAbstractWebPopupFactory* QtAbstractWebPopup::m_factory = 0;
-
-QtAbstractWebPopup::QtAbstractWebPopup(PopupMenuClient* client)
-    : m_client(client)
+QtAbstractWebPopup::QtAbstractWebPopup()
+    : m_client(0)
 {
-    Q_ASSERT(m_client);
 }
 
 QtAbstractWebPopup::~QtAbstractWebPopup()
 {
 }
 
-PopupMenuClient* QtAbstractWebPopup::client()
+void QtAbstractWebPopup::popupDidHide(bool acceptSuggestions)
 {
-    return m_client;
-}
-
-void QtAbstractWebPopup::setFactory(QtAbstractWebPopupFactory* factory)
-{
-    m_factory = factory;
+    Q_ASSERT(m_client);
+    m_client->popupDidHide(acceptSuggestions);
 }
 
-QtAbstractWebPopup* QtAbstractWebPopup::create(PopupMenuClient* client)
+void QtAbstractWebPopup::valueChanged(int index)
 {
-    return m_factory ? m_factory->create(client) : new QtFallbackWebPopup(client);
+    Q_ASSERT(m_client);
+    m_client->valueChanged(index);
 }
 
 } // namespace WebCore