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

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 shadowHost() 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') | public/platform/WebPrivatePtr.h » ('J')
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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 536 }
537 537
538 void ChromeClientImpl::mouseDidMoveOverElement( 538 void ChromeClientImpl::mouseDidMoveOverElement(
539 const HitTestResult& result, unsigned modifierFlags) 539 const HitTestResult& result, unsigned modifierFlags)
540 { 540 {
541 if (!m_webView->client()) 541 if (!m_webView->client())
542 return; 542 return;
543 543
544 WebURL url; 544 WebURL url;
545 // Find out if the mouse is over a link, and if so, let our UI know... 545 // Find out if the mouse is over a link, and if so, let our UI know...
546 if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty()) 546 if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty()) {
547 url = result.absoluteLinkURL(); 547 url = result.absoluteLinkURL();
548 else if (result.innerNonSharedNode() 548 } else if (result.innerNonSharedNode()
549 && (result.innerNonSharedNode()->hasTagName(HTMLNames::objectTag) 549 && (isHTMLObjectElement(*result.innerNonSharedNode())
550 || result.innerNonSharedNode()->hasTagName(HTMLNames::embedTag) )) { 550 || isHTMLEmbedElement(*result.innerNonSharedNode()))) {
551 RenderObject* object = result.innerNonSharedNode()->renderer(); 551 RenderObject* object = result.innerNonSharedNode()->renderer();
552 if (object && object->isWidget()) { 552 if (object && object->isWidget()) {
553 Widget* widget = toRenderWidget(object)->widget(); 553 Widget* widget = toRenderWidget(object)->widget();
554 if (widget && widget->isPluginContainer()) { 554 if (widget && widget->isPluginContainer()) {
555 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget ); 555 WebPluginContainerImpl* plugin = toWebPluginContainerImpl(widget );
556 url = plugin->plugin()->linkAtPosition(result.roundedPointInInne rNodeFrame()); 556 url = plugin->plugin()->linkAtPosition(result.roundedPointInInne rNodeFrame());
557 } 557 }
558 } 558 }
559 } 559 }
560 560
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 { 957 {
958 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url)); 958 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url));
959 } 959 }
960 960
961 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const WebCore::KURL& baseURL, const WebCore::KURL& url) 961 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const WebCore::KURL& baseURL, const WebCore::KURL& url)
962 { 962 {
963 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url); 963 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url);
964 } 964 }
965 965
966 } // namespace blink 966 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/web/ContextMenuClientImpl.cpp » ('j') | public/platform/WebPrivatePtr.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698