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

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

Issue 226663003: Allow content script insertion on about:-URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move GetEffectiveDocumentURL to ScriptContext Created 6 years, 7 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
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 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 process ? process->GetID() : -1, 1184 process ? process->GetID() : -1,
1185 &error_)) { 1185 &error_)) {
1186 return false; 1186 return false;
1187 } 1187 }
1188 1188
1189 TabHelper::FromWebContents(web_contents_)->script_executor()->ExecuteScript( 1189 TabHelper::FromWebContents(web_contents_)->script_executor()->ExecuteScript(
1190 extension_id(), 1190 extension_id(),
1191 ScriptExecutor::JAVASCRIPT, 1191 ScriptExecutor::JAVASCRIPT,
1192 url.GetContent(), 1192 url.GetContent(),
1193 ScriptExecutor::TOP_FRAME, 1193 ScriptExecutor::TOP_FRAME,
1194 ScriptExecutor::DONT_MATCH_ABOUT_BLANK,
1194 UserScript::DOCUMENT_IDLE, 1195 UserScript::DOCUMENT_IDLE,
1195 ScriptExecutor::MAIN_WORLD, 1196 ScriptExecutor::MAIN_WORLD,
1196 ScriptExecutor::DEFAULT_PROCESS, 1197 ScriptExecutor::DEFAULT_PROCESS,
1197 GURL(), 1198 GURL(),
1198 GURL(), 1199 GURL(),
1199 user_gesture_, 1200 user_gesture_,
1200 ScriptExecutor::NO_RESULT, 1201 ScriptExecutor::NO_RESULT,
1201 base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this)); 1202 base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this));
1202 1203
1203 *is_async = true; 1204 *is_async = true;
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 execute_tab_id_ = tab_id; 1736 execute_tab_id_ = tab_id;
1736 details_ = details.Pass(); 1737 details_ = details.Pass();
1737 return true; 1738 return true;
1738 } 1739 }
1739 1740
1740 bool TabsInsertCSSFunction::ShouldInsertCSS() const { 1741 bool TabsInsertCSSFunction::ShouldInsertCSS() const {
1741 return true; 1742 return true;
1742 } 1743 }
1743 1744
1744 } // namespace extensions 1745 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/execute_code_function.cc ('k') | chrome/browser/extensions/content_script_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698