Chromium Code Reviews| Index: Source/web/PopupMenuImpl.h |
| diff --git a/Source/web/PopupMenuImpl.h b/Source/web/PopupMenuImpl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c881eefc271bdc1cb8990e33a8d004f4d42d74c4 |
| --- /dev/null |
| +++ b/Source/web/PopupMenuImpl.h |
| @@ -0,0 +1,60 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef PopupMenuImpl_h |
| +#define PopupMenuImpl_h |
| + |
| +#include "core/html/forms/PopupMenuClient.h" |
| +#include "core/page/PagePopupClient.h" |
| +#include "platform/PopupMenu.h" |
| + |
| +namespace blink { |
| + |
| +class ChromeClientImpl; |
| +class PagePopup; |
| +class HTMLElement; |
| +class HTMLHRElement; |
| +class HTMLOptGroupElement; |
| +class HTMLOptionElement; |
| + |
| +class PopupMenuImpl final : public PopupMenu, public PagePopupClient { |
| +public: |
| + static PassRefPtr<PopupMenuImpl> create(ChromeClientImpl*, PopupMenuClient*); |
|
tkent
2014/12/16 05:42:39
PassRefPtr -> PassRefPtrWillBeRawPtr
keishi
2014/12/16 12:21:03
Done.
|
| + virtual ~PopupMenuImpl(); |
| + virtual void trace(Visitor*) override; |
| + |
| + virtual void show(const FloatQuad& controlPosition, const IntSize& controlSize, int index) override; |
|
tkent
2014/12/16 05:42:39
nit: Add a comment like "PopupMenu functions:"
Al
keishi
2014/12/16 12:21:03
Done.
|
| + virtual void hide() override; |
| + virtual void updateFromElement() override; |
| + virtual void disconnectClient() override; |
| + |
| + void dispose(); |
| + |
| +private: |
| + 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 Locale& locale() override; |
| + virtual void didClosePopup() override; |
| + |
| + ChromeClientImpl* m_chromeClient; |
| + PopupMenuClient* m_client; |
| + PagePopup* m_popup; |
| +}; |
| + |
| +} |
| + |
| +#endif // PopupMenuImpl_h |