| Index: Source/web/PopupMenuImpl.h
|
| diff --git a/Source/web/PopupMenuChromium.h b/Source/web/PopupMenuImpl.h
|
| similarity index 58%
|
| rename from Source/web/PopupMenuChromium.h
|
| rename to Source/web/PopupMenuImpl.h
|
| index e8ef543eb21110d49650251ff8d7bc4eda5fc6aa..26a06e020cb0e465e12e9b63e2f49a92b1954174 100644
|
| --- a/Source/web/PopupMenuChromium.h
|
| +++ b/Source/web/PopupMenuImpl.h
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
|
| + * Copyright (C) 2012 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -28,39 +28,58 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef PopupMenuChromium_h
|
| -#define PopupMenuChromium_h
|
| +#ifndef PopupMenuImpl_h
|
| +#define PopupMenuImpl_h
|
|
|
| +#include "core/page/PagePopupClient.h"
|
| #include "platform/PopupMenu.h"
|
| -#include "wtf/RefPtr.h"
|
| +#include "platform/PopupMenuClient.h"
|
|
|
| namespace blink {
|
|
|
| -class LocalFrame;
|
| -class FrameView;
|
| -class PopupContainer;
|
| -class PopupMenuClient;
|
| +class ChromeClientImpl;
|
| +class PagePopup;
|
| +class HTMLElement;
|
| +class HTMLHRElement;
|
| +class HTMLOptGroupElement;
|
| +class HTMLOptionElement;
|
|
|
| -class PopupMenuChromium final : public PopupMenu {
|
| +class PopupMenuImpl final : public PopupMenu, public PagePopupClient {
|
| public:
|
| - PopupMenuChromium(LocalFrame&, PopupMenuClient*);
|
| - virtual ~PopupMenuChromium();
|
| + static PassRefPtr<PopupMenuImpl> create(ChromeClientImpl*, PopupMenuClient*);
|
| + virtual ~PopupMenuImpl();
|
| + virtual void trace(Visitor*) 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;
|
|
|
| - virtual void trace(Visitor*) override;
|
| + void dispose();
|
|
|
| private:
|
| - void dispose();
|
| + 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 void didWriteDocument(Document*) override;
|
| + virtual void setValueAndClosePopup(int, const String&) override;
|
| + virtual void setValue(const String&) override;
|
| + virtual void closePopup() override;
|
| + virtual Element& ownerElement() override;
|
| + virtual void didClosePopup() override;
|
|
|
| - PopupMenuClient* m_popupClient;
|
| - RefPtrWillBeMember<FrameView> m_frameView;
|
| - RefPtrWillBeMember<PopupContainer> m_popup;
|
| + ChromeClientImpl* m_chromeClient;
|
| + PopupMenuClient* m_client;
|
| + PagePopup* m_popup;
|
| };
|
|
|
| -} // namespace blink
|
| +}
|
|
|
| -#endif
|
| +#endif // PopupMenuImpl_h
|
|
|