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