Commit 41a2ffa0 authored by gdk@chromium.org's avatar gdk@chromium.org

Fixing cross-incognito dispatch of onFocusChanged event.

BUG=141474
TEST=manual

Review URL: https://chromiumcodereview.appspot.com/10829263

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151083 0039d316-1c4b-4281-b951-d872f2087c98
parent 7fcd129a
...@@ -139,11 +139,12 @@ void WindowEventRouter::OnActiveWindowChanged( ...@@ -139,11 +139,12 @@ void WindowEventRouter::OnActiveWindowChanged(
// dispatch WINDOW_ID_NONE to extensions whose profile lost focus that // dispatch WINDOW_ID_NONE to extensions whose profile lost focus that
// can't see the new focused window across the incognito boundary. // can't see the new focused window across the incognito boundary.
// See crbug.com/46610. // See crbug.com/46610.
scoped_ptr<base::ListValue> none_args(new ListValue()); scoped_ptr<base::ListValue> none_args(NULL);
if (focused_profile_ != NULL && previous_focused_profile != NULL && if (focused_profile_ != NULL && previous_focused_profile != NULL &&
focused_profile_ != previous_focused_profile) { focused_profile_ != previous_focused_profile) {
none_args->Append( none_args.reset(new ListValue());
Value::CreateIntegerValue(extension_misc::kUnknownWindowId)); none_args->Append(Value::CreateIntegerValue(
extension_misc::kUnknownWindowId));
} }
// Note that we may pass a NULL |window_profile| for the |restrict_to_profile| // Note that we may pass a NULL |window_profile| for the |restrict_to_profile|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment