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

Issue 3156016: Making window.focus()/blur() work only when user initiated (Closed)

Created:
10 years, 4 months ago by Jay Civelli
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, darin-cc_chromium.org, ben+cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

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). 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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57094

Patch Set 1 #

Patch Set 2 : synces #

Patch Set 3 : More comments #

Patch Set 4 : Fix Linux compilation #

Patch Set 5 : Fix Linux compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -26 lines) Patch
M chrome/browser/blocked_popup_container.h View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/browser.h View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/browser.cc View 1 2 3 2 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/debugger/devtools_window.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/external_tab_container_win.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/external_tab_container_win.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sidebar/sidebar_container.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/tab_contents/match_preview.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_delegate.h View 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_delegate.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/views/app_launcher.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/views/tabs/dragged_tab_controller.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/views/tabs/dragged_tab_controller.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/render_view.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/renderer/render_widget.cc View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Jay Civelli
Darin, could you review the changes in: render_view.[h,cc] render_widget.cc Ben, could you look at the ...
10 years, 4 months ago (2010-08-16 22:07:52 UTC) #1
darin (slow to review)
LGTM for the render_* part
10 years, 4 months ago (2010-08-18 17:11:06 UTC) #2
Jay Civelli
Scott, Would you mind reviewing this as Ben is in vacations? (everything but the render_* ...
10 years, 4 months ago (2010-08-19 18:01:12 UTC) #3
sky
10 years, 4 months ago (2010-08-19 18:20:55 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld 408576698