OLD | NEW |
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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <utility> | 14 #include <utility> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/scoped_observer.h" | 19 #include "base/scoped_observer.h" |
20 #include "base/timer/timer.h" | 20 #include "base/timer/timer.h" |
21 #include "components/version_info/version_info.h" | 21 #include "components/version_info/version_info.h" |
22 #include "content/public/renderer/render_thread_observer.h" | 22 #include "content/public/renderer/render_thread_observer.h" |
23 #include "extensions/common/event_filter.h" | 23 #include "extensions/common/event_filter.h" |
24 #include "extensions/common/extension.h" | 24 #include "extensions/common/extension.h" |
25 #include "extensions/common/extensions_client.h" | 25 #include "extensions/common/extensions_client.h" |
26 #include "extensions/common/features/feature.h" | 26 #include "extensions/common/features/feature.h" |
| 27 #include "extensions/common/features/feature_session_type.h" |
27 #include "extensions/renderer/resource_bundle_source_map.h" | 28 #include "extensions/renderer/resource_bundle_source_map.h" |
28 #include "extensions/renderer/script_context.h" | 29 #include "extensions/renderer/script_context.h" |
29 #include "extensions/renderer/script_context_set.h" | 30 #include "extensions/renderer/script_context_set.h" |
30 #include "extensions/renderer/user_script_set_manager.h" | 31 #include "extensions/renderer/user_script_set_manager.h" |
31 #include "extensions/renderer/v8_schema_registry.h" | 32 #include "extensions/renderer/v8_schema_registry.h" |
32 #include "third_party/WebKit/public/platform/WebString.h" | 33 #include "third_party/WebKit/public/platform/WebString.h" |
33 #include "third_party/WebKit/public/platform/WebVector.h" | 34 #include "third_party/WebKit/public/platform/WebVector.h" |
34 #include "v8/include/v8.h" | 35 #include "v8/include/v8.h" |
35 | 36 |
36 class ChromeRenderViewTest; | 37 class ChromeRenderViewTest; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 const std::string& extension_id, | 196 const std::string& extension_id, |
196 const URLPatternSet& new_hosts, | 197 const URLPatternSet& new_hosts, |
197 bool update_origin_whitelist, | 198 bool update_origin_whitelist, |
198 int tab_id); | 199 int tab_id); |
199 void OnClearTabSpecificPermissions( | 200 void OnClearTabSpecificPermissions( |
200 const std::vector<std::string>& extension_ids, | 201 const std::vector<std::string>& extension_ids, |
201 bool update_origin_whitelist, | 202 bool update_origin_whitelist, |
202 int tab_id); | 203 int tab_id); |
203 void OnUsingWebRequestAPI(bool webrequest_used); | 204 void OnUsingWebRequestAPI(bool webrequest_used); |
204 void OnSetActivityLoggingEnabled(bool enabled); | 205 void OnSetActivityLoggingEnabled(bool enabled); |
| 206 void OnSetUserSessionType(FeatureSessionType session_type); |
205 | 207 |
206 // UserScriptSetManager::Observer implementation. | 208 // UserScriptSetManager::Observer implementation. |
207 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts) override; | 209 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts) override; |
208 | 210 |
209 void UpdateActiveExtensions(); | 211 void UpdateActiveExtensions(); |
210 | 212 |
211 // Sets up the host permissions for |extension|. | 213 // Sets up the host permissions for |extension|. |
212 void InitOriginPermissions(const Extension* extension); | 214 void InitOriginPermissions(const Extension* extension); |
213 | 215 |
214 // Updates the host permissions for the extension url to include only those in | 216 // Updates the host permissions for the extension url to include only those in |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // if this renderer is a WebView guest render process. Otherwise, this will be | 320 // if this renderer is a WebView guest render process. Otherwise, this will be |
319 // empty. | 321 // empty. |
320 std::string webview_partition_id_; | 322 std::string webview_partition_id_; |
321 | 323 |
322 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 324 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
323 }; | 325 }; |
324 | 326 |
325 } // namespace extensions | 327 } // namespace extensions |
326 | 328 |
327 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 329 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
OLD | NEW |