Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 22875046: Don't serialize extension user script injection results unless the extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sensible v8::Context-ness Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/execute_code_function.cc ('k') | chrome/browser/extensions/script_executor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698