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

Side by Side Diff: third_party/WebKit/Source/web/WebPagePopupImpl.cpp

Issue 1650673002: Follow on to moving wheel_event_handlers to LayerTreeView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 needTouchEvents(bool needsTouchEvents) override
167 { 167 {
168 m_popup->widgetClient()->hasTouchEventHandlers(needsTouchEvents); 168 m_popup->widgetClient()->hasTouchEventHandlers(needsTouchEvents);
169 } 169 }
170 170
171 void setHaveWheelEventHandlers(bool haveEventHandlers) override
172 {
173 if (m_popup->m_layerTreeView)
174 return m_popup->m_layerTreeView->setHaveWheelEventHandlers(haveEvent Handlers);
175 }
176
177 bool haveWheelEventHandlers() const override
178 {
179 if (m_popup->m_layerTreeView)
180 return m_popup->m_layerTreeView->haveWheelEventHandlers();
181 return false;
182 }
183
184 void setTouchAction(TouchAction touchAction) override
185 {
186 if (WebViewClient* client = m_popup->m_webView->client())
187 client->setTouchAction(static_cast<WebTouchAction>(touchAction));
188 }
189
171 GraphicsLayerFactory* graphicsLayerFactory() const override 190 GraphicsLayerFactory* graphicsLayerFactory() const override
172 { 191 {
173 return m_popup->m_webView->graphicsLayerFactory(); 192 return m_popup->m_webView->graphicsLayerFactory();
174 } 193 }
175 194
176 void attachRootGraphicsLayer(GraphicsLayer* graphicsLayer, LocalFrame* local Root) override 195 void attachRootGraphicsLayer(GraphicsLayer* graphicsLayer, LocalFrame* local Root) override
177 { 196 {
178 m_popup->setRootGraphicsLayer(graphicsLayer); 197 m_popup->setRootGraphicsLayer(graphicsLayer);
179 } 198 }
180 199
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 // A WebPagePopupImpl instance usually has two references. 558 // A WebPagePopupImpl instance usually has two references.
540 // - One owned by the instance itself. It represents the visible widget. 559 // - One owned by the instance itself. It represents the visible widget.
541 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 560 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
542 // WebPagePopupImpl to close. 561 // WebPagePopupImpl to close.
543 // We need them because the closing operation is asynchronous and the widget 562 // We need them because the closing operation is asynchronous and the widget
544 // can be closed while the WebViewImpl is unaware of it. 563 // can be closed while the WebViewImpl is unaware of it.
545 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 564 return adoptRef(new WebPagePopupImpl(client)).leakRef();
546 } 565 }
547 566
548 } // namespace blink 567 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698