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

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: address reviewer's comments (matches->match) Created 6 years, 8 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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 &error_)) { 1365 &error_)) {
1366 return false; 1366 return false;
1367 } 1367 }
1368 1368
1369 TabHelper::FromWebContents(web_contents_)-> 1369 TabHelper::FromWebContents(web_contents_)->
1370 script_executor()->ExecuteScript( 1370 script_executor()->ExecuteScript(
1371 extension_id(), 1371 extension_id(),
1372 ScriptExecutor::JAVASCRIPT, 1372 ScriptExecutor::JAVASCRIPT,
1373 url.GetContent(), 1373 url.GetContent(),
1374 ScriptExecutor::TOP_FRAME, 1374 ScriptExecutor::TOP_FRAME,
1375 ScriptExecutor::MATCH_ABOUT_BLANK,
not at google - send to devlin 2014/04/21 22:34:41 for backwards compatibility this should be DONT_..
robwu 2014/04/21 23:21:46 Done.
1375 UserScript::DOCUMENT_IDLE, 1376 UserScript::DOCUMENT_IDLE,
1376 ScriptExecutor::MAIN_WORLD, 1377 ScriptExecutor::MAIN_WORLD,
1377 ScriptExecutor::DEFAULT_PROCESS, 1378 ScriptExecutor::DEFAULT_PROCESS,
1378 GURL(), 1379 GURL(),
1379 user_gesture_, 1380 user_gesture_,
1380 ScriptExecutor::NO_RESULT, 1381 ScriptExecutor::NO_RESULT,
1381 base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this)); 1382 base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this));
1382 1383
1383 *is_async = true; 1384 *is_async = true;
1384 return true; 1385 return true;
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 execute_tab_id_ = tab_id; 1912 execute_tab_id_ = tab_id;
1912 details_ = details.Pass(); 1913 details_ = details.Pass();
1913 return true; 1914 return true;
1914 } 1915 }
1915 1916
1916 bool TabsInsertCSSFunction::ShouldInsertCSS() const { 1917 bool TabsInsertCSSFunction::ShouldInsertCSS() const {
1917 return true; 1918 return true;
1918 } 1919 }
1919 1920
1920 } // namespace extensions 1921 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698