OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 PopupMenuChromium_h | 5 #ifndef PopupMenuChromium_h |
6 #define PopupMenuChromium_h | 6 #define PopupMenuChromium_h |
7 | 7 |
8 #pragma warning(push, 0) | 8 #pragma warning(push, 0) |
9 #include "PopupMenuClient.h" | 9 #include "PopupMenuClient.h" |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Note: this code was somehow arbitrarily factored-out of the Popup class | 53 // Note: this code was somehow arbitrarily factored-out of the Popup class |
54 // so WebViewImpl can create a PopupContainer. | 54 // so WebViewImpl can create a PopupContainer. |
55 void show(const IntRect& r, FrameView* v, int index); | 55 void show(const IntRect& r, FrameView* v, int index); |
56 | 56 |
57 // Hide the popup. Do not call this directly: use client->hidePopup(). | 57 // Hide the popup. Do not call this directly: use client->hidePopup(). |
58 void hidePopup(); | 58 void hidePopup(); |
59 | 59 |
60 // Compute size of widget and children. | 60 // Compute size of widget and children. |
61 void layout(); | 61 void layout(); |
62 | 62 |
| 63 // Sets whether the PopupMenuClient should be told to change its text when a |
| 64 // new item is selected (by using the arrow keys). Default is true. |
| 65 void setTextOnIndexChange(bool value); |
| 66 |
63 PopupListBox* listBox() const { return m_listBox.get(); } | 67 PopupListBox* listBox() const { return m_listBox.get(); } |
64 | 68 |
65 private: | 69 private: |
66 friend class WTF::RefCounted<PopupContainer>; | 70 friend class WTF::RefCounted<PopupContainer>; |
67 | 71 |
68 PopupContainer(PopupMenuClient* client, bool focusOnShow); | 72 PopupContainer(PopupMenuClient* client, bool focusOnShow); |
69 ~PopupContainer(); | 73 ~PopupContainer(); |
70 | 74 |
71 // Paint the border. | 75 // Paint the border. |
72 void paintBorder(GraphicsContext* gc, const IntRect& rect); | 76 void paintBorder(GraphicsContext* gc, const IntRect& rect); |
73 | 77 |
74 RefPtr<PopupListBox> m_listBox; | 78 RefPtr<PopupListBox> m_listBox; |
75 | 79 |
76 // Whether the window showing this popup should be focused when shown. | 80 // Whether the window showing this popup should be focused when shown. |
77 bool m_focusOnShow; | 81 bool m_focusOnShow; |
78 }; | 82 }; |
79 | 83 |
80 } | 84 } |
81 | 85 |
82 #endif // PopupMenuChromium_h | 86 #endif // PopupMenuChromium_h |
OLD | NEW |