Remove extension Event::cross_incognito_args in favor of will_dispatch_callback.

Only one event (chrome.windows.onFocusChanged) was using it. This does result in a slight change in behavior. We'll now dispatch an additional onFocusChanged with window_id=-1 when switching focus from non-Chrome to incognito-inaccessible-Chrome. This doesn't seem that bad, especially given we were already sending an extra "focus lost" event when doing the inverse.

BUG=163246
TEST=Install "Tab Inspector" from the extension docs samples page. Open the tab inspector, and an incognito window. Ensure that focusing the incognito window sends a window.onFocusChanged event with windowId=-1.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172106 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/event_router.h b/chrome/browser/extensions/event_router.h
index eb30f78..9b8d4cd 100644
--- a/chrome/browser/extensions/event_router.h
+++ b/chrome/browser/extensions/event_router.h
@@ -194,8 +194,7 @@
   // the event crosses the incognito boundary.
   bool CanDispatchEventToProfile(Profile* profile,
                                  const Extension* extension,
-                                 const linked_ptr<Event>& event,
-                                 base::ListValue** event_args);
+                                 const linked_ptr<Event>& event);
 
   // Possibly loads given extension's background page in preparation to
   // dispatch an event.  Returns true if the event was queued for subsequent
@@ -243,16 +242,6 @@
   // Arguments to send to the event listener.
   scoped_ptr<base::ListValue> event_args;
 
-  // This is used in the case of sending one event to extensions that have
-  // incognito access, and another event to extensions that don't (here),
-  // in order to avoid sending 2 events to "spanning" extensions.
-  // If this is non-NULL, these arguments are used in place of event_args
-  // when an event is dispatched across incognito to an extension that can't
-  // cross incognito.
-  // TODO(mpcomplete): figure out a way to clean this up. It's only used in 1
-  // place.
-  scoped_ptr<base::ListValue> cross_incognito_args;
-
   // If non-NULL, then the event will not be sent to other profiles unless the
   // extension has permission (e.g. incognito tab update -> normal profile only
   // works if extension is allowed incognito access).
@@ -280,7 +269,6 @@
 
   Event(const std::string& event_name,
         scoped_ptr<base::ListValue> event_args,
-        scoped_ptr<base::ListValue> cross_incognito_args,
         Profile* restrict_to_profile,
         const GURL& event_url,
         EventRouter::UserGestureState user_gesture,