diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-23 23:58:12 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-23 23:58:12 +0000 |
commit | ea42e778f31ab38a5e0d7e172c90e9abc2fd1588 (patch) | |
tree | 62844f3402bf776da1a52e4145c3ed40ede95d03 /chrome/renderer/render_widget.cc | |
parent | 769e9080186fa376091519fcec8f2f01ea61ab14 (diff) | |
download | chromium_src-ea42e778f31ab38a5e0d7e172c90e9abc2fd1588.zip chromium_src-ea42e778f31ab38a5e0d7e172c90e9abc2fd1588.tar.gz chromium_src-ea42e778f31ab38a5e0d7e172c90e9abc2fd1588.tar.bz2 |
Relanding a previous CL (I fixed the ChromeOS build):
Making window.focus()/blur() work only when there is a user gesture.
Also making window.focus() select tab if it is not visible.
The RenderViewHost now calls ActivateContent and the new DeactivateContent (instead of using the recently added TabContentsDelegate::Activate/Deactivate methods which have been removed).
TBR=darin,sky
BUG=29643,52346
TEST=Create a page with buttons that call window.focus()/blur() directly and with a timeout. When called directly, the calls should succeed (the browser should be activated/deactivated). When called with a timeout, nothing should happen. Also test that a popup calling window.opener.focus() cause the opening tab to become selected when it is not the current tab.
Review URL: http://codereview.chromium.org/3174030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57124 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_widget.cc')
-rw-r--r-- | chrome/renderer/render_widget.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 7b14ccd..9111391 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -655,11 +655,9 @@ void RenderWidget::show(WebNavigationPolicy) { } void RenderWidget::didFocus() { - Send(new ViewHostMsg_Focus(routing_id_)); } void RenderWidget::didBlur() { - Send(new ViewHostMsg_Blur(routing_id_)); } void RenderWidget::DoDeferredClose() { |