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 #include "apps/shell/renderer/shell_dispatcher_delegate.h" | 5 #include "extensions/shell/renderer/shell_dispatcher_delegate.h" |
6 | 6 |
7 #include "apps/shell/renderer/shell_custom_bindings.h" | |
8 #include "extensions/renderer/module_system.h" | 7 #include "extensions/renderer/module_system.h" |
9 #include "extensions/renderer/resource_bundle_source_map.h" | 8 #include "extensions/renderer/resource_bundle_source_map.h" |
10 #include "extensions/renderer/script_context.h" | 9 #include "extensions/renderer/script_context.h" |
| 10 #include "extensions/shell/renderer/shell_custom_bindings.h" |
11 #include "grit/app_shell_resources.h" | 11 #include "grit/app_shell_resources.h" |
12 | 12 |
13 namespace apps { | 13 namespace extensions { |
14 | 14 |
15 ShellDispatcherDelegate::ShellDispatcherDelegate() { | 15 ShellDispatcherDelegate::ShellDispatcherDelegate() { |
16 } | 16 } |
17 | 17 |
18 ShellDispatcherDelegate::~ShellDispatcherDelegate() { | 18 ShellDispatcherDelegate::~ShellDispatcherDelegate() { |
19 } | 19 } |
20 | 20 |
21 void ShellDispatcherDelegate::RegisterNativeHandlers( | 21 void ShellDispatcherDelegate::RegisterNativeHandlers( |
22 extensions::Dispatcher* dispatcher, | 22 Dispatcher* dispatcher, |
23 extensions::ModuleSystem* module_system, | 23 ModuleSystem* module_system, |
24 extensions::ScriptContext* context) { | 24 ScriptContext* context) { |
25 module_system->RegisterNativeHandler( | 25 module_system->RegisterNativeHandler( |
26 "shell_natives", | 26 "shell_natives", |
27 scoped_ptr<extensions::NativeHandler>(new ShellCustomBindings(context))); | 27 scoped_ptr<NativeHandler>(new ShellCustomBindings(context))); |
28 } | 28 } |
29 | 29 |
30 void ShellDispatcherDelegate::PopulateSourceMap( | 30 void ShellDispatcherDelegate::PopulateSourceMap( |
31 extensions::ResourceBundleSourceMap* source_map) { | 31 ResourceBundleSourceMap* source_map) { |
32 source_map->RegisterSource("shell", IDR_SHELL_CUSTOM_BINDINGS_JS); | 32 source_map->RegisterSource("shell", IDR_SHELL_CUSTOM_BINDINGS_JS); |
33 } | 33 } |
34 | 34 |
35 } // namespace apps | 35 } // namespace extensions |
OLD | NEW |