| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 if (m_popup->m_layerTreeView) | 194 if (m_popup->m_layerTreeView) |
| 195 m_popup->m_layerTreeView->setHaveScrollEventHandlers(hasEventHandlers); | 195 m_popup->m_layerTreeView->setHaveScrollEventHandlers(hasEventHandlers); |
| 196 } | 196 } |
| 197 | 197 |
| 198 bool hasScrollEventHandlers() const override { | 198 bool hasScrollEventHandlers() const override { |
| 199 if (m_popup->m_layerTreeView) | 199 if (m_popup->m_layerTreeView) |
| 200 return m_popup->m_layerTreeView->haveScrollEventHandlers(); | 200 return m_popup->m_layerTreeView->haveScrollEventHandlers(); |
| 201 return false; | 201 return false; |
| 202 } | 202 } |
| 203 | 203 |
| 204 void setTouchAction(TouchAction touchAction) override { | 204 void setTouchAction(LocalFrame* frame, TouchAction touchAction) override { |
| 205 if (WebViewClient* client = m_popup->m_webView->client()) | 205 DCHECK(frame); |
| 206 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame); |
| 207 WebFrameWidgetBase* widget = webFrame->localRoot()->frameWidget(); |
| 208 if (!widget) |
| 209 return; |
| 210 |
| 211 if (WebWidgetClient* client = widget->client()) |
| 206 client->setTouchAction(static_cast<WebTouchAction>(touchAction)); | 212 client->setTouchAction(static_cast<WebTouchAction>(touchAction)); |
| 207 } | 213 } |
| 208 | 214 |
| 209 void attachRootGraphicsLayer(GraphicsLayer* graphicsLayer, | 215 void attachRootGraphicsLayer(GraphicsLayer* graphicsLayer, |
| 210 LocalFrame* localRoot) override { | 216 LocalFrame* localRoot) override { |
| 211 m_popup->setRootGraphicsLayer(graphicsLayer); | 217 m_popup->setRootGraphicsLayer(graphicsLayer); |
| 212 } | 218 } |
| 213 | 219 |
| 214 void postAccessibilityNotification( | 220 void postAccessibilityNotification( |
| 215 AXObject* obj, | 221 AXObject* obj, |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 // A WebPagePopupImpl instance usually has two references. | 598 // A WebPagePopupImpl instance usually has two references. |
| 593 // - One owned by the instance itself. It represents the visible widget. | 599 // - One owned by the instance itself. It represents the visible widget. |
| 594 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 600 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 595 // WebPagePopupImpl to close. | 601 // WebPagePopupImpl to close. |
| 596 // We need them because the closing operation is asynchronous and the widget | 602 // We need them because the closing operation is asynchronous and the widget |
| 597 // can be closed while the WebViewImpl is unaware of it. | 603 // can be closed while the WebViewImpl is unaware of it. |
| 598 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 604 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 599 } | 605 } |
| 600 | 606 |
| 601 } // namespace blink | 607 } // namespace blink |
| OLD | NEW |