| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/extensions/extension_function_dispatcher.h" | 5 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/process_util.h" | 7 #include "base/process_util.h" |
| 8 #include "base/singleton.h" | 8 #include "base/singleton.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/extensions/extension_bookmarks_module.h" | 10 #include "chrome/browser/extensions/extension_bookmarks_module.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 factories_[toolstrip::kExpandFunction] = | 140 factories_[toolstrip::kExpandFunction] = |
| 141 &NewExtensionFunction<ToolstripExpandFunction>; | 141 &NewExtensionFunction<ToolstripExpandFunction>; |
| 142 factories_[toolstrip::kCollapseFunction] = | 142 factories_[toolstrip::kCollapseFunction] = |
| 143 &NewExtensionFunction<ToolstripCollapseFunction>; | 143 &NewExtensionFunction<ToolstripCollapseFunction>; |
| 144 | 144 |
| 145 // Test. | 145 // Test. |
| 146 factories_[test::kPassFunction] = | 146 factories_[test::kPassFunction] = |
| 147 &NewExtensionFunction<ExtensionTestPassFunction>; | 147 &NewExtensionFunction<ExtensionTestPassFunction>; |
| 148 factories_[test::kFailFunction] = | 148 factories_[test::kFailFunction] = |
| 149 &NewExtensionFunction<ExtensionTestFailFunction>; | 149 &NewExtensionFunction<ExtensionTestFailFunction>; |
| 150 factories_[test::kLogFunction] = |
| 151 &NewExtensionFunction<ExtensionTestLogFunction>; |
| 150 } | 152 } |
| 151 | 153 |
| 152 void FactoryRegistry::GetAllNames(std::vector<std::string>* names) { | 154 void FactoryRegistry::GetAllNames(std::vector<std::string>* names) { |
| 153 for (FactoryMap::iterator iter = factories_.begin(); | 155 for (FactoryMap::iterator iter = factories_.begin(); |
| 154 iter != factories_.end(); ++iter) { | 156 iter != factories_.end(); ++iter) { |
| 155 names->push_back(iter->first); | 157 names->push_back(iter->first); |
| 156 } | 158 } |
| 157 } | 159 } |
| 158 | 160 |
| 159 bool FactoryRegistry::OverrideFunction(const std::string& name, | 161 bool FactoryRegistry::OverrideFunction(const std::string& name, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 } else { | 274 } else { |
| 273 NOTREACHED(); | 275 NOTREACHED(); |
| 274 base::KillProcess(render_view_host_->process()->process().handle(), | 276 base::KillProcess(render_view_host_->process()->process().handle(), |
| 275 ResultCodes::KILLED_BAD_MESSAGE, false); | 277 ResultCodes::KILLED_BAD_MESSAGE, false); |
| 276 } | 278 } |
| 277 } | 279 } |
| 278 | 280 |
| 279 Profile* ExtensionFunctionDispatcher::profile() { | 281 Profile* ExtensionFunctionDispatcher::profile() { |
| 280 return render_view_host_->process()->profile(); | 282 return render_view_host_->process()->profile(); |
| 281 } | 283 } |
| OLD | NEW |