2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
4 * Copyright (C) 2009-2010 ProFUSION embedded systems
5 * Copyright (C) 2009-2010 Samsung Electronics
6 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
26 #include "PopupMenuEfl.h"
29 #include "ChromeClientEfl.h"
31 #include "FrameView.h"
32 #include "NotImplemented.h"
34 #include "PopupMenuClient.h"
38 PopupMenuEfl::PopupMenuEfl(PopupMenuClient* client)
39 : m_popupClient(client)
44 PopupMenuEfl::~PopupMenuEfl()
46 // Tell client to destroy data related to this popup since this object is
52 void PopupMenuEfl::show(const IntRect& rect, FrameView* view, int index)
54 ASSERT(m_popupClient);
55 ChromeClientEfl* chromeClient = static_cast<ChromeClientEfl*>(view->frame()->page()->chrome()->client());
59 chromeClient->createSelectPopup(m_popupClient, index, rect);
62 void PopupMenuEfl::hide()
65 ChromeClientEfl* chromeClient = static_cast<ChromeClientEfl*>(m_view->frame()->page()->chrome()->client());
68 chromeClient->destroySelectPopup();
71 void PopupMenuEfl::updateFromElement()
73 client()->setTextFromItem(client()->selectedIndex());
76 void PopupMenuEfl::disconnectClient()