| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h" | 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 #include <limits> | 8 #include <limits> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1381     } | 1381     } | 
| 1382 | 1382 | 
| 1383     extensions::TabHelper::FromWebContents(web_contents_)-> | 1383     extensions::TabHelper::FromWebContents(web_contents_)-> | 
| 1384         script_executor()->ExecuteScript( | 1384         script_executor()->ExecuteScript( | 
| 1385             extension_id(), | 1385             extension_id(), | 
| 1386             ScriptExecutor::JAVASCRIPT, | 1386             ScriptExecutor::JAVASCRIPT, | 
| 1387             url.path(), | 1387             url.path(), | 
| 1388             ScriptExecutor::TOP_FRAME, | 1388             ScriptExecutor::TOP_FRAME, | 
| 1389             extensions::UserScript::DOCUMENT_IDLE, | 1389             extensions::UserScript::DOCUMENT_IDLE, | 
| 1390             ScriptExecutor::MAIN_WORLD, | 1390             ScriptExecutor::MAIN_WORLD, | 
|  | 1391             false /* is_web_view */, | 
| 1391             base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this)); | 1392             base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this)); | 
| 1392 | 1393 | 
| 1393     *is_async = true; | 1394     *is_async = true; | 
| 1394     return true; | 1395     return true; | 
| 1395   } | 1396   } | 
| 1396 | 1397 | 
| 1397   web_contents_->GetController().LoadURL( | 1398   web_contents_->GetController().LoadURL( | 
| 1398       url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); | 1399       url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); | 
| 1399 | 1400 | 
| 1400   // The URL of a tab contents never actually changes to a JavaScript URL, so | 1401   // The URL of a tab contents never actually changes to a JavaScript URL, so | 
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2124   CHECK_NE(UserScript::UNDEFINED, run_at); | 2125   CHECK_NE(UserScript::UNDEFINED, run_at); | 
| 2125 | 2126 | 
| 2126   extensions::TabHelper::FromWebContents(contents)-> | 2127   extensions::TabHelper::FromWebContents(contents)-> | 
| 2127       script_executor()->ExecuteScript( | 2128       script_executor()->ExecuteScript( | 
| 2128           extension->id(), | 2129           extension->id(), | 
| 2129           script_type, | 2130           script_type, | 
| 2130           code_string, | 2131           code_string, | 
| 2131           frame_scope, | 2132           frame_scope, | 
| 2132           run_at, | 2133           run_at, | 
| 2133           ScriptExecutor::ISOLATED_WORLD, | 2134           ScriptExecutor::ISOLATED_WORLD, | 
|  | 2135           false /* is_web_view */, | 
| 2134           base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this)); | 2136           base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this)); | 
| 2135   return true; | 2137   return true; | 
| 2136 } | 2138 } | 
| OLD | NEW | 
|---|