| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 { | 156 { |
| 157 return IntSize(0, 0); | 157 return IntSize(0, 0); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void setCursor(const Cursor& cursor, LocalFrame* localRoot) override | 160 void setCursor(const Cursor& cursor, LocalFrame* localRoot) override |
| 161 { | 161 { |
| 162 if (m_popup->m_webView->client()) | 162 if (m_popup->m_webView->client()) |
| 163 m_popup->m_webView->client()->didChangeCursor(WebCursorInfo(cursor))
; | 163 m_popup->m_webView->client()->didChangeCursor(WebCursorInfo(cursor))
; |
| 164 } | 164 } |
| 165 | 165 |
| 166 void needTouchEvents(bool needsTouchEvents) override | 166 void setEventListenerProperties(WebEventListenerClass eventClass, WebEventLi
stenerProperties properties) override |
| 167 { | 167 { |
| 168 m_popup->widgetClient()->hasTouchEventHandlers(needsTouchEvents); | 168 if (eventClass == WebEventListenerClass::Touch) |
| 169 m_popup->widgetClient()->hasTouchEventHandlers(properties != WebEven
tListenerProperties::Nothing); |
| 170 if (m_popup->m_layerTreeView) |
| 171 m_popup->m_layerTreeView->setEventListenerProperties(eventClass, pro
perties); |
| 169 } | 172 } |
| 170 | 173 WebEventListenerProperties eventListenerProperties(WebEventListenerClass eve
ntClass) const override |
| 171 void setHaveWheelEventHandlers(bool haveEventHandlers) override | |
| 172 { | 174 { |
| 173 if (m_popup->m_layerTreeView) | 175 if (m_popup->m_layerTreeView) |
| 174 return m_popup->m_layerTreeView->setHaveWheelEventHandlers(haveEvent
Handlers); | 176 return m_popup->m_layerTreeView->eventListenerProperties(eventClass)
; |
| 175 } | 177 return WebEventListenerProperties::Nothing; |
| 176 | |
| 177 bool haveWheelEventHandlers() const override | |
| 178 { | |
| 179 if (m_popup->m_layerTreeView) | |
| 180 return m_popup->m_layerTreeView->haveWheelEventHandlers(); | |
| 181 return false; | |
| 182 } | 178 } |
| 183 | 179 |
| 184 void setHaveScrollEventHandlers(bool hasEventHandlers) override | 180 void setHaveScrollEventHandlers(bool hasEventHandlers) override |
| 185 { | 181 { |
| 186 if (m_popup->m_layerTreeView) | 182 if (m_popup->m_layerTreeView) |
| 187 m_popup->m_layerTreeView->setHaveScrollEventHandlers(hasEventHandler
s); | 183 m_popup->m_layerTreeView->setHaveScrollEventHandlers(hasEventHandler
s); |
| 188 } | 184 } |
| 189 | 185 |
| 190 bool haveScrollEventHandlers() const override | 186 bool haveScrollEventHandlers() const override |
| 191 { | 187 { |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 // A WebPagePopupImpl instance usually has two references. | 567 // A WebPagePopupImpl instance usually has two references. |
| 572 // - One owned by the instance itself. It represents the visible widget. | 568 // - One owned by the instance itself. It represents the visible widget. |
| 573 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 569 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 574 // WebPagePopupImpl to close. | 570 // WebPagePopupImpl to close. |
| 575 // We need them because the closing operation is asynchronous and the widget | 571 // We need them because the closing operation is asynchronous and the widget |
| 576 // can be closed while the WebViewImpl is unaware of it. | 572 // can be closed while the WebViewImpl is unaware of it. |
| 577 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 573 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 578 } | 574 } |
| 579 | 575 |
| 580 } // namespace blink | 576 } // namespace blink |
| OLD | NEW |