Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: Source/web/PopupMenuImpl.h

Issue 736883002: Implement <select> Popup Menu using PagePopup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PopupMenuImpl_h
6 #define PopupMenuImpl_h
7
8 #include "core/html/forms/PopupMenuClient.h"
9 #include "core/page/PagePopupClient.h"
10 #include "platform/PopupMenu.h"
11
12 namespace blink {
13
14 class ChromeClientImpl;
15 class PagePopup;
16 class HTMLElement;
17 class HTMLHRElement;
18 class HTMLOptGroupElement;
19 class HTMLOptionElement;
20
21 class PopupMenuImpl final : public PopupMenu, public PagePopupClient {
22 public:
23 static PassRefPtr<PopupMenuImpl> create(ChromeClientImpl*, PopupMenuClient*) ;
tkent 2014/12/16 05:42:39 PassRefPtr -> PassRefPtrWillBeRawPtr
keishi 2014/12/16 12:21:03 Done.
24 virtual ~PopupMenuImpl();
25 virtual void trace(Visitor*) override;
26
27 virtual void show(const FloatQuad& controlPosition, const IntSize& controlSi ze, 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.
28 virtual void hide() override;
29 virtual void updateFromElement() override;
30 virtual void disconnectClient() override;
31
32 void dispose();
33
34 private:
35 PopupMenuImpl(ChromeClientImpl*, PopupMenuClient*);
36
37 void addOption(HTMLOptionElement&, SharedBuffer*);
38 void addOptGroup(HTMLOptGroupElement&, SharedBuffer*);
39 void addSeparator(HTMLHRElement&, SharedBuffer*);
40 void addElementStyle(HTMLElement&, SharedBuffer*);
41
42 // PagePopupClient functions:
43 virtual IntSize contentSize() override;
44 virtual void writeDocument(SharedBuffer*) override;
45 virtual void didWriteDocument(Document*) override;
46 virtual void setValueAndClosePopup(int, const String&) override;
47 virtual void setValue(const String&) override;
48 virtual void closePopup() override;
49 virtual Element& ownerElement() override;
50 virtual Locale& locale() override;
51 virtual void didClosePopup() override;
52
53 ChromeClientImpl* m_chromeClient;
54 PopupMenuClient* m_client;
55 PagePopup* m_popup;
56 };
57
58 }
59
60 #endif // PopupMenuImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698