| Index: Source/web/PopupMenuImpl.h
|
| diff --git a/Source/web/DateTimeChooserImpl.h b/Source/web/PopupMenuImpl.h
|
| similarity index 66%
|
| copy from Source/web/DateTimeChooserImpl.h
|
| copy to Source/web/PopupMenuImpl.h
|
| index 83eb256fa86b567364ffd032647fd89825055299..833d5f60cb48be143f2e11ed27391b469264d0b9 100644
|
| --- a/Source/web/DateTimeChooserImpl.h
|
| +++ b/Source/web/PopupMenuImpl.h
|
| @@ -28,34 +28,47 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef DateTimeChooserImpl_h
|
| -#define DateTimeChooserImpl_h
|
| +#ifndef PopupMenuImpl_h
|
| +#define PopupMenuImpl_h
|
|
|
| -#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
|
| -#include "core/html/forms/DateTimeChooser.h"
|
| +#include "core/html/forms/PopupMenuClient.h"
|
| #include "core/page/PagePopupClient.h"
|
| +#include "platform/PopupMenu.h"
|
|
|
| namespace blink {
|
|
|
| class ChromeClientImpl;
|
| -class DateTimeChooserClient;
|
| class PagePopup;
|
| +class HTMLElement;
|
| +class HTMLHRElement;
|
| +class HTMLOptGroupElement;
|
| +class HTMLOptionElement;
|
|
|
| -class DateTimeChooserImpl final : public DateTimeChooser, public PagePopupClient {
|
| +class PopupMenuImpl final : public PopupMenu, public PagePopupClient {
|
| public:
|
| - static PassRefPtr<DateTimeChooserImpl> create(ChromeClientImpl*, DateTimeChooserClient*, const DateTimeChooserParameters&);
|
| - virtual ~DateTimeChooserImpl();
|
| + static PassRefPtr<PopupMenuImpl> create(ChromeClientImpl*, PopupMenuClient*);
|
| + virtual ~PopupMenuImpl();
|
| + virtual void trace(Visitor*) override;
|
|
|
| - // DateTimeChooser functions:
|
| - virtual void endChooser() override;
|
| - virtual AXObject* rootAXObject() override;
|
| + virtual void show(const FloatQuad& controlPosition, const IntSize& controlSize, int index) override;
|
| + virtual void hide() override;
|
| + virtual void updateFromElement() override;
|
| + virtual void disconnectClient() override;
|
| +
|
| + void dispose();
|
|
|
| private:
|
| - DateTimeChooserImpl(ChromeClientImpl*, DateTimeChooserClient*, const DateTimeChooserParameters&);
|
| + PopupMenuImpl(ChromeClientImpl*, PopupMenuClient*);
|
| +
|
| + void addOption(HTMLOptionElement&, SharedBuffer*);
|
| + void addOptGroup(HTMLOptGroupElement&, SharedBuffer*);
|
| + void addSeparator(HTMLHRElement&, SharedBuffer*);
|
| + void addElementStyle(HTMLElement&, SharedBuffer*);
|
| +
|
| // PagePopupClient functions:
|
| virtual IntSize contentSize() override;
|
| virtual void writeDocument(SharedBuffer*) override;
|
| - virtual Locale& locale() override;
|
| + virtual void didWriteDocument(Document*) override;
|
| virtual void setValueAndClosePopup(int, const String&) override;
|
| virtual void setValue(const String&) override;
|
| virtual void closePopup() override;
|
| @@ -63,14 +76,10 @@ private:
|
| virtual void didClosePopup() override;
|
|
|
| ChromeClientImpl* m_chromeClient;
|
| - DateTimeChooserClient* m_client;
|
| + PopupMenuClient* m_client;
|
| PagePopup* m_popup;
|
| - DateTimeChooserParameters m_parameters;
|
| - OwnPtr<Locale> m_locale;
|
| };
|
|
|
| }
|
|
|
| -#endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI)
|
| -
|
| -#endif // DateTimeChooserImpl_h
|
| +#endif // PopupMenuImpl_h
|
|
|