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

Side by Side Diff: webkit/glue/chrome_client_impl.cc

Issue 337032: Show status bubble for links that have keyboard focus.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « webkit/glue/chrome_client_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "AccessibilityObject.h" 7 #include "AccessibilityObject.h"
8 #include "AXObjectCache.h" 8 #include "AXObjectCache.h"
9 #include "CharacterNames.h" 9 #include "CharacterNames.h"
10 #include "Console.h" 10 #include "Console.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 void ChromeClientImpl::takeFocus(WebCore::FocusDirection direction) { 176 void ChromeClientImpl::takeFocus(WebCore::FocusDirection direction) {
177 if (!webview_->client()) 177 if (!webview_->client())
178 return; 178 return;
179 if (direction == WebCore::FocusDirectionBackward) { 179 if (direction == WebCore::FocusDirectionBackward) {
180 webview_->client()->focusPrevious(); 180 webview_->client()->focusPrevious();
181 } else { 181 } else {
182 webview_->client()->focusNext(); 182 webview_->client()->focusNext();
183 } 183 }
184 } 184 }
185 185
186 void ChromeClientImpl::focusedNodeChanged(WebCore::Node* node) {
187 WebURL focus_url;
188 if (node && node->isLink()) {
189 // This HitTestResult hack is the easiest way to get a link URL out of a
190 // WebCore::Node.
191 WebCore::HitTestResult hit_test(WebCore::IntPoint(0, 0));
192 // This cast must be valid because of the isLink() check.
193 hit_test.setURLElement(reinterpret_cast<WebCore::Element*>(node));
194 if (hit_test.isLiveLink())
195 focus_url = webkit_glue::KURLToWebURL(hit_test.absoluteLinkURL());
196 }
197 webview_->client()->setKeyboardFocusURL(focus_url);
198 }
199
186 WebCore::Page* ChromeClientImpl::createWindow( 200 WebCore::Page* ChromeClientImpl::createWindow(
187 WebCore::Frame* frame, const WebCore::FrameLoadRequest& r, 201 WebCore::Frame* frame, const WebCore::FrameLoadRequest& r,
188 const WebCore::WindowFeatures& features) { 202 const WebCore::WindowFeatures& features) {
189 if (!webview_->client()) 203 if (!webview_->client())
190 return NULL; 204 return NULL;
191 205
192 WebViewImpl* new_view = static_cast<WebViewImpl*>( 206 WebViewImpl* new_view = static_cast<WebViewImpl*>(
193 webview_->client()->createView(WebFrameImpl::FromFrame(frame))); 207 webview_->client()->createView(WebFrameImpl::FromFrame(frame)));
194 if (!new_view) 208 if (!new_view)
195 return NULL; 209 return NULL;
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 info->itemHeight = popup_container->menuItemHeight(); 637 info->itemHeight = popup_container->menuItemHeight();
624 info->selectedIndex = popup_container->selectedIndex(); 638 info->selectedIndex = popup_container->selectedIndex();
625 info->items.swap(output_items); 639 info->items.swap(output_items);
626 } 640 }
627 641
628 #if ENABLE(NOTIFICATIONS) 642 #if ENABLE(NOTIFICATIONS)
629 WebCore::NotificationPresenter* ChromeClientImpl::notificationPresenter() const { 643 WebCore::NotificationPresenter* ChromeClientImpl::notificationPresenter() const {
630 return webview_->GetNotificationPresenter(); 644 return webview_->GetNotificationPresenter();
631 } 645 }
632 #endif 646 #endif
OLDNEW
« no previous file with comments | « webkit/glue/chrome_client_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698