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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 void* webView() const override | 153 void* webView() const override |
154 { | 154 { |
155 return m_popup->m_webView; | 155 return m_popup->m_webView; |
156 } | 156 } |
157 | 157 |
158 IntSize minimumWindowSize() const override | 158 IntSize minimumWindowSize() const override |
159 { | 159 { |
160 return IntSize(0, 0); | 160 return IntSize(0, 0); |
161 } | 161 } |
162 | 162 |
163 void setCursor(const Cursor& cursor, LocalFrame* localRoot) override | 163 void setCursor(const Cursor& cursor, LocalFrame* localFrame) override |
164 { | 164 { |
165 if (m_popup->m_webView->client()) | 165 m_popup->m_widgetClient->didChangeCursor(WebCursorInfo(cursor)); |
166 m_popup->m_webView->client()->didChangeCursor(WebCursorInfo(cursor))
; | |
167 } | 166 } |
168 | 167 |
169 void setEventListenerProperties(WebEventListenerClass eventClass, WebEventLi
stenerProperties properties) override | 168 void setEventListenerProperties(WebEventListenerClass eventClass, WebEventLi
stenerProperties properties) override |
170 { | 169 { |
171 if (m_popup->m_layerTreeView) { | 170 if (m_popup->m_layerTreeView) { |
172 m_popup->m_layerTreeView->setEventListenerProperties(eventClass, pro
perties); | 171 m_popup->m_layerTreeView->setEventListenerProperties(eventClass, pro
perties); |
173 if (eventClass == WebEventListenerClass::TouchStartOrMove) { | 172 if (eventClass == WebEventListenerClass::TouchStartOrMove) { |
174 m_popup->widgetClient()->hasTouchEventHandlers(properties != Web
EventListenerProperties::Nothing || eventListenerProperties(WebEventListenerClas
s::TouchEndOrCancel) != WebEventListenerProperties::Nothing); | 173 m_popup->widgetClient()->hasTouchEventHandlers(properties != Web
EventListenerProperties::Nothing || eventListenerProperties(WebEventListenerClas
s::TouchEndOrCancel) != WebEventListenerProperties::Nothing); |
175 } else if (eventClass == WebEventListenerClass::TouchEndOrCancel) { | 174 } else if (eventClass == WebEventListenerClass::TouchEndOrCancel) { |
176 m_popup->widgetClient()->hasTouchEventHandlers(properties != Web
EventListenerProperties::Nothing || eventListenerProperties(WebEventListenerClas
s::TouchStartOrMove) != WebEventListenerProperties::Nothing); | 175 m_popup->widgetClient()->hasTouchEventHandlers(properties != Web
EventListenerProperties::Nothing || eventListenerProperties(WebEventListenerClas
s::TouchStartOrMove) != WebEventListenerProperties::Nothing); |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 // A WebPagePopupImpl instance usually has two references. | 582 // A WebPagePopupImpl instance usually has two references. |
584 // - One owned by the instance itself. It represents the visible widget. | 583 // - One owned by the instance itself. It represents the visible widget. |
585 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 584 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
586 // WebPagePopupImpl to close. | 585 // WebPagePopupImpl to close. |
587 // We need them because the closing operation is asynchronous and the widget | 586 // We need them because the closing operation is asynchronous and the widget |
588 // can be closed while the WebViewImpl is unaware of it. | 587 // can be closed while the WebViewImpl is unaware of it. |
589 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 588 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
590 } | 589 } |
591 | 590 |
592 } // namespace blink | 591 } // namespace blink |
OLD | NEW |