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

Side by Side Diff: chrome/renderer/render_view.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 | « chrome/renderer/render_view.h ('k') | webkit/api/public/WebViewClient.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 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 } 1605 }
1606 1606
1607 void RenderView::showContextMenu( 1607 void RenderView::showContextMenu(
1608 WebFrame* frame, const WebContextMenuData& data) { 1608 WebFrame* frame, const WebContextMenuData& data) {
1609 Send(new ViewHostMsg_ContextMenu(routing_id_, ContextMenuParams(data))); 1609 Send(new ViewHostMsg_ContextMenu(routing_id_, ContextMenuParams(data)));
1610 } 1610 }
1611 1611
1612 void RenderView::setStatusText(const WebString& text) { 1612 void RenderView::setStatusText(const WebString& text) {
1613 } 1613 }
1614 1614
1615 void RenderView::setMouseOverURL(const WebURL& url) { 1615 void RenderView::UpdateTargetURL(const GURL& url, const GURL& fallback_url) {
1616 GURL latest_url(url); 1616 GURL latest_url = url.spec().empty() ? fallback_url : url;
1617 if (latest_url == target_url_) 1617 if (latest_url == target_url_)
1618 return; 1618 return;
1619
1619 // Tell the browser to display a destination link. 1620 // Tell the browser to display a destination link.
1620 if (target_url_status_ == TARGET_INFLIGHT || 1621 if (target_url_status_ == TARGET_INFLIGHT ||
1621 target_url_status_ == TARGET_PENDING) { 1622 target_url_status_ == TARGET_PENDING) {
1622 // If we have a request in-flight, save the URL to be sent when we 1623 // If we have a request in-flight, save the URL to be sent when we
1623 // receive an ACK to the in-flight request. We can happily overwrite 1624 // receive an ACK to the in-flight request. We can happily overwrite
1624 // any existing pending sends. 1625 // any existing pending sends.
1625 pending_target_url_ = latest_url; 1626 pending_target_url_ = latest_url;
1626 target_url_status_ = TARGET_PENDING; 1627 target_url_status_ = TARGET_PENDING;
1627 } else { 1628 } else {
1628 Send(new ViewHostMsg_UpdateTargetURL(routing_id_, page_id_, latest_url)); 1629 Send(new ViewHostMsg_UpdateTargetURL(routing_id_, page_id_, latest_url));
1629 target_url_ = latest_url; 1630 target_url_ = latest_url;
1630 target_url_status_ = TARGET_INFLIGHT; 1631 target_url_status_ = TARGET_INFLIGHT;
1631 } 1632 }
1632 } 1633 }
1633 1634
1635 void RenderView::setMouseOverURL(const WebURL& url) {
1636 mouse_over_url_ = GURL(url);
1637 UpdateTargetURL(mouse_over_url_, focus_url_);
1638 }
1639
1640 void RenderView::setKeyboardFocusURL(const WebURL& url) {
1641 focus_url_ = GURL(url);
1642 UpdateTargetURL(focus_url_, mouse_over_url_);
1643 }
1644
1634 void RenderView::setToolTipText(const WebString& text, WebTextDirection hint) { 1645 void RenderView::setToolTipText(const WebString& text, WebTextDirection hint) {
1635 Send(new ViewHostMsg_SetTooltipText(routing_id_, UTF16ToWideHack(text), 1646 Send(new ViewHostMsg_SetTooltipText(routing_id_, UTF16ToWideHack(text),
1636 hint)); 1647 hint));
1637 } 1648 }
1638 1649
1639 void RenderView::startDragging(const WebPoint& from, const WebDragData& data, 1650 void RenderView::startDragging(const WebPoint& from, const WebDragData& data,
1640 WebDragOperationsMask allowed_ops) { 1651 WebDragOperationsMask allowed_ops) {
1641 Send(new ViewHostMsg_StartDragging(routing_id_, 1652 Send(new ViewHostMsg_StartDragging(routing_id_,
1642 WebDropData(data), 1653 WebDropData(data),
1643 allowed_ops)); 1654 allowed_ops));
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after
3682 new PluginMsg_SignalModalDialogEvent(host_window_)); 3693 new PluginMsg_SignalModalDialogEvent(host_window_));
3683 3694
3684 message->EnableMessagePumping(); // Runs a nested message loop. 3695 message->EnableMessagePumping(); // Runs a nested message loop.
3685 bool rv = Send(message); 3696 bool rv = Send(message);
3686 3697
3687 PluginChannelHost::Broadcast( 3698 PluginChannelHost::Broadcast(
3688 new PluginMsg_ResetModalDialogEvent(host_window_)); 3699 new PluginMsg_ResetModalDialogEvent(host_window_));
3689 3700
3690 return rv; 3701 return rv;
3691 } 3702 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/api/public/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698