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

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

Issue 1312653003: Fix for WebView accessible resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments by kalman@. Created 5 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_DISPATCHER_H_ 5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_H_
6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // add to the source map. 129 // add to the source map.
130 static std::vector<std::pair<std::string, int> > GetJsResources(); 130 static std::vector<std::pair<std::string, int> > GetJsResources();
131 static void RegisterNativeHandlers(ModuleSystem* module_system, 131 static void RegisterNativeHandlers(ModuleSystem* module_system,
132 ScriptContext* context, 132 ScriptContext* context,
133 Dispatcher* dispatcher, 133 Dispatcher* dispatcher,
134 RequestSender* request_sender, 134 RequestSender* request_sender,
135 V8SchemaRegistry* v8_schema_registry); 135 V8SchemaRegistry* v8_schema_registry);
136 136
137 bool WasWebRequestUsedBySomeExtensions() const { return webrequest_used_; } 137 bool WasWebRequestUsedBySomeExtensions() const { return webrequest_used_; }
138 138
139 // Returns the webview partition ID associated with this renderer if it is a
140 // WebView guest render process. Otherwise, an empty string is returned.
141 static std::string GetWebViewPartitionID();
142
139 private: 143 private:
140 // The RendererPermissionsPolicyDelegateTest.CannotScriptWebstore test needs 144 // The RendererPermissionsPolicyDelegateTest.CannotScriptWebstore test needs
141 // to call the OnActivateExtension IPCs. 145 // to call the OnActivateExtension IPCs.
142 friend class ::ChromeRenderViewTest; 146 friend class ::ChromeRenderViewTest;
143 FRIEND_TEST_ALL_PREFIXES(RendererPermissionsPolicyDelegateTest, 147 FRIEND_TEST_ALL_PREFIXES(RendererPermissionsPolicyDelegateTest,
144 CannotScriptWebstore); 148 CannotScriptWebstore);
145 149
146 // RenderProcessObserver implementation: 150 // RenderProcessObserver implementation:
147 bool OnControlMessageReceived(const IPC::Message& message) override; 151 bool OnControlMessageReceived(const IPC::Message& message) override;
148 void WebKitInitialized() override; 152 void WebKitInitialized() override;
(...skipping 15 matching lines...) Expand all
164 const std::string& module_name, 168 const std::string& module_name,
165 const std::string& function_name, 169 const std::string& function_name,
166 const base::ListValue& args, 170 const base::ListValue& args,
167 bool user_gesture); 171 bool user_gesture);
168 void OnSetChannel(int channel); 172 void OnSetChannel(int channel);
169 void OnSetFunctionNames(const std::vector<std::string>& names); 173 void OnSetFunctionNames(const std::vector<std::string>& names);
170 void OnSetScriptingWhitelist( 174 void OnSetScriptingWhitelist(
171 const ExtensionsClient::ScriptingWhitelist& extension_ids); 175 const ExtensionsClient::ScriptingWhitelist& extension_ids);
172 void OnSetSystemFont(const std::string& font_family, 176 void OnSetSystemFont(const std::string& font_family,
173 const std::string& font_size); 177 const std::string& font_size);
178 void OnSetWebViewPartitionID(const std::string& partition_id);
174 void OnShouldSuspend(const std::string& extension_id, uint64 sequence_id); 179 void OnShouldSuspend(const std::string& extension_id, uint64 sequence_id);
175 void OnSuspend(const std::string& extension_id); 180 void OnSuspend(const std::string& extension_id);
176 void OnTransferBlobs(const std::vector<std::string>& blob_uuids); 181 void OnTransferBlobs(const std::vector<std::string>& blob_uuids);
177 void OnUnloaded(const std::string& id); 182 void OnUnloaded(const std::string& id);
178 void OnUpdatePermissions(const ExtensionMsg_UpdatePermissions_Params& params); 183 void OnUpdatePermissions(const ExtensionMsg_UpdatePermissions_Params& params);
179 void OnUpdateTabSpecificPermissions(const GURL& visible_url, 184 void OnUpdateTabSpecificPermissions(const GURL& visible_url,
180 const std::string& extension_id, 185 const std::string& extension_id,
181 const URLPatternSet& new_hosts, 186 const URLPatternSet& new_hosts,
182 bool update_origin_whitelist, 187 bool update_origin_whitelist,
183 int tab_id); 188 int tab_id);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 309
305 // Status of webrequest usage. 310 // Status of webrequest usage.
306 bool webrequest_used_; 311 bool webrequest_used_;
307 312
308 DISALLOW_COPY_AND_ASSIGN(Dispatcher); 313 DISALLOW_COPY_AND_ASSIGN(Dispatcher);
309 }; 314 };
310 315
311 } // namespace extensions 316 } // namespace extensions
312 317
313 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ 318 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698