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

Side by Side Diff: extensions/renderer/script_injection_manager.h

Issue 492133002: Renderer changes for wiring up shared memory with declarative injection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed up tests and responded to other comments Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ 5 #ifndef EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_
6 #define EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ 6 #define EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void InvalidateForFrame(blink::WebFrame* frame); 65 void InvalidateForFrame(blink::WebFrame* frame);
66 66
67 // Inject appropriate scripts into |frame|. 67 // Inject appropriate scripts into |frame|.
68 void InjectScripts(blink::WebFrame* frame, 68 void InjectScripts(blink::WebFrame* frame,
69 UserScript::RunLocation run_location); 69 UserScript::RunLocation run_location);
70 70
71 // Handle the ExecuteCode extension message. 71 // Handle the ExecuteCode extension message.
72 void HandleExecuteCode(const ExtensionMsg_ExecuteCode_Params& params, 72 void HandleExecuteCode(const ExtensionMsg_ExecuteCode_Params& params,
73 content::RenderView* render_view); 73 content::RenderView* render_view);
74 74
75 // Handle the ExecuteDeclarativeScript extension message.
76 void HandleExecuteDeclarativeScript(blink::WebFrame* web_frame,
77 int tab_id,
78 const ExtensionId& extension_id,
79 int64 script_id,
80 const GURL& url);
81
75 // Handle the GrantInjectionPermission extension message. 82 // Handle the GrantInjectionPermission extension message.
76 void HandlePermitScriptInjection(int64 request_id); 83 void HandlePermitScriptInjection(int64 request_id);
77 84
78 // Extensions metadata, owned by Dispatcher (which owns this object). 85 // Extensions metadata, owned by Dispatcher (which owns this object).
79 const ExtensionSet* extensions_; 86 const ExtensionSet* extensions_;
80 87
81 // The map of active web frames to their corresponding statuses. The 88 // The map of active web frames to their corresponding statuses. The
82 // RunLocation of the frame corresponds to the last location that has ran. 89 // RunLocation of the frame corresponds to the last location that has ran.
83 FrameStatusMap frame_statuses_; 90 FrameStatusMap frame_statuses_;
84 91
85 // The collection of RVOHelpers. 92 // The collection of RVOHelpers.
86 ScopedVector<RVOHelper> rvo_helpers_; 93 ScopedVector<RVOHelper> rvo_helpers_;
87 94
88 // The set of UserScripts associated with extensions. Owned by the Dispatcher. 95 // The set of UserScripts associated with extensions. Owned by the Dispatcher.
89 UserScriptSetManager* user_script_set_manager_; 96 UserScriptSetManager* user_script_set_manager_;
90 97
91 // Pending injections which are waiting for either the proper run location or 98 // Pending injections which are waiting for either the proper run location or
92 // user consent. 99 // user consent.
93 ScopedVector<ScriptInjection> pending_injections_; 100 ScopedVector<ScriptInjection> pending_injections_;
94 101
95 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> 102 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer>
96 user_script_set_manager_observer_; 103 user_script_set_manager_observer_;
97 104
98 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); 105 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager);
99 }; 106 };
100 107
101 } // namespace extensions 108 } // namespace extensions
102 109
103 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ 110 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698