Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / extensions / renderer / dispatcher_delegate.h
blobf00c357b7efce87d91977da26a4399eeb371911b
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_
6 #define EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_
8 #include <set>
9 #include <string>
11 namespace blink {
12 class WebFrame;
15 namespace extensions {
16 class Dispatcher;
17 class Extension;
18 class ModuleSystem;
19 class ResourceBundleSourceMap;
20 class ScriptContext;
21 class URLPatternSet;
23 // Base class and default implementation for an extensions::Dispacher delegate.
24 // DispatcherDelegate can be used to override and extend the behavior of the
25 // extensions system's renderer side.
26 class DispatcherDelegate {
27 public:
28 virtual ~DispatcherDelegate() {}
30 // Initializes origin permissions for a newly created extension context.
31 virtual void InitOriginPermissions(const Extension* extension,
32 bool is_extension_active) {}
34 // Includes additional native handlers in a ScriptContext's ModuleSystem.
35 virtual void RegisterNativeHandlers(Dispatcher* dispatcher,
36 ModuleSystem* module_system,
37 ScriptContext* context) {}
39 // Includes additional source resources into the resource map.
40 virtual void PopulateSourceMap(ResourceBundleSourceMap* source_map) {}
42 // Requires additional modules within an extension context's module system.
43 virtual void RequireAdditionalModules(ScriptContext* context,
44 bool is_within_platform_app) {}
46 // Allows the delegate to respond to an updated set of active extensions in
47 // the Dispatcher.
48 virtual void OnActiveExtensionsUpdated(
49 const std::set<std::string>& extension_ids) {}
51 // Sets the current Chrome channel.
52 // TODO(rockot): This doesn't belong in a generic extensions system interface.
53 // See http://crbug.com/368431.
54 virtual void SetChannel(int channel) {}
57 } // namespace extensions
59 #endif // EXTENSIONS_RENDERER_DISPATCHER_DELEGATE_H_