Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/extensions/extension_function_registry.cc

Issue 11826048: Revert 176015 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_registry.h" 5 #include "chrome/browser/extensions/extension_function_registry.h"
6 6
7 #include "chrome/browser/accessibility/accessibility_extension_api.h" 7 #include "chrome/browser/accessibility/accessibility_extension_api.h"
8 #include "chrome/browser/extensions/api/app/app_api.h" 8 #include "chrome/browser/extensions/api/app/app_api.h"
9 #include "chrome/browser/extensions/api/bookmark_manager_private/bookmark_manage r_private_api.h" 9 #include "chrome/browser/extensions/api/bookmark_manager_private/bookmark_manage r_private_api.h"
10 #include "chrome/browser/extensions/api/bookmarks/bookmark_api.h"
10 #include "chrome/browser/extensions/api/browsing_data/browsing_data_api.h" 11 #include "chrome/browser/extensions/api/browsing_data/browsing_data_api.h"
12 #include "chrome/browser/extensions/api/cloud_print_private/cloud_print_private_ api.h"
11 #include "chrome/browser/extensions/api/commands/commands.h" 13 #include "chrome/browser/extensions/api/commands/commands.h"
14 #include "chrome/browser/extensions/api/content_settings/content_settings_api.h"
15 #include "chrome/browser/extensions/api/context_menu/context_menu_api.h"
16 #include "chrome/browser/extensions/api/cookies/cookies_api.h"
17 #include "chrome/browser/extensions/api/debugger/debugger_api.h"
18 #include "chrome/browser/extensions/api/declarative/declarative_api.h"
12 #include "chrome/browser/extensions/api/extension_action/extension_browser_actio ns_api.h" 19 #include "chrome/browser/extensions/api/extension_action/extension_browser_actio ns_api.h"
13 #include "chrome/browser/extensions/api/extension_action/extension_page_actions_ api.h" 20 #include "chrome/browser/extensions/api/extension_action/extension_page_actions_ api.h"
14 #include "chrome/browser/extensions/api/extension_action/extension_script_badge_ api.h" 21 #include "chrome/browser/extensions/api/extension_action/extension_script_badge_ api.h"
22 #include "chrome/browser/extensions/api/font_settings/font_settings_api.h"
23 #include "chrome/browser/extensions/api/history/history_api.h"
24 #include "chrome/browser/extensions/api/identity/identity_api.h"
25 #include "chrome/browser/extensions/api/i18n/i18n_api.h"
15 #include "chrome/browser/extensions/api/idle/idle_api.h" 26 #include "chrome/browser/extensions/api/idle/idle_api.h"
16 #include "chrome/browser/extensions/api/managed_mode/managed_mode_api.h" 27 #include "chrome/browser/extensions/api/managed_mode/managed_mode_api.h"
28 #include "chrome/browser/extensions/api/management/management_api.h"
17 #include "chrome/browser/extensions/api/metrics/metrics.h" 29 #include "chrome/browser/extensions/api/metrics/metrics.h"
18 #include "chrome/browser/extensions/api/module/module.h" 30 #include "chrome/browser/extensions/api/module/module.h"
19 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" 31 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
32 #include "chrome/browser/extensions/api/page_capture/page_capture_api.h"
33 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
20 #include "chrome/browser/extensions/api/preference/preference_api.h" 34 #include "chrome/browser/extensions/api/preference/preference_api.h"
35 #include "chrome/browser/extensions/api/record/record_api.h"
21 #include "chrome/browser/extensions/api/runtime/runtime_api.h" 36 #include "chrome/browser/extensions/api/runtime/runtime_api.h"
37 #include "chrome/browser/extensions/api/serial/serial_api.h"
38 #include "chrome/browser/extensions/api/socket/socket_api.h"
39 #include "chrome/browser/extensions/api/tabs/execute_code_in_tab_function.h"
40 #include "chrome/browser/extensions/api/tabs/tabs.h"
22 #include "chrome/browser/extensions/api/test/test_api.h" 41 #include "chrome/browser/extensions/api/test/test_api.h"
23 #include "chrome/browser/extensions/api/top_sites/top_sites_api.h" 42 #include "chrome/browser/extensions/api/top_sites/top_sites_api.h"
43 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
24 #include "chrome/browser/extensions/api/web_request/web_request_api.h" 44 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
25 #include "chrome/browser/extensions/api/web_socket_proxy_private/web_socket_prox y_private_api.h" 45 #include "chrome/browser/extensions/api/web_socket_proxy_private/web_socket_prox y_private_api.h"
26 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h" 46 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h"
47 #include "chrome/browser/extensions/settings/settings_api.h"
27 #include "chrome/browser/extensions/system/system_api.h" 48 #include "chrome/browser/extensions/system/system_api.h"
28 #include "chrome/browser/infobars/infobar_extension_api.h" 49 #include "chrome/browser/infobars/infobar_extension_api.h"
29 #include "chrome/browser/rlz/rlz_extension_api.h" 50 #include "chrome/browser/rlz/rlz_extension_api.h"
30 #include "chrome/browser/speech/speech_input_extension_api.h" 51 #include "chrome/browser/speech/speech_input_extension_api.h"
31 #include "chrome/common/extensions/api/generated_api.h" 52 #include "chrome/common/extensions/api/generated_api.h"
32 53
33 #if defined(TOOLKIT_VIEWS) 54 #if defined(TOOLKIT_VIEWS)
34 #include "chrome/browser/extensions/api/input/input.h" 55 #include "chrome/browser/extensions/api/input/input.h"
35 #endif // defined(TOOLKIT_VIEWS) 56 #endif
36 57
37 #if defined(OS_CHROMEOS) 58 #if defined(OS_CHROMEOS)
38 #include "chrome/browser/chromeos/extensions/echo_private_api.h" 59 #include "chrome/browser/chromeos/extensions/echo_private_api.h"
60 #include "chrome/browser/chromeos/extensions/file_browser_handler_api.h"
39 #include "chrome/browser/chromeos/extensions/info_private_api.h" 61 #include "chrome/browser/chromeos/extensions/info_private_api.h"
40 #include "chrome/browser/chromeos/extensions/input_method_api.h" 62 #include "chrome/browser/chromeos/extensions/input_method_api.h"
41 #include "chrome/browser/chromeos/extensions/media_player_api.h" 63 #include "chrome/browser/chromeos/extensions/media_player_api.h"
42 #include "chrome/browser/chromeos/extensions/power/power_api.h" 64 #include "chrome/browser/chromeos/extensions/power/power_api.h"
43 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" 65 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h"
44 #include "chrome/browser/extensions/api/terminal/terminal_private_api.h" 66 #include "chrome/browser/extensions/api/terminal/terminal_private_api.h"
45 #endif // defined(OS_CHROMEOS) 67 #endif
46 68
47 // static 69 // static
48 ExtensionFunctionRegistry* ExtensionFunctionRegistry::GetInstance() { 70 ExtensionFunctionRegistry* ExtensionFunctionRegistry::GetInstance() {
49 return Singleton<ExtensionFunctionRegistry>::get(); 71 return Singleton<ExtensionFunctionRegistry>::get();
50 } 72 }
51 73
52 ExtensionFunctionRegistry::ExtensionFunctionRegistry() { 74 ExtensionFunctionRegistry::ExtensionFunctionRegistry() {
53 ResetFunctions(); 75 ResetFunctions();
54 } 76 }
55 77
56 ExtensionFunctionRegistry::~ExtensionFunctionRegistry() { 78 ExtensionFunctionRegistry::~ExtensionFunctionRegistry() {
57 } 79 }
58 80
59 void ExtensionFunctionRegistry::ResetFunctions() { 81 void ExtensionFunctionRegistry::ResetFunctions() {
60 #if defined(ENABLE_EXTENSIONS) 82 #if defined(ENABLE_EXTENSIONS)
61 83
62 // Register all functions here. 84 // Register all functions here.
63 85
86 // Windows
87 RegisterFunction<GetWindowFunction>();
88 RegisterFunction<GetCurrentWindowFunction>();
89 RegisterFunction<GetLastFocusedWindowFunction>();
90 RegisterFunction<GetAllWindowsFunction>();
91 RegisterFunction<CreateWindowFunction>();
92 RegisterFunction<UpdateWindowFunction>();
93 RegisterFunction<RemoveWindowFunction>();
94
95 // Tabs
96 RegisterFunction<CaptureVisibleTabFunction>();
97 RegisterFunction<CreateTabFunction>();
98 RegisterFunction<DetectTabLanguageFunction>();
99 RegisterFunction<DuplicateTabFunction>();
100 RegisterFunction<GetAllTabsInWindowFunction>();
101 RegisterFunction<GetCurrentTabFunction>();
102 RegisterFunction<GetSelectedTabFunction>();
103 RegisterFunction<GetTabFunction>();
104 RegisterFunction<HighlightTabsFunction>();
105 RegisterFunction<MoveTabsFunction>();
106 RegisterFunction<QueryTabsFunction>();
107 RegisterFunction<ReloadTabFunction>();
108 RegisterFunction<RemoveTabsFunction>();
109 RegisterFunction<TabsExecuteScriptFunction>();
110 RegisterFunction<TabsInsertCSSFunction>();
111 RegisterFunction<UpdateTabFunction>();
112
64 // Page Actions. 113 // Page Actions.
65 RegisterFunction<EnablePageActionsFunction>(); 114 RegisterFunction<EnablePageActionsFunction>();
66 RegisterFunction<DisablePageActionsFunction>(); 115 RegisterFunction<DisablePageActionsFunction>();
67 RegisterFunction<PageActionShowFunction>(); 116 RegisterFunction<PageActionShowFunction>();
68 RegisterFunction<PageActionHideFunction>(); 117 RegisterFunction<PageActionHideFunction>();
69 RegisterFunction<PageActionSetIconFunction>(); 118 RegisterFunction<PageActionSetIconFunction>();
70 RegisterFunction<PageActionSetTitleFunction>(); 119 RegisterFunction<PageActionSetTitleFunction>();
71 RegisterFunction<PageActionSetPopupFunction>(); 120 RegisterFunction<PageActionSetPopupFunction>();
72 RegisterFunction<PageActionGetTitleFunction>(); 121 RegisterFunction<PageActionGetTitleFunction>();
73 RegisterFunction<PageActionGetPopupFunction>(); 122 RegisterFunction<PageActionGetPopupFunction>();
(...skipping 24 matching lines...) Expand all
98 RegisterFunction<RemoveDownloadsFunction>(); 147 RegisterFunction<RemoveDownloadsFunction>();
99 RegisterFunction<RemoveFileSystemsFunction>(); 148 RegisterFunction<RemoveFileSystemsFunction>();
100 RegisterFunction<RemoveFormDataFunction>(); 149 RegisterFunction<RemoveFormDataFunction>();
101 RegisterFunction<RemoveHistoryFunction>(); 150 RegisterFunction<RemoveHistoryFunction>();
102 RegisterFunction<RemoveIndexedDBFunction>(); 151 RegisterFunction<RemoveIndexedDBFunction>();
103 RegisterFunction<RemoveLocalStorageFunction>(); 152 RegisterFunction<RemoveLocalStorageFunction>();
104 RegisterFunction<RemovePluginDataFunction>(); 153 RegisterFunction<RemovePluginDataFunction>();
105 RegisterFunction<RemovePasswordsFunction>(); 154 RegisterFunction<RemovePasswordsFunction>();
106 RegisterFunction<RemoveWebSQLFunction>(); 155 RegisterFunction<RemoveWebSQLFunction>();
107 156
157 // Bookmarks.
158 RegisterFunction<extensions::GetBookmarksFunction>();
159 RegisterFunction<extensions::GetBookmarkChildrenFunction>();
160 RegisterFunction<extensions::GetBookmarkRecentFunction>();
161 RegisterFunction<extensions::GetBookmarkTreeFunction>();
162 RegisterFunction<extensions::GetBookmarkSubTreeFunction>();
163 RegisterFunction<extensions::ImportBookmarksFunction>();
164 RegisterFunction<extensions::ExportBookmarksFunction>();
165 RegisterFunction<extensions::SearchBookmarksFunction>();
166 RegisterFunction<extensions::RemoveBookmarkFunction>();
167 RegisterFunction<extensions::RemoveTreeBookmarkFunction>();
168 RegisterFunction<extensions::CreateBookmarkFunction>();
169 RegisterFunction<extensions::MoveBookmarkFunction>();
170 RegisterFunction<extensions::UpdateBookmarkFunction>();
171
108 // Infobars. 172 // Infobars.
109 RegisterFunction<ShowInfoBarFunction>(); 173 RegisterFunction<ShowInfoBarFunction>();
110 174
111 // BookmarkManager 175 // BookmarkManager
112 RegisterFunction<extensions::CopyBookmarkManagerFunction>(); 176 RegisterFunction<extensions::CopyBookmarkManagerFunction>();
113 RegisterFunction<extensions::CutBookmarkManagerFunction>(); 177 RegisterFunction<extensions::CutBookmarkManagerFunction>();
114 RegisterFunction<extensions::PasteBookmarkManagerFunction>(); 178 RegisterFunction<extensions::PasteBookmarkManagerFunction>();
115 RegisterFunction<extensions::CanPasteBookmarkManagerFunction>(); 179 RegisterFunction<extensions::CanPasteBookmarkManagerFunction>();
116 RegisterFunction<extensions::SortChildrenBookmarkManagerFunction>(); 180 RegisterFunction<extensions::SortChildrenBookmarkManagerFunction>();
117 RegisterFunction<extensions::BookmarkManagerGetStringsFunction>(); 181 RegisterFunction<extensions::BookmarkManagerGetStringsFunction>();
118 RegisterFunction<extensions::StartDragBookmarkManagerFunction>(); 182 RegisterFunction<extensions::StartDragBookmarkManagerFunction>();
119 RegisterFunction<extensions::DropBookmarkManagerFunction>(); 183 RegisterFunction<extensions::DropBookmarkManagerFunction>();
120 RegisterFunction<extensions::GetSubtreeBookmarkManagerFunction>(); 184 RegisterFunction<extensions::GetSubtreeBookmarkManagerFunction>();
121 RegisterFunction<extensions::CanEditBookmarkManagerFunction>(); 185 RegisterFunction<extensions::CanEditBookmarkManagerFunction>();
122 RegisterFunction<extensions::CanOpenNewWindowsBookmarkFunction>(); 186 RegisterFunction<extensions::CanOpenNewWindowsBookmarkFunction>();
123 187
188 // History
189 RegisterFunction<extensions::AddUrlHistoryFunction>();
190 RegisterFunction<extensions::DeleteAllHistoryFunction>();
191 RegisterFunction<extensions::DeleteRangeHistoryFunction>();
192 RegisterFunction<extensions::DeleteUrlHistoryFunction>();
193 RegisterFunction<extensions::GetMostVisitedHistoryFunction>();
194 RegisterFunction<extensions::GetVisitsHistoryFunction>();
195 RegisterFunction<extensions::SearchHistoryFunction>();
196
124 // Idle 197 // Idle
125 RegisterFunction<extensions::IdleQueryStateFunction>(); 198 RegisterFunction<extensions::IdleQueryStateFunction>();
126 RegisterFunction<extensions::IdleSetDetectionIntervalFunction>(); 199 RegisterFunction<extensions::IdleSetDetectionIntervalFunction>();
127 200
201 // I18N.
202 RegisterFunction<GetAcceptLanguagesFunction>();
203
128 // Metrics. 204 // Metrics.
129 RegisterFunction<extensions::MetricsRecordUserActionFunction>(); 205 RegisterFunction<extensions::MetricsRecordUserActionFunction>();
130 RegisterFunction<extensions::MetricsRecordValueFunction>(); 206 RegisterFunction<extensions::MetricsRecordValueFunction>();
131 RegisterFunction<extensions::MetricsRecordPercentageFunction>(); 207 RegisterFunction<extensions::MetricsRecordPercentageFunction>();
132 RegisterFunction<extensions::MetricsRecordCountFunction>(); 208 RegisterFunction<extensions::MetricsRecordCountFunction>();
133 RegisterFunction<extensions::MetricsRecordSmallCountFunction>(); 209 RegisterFunction<extensions::MetricsRecordSmallCountFunction>();
134 RegisterFunction<extensions::MetricsRecordMediumCountFunction>(); 210 RegisterFunction<extensions::MetricsRecordMediumCountFunction>();
135 RegisterFunction<extensions::MetricsRecordTimeFunction>(); 211 RegisterFunction<extensions::MetricsRecordTimeFunction>();
136 RegisterFunction<extensions::MetricsRecordMediumTimeFunction>(); 212 RegisterFunction<extensions::MetricsRecordMediumTimeFunction>();
137 RegisterFunction<extensions::MetricsRecordLongTimeFunction>(); 213 RegisterFunction<extensions::MetricsRecordLongTimeFunction>();
138 214
139 // RLZ (not supported on ChromeOS yet). 215 // RLZ (not supported on ChromeOS yet).
140 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) 216 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS)
141 RegisterFunction<RlzRecordProductEventFunction>(); 217 RegisterFunction<RlzRecordProductEventFunction>();
142 RegisterFunction<RlzGetAccessPointRlzFunction>(); 218 RegisterFunction<RlzGetAccessPointRlzFunction>();
143 RegisterFunction<RlzSendFinancialPingFunction>(); 219 RegisterFunction<RlzSendFinancialPingFunction>();
144 RegisterFunction<RlzClearProductStateFunction>(); 220 RegisterFunction<RlzClearProductStateFunction>();
145 #endif 221 #endif
146 222
223 // Cookies.
224 RegisterFunction<extensions::GetCookieFunction>();
225 RegisterFunction<extensions::GetAllCookiesFunction>();
226 RegisterFunction<extensions::SetCookieFunction>();
227 RegisterFunction<extensions::RemoveCookieFunction>();
228 RegisterFunction<extensions::GetAllCookieStoresFunction>();
229
147 // Test. 230 // Test.
148 RegisterFunction<extensions::TestNotifyPassFunction>(); 231 RegisterFunction<extensions::TestNotifyPassFunction>();
149 RegisterFunction<extensions::TestFailFunction>(); 232 RegisterFunction<extensions::TestFailFunction>();
150 RegisterFunction<extensions::TestLogFunction>(); 233 RegisterFunction<extensions::TestLogFunction>();
151 RegisterFunction<extensions::TestResetQuotaFunction>(); 234 RegisterFunction<extensions::TestResetQuotaFunction>();
152 RegisterFunction<extensions::TestCreateIncognitoTabFunction>(); 235 RegisterFunction<extensions::TestCreateIncognitoTabFunction>();
153 RegisterFunction<extensions::TestSendMessageFunction>(); 236 RegisterFunction<extensions::TestSendMessageFunction>();
154 RegisterFunction<extensions::TestGetConfigFunction>(); 237 RegisterFunction<extensions::TestGetConfigFunction>();
155 238
239 // Record.
240 RegisterFunction<extensions::CaptureURLsFunction>();
241 RegisterFunction<extensions::ReplayURLsFunction>();
242
156 // Accessibility. 243 // Accessibility.
157 RegisterFunction<GetFocusedControlFunction>(); 244 RegisterFunction<GetFocusedControlFunction>();
158 RegisterFunction<SetAccessibilityEnabledFunction>(); 245 RegisterFunction<SetAccessibilityEnabledFunction>();
159 RegisterFunction<GetAlertsForTabFunction>(); 246 RegisterFunction<GetAlertsForTabFunction>();
160 247
161 // Commands. 248 // Commands.
162 RegisterFunction<GetAllCommandsFunction>(); 249 RegisterFunction<GetAllCommandsFunction>();
163 250
251 // Context Menus.
252 RegisterFunction<extensions::CreateContextMenuFunction>();
253 RegisterFunction<extensions::UpdateContextMenuFunction>();
254 RegisterFunction<extensions::RemoveContextMenuFunction>();
255 RegisterFunction<extensions::RemoveAllContextMenusFunction>();
256
164 // Omnibox. 257 // Omnibox.
165 RegisterFunction<extensions::OmniboxSendSuggestionsFunction>(); 258 RegisterFunction<extensions::OmniboxSendSuggestionsFunction>();
166 RegisterFunction<extensions::OmniboxSetDefaultSuggestionFunction>(); 259 RegisterFunction<extensions::OmniboxSetDefaultSuggestionFunction>();
167 260
168 #if defined(ENABLE_INPUT_SPEECH) 261 #if defined(ENABLE_INPUT_SPEECH)
169 // Speech input. 262 // Speech input.
170 RegisterFunction<StartSpeechInputFunction>(); 263 RegisterFunction<StartSpeechInputFunction>();
171 RegisterFunction<StopSpeechInputFunction>(); 264 RegisterFunction<StopSpeechInputFunction>();
172 RegisterFunction<IsRecordingSpeechInputFunction>(); 265 RegisterFunction<IsRecordingSpeechInputFunction>();
173 #endif 266 #endif
174 267
175 #if defined(TOOLKIT_VIEWS) 268 #if defined(TOOLKIT_VIEWS)
176 // Input. 269 // Input.
177 RegisterFunction<extensions::SendKeyboardEventInputFunction>(); 270 RegisterFunction<extensions::SendKeyboardEventInputFunction>();
178 #endif 271 #endif
179 272
180 #if defined(OS_CHROMEOS) 273 #if defined(OS_CHROMEOS)
181 // Power 274 // Power
182 RegisterFunction<extensions::power::RequestKeepAwakeFunction>(); 275 RegisterFunction<extensions::power::RequestKeepAwakeFunction>();
183 RegisterFunction<extensions::power::ReleaseKeepAwakeFunction>(); 276 RegisterFunction<extensions::power::ReleaseKeepAwakeFunction>();
184 #endif 277 #endif
185 278
186 // Managed mode. 279 // Managed mode.
187 RegisterFunction<extensions::GetManagedModeFunction>(); 280 RegisterFunction<extensions::GetManagedModeFunction>();
188 RegisterFunction<extensions::EnterManagedModeFunction>(); 281 RegisterFunction<extensions::EnterManagedModeFunction>();
189 RegisterFunction<extensions::GetPolicyFunction>(); 282 RegisterFunction<extensions::GetPolicyFunction>();
190 RegisterFunction<extensions::SetPolicyFunction>(); 283 RegisterFunction<extensions::SetPolicyFunction>();
191 284
285 // Management.
286 RegisterFunction<extensions::GetAllExtensionsFunction>();
287 RegisterFunction<extensions::GetExtensionByIdFunction>();
288 RegisterFunction<extensions::GetPermissionWarningsByIdFunction>();
289 RegisterFunction<extensions::GetPermissionWarningsByManifestFunction>();
290 RegisterFunction<extensions::LaunchAppFunction>();
291 RegisterFunction<extensions::SetEnabledFunction>();
292 RegisterFunction<extensions::UninstallFunction>();
293
192 // Extension module. 294 // Extension module.
193 RegisterFunction<extensions::SetUpdateUrlDataFunction>(); 295 RegisterFunction<extensions::SetUpdateUrlDataFunction>();
194 RegisterFunction<extensions::IsAllowedIncognitoAccessFunction>(); 296 RegisterFunction<extensions::IsAllowedIncognitoAccessFunction>();
195 RegisterFunction<extensions::IsAllowedFileSchemeAccessFunction>(); 297 RegisterFunction<extensions::IsAllowedFileSchemeAccessFunction>();
196 298
197 // WebstorePrivate. 299 // WebstorePrivate.
198 RegisterFunction<extensions::GetBrowserLoginFunction>(); 300 RegisterFunction<extensions::GetBrowserLoginFunction>();
199 RegisterFunction<extensions::GetStoreLoginFunction>(); 301 RegisterFunction<extensions::GetStoreLoginFunction>();
200 RegisterFunction<extensions::SetStoreLoginFunction>(); 302 RegisterFunction<extensions::SetStoreLoginFunction>();
201 RegisterFunction<extensions::InstallBundleFunction>(); 303 RegisterFunction<extensions::InstallBundleFunction>();
202 RegisterFunction<extensions::BeginInstallWithManifestFunction>(); 304 RegisterFunction<extensions::BeginInstallWithManifestFunction>();
203 RegisterFunction<extensions::CompleteInstallFunction>(); 305 RegisterFunction<extensions::CompleteInstallFunction>();
204 RegisterFunction<extensions::GetWebGLStatusFunction>(); 306 RegisterFunction<extensions::GetWebGLStatusFunction>();
205 307
308 // WebNavigation.
309 RegisterFunction<extensions::GetFrameFunction>();
310 RegisterFunction<extensions::GetAllFramesFunction>();
311
206 // WebRequest. 312 // WebRequest.
207 RegisterFunction<WebRequestAddEventListener>(); 313 RegisterFunction<WebRequestAddEventListener>();
208 RegisterFunction<WebRequestEventHandled>(); 314 RegisterFunction<WebRequestEventHandled>();
315 RegisterFunction<WebRequestHandlerBehaviorChanged>();
209 316
210 // Preferences. 317 // Preferences.
211 RegisterFunction<extensions::GetPreferenceFunction>(); 318 RegisterFunction<extensions::GetPreferenceFunction>();
212 RegisterFunction<extensions::SetPreferenceFunction>(); 319 RegisterFunction<extensions::SetPreferenceFunction>();
213 RegisterFunction<extensions::ClearPreferenceFunction>(); 320 RegisterFunction<extensions::ClearPreferenceFunction>();
214 321
215 // ChromeOS-specific part of the API. 322 // ChromeOS-specific part of the API.
216 #if defined(OS_CHROMEOS) 323 #if defined(OS_CHROMEOS)
217 // Device Customization. 324 // Device Customization.
218 RegisterFunction<extensions::GetChromeosInfoFunction>(); 325 RegisterFunction<extensions::GetChromeosInfoFunction>();
219 326
327 // FileBrowserHandlerInternal.
328 RegisterFunction<FileHandlerSelectFileFunction>();
329
220 // Mediaplayer 330 // Mediaplayer
221 RegisterFunction<extensions::PlayMediaplayerFunction>(); 331 RegisterFunction<extensions::PlayMediaplayerFunction>();
222 RegisterFunction<extensions::GetPlaylistMediaplayerFunction>(); 332 RegisterFunction<extensions::GetPlaylistMediaplayerFunction>();
223 RegisterFunction<extensions::SetWindowHeightMediaplayerFunction>(); 333 RegisterFunction<extensions::SetWindowHeightMediaplayerFunction>();
224 RegisterFunction<extensions::CloseWindowMediaplayerFunction>(); 334 RegisterFunction<extensions::CloseWindowMediaplayerFunction>();
225 335
226 // WallpaperManagerPrivate functions. 336 // WallpaperManagerPrivate functions.
227 RegisterFunction<WallpaperStringsFunction>(); 337 RegisterFunction<WallpaperStringsFunction>();
228 RegisterFunction<WallpaperSetWallpaperIfExistFunction>(); 338 RegisterFunction<WallpaperSetWallpaperIfExistFunction>();
229 RegisterFunction<WallpaperSetWallpaperFunction>(); 339 RegisterFunction<WallpaperSetWallpaperFunction>();
(...skipping 15 matching lines...) Expand all
245 RegisterFunction<SendInputToTerminalProcessFunction>(); 355 RegisterFunction<SendInputToTerminalProcessFunction>();
246 RegisterFunction<CloseTerminalProcessFunction>(); 356 RegisterFunction<CloseTerminalProcessFunction>();
247 RegisterFunction<OnTerminalResizeFunction>(); 357 RegisterFunction<OnTerminalResizeFunction>();
248 #endif 358 #endif
249 359
250 // Websocket to TCP proxy. Currently noop on anything other than ChromeOS. 360 // Websocket to TCP proxy. Currently noop on anything other than ChromeOS.
251 RegisterFunction< 361 RegisterFunction<
252 extensions::WebSocketProxyPrivateGetPassportForTCPFunction>(); 362 extensions::WebSocketProxyPrivateGetPassportForTCPFunction>();
253 RegisterFunction<extensions::WebSocketProxyPrivateGetURLForTCPFunction>(); 363 RegisterFunction<extensions::WebSocketProxyPrivateGetURLForTCPFunction>();
254 364
365 // Debugger
366 RegisterFunction<AttachDebuggerFunction>();
367 RegisterFunction<DetachDebuggerFunction>();
368 RegisterFunction<SendCommandDebuggerFunction>();
369
370 // Settings
371 RegisterFunction<extensions::GetSettingsFunction>();
372 RegisterFunction<extensions::SetSettingsFunction>();
373 RegisterFunction<extensions::RemoveSettingsFunction>();
374 RegisterFunction<extensions::ClearSettingsFunction>();
375 RegisterFunction<extensions::GetBytesInUseSettingsFunction>();
376
377 // Content settings.
378 RegisterFunction<extensions::GetResourceIdentifiersFunction>();
379 RegisterFunction<extensions::ClearContentSettingsFunction>();
380 RegisterFunction<extensions::GetContentSettingFunction>();
381 RegisterFunction<extensions::SetContentSettingFunction>();
382
383 // Font settings.
384 RegisterFunction<extensions::GetFontListFunction>();
385 RegisterFunction<extensions::ClearFontFunction>();
386 RegisterFunction<extensions::GetFontFunction>();
387 RegisterFunction<extensions::SetFontFunction>();
388 RegisterFunction<extensions::ClearDefaultFontSizeFunction>();
389 RegisterFunction<extensions::GetDefaultFontSizeFunction>();
390 RegisterFunction<extensions::SetDefaultFontSizeFunction>();
391 RegisterFunction<extensions::ClearDefaultFixedFontSizeFunction>();
392 RegisterFunction<extensions::GetDefaultFixedFontSizeFunction>();
393 RegisterFunction<extensions::SetDefaultFixedFontSizeFunction>();
394 RegisterFunction<extensions::ClearMinimumFontSizeFunction>();
395 RegisterFunction<extensions::GetMinimumFontSizeFunction>();
396 RegisterFunction<extensions::SetMinimumFontSizeFunction>();
397
398 // CloudPrint settings.
399 RegisterFunction<extensions::CloudPrintSetupConnectorFunction>();
400 RegisterFunction<extensions::CloudPrintGetHostNameFunction>();
401 RegisterFunction<extensions::CloudPrintGetPrintersFunction>();
402
255 // Experimental App API. 403 // Experimental App API.
256 RegisterFunction<extensions::AppNotifyFunction>(); 404 RegisterFunction<extensions::AppNotifyFunction>();
257 RegisterFunction<extensions::AppClearAllNotificationsFunction>(); 405 RegisterFunction<extensions::AppClearAllNotificationsFunction>();
258 406
407 // Permissions
408 RegisterFunction<ContainsPermissionsFunction>();
409 RegisterFunction<GetAllPermissionsFunction>();
410 RegisterFunction<RemovePermissionsFunction>();
411 RegisterFunction<RequestPermissionsFunction>();
412
413 // PageCapture
414 RegisterFunction<extensions::PageCaptureSaveAsMHTMLFunction>();
415
259 // TopSites 416 // TopSites
260 RegisterFunction<extensions::GetTopSitesFunction>(); 417 RegisterFunction<extensions::GetTopSitesFunction>();
261 418
419 // Serial
420 RegisterFunction<extensions::SerialOpenFunction>();
421 RegisterFunction<extensions::SerialCloseFunction>();
422 RegisterFunction<extensions::SerialReadFunction>();
423 RegisterFunction<extensions::SerialWriteFunction>();
424
425 // Sockets
426 RegisterFunction<extensions::SocketCreateFunction>();
427 RegisterFunction<extensions::SocketDestroyFunction>();
428 RegisterFunction<extensions::SocketConnectFunction>();
429 RegisterFunction<extensions::SocketDisconnectFunction>();
430 RegisterFunction<extensions::SocketReadFunction>();
431 RegisterFunction<extensions::SocketWriteFunction>();
432
262 // System 433 // System
263 RegisterFunction<extensions::GetIncognitoModeAvailabilityFunction>(); 434 RegisterFunction<extensions::GetIncognitoModeAvailabilityFunction>();
264 RegisterFunction<extensions::GetUpdateStatusFunction>(); 435 RegisterFunction<extensions::GetUpdateStatusFunction>();
265 436
437 // Net
438 RegisterFunction<extensions::AddRulesFunction>();
439 RegisterFunction<extensions::RemoveRulesFunction>();
440 RegisterFunction<extensions::GetRulesFunction>();
441
266 // Runtime 442 // Runtime
267 RegisterFunction<extensions::RuntimeGetBackgroundPageFunction>(); 443 RegisterFunction<extensions::RuntimeGetBackgroundPageFunction>();
268 RegisterFunction<extensions::RuntimeReloadFunction>(); 444 RegisterFunction<extensions::RuntimeReloadFunction>();
269 RegisterFunction<extensions::RuntimeRequestUpdateCheckFunction>(); 445 RegisterFunction<extensions::RuntimeRequestUpdateCheckFunction>();
270 446
271 // Generated APIs 447 // Generated APIs
272 extensions::api::GeneratedFunctionRegistry::RegisterAll(this); 448 extensions::api::GeneratedFunctionRegistry::RegisterAll(this);
273 #endif // defined(ENABLE_EXTENSIONS) 449 #endif // defined(ENABLE_EXTENSIONS)
274 } 450 }
275 451
(...skipping 17 matching lines...) Expand all
293 } 469 }
294 470
295 ExtensionFunction* ExtensionFunctionRegistry::NewFunction( 471 ExtensionFunction* ExtensionFunctionRegistry::NewFunction(
296 const std::string& name) { 472 const std::string& name) {
297 FactoryMap::iterator iter = factories_.find(name); 473 FactoryMap::iterator iter = factories_.find(name);
298 DCHECK(iter != factories_.end()); 474 DCHECK(iter != factories_.end());
299 ExtensionFunction* function = iter->second(); 475 ExtensionFunction* function = iter->second();
300 function->set_name(name); 476 function->set_name(name);
301 return function; 477 return function;
302 } 478 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/data_deleter.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698