|
Refactor renderer-side script injection.
Instead of having two script injection systems (UserScriptScheduler and
UserScriptSlave), we have a single system (ScriptInjectionManager).
Introduce abstract ScriptInjection class as an object which knows how to inject
itself and whether or not it is allowed, with two implementations
(UserScriptInjection and ProgrammaticScriptInjection).
Primary benefit:
Combine logic for script injections so that a) it's all in one place, b) when
we ask for permission, we can do so analogously.
Additional benefits:
- Reduce dependency of script injection on ExtensionHelper.
- Eliminate ScriptInjection dependency on UserScriptSlave (or
ScriptInjectionManager).
BUG= 382945
TBR=jschuh@chromium.org (name changes to extension_messages.h, no functional changes)
TBR=jochen@chromium.org (two-line change to chrome/renderer/chrome_content_renderer_client.cc)
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279183
Total comments: 7
Total comments: 13
Total comments: 8
Total comments: 6
Total comments: 18
Total comments: 12
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1544 lines, -1356 lines) |
Patch |
 |
M |
chrome/browser/extensions/active_script_controller.h
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/active_script_controller.cc
|
View
|
|
2 chunks |
+8 lines, -9 lines |
0 comments
|
Download
|
 |
M |
chrome/renderer/chrome_content_renderer_client.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/renderer/extensions/chrome_v8_context.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+0 lines, -11 lines |
0 comments
|
Download
|
 |
M |
extensions/common/extension_messages.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+5 lines, -6 lines |
0 comments
|
Download
|
 |
M |
extensions/extensions.gyp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+8 lines, -4 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/dispatcher.h
|
View
|
1
2
3
4
5
6
|
7 chunks |
+20 lines, -8 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/dispatcher.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
9 chunks |
+22 lines, -28 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/extension_helper.h
|
View
|
|
3 chunks |
+0 lines, -9 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/extension_helper.cc
|
View
|
1
2
3
4
|
9 chunks |
+0 lines, -92 lines |
0 comments
|
Download
|
 |
A |
extensions/renderer/programmatic_script_injection.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+60 lines, -0 lines |
0 comments
|
Download
|
 |
A |
extensions/renderer/programmatic_script_injection.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+217 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/resources/messaging.js
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/script_injection.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+54 lines, -87 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/script_injection.cc
|
View
|
1
2
3
4
|
2 chunks |
+52 lines, -314 lines |
0 comments
|
Download
|
 |
A |
extensions/renderer/script_injection_manager.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+103 lines, -0 lines |
0 comments
|
Download
|
 |
A |
extensions/renderer/script_injection_manager.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+351 lines, -0 lines |
0 comments
|
Download
|
 |
A |
extensions/renderer/user_script_injection.h
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+80 lines, -0 lines |
0 comments
|
Download
|
 |
A |
extensions/renderer/user_script_injection.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+239 lines, -0 lines |
0 comments
|
Download
|
 |
D |
extensions/renderer/user_script_scheduler.h
|
View
|
|
1 chunk |
+0 lines, -95 lines |
0 comments
|
Download
|
 |
D |
extensions/renderer/user_script_scheduler.cc
|
View
|
|
1 chunk |
+0 lines, -281 lines |
0 comments
|
Download
|
 |
A |
extensions/renderer/user_script_set.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+100 lines, -0 lines |
0 comments
|
Download
|
 |
A |
extensions/renderer/user_script_set.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+218 lines, -0 lines |
0 comments
|
Download
|
 |
D |
extensions/renderer/user_script_slave.h
|
View
|
|
1 chunk |
+0 lines, -105 lines |
0 comments
|
Download
|
 |
D |
extensions/renderer/user_script_slave.cc
|
View
|
|
1 chunk |
+0 lines, -298 lines |
0 comments
|
Download
|
Total messages: 18 (0 generated)
|