OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... | |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef ExternalPopupMenu_h | 31 #ifndef ExternalPopupMenu_h |
32 #define ExternalPopupMenu_h | 32 #define ExternalPopupMenu_h |
33 | 33 |
34 #include "base/gtest_prod_util.h" | |
tkent
2014/08/21 00:53:33
Remove this. Blink must not include base/ files.
spartha
2014/08/21 06:33:23
It did give me a DEPS error. Other than that, it d
tkent
2014/08/21 06:40:05
We can use FRIEND_TEST defined in gtest/gtest_prod
spartha
2014/08/21 07:07:26
I see that FRIEND_TEST is not encouraged to be use
tkent
2014/08/21 07:09:31
Oh, I see. Then, making them public is the only w
spartha
2014/08/21 07:18:57
Done. Would it not be useful if gtest_prod_util.h
tkent
2014/08/21 07:49:01
It would be useful, but I don't think we should do
| |
34 #include "platform/PopupMenu.h" | 35 #include "platform/PopupMenu.h" |
35 #include "platform/Timer.h" | 36 #include "platform/Timer.h" |
36 #include "public/platform/WebCanvas.h" | 37 #include "public/platform/WebCanvas.h" |
37 #include "public/platform/WebScrollbar.h" | 38 #include "public/platform/WebScrollbar.h" |
38 #include "public/web/WebExternalPopupMenuClient.h" | 39 #include "public/web/WebExternalPopupMenuClient.h" |
39 | 40 |
40 namespace blink { | 41 namespace blink { |
41 | 42 |
42 class FloatQuad; | 43 class FloatQuad; |
43 class LocalFrame; | 44 class LocalFrame; |
(...skipping 22 matching lines...) Expand all Loading... | |
66 | 67 |
67 // WebExternalPopupClient methods: | 68 // WebExternalPopupClient methods: |
68 virtual void didChangeSelection(int index) OVERRIDE; | 69 virtual void didChangeSelection(int index) OVERRIDE; |
69 virtual void didAcceptIndex(int index) OVERRIDE; | 70 virtual void didAcceptIndex(int index) OVERRIDE; |
70 virtual void didAcceptIndices(const WebVector<int>& indices) OVERRIDE; | 71 virtual void didAcceptIndices(const WebVector<int>& indices) OVERRIDE; |
71 virtual void didCancel() OVERRIDE; | 72 virtual void didCancel() OVERRIDE; |
72 | 73 |
73 void dispatchEvent(Timer<ExternalPopupMenu>*); | 74 void dispatchEvent(Timer<ExternalPopupMenu>*); |
74 // Fills |info| with the popup menu information contained in the | 75 // Fills |info| with the popup menu information contained in the |
75 // PopupMenuClient associated with this ExternalPopupMenu. | 76 // PopupMenuClient associated with this ExternalPopupMenu. |
76 void getPopupMenuInfo(WebPopupMenuInfo* info); | 77 static void getPopupMenuInfo(WebPopupMenuInfo*, PopupMenuClient*); |
tkent
2014/08/21 00:53:33
PopupMenuClient argument should be |PopupMenuClien
spartha
2014/08/21 10:05:43
Done.
| |
77 int toPopupMenuItemIndex(int index); | 78 static int toPopupMenuItemIndex(int index, PopupMenuClient*); |
tkent
2014/08/21 00:53:33
Ditto.
spartha
2014/08/21 10:05:43
Done.
| |
78 int toExternalPopupMenuItemIndex(int index); | 79 static int toExternalPopupMenuItemIndex(int index, PopupMenuClient*); |
tkent
2014/08/21 00:53:33
Ditto.
spartha
2014/08/21 10:05:43
Done.
| |
79 | 80 |
80 PopupMenuClient* m_popupMenuClient; | 81 PopupMenuClient* m_popupMenuClient; |
81 RefPtr<FrameView> m_frameView; | 82 RefPtr<FrameView> m_frameView; |
82 WebViewImpl& m_webView; | 83 WebViewImpl& m_webView; |
83 OwnPtr<WebMouseEvent> m_syntheticEvent; | 84 OwnPtr<WebMouseEvent> m_syntheticEvent; |
84 Timer<ExternalPopupMenu> m_dispatchEventTimer; | 85 Timer<ExternalPopupMenu> m_dispatchEventTimer; |
85 // The actual implementor of the show menu. | 86 // The actual implementor of the show menu. |
86 WebExternalPopupMenu* m_webExternalPopupMenu; | 87 WebExternalPopupMenu* m_webExternalPopupMenu; |
88 | |
89 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneItemsTest, PopupMenuInf oSizeTest); | |
90 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneItemsTest, IndexMapping Test); | |
87 }; | 91 }; |
88 | 92 |
89 } // namespace blink | 93 } // namespace blink |
90 | 94 |
91 #endif // ExternalPopupMenu_h | 95 #endif // ExternalPopupMenu_h |
OLD | NEW |