| OLD | NEW |
| 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 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/shared_memory.h" | 13 #include "base/shared_memory.h" |
| 14 #include "base/timer.h" | 14 #include "base/timer.h" |
| 15 #include "content/public/renderer/render_process_observer.h" | 15 #include "content/public/renderer/render_process_observer.h" |
| 16 #include "chrome/common/extensions/event_filter.h" |
| 16 #include "chrome/common/extensions/extension_set.h" | 17 #include "chrome/common/extensions/extension_set.h" |
| 17 #include "chrome/common/extensions/features/feature.h" | 18 #include "chrome/common/extensions/features/feature.h" |
| 18 #include "chrome/renderer/extensions/chrome_v8_context.h" | 19 #include "chrome/renderer/extensions/chrome_v8_context.h" |
| 19 #include "chrome/renderer/extensions/chrome_v8_context_set.h" | 20 #include "chrome/renderer/extensions/chrome_v8_context_set.h" |
| 20 #include "chrome/renderer/extensions/v8_schema_registry.h" | 21 #include "chrome/renderer/extensions/v8_schema_registry.h" |
| 21 #include "chrome/renderer/resource_bundle_source_map.h" | 22 #include "chrome/renderer/resource_bundle_source_map.h" |
| 22 #include "v8/include/v8.h" | 23 #include "v8/include/v8.h" |
| 23 | 24 |
| 24 class ExtensionRequestSender; | 25 class ExtensionRequestSender; |
| 25 class GURL; | 26 class GURL; |
| 26 class ModuleSystem; | 27 class ModuleSystem; |
| 27 class URLPattern; | 28 class URLPattern; |
| 28 class UserScriptSlave; | 29 class UserScriptSlave; |
| 29 struct ExtensionMsg_Loaded_Params; | 30 struct ExtensionMsg_Loaded_Params; |
| 30 | 31 |
| 32 namespace extensions { |
| 33 class FilteredEventRouter; |
| 34 } |
| 35 |
| 31 namespace WebKit { | 36 namespace WebKit { |
| 32 class WebFrame; | 37 class WebFrame; |
| 33 } | 38 } |
| 34 | 39 |
| 35 namespace base { | 40 namespace base { |
| 36 class ListValue; | 41 class ListValue; |
| 37 } | 42 } |
| 38 | 43 |
| 39 namespace content { | 44 namespace content { |
| 40 class RenderThread; | 45 class RenderThread; |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // them. | 256 // them. |
| 252 std::map<std::string, BindingInstaller> lazy_bindings_map_; | 257 std::map<std::string, BindingInstaller> lazy_bindings_map_; |
| 253 | 258 |
| 254 // Sends API requests to the extension host. | 259 // Sends API requests to the extension host. |
| 255 scoped_ptr<ExtensionRequestSender> request_sender_; | 260 scoped_ptr<ExtensionRequestSender> request_sender_; |
| 256 | 261 |
| 257 // The current channel. From VersionInfo::GetChannel(). | 262 // The current channel. From VersionInfo::GetChannel(). |
| 258 // TODO(aa): Remove when we can restrict non-permission APIs to dev-only. | 263 // TODO(aa): Remove when we can restrict non-permission APIs to dev-only. |
| 259 int chrome_channel_; | 264 int chrome_channel_; |
| 260 | 265 |
| 266 // Routes events to the appropriate listener taking into consideration event |
| 267 // filters. |
| 268 scoped_ptr<extensions::EventFilter> event_filter_; |
| 269 |
| 261 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); | 270 DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); |
| 262 }; | 271 }; |
| 263 | 272 |
| 264 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ | 273 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_DISPATCHER_H_ |
| OLD | NEW |