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

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

Issue 1193813002: New SELECT Popup: Reduce the size of JSON data. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months 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
« no previous file with comments | « no previous file | Source/web/PopupMenuImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PopupMenuImpl_h 5 #ifndef PopupMenuImpl_h
6 #define PopupMenuImpl_h 6 #define PopupMenuImpl_h
7 7
8 #include "core/html/forms/PopupMenuClient.h" 8 #include "core/html/forms/PopupMenuClient.h"
9 #include "core/page/PagePopupClient.h" 9 #include "core/page/PagePopupClient.h"
10 #include "platform/PopupMenu.h" 10 #include "platform/PopupMenu.h"
(...skipping 12 matching lines...) Expand all
23 static PassRefPtrWillBeRawPtr<PopupMenuImpl> create(ChromeClientImpl*, Popup MenuClient*); 23 static PassRefPtrWillBeRawPtr<PopupMenuImpl> create(ChromeClientImpl*, Popup MenuClient*);
24 virtual ~PopupMenuImpl(); 24 virtual ~PopupMenuImpl();
25 25
26 void update(); 26 void update();
27 27
28 void dispose(); 28 void dispose();
29 29
30 private: 30 private:
31 PopupMenuImpl(ChromeClientImpl*, PopupMenuClient*); 31 PopupMenuImpl(ChromeClientImpl*, PopupMenuClient*);
32 32
33 class ItemIterationContext;
33 bool hasTooManyItemsForStyling(); 34 bool hasTooManyItemsForStyling();
34 void addOption(HTMLOptionElement&, int& listIndex, bool enableExtraStyling, SharedBuffer*); 35 void addOption(ItemIterationContext&, HTMLOptionElement&, int& listIndex, Sh aredBuffer*);
35 void addOptGroup(HTMLOptGroupElement&, int& listIndex, bool enableExtraStyli ng, SharedBuffer*); 36 void addOptGroup(ItemIterationContext&, HTMLOptGroupElement&, int& listIndex , SharedBuffer*);
36 void addSeparator(HTMLHRElement&, int& listIndex, bool enableExtraStyling, S haredBuffer*); 37 void addSeparator(ItemIterationContext&, HTMLHRElement&, int& listIndex, Sha redBuffer*);
37 void addElementStyle(HTMLElement&, bool enableExtraStyling, SharedBuffer*); 38 void addElementStyle(ItemIterationContext&, HTMLElement&, SharedBuffer*);
38 39
39 // PopupMenu functions: 40 // PopupMenu functions:
40 void show(const FloatQuad& controlPosition, const IntSize& controlSize, int index) override; 41 void show(const FloatQuad& controlPosition, const IntSize& controlSize, int index) override;
41 void hide() override; 42 void hide() override;
42 void disconnectClient() override; 43 void disconnectClient() override;
43 void updateFromElement() override; 44 void updateFromElement() override;
44 45
45 // PagePopupClient functions: 46 // PagePopupClient functions:
46 IntSize contentSize() override; 47 IntSize contentSize() override;
47 void writeDocument(SharedBuffer*) override; 48 void writeDocument(SharedBuffer*) override;
48 void selectFontsFromOwnerDocument(Document&) override; 49 void selectFontsFromOwnerDocument(Document&) override;
49 void setValueAndClosePopup(int, const String&) override; 50 void setValueAndClosePopup(int, const String&) override;
50 void setValue(const String&) override; 51 void setValue(const String&) override;
51 void closePopup() override; 52 void closePopup() override;
52 Element& ownerElement() override; 53 Element& ownerElement() override;
53 Locale& locale() override; 54 Locale& locale() override;
54 void didClosePopup() override; 55 void didClosePopup() override;
55 56
56 ChromeClientImpl* m_chromeClient; 57 ChromeClientImpl* m_chromeClient;
57 PopupMenuClient* m_client; 58 PopupMenuClient* m_client;
58 PagePopup* m_popup; 59 PagePopup* m_popup;
59 bool m_needsUpdate; 60 bool m_needsUpdate;
60 }; 61 };
61 62
62 } 63 }
63 64
64 #endif // PopupMenuImpl_h 65 #endif // PopupMenuImpl_h
OLDNEW
« no previous file with comments | « no previous file | Source/web/PopupMenuImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698