OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 void* webView() const override { return m_popup->m_webView; } | 151 void* webView() const override { return m_popup->m_webView; } |
152 | 152 |
153 IntSize minimumWindowSize() const override { return IntSize(0, 0); } | 153 IntSize minimumWindowSize() const override { return IntSize(0, 0); } |
154 | 154 |
155 void setCursor(const Cursor& cursor, LocalFrame* localFrame) override { | 155 void setCursor(const Cursor& cursor, LocalFrame* localFrame) override { |
156 m_popup->m_widgetClient->didChangeCursor(WebCursorInfo(cursor)); | 156 m_popup->m_widgetClient->didChangeCursor(WebCursorInfo(cursor)); |
157 } | 157 } |
158 | 158 |
159 void setEventListenerProperties( | 159 void setEventListenerProperties( |
| 160 LocalFrame*, |
160 WebEventListenerClass eventClass, | 161 WebEventListenerClass eventClass, |
161 WebEventListenerProperties properties) override { | 162 WebEventListenerProperties properties) override { |
162 if (m_popup->m_layerTreeView) { | 163 if (m_popup->m_layerTreeView) { |
163 m_popup->m_layerTreeView->setEventListenerProperties(eventClass, | 164 m_popup->m_layerTreeView->setEventListenerProperties(eventClass, |
164 properties); | 165 properties); |
165 if (eventClass == WebEventListenerClass::TouchStartOrMove) { | 166 if (eventClass == WebEventListenerClass::TouchStartOrMove) { |
166 m_popup->widgetClient()->hasTouchEventHandlers( | 167 m_popup->widgetClient()->hasTouchEventHandlers( |
167 properties != WebEventListenerProperties::Nothing || | 168 properties != WebEventListenerProperties::Nothing || |
168 eventListenerProperties(WebEventListenerClass::TouchEndOrCancel) != | 169 eventListenerProperties(nullptr, |
| 170 WebEventListenerClass::TouchEndOrCancel) != |
169 WebEventListenerProperties::Nothing); | 171 WebEventListenerProperties::Nothing); |
170 } else if (eventClass == WebEventListenerClass::TouchEndOrCancel) { | 172 } else if (eventClass == WebEventListenerClass::TouchEndOrCancel) { |
171 m_popup->widgetClient()->hasTouchEventHandlers( | 173 m_popup->widgetClient()->hasTouchEventHandlers( |
172 properties != WebEventListenerProperties::Nothing || | 174 properties != WebEventListenerProperties::Nothing || |
173 eventListenerProperties(WebEventListenerClass::TouchStartOrMove) != | 175 eventListenerProperties(nullptr, |
| 176 WebEventListenerClass::TouchStartOrMove) != |
174 WebEventListenerProperties::Nothing); | 177 WebEventListenerProperties::Nothing); |
175 } | 178 } |
176 } else { | 179 } else { |
177 m_popup->widgetClient()->hasTouchEventHandlers(true); | 180 m_popup->widgetClient()->hasTouchEventHandlers(true); |
178 } | 181 } |
179 } | 182 } |
180 WebEventListenerProperties eventListenerProperties( | 183 WebEventListenerProperties eventListenerProperties( |
| 184 LocalFrame*, |
181 WebEventListenerClass eventClass) const override { | 185 WebEventListenerClass eventClass) const override { |
182 if (m_popup->m_layerTreeView) | 186 if (m_popup->m_layerTreeView) |
183 return m_popup->m_layerTreeView->eventListenerProperties(eventClass); | 187 return m_popup->m_layerTreeView->eventListenerProperties(eventClass); |
184 return WebEventListenerProperties::Nothing; | 188 return WebEventListenerProperties::Nothing; |
185 } | 189 } |
186 | 190 |
187 void setHasScrollEventHandlers(bool hasEventHandlers) override { | 191 void setHasScrollEventHandlers(bool hasEventHandlers) override { |
188 if (m_popup->m_layerTreeView) | 192 if (m_popup->m_layerTreeView) |
189 m_popup->m_layerTreeView->setHaveScrollEventHandlers(hasEventHandlers); | 193 m_popup->m_layerTreeView->setHaveScrollEventHandlers(hasEventHandlers); |
190 } | 194 } |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 // A WebPagePopupImpl instance usually has two references. | 586 // A WebPagePopupImpl instance usually has two references. |
583 // - One owned by the instance itself. It represents the visible widget. | 587 // - One owned by the instance itself. It represents the visible widget. |
584 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 588 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
585 // WebPagePopupImpl to close. | 589 // WebPagePopupImpl to close. |
586 // We need them because the closing operation is asynchronous and the widget | 590 // We need them because the closing operation is asynchronous and the widget |
587 // can be closed while the WebViewImpl is unaware of it. | 591 // can be closed while the WebViewImpl is unaware of it. |
588 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 592 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
589 } | 593 } |
590 | 594 |
591 } // namespace blink | 595 } // namespace blink |
OLD | NEW |