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

Unified Diff: chrome/browser/extensions/extension_popup_api.cc

Issue 5733002: Preventive fix for focus shifting behaviour in extension popup views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_popup_api.cc
===================================================================
--- chrome/browser/extensions/extension_popup_api.cc (revision 68649)
+++ chrome/browser/extensions/extension_popup_api.cc (working copy)
@@ -242,6 +242,12 @@
// If no view is to be focused, then Chrome was deactivated, so hide the
// popup.
if (focused_now) {
+ // On XP, the focus change handler may be invoked when the delegate has
+ // already been revoked.
+ // TODO(twiz@chromium.org): Resolve the trigger of this behaviour.
+ if (!dispatcher_ || !dispatcher_->delegate())
+ return;
+
gfx::NativeView host_view =
dispatcher_->delegate()->GetNativeViewOfHost();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698