OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 7 #include <map> |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "chrome/browser/extensions/execute_code_in_tab_function.h" | 14 #include "chrome/browser/extensions/execute_code_in_tab_function.h" |
15 #include "chrome/browser/extensions/extension_accessibility_api.h" | 15 #include "chrome/browser/extensions/extension_accessibility_api.h" |
16 #include "chrome/browser/extensions/extension_bookmark_manager_api.h" | 16 #include "chrome/browser/extensions/extension_bookmark_manager_api.h" |
17 #include "chrome/browser/extensions/extension_bookmarks_module.h" | 17 #include "chrome/browser/extensions/extension_bookmarks_module.h" |
18 #include "chrome/browser/extensions/extension_browser_actions_api.h" | 18 #include "chrome/browser/extensions/extension_browser_actions_api.h" |
19 #include "chrome/browser/extensions/extension_clipboard_api.h" | 19 #include "chrome/browser/extensions/extension_clipboard_api.h" |
20 #include "chrome/browser/extensions/extension_context_menu_api.h" | 20 #include "chrome/browser/extensions/extension_context_menu_api.h" |
21 #include "chrome/browser/extensions/extension_cookies_api.h" | 21 #include "chrome/browser/extensions/extension_cookies_api.h" |
22 #include "chrome/browser/extensions/extension_debugger_api.h" | 22 #include "chrome/browser/extensions/extension_debugger_api.h" |
23 #include "chrome/browser/extensions/extension_file_browser_private_api.h" | 23 #include "chrome/browser/extensions/extension_file_browser_private_api.h" |
24 #include "chrome/browser/extensions/extension_file_system_api.h" | |
24 #include "chrome/browser/extensions/extension_function.h" | 25 #include "chrome/browser/extensions/extension_function.h" |
25 #include "chrome/browser/extensions/extension_history_api.h" | 26 #include "chrome/browser/extensions/extension_history_api.h" |
26 #include "chrome/browser/extensions/extension_i18n_api.h" | 27 #include "chrome/browser/extensions/extension_i18n_api.h" |
27 #include "chrome/browser/extensions/extension_idle_api.h" | 28 #include "chrome/browser/extensions/extension_idle_api.h" |
28 #include "chrome/browser/extensions/extension_infobar_module.h" | 29 #include "chrome/browser/extensions/extension_infobar_module.h" |
29 #include "chrome/browser/extensions/extension_management_api.h" | 30 #include "chrome/browser/extensions/extension_management_api.h" |
30 #include "chrome/browser/extensions/extension_message_service.h" | 31 #include "chrome/browser/extensions/extension_message_service.h" |
31 #include "chrome/browser/extensions/extension_metrics_module.h" | 32 #include "chrome/browser/extensions/extension_metrics_module.h" |
32 #include "chrome/browser/extensions/extension_module.h" | 33 #include "chrome/browser/extensions/extension_module.h" |
33 #include "chrome/browser/extensions/extension_omnibox_api.h" | 34 #include "chrome/browser/extensions/extension_omnibox_api.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 | 195 |
195 // Idle | 196 // Idle |
196 RegisterFunction<ExtensionIdleQueryStateFunction>(); | 197 RegisterFunction<ExtensionIdleQueryStateFunction>(); |
197 | 198 |
198 // I18N. | 199 // I18N. |
199 RegisterFunction<GetAcceptLanguagesFunction>(); | 200 RegisterFunction<GetAcceptLanguagesFunction>(); |
200 | 201 |
201 // Processes. | 202 // Processes. |
202 RegisterFunction<GetProcessIdForTabFunction>(); | 203 RegisterFunction<GetProcessIdForTabFunction>(); |
203 | 204 |
204 // Local filesystem. | 205 // fileSystem functions. |
Aaron Boodman
2011/04/12 22:47:21
You should only register these functions on Chrome
Aaron Boodman
2011/04/13 18:08:03
You didn't address this comment yet.
zel
2011/04/14 21:58:05
Done.
| |
206 RegisterFunction<ResolveLocalFileSystemURLFunction>(); | |
207 | |
208 // fileBrowserPrivate functions. | |
209 RegisterFunction<ExecuteTasksFileBrowserFunction>(); | |
210 RegisterFunction<GetFileTasksFileBrowserFunction>(); | |
205 RegisterFunction<RequestLocalFileSystemFunction>(); | 211 RegisterFunction<RequestLocalFileSystemFunction>(); |
206 | 212 |
207 // Metrics. | 213 // Metrics. |
208 RegisterFunction<MetricsGetEnabledFunction>(); | 214 RegisterFunction<MetricsGetEnabledFunction>(); |
209 RegisterFunction<MetricsSetEnabledFunction>(); | 215 RegisterFunction<MetricsSetEnabledFunction>(); |
210 RegisterFunction<MetricsRecordUserActionFunction>(); | 216 RegisterFunction<MetricsRecordUserActionFunction>(); |
211 RegisterFunction<MetricsRecordValueFunction>(); | 217 RegisterFunction<MetricsRecordValueFunction>(); |
212 RegisterFunction<MetricsRecordPercentageFunction>(); | 218 RegisterFunction<MetricsRecordPercentageFunction>(); |
213 RegisterFunction<MetricsRecordCountFunction>(); | 219 RegisterFunction<MetricsRecordCountFunction>(); |
214 RegisterFunction<MetricsRecordSmallCountFunction>(); | 220 RegisterFunction<MetricsRecordSmallCountFunction>(); |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
531 NOTREACHED(); | 537 NOTREACHED(); |
532 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_EFD")); | 538 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_EFD")); |
533 base::KillProcess(render_view_host_->process()->GetHandle(), | 539 base::KillProcess(render_view_host_->process()->GetHandle(), |
534 ResultCodes::KILLED_BAD_MESSAGE, false); | 540 ResultCodes::KILLED_BAD_MESSAGE, false); |
535 } | 541 } |
536 } | 542 } |
537 | 543 |
538 Profile* ExtensionFunctionDispatcher::profile() { | 544 Profile* ExtensionFunctionDispatcher::profile() { |
539 return profile_; | 545 return profile_; |
540 } | 546 } |
OLD | NEW |