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

Unified Diff: chrome/renderer/render_widget.cc

Issue 3060045: Making window.focus() work in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/test/test_browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_widget.cc
===================================================================
--- chrome/renderer/render_widget.cc (revision 55530)
+++ chrome/renderer/render_widget.cc (working copy)
@@ -628,13 +628,7 @@
}
void RenderWidget::didFocus() {
- // Prevent the widget from stealing the focus if it does not have focus
- // already. We do this by explicitely setting the focus to false again.
- // We only let the browser focus the renderer.
- if (!has_focus_ && webwidget_) {
- MessageLoop::current()->PostTask(FROM_HERE,
- NewRunnableMethod(this, &RenderWidget::ClearFocus));
- }
+ Send(new ViewHostMsg_Focus(routing_id_));
}
void RenderWidget::didBlur() {
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/test/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698