Chromium Code Reviews| Index: Source/web/ChromeClientImpl.cpp |
| diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp |
| index 7f94b2dcb0b6ea8e2ed9b82f97cb8f0a9de1152a..fe48c71cd679596f0b828ede78b74241b5866929 100644 |
| --- a/Source/web/ChromeClientImpl.cpp |
| +++ b/Source/web/ChromeClientImpl.cpp |
| @@ -118,6 +118,7 @@ static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) |
| ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
| : m_webView(webView) |
| + , m_overrideCursor(nullptr) |
| { |
| } |
| @@ -660,7 +661,8 @@ Cursor ChromeClientImpl::lastSetCursorForTesting() const |
| void ChromeClientImpl::setCursor(const Cursor& cursor) |
| { |
| m_lastSetMouseCursorForTesting = cursor; |
| - setCursor(WebCursorInfo(cursor)); |
| + if (!m_overrideCursor) |
| + setCursor(WebCursorInfo(cursor)); |
| } |
| void ChromeClientImpl::setCursor(const WebCursorInfo& cursor) |
| @@ -680,6 +682,15 @@ void ChromeClientImpl::setCursorForPlugin(const WebCursorInfo& cursor) |
| setCursor(cursor); |
| } |
| +void ChromeClientImpl::setCursorOverride(PassOwnPtr<Cursor> cursor) |
| +{ |
| + m_overrideCursor = cursor; |
| + if (m_overrideCursor) |
|
pfeldman
2015/08/26 21:08:42
Why is this here? You should have stored exiting c
|
| + setCursor(WebCursorInfo(*m_overrideCursor.get())); |
| + else |
| + setCursor(WebCursorInfo(pointerCursor())); |
| +} |
| + |
| void ChromeClientImpl::postAccessibilityNotification(AXObject* obj, AXObjectCache::AXNotification notification) |
| { |
| // Alert assistive technology about the accessibility object notification. |