| 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 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 } | 1388 } |
| 1389 | 1389 |
| 1390 TabHelper::FromWebContents(web_contents_)-> | 1390 TabHelper::FromWebContents(web_contents_)-> |
| 1391 script_executor()->ExecuteScript( | 1391 script_executor()->ExecuteScript( |
| 1392 extension_id(), | 1392 extension_id(), |
| 1393 ScriptExecutor::JAVASCRIPT, | 1393 ScriptExecutor::JAVASCRIPT, |
| 1394 url.path(), | 1394 url.path(), |
| 1395 ScriptExecutor::TOP_FRAME, | 1395 ScriptExecutor::TOP_FRAME, |
| 1396 UserScript::DOCUMENT_IDLE, | 1396 UserScript::DOCUMENT_IDLE, |
| 1397 ScriptExecutor::MAIN_WORLD, | 1397 ScriptExecutor::MAIN_WORLD, |
| 1398 false /* is_web_view */, | 1398 ScriptExecutor::DEFAULT_PROCESS, |
| 1399 ScriptExecutor::NO_RESULT, |
| 1399 base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this)); | 1400 base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this)); |
| 1400 | 1401 |
| 1401 *is_async = true; | 1402 *is_async = true; |
| 1402 return true; | 1403 return true; |
| 1403 } | 1404 } |
| 1404 | 1405 |
| 1405 web_contents_->GetController().LoadURL( | 1406 web_contents_->GetController().LoadURL( |
| 1406 url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); | 1407 url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); |
| 1407 | 1408 |
| 1408 // The URL of a tab contents never actually changes to a JavaScript URL, so | 1409 // The URL of a tab contents never actually changes to a JavaScript URL, so |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2039 execute_tab_id_ = tab_id; | 2040 execute_tab_id_ = tab_id; |
| 2040 details_ = details.Pass(); | 2041 details_ = details.Pass(); |
| 2041 return true; | 2042 return true; |
| 2042 } | 2043 } |
| 2043 | 2044 |
| 2044 bool TabsInsertCSSFunction::ShouldInsertCSS() const { | 2045 bool TabsInsertCSSFunction::ShouldInsertCSS() const { |
| 2045 return true; | 2046 return true; |
| 2046 } | 2047 } |
| 2047 | 2048 |
| 2048 } // namespace extensions | 2049 } // namespace extensions |
| OLD | NEW |