src/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc
// Constructs and dispatches an onTabReplaced event.
Constructs and dispatches an onTabReplaced event.
Constructs and dispatches an onTabReplaced event .
void DispatchOnTabReplaced(
    content::WebContents* old_web_contents,
    content::BrowserContext* browser_context,
    content::WebContents* new_web_contents) {
  scoped_ptr<ListValue> args(new ListValue());
  DictionaryValue* dict = new DictionaryValue();
  dict->SetInteger(keys::kReplacedTabIdKey,
                   ExtensionTabUtil::GetTabId(old_web_contents));
  dict->SetInteger(keys::kTabIdKey,
                   ExtensionTabUtil::GetTabId(new_web_contents));
  dict->SetDouble(keys::kTimeStampKey, MilliSecondsFromTime(base::Time::Now()));
  args->Append(dict);
  DispatchEvent(browser_context, keys::kOnTabReplaced, args.Pass(), GURL());
}
void DispatchOnTabReplaced ( content :: WebContents * old_web_contents , content :: BrowserContext * browser_context , content :: WebContents * new_web_contents ) { scoped_ptr < ListValue > args ( new ListValue ( ) ) ; DictionaryValue * dict = new DictionaryValue ( ) ; dict -> SetInteger ( keys :: kReplacedTabIdKey , ExtensionTabUtil :: GetTabId ( old_web_contents ) ) ; dict -> SetInteger ( keys :: kTabIdKey , ExtensionTabUtil :: GetTabId ( new_web_contents ) ) ; dict -> SetDouble ( keys :: kTimeStampKey , MilliSecondsFromTime ( base :: Time :: Now ( ) ) ) ; args -> Append ( dict ) ; DispatchEvent ( browser_context , keys :: kOnTabReplaced , args . Pass ( ) , GURL ( ) ) ; }
Constructs and dispatches an onTabReplaced event.
Constructs and dispatches an onTabReplaced event .