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

Side by Side Diff: sky/engine/web/ChromeClientImpl.cpp

Issue 873963003: Remove more mouse-specific code (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Build fixes Created 5 years, 11 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 | « sky/engine/web/ChromeClientImpl.h ('k') | sky/engine/web/WebViewImpl.h » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 WebScreenInfo ChromeClientImpl::screenInfo() const 239 WebScreenInfo ChromeClientImpl::screenInfo() const
240 { 240 {
241 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn fo(); 241 return m_webView->client() ? m_webView->client()->screenInfo() : WebScreenIn fo();
242 } 242 }
243 243
244 void ChromeClientImpl::layoutUpdated(LocalFrame* frame) const 244 void ChromeClientImpl::layoutUpdated(LocalFrame* frame) const
245 { 245 {
246 m_webView->layoutUpdated(WebLocalFrameImpl::fromFrame(frame)); 246 m_webView->layoutUpdated(WebLocalFrameImpl::fromFrame(frame));
247 } 247 }
248 248
249 void ChromeClientImpl::mouseDidMoveOverElement(
250 const HitTestResult& result, unsigned modifierFlags)
251 {
252 if (!m_webView->client())
253 return;
254
255 WebURL url;
256 // Find out if the mouse is over a link, and if so, let our UI know...
257 if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty())
258 url = result.absoluteLinkURL();
259
260 m_webView->client()->setMouseOverURL(url);
261 }
262
263 void ChromeClientImpl::setCursor(const Cursor& cursor) 249 void ChromeClientImpl::setCursor(const Cursor& cursor)
264 { 250 {
265 setCursor(WebCursorInfo(cursor)); 251 setCursor(WebCursorInfo(cursor));
266 } 252 }
267 253
268 void ChromeClientImpl::setCursor(const WebCursorInfo& cursor) 254 void ChromeClientImpl::setCursor(const WebCursorInfo& cursor)
269 { 255 {
270 if (m_webView->client()) 256 if (m_webView->client())
271 m_webView->client()->didChangeCursor(cursor); 257 m_webView->client()->didChangeCursor(cursor);
272 } 258 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // This is only called when we have out-of-process iframes, which 298 // This is only called when we have out-of-process iframes, which
313 // need to forward input events across processes. 299 // need to forward input events across processes.
314 // FIXME: Add a check for out-of-process iframes enabled. 300 // FIXME: Add a check for out-of-process iframes enabled.
315 if (event->isKeyboardEvent()) { 301 if (event->isKeyboardEvent()) {
316 WebKeyboardEventBuilder webEvent(*static_cast<KeyboardEvent*>(event)); 302 WebKeyboardEventBuilder webEvent(*static_cast<KeyboardEvent*>(event));
317 webFrame->client()->forwardInputEvent(&webEvent); 303 webFrame->client()->forwardInputEvent(&webEvent);
318 } 304 }
319 } 305 }
320 306
321 } // namespace blink 307 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/ChromeClientImpl.h ('k') | sky/engine/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698