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 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 NULL, | 1335 NULL, |
1336 process ? process->GetID() : -1, | 1336 process ? process->GetID() : -1, |
1337 &error_)) { | 1337 &error_)) { |
1338 return false; | 1338 return false; |
1339 } | 1339 } |
1340 | 1340 |
1341 TabHelper::FromWebContents(web_contents_)-> | 1341 TabHelper::FromWebContents(web_contents_)-> |
1342 script_executor()->ExecuteScript( | 1342 script_executor()->ExecuteScript( |
1343 extension_id(), | 1343 extension_id(), |
1344 ScriptExecutor::JAVASCRIPT, | 1344 ScriptExecutor::JAVASCRIPT, |
1345 url.path(), | 1345 url.GetContent(), |
1346 ScriptExecutor::TOP_FRAME, | 1346 ScriptExecutor::TOP_FRAME, |
1347 UserScript::DOCUMENT_IDLE, | 1347 UserScript::DOCUMENT_IDLE, |
1348 ScriptExecutor::MAIN_WORLD, | 1348 ScriptExecutor::MAIN_WORLD, |
1349 ScriptExecutor::DEFAULT_PROCESS, | 1349 ScriptExecutor::DEFAULT_PROCESS, |
1350 ScriptExecutor::NO_RESULT, | 1350 ScriptExecutor::NO_RESULT, |
1351 base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this)); | 1351 base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this)); |
1352 | 1352 |
1353 *is_async = true; | 1353 *is_async = true; |
1354 return true; | 1354 return true; |
1355 } | 1355 } |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1991 execute_tab_id_ = tab_id; | 1991 execute_tab_id_ = tab_id; |
1992 details_ = details.Pass(); | 1992 details_ = details.Pass(); |
1993 return true; | 1993 return true; |
1994 } | 1994 } |
1995 | 1995 |
1996 bool TabsInsertCSSFunction::ShouldInsertCSS() const { | 1996 bool TabsInsertCSSFunction::ShouldInsertCSS() const { |
1997 return true; | 1997 return true; |
1998 } | 1998 } |
1999 | 1999 |
2000 } // namespace extensions | 2000 } // namespace extensions |
OLD | NEW |