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

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

Issue 184103030: Plumb changes to the focused frame to WebFramelient. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix crash 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
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | public/web/WebFrameClient.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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // WebCore::Node. 206 // WebCore::Node.
207 HitTestResult hitTest(IntPoint(0, 0)); 207 HitTestResult hitTest(IntPoint(0, 0));
208 // This cast must be valid because of the isLink() check. 208 // This cast must be valid because of the isLink() check.
209 hitTest.setURLElement(toElement(node)); 209 hitTest.setURLElement(toElement(node));
210 if (hitTest.isLiveLink()) 210 if (hitTest.isLiveLink())
211 focusURL = hitTest.absoluteLinkURL(); 211 focusURL = hitTest.absoluteLinkURL();
212 } 212 }
213 m_webView->client()->setKeyboardFocusURL(focusURL); 213 m_webView->client()->setKeyboardFocusURL(focusURL);
214 } 214 }
215 215
216 void ChromeClientImpl::focusedFrameChanged(WebCore::LocalFrame* frame)
217 {
218 WebFrameImpl* webframe = WebFrameImpl::fromFrame(frame);
219 if (webframe && webframe->client())
220 webframe->client()->frameFocused();
221 }
222
216 Page* ChromeClientImpl::createWindow(LocalFrame* frame, const FrameLoadRequest& r, const WindowFeatures& features, 223 Page* ChromeClientImpl::createWindow(LocalFrame* frame, const FrameLoadRequest& r, const WindowFeatures& features,
217 NavigationPolicy navigationPolicy, ShouldSendReferrer shouldSendReferrer) 224 NavigationPolicy navigationPolicy, ShouldSendReferrer shouldSendReferrer)
218 { 225 {
219 if (!m_webView->client()) 226 if (!m_webView->client())
220 return 0; 227 return 0;
221 228
222 WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPoli cy); 229 WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPoli cy);
223 if (policy == WebNavigationPolicyIgnore) 230 if (policy == WebNavigationPolicyIgnore)
224 policy = getNavigationPolicy(); 231 policy = getNavigationPolicy();
225 232
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 { 948 {
942 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url)); 949 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url));
943 } 950 }
944 951
945 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const WebCore::KURL& baseURL, const WebCore::KURL& url) 952 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const WebCore::KURL& baseURL, const WebCore::KURL& url)
946 { 953 {
947 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url); 954 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url);
948 } 955 }
949 956
950 } // namespace blink 957 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698