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

Side by Side Diff: Source/web/ChromeClientImpl.cpp

Issue 200723002: Use new is*Element() helper functions more in web/ code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use same assertion as in operator->() Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/ContextMenuClientImpl.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) 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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 } 547 }
548 548
549 void ChromeClientImpl::mouseDidMoveOverElement( 549 void ChromeClientImpl::mouseDidMoveOverElement(
550 const HitTestResult& result, unsigned modifierFlags) 550 const HitTestResult& result, unsigned modifierFlags)
551 { 551 {
552 if (!m_webView->client()) 552 if (!m_webView->client())
553 return; 553 return;
554 554
555 WebURL url; 555 WebURL url;
556 // Find out if the mouse is over a link, and if so, let our UI know... 556 // Find out if the mouse is over a link, and if so, let our UI know...
557 if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty()) 557 if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty()) {
558 url = result.absoluteLinkURL(); 558 url = result.absoluteLinkURL();
559 else if (result.innerNonSharedNode() 559 } else if (result.innerNonSharedNode()
560 && (result.innerNonSharedNode()->hasTagName(HTMLNames::objectTag) 560 && (isHTMLObjectElement(*result.innerNonSharedNode())
561 || result.innerNonSharedNode()->hasTagName(HTMLNames::embedTag) )) { 561 || isHTMLEmbedElement(*result.innerNonSharedNode()))) {
562 RenderObject* object = result.innerNonSharedNode()->renderer(); 562 RenderObject* object = result.innerNonSharedNode()->renderer();
563 if (object && object->isWidget()) { 563 if (object && object->isWidget()) {
564 Widget* widget = toRenderWidget(object)->widget(); 564 Widget* widget = toRenderWidget(object)->widget();
565 if (widget && widget->isPluginContainer()) { 565 if (widget && widget->isPluginContainer()) {
566 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget ); 566 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget );
567 url = plugin->plugin()->linkAtPosition(result.roundedPointInInne rNodeFrame()); 567 url = plugin->plugin()->linkAtPosition(result.roundedPointInInne rNodeFrame());
568 } 568 }
569 } 569 }
570 } 570 }
571 571
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 { 968 {
969 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url)); 969 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url));
970 } 970 }
971 971
972 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const WebCore::KURL& baseURL, const WebCore::KURL& url) 972 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const WebCore::KURL& baseURL, const WebCore::KURL& url)
973 { 973 {
974 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url); 974 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url);
975 } 975 }
976 976
977 } // namespace blink 977 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/web/ContextMenuClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698