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

Side by Side Diff: Source/web/PopupMenuChromium.cpp

Issue 26444008: Remove several Page.h includes in preparation for removing page/ dependencies from the rest of core (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 17 matching lines...) Expand all
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #include "config.h" 32 #include "config.h"
33 #include "PopupMenuChromium.h" 33 #include "PopupMenuChromium.h"
34 34
35 #include "PopupContainer.h" 35 #include "PopupContainer.h"
36 #include "core/page/Frame.h" 36 #include "core/page/Frame.h"
37 #include "core/page/FrameView.h" 37 #include "core/page/FrameView.h"
38 #include "core/page/Page.h"
39 #include "core/page/Settings.h" 38 #include "core/page/Settings.h"
40 39
41 namespace WebCore { 40 namespace WebCore {
42 41
43 int PopupMenuChromium::s_minimumRowHeight = 0; 42 int PopupMenuChromium::s_minimumRowHeight = 0;
44 int PopupMenuChromium::s_optionRowHeightForTouch = 28; 43 int PopupMenuChromium::s_optionRowHeightForTouch = 28;
45 44
46 // The settings used for the drop down menu. 45 // The settings used for the drop down menu.
47 // This is the delegate used if none is provided. 46 // This is the delegate used if none is provided.
48 static const PopupContainerSettings dropDownSettings = { 47 static const PopupContainerSettings dropDownSettings = {
(...skipping 15 matching lines...) Expand all
64 // deleted. 63 // deleted.
65 if (m_popup) 64 if (m_popup)
66 m_popup->listBox()->disconnectClient(); 65 m_popup->listBox()->disconnectClient();
67 hide(); 66 hide();
68 } 67 }
69 68
70 void PopupMenuChromium::show(const FloatQuad& controlPosition, const IntSize& co ntrolSize, int index) 69 void PopupMenuChromium::show(const FloatQuad& controlPosition, const IntSize& co ntrolSize, int index)
71 { 70 {
72 if (!m_popup) { 71 if (!m_popup) {
73 PopupContainerSettings popupSettings = dropDownSettings; 72 PopupContainerSettings popupSettings = dropDownSettings;
74 popupSettings.deviceSupportsTouch = m_frameView->frame().page()->setting s().deviceSupportsTouch(); 73 popupSettings.deviceSupportsTouch = m_frameView->frame().settings()->dev iceSupportsTouch();
75 m_popup = PopupContainer::create(client(), PopupContainer::Select, popup Settings); 74 m_popup = PopupContainer::create(client(), PopupContainer::Select, popup Settings);
76 } 75 }
77 m_popup->showInRect(controlPosition, controlSize, m_frameView.get(), index); 76 m_popup->showInRect(controlPosition, controlSize, m_frameView.get(), index);
78 } 77 }
79 78
80 void PopupMenuChromium::hide() 79 void PopupMenuChromium::hide()
81 { 80 {
82 if (m_popup) 81 if (m_popup)
83 m_popup->hide(); 82 m_popup->hide();
84 } 83 }
85 84
86 void PopupMenuChromium::updateFromElement() 85 void PopupMenuChromium::updateFromElement()
87 { 86 {
88 m_popup->listBox()->updateFromElement(); 87 m_popup->listBox()->updateFromElement();
89 } 88 }
90 89
91 90
92 void PopupMenuChromium::disconnectClient() 91 void PopupMenuChromium::disconnectClient()
93 { 92 {
94 m_popupClient = 0; 93 m_popupClient = 0;
95 } 94 }
96 95
97 } // namespace WebCore 96 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698