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_app_api.h" | 16 #include "chrome/browser/extensions/extension_app_api.h" |
17 #include "chrome/browser/extensions/extension_bookmark_manager_api.h" | 17 #include "chrome/browser/extensions/extension_bookmark_manager_api.h" |
18 #include "chrome/browser/extensions/extension_bookmarks_module.h" | 18 #include "chrome/browser/extensions/extension_bookmarks_module.h" |
19 #include "chrome/browser/extensions/extension_browser_actions_api.h" | 19 #include "chrome/browser/extensions/extension_browser_actions_api.h" |
| 20 #include "chrome/browser/extensions/extension_clear_api.h" |
20 #include "chrome/browser/extensions/extension_chrome_auth_private_api.h" | 21 #include "chrome/browser/extensions/extension_chrome_auth_private_api.h" |
21 #include "chrome/browser/extensions/extension_content_settings_api.h" | 22 #include "chrome/browser/extensions/extension_content_settings_api.h" |
22 #include "chrome/browser/extensions/extension_context_menu_api.h" | 23 #include "chrome/browser/extensions/extension_context_menu_api.h" |
23 #include "chrome/browser/extensions/extension_cookies_api.h" | 24 #include "chrome/browser/extensions/extension_cookies_api.h" |
24 #include "chrome/browser/extensions/extension_debugger_api.h" | 25 #include "chrome/browser/extensions/extension_debugger_api.h" |
25 #include "chrome/browser/extensions/extension_downloads_api.h" | 26 #include "chrome/browser/extensions/extension_downloads_api.h" |
26 #include "chrome/browser/extensions/extension_function.h" | 27 #include "chrome/browser/extensions/extension_function.h" |
27 #include "chrome/browser/extensions/extension_history_api.h" | 28 #include "chrome/browser/extensions/extension_history_api.h" |
28 #include "chrome/browser/extensions/extension_i18n_api.h" | 29 #include "chrome/browser/extensions/extension_i18n_api.h" |
29 #include "chrome/browser/extensions/extension_idle_api.h" | 30 #include "chrome/browser/extensions/extension_idle_api.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 RegisterFunction<PageActionSetTitleFunction>(); | 162 RegisterFunction<PageActionSetTitleFunction>(); |
162 RegisterFunction<PageActionSetPopupFunction>(); | 163 RegisterFunction<PageActionSetPopupFunction>(); |
163 | 164 |
164 // Browser Actions. | 165 // Browser Actions. |
165 RegisterFunction<BrowserActionSetIconFunction>(); | 166 RegisterFunction<BrowserActionSetIconFunction>(); |
166 RegisterFunction<BrowserActionSetTitleFunction>(); | 167 RegisterFunction<BrowserActionSetTitleFunction>(); |
167 RegisterFunction<BrowserActionSetBadgeTextFunction>(); | 168 RegisterFunction<BrowserActionSetBadgeTextFunction>(); |
168 RegisterFunction<BrowserActionSetBadgeBackgroundColorFunction>(); | 169 RegisterFunction<BrowserActionSetBadgeBackgroundColorFunction>(); |
169 RegisterFunction<BrowserActionSetPopupFunction>(); | 170 RegisterFunction<BrowserActionSetPopupFunction>(); |
170 | 171 |
| 172 // Browsing Data. |
| 173 RegisterFunction<ClearBrowsingDataFunction>(); |
| 174 RegisterFunction<ClearCacheFunction>(); |
| 175 RegisterFunction<ClearCookiesFunction>(); |
| 176 RegisterFunction<ClearDownloadsFunction>(); |
| 177 RegisterFunction<ClearFormDataFunction>(); |
| 178 RegisterFunction<ClearHistoryFunction>(); |
| 179 RegisterFunction<ClearPasswordsFunction>(); |
| 180 |
171 // Bookmarks. | 181 // Bookmarks. |
172 RegisterFunction<GetBookmarksFunction>(); | 182 RegisterFunction<GetBookmarksFunction>(); |
173 RegisterFunction<GetBookmarkChildrenFunction>(); | 183 RegisterFunction<GetBookmarkChildrenFunction>(); |
174 RegisterFunction<GetBookmarkRecentFunction>(); | 184 RegisterFunction<GetBookmarkRecentFunction>(); |
175 RegisterFunction<GetBookmarkTreeFunction>(); | 185 RegisterFunction<GetBookmarkTreeFunction>(); |
176 RegisterFunction<GetBookmarkSubTreeFunction>(); | 186 RegisterFunction<GetBookmarkSubTreeFunction>(); |
177 RegisterFunction<SearchBookmarksFunction>(); | 187 RegisterFunction<SearchBookmarksFunction>(); |
178 RegisterFunction<RemoveBookmarkFunction>(); | 188 RegisterFunction<RemoveBookmarkFunction>(); |
179 RegisterFunction<RemoveTreeBookmarkFunction>(); | 189 RegisterFunction<RemoveTreeBookmarkFunction>(); |
180 RegisterFunction<CreateBookmarkFunction>(); | 190 RegisterFunction<CreateBookmarkFunction>(); |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 return function; | 657 return function; |
648 } | 658 } |
649 | 659 |
650 // static | 660 // static |
651 void ExtensionFunctionDispatcher::SendAccessDenied( | 661 void ExtensionFunctionDispatcher::SendAccessDenied( |
652 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { | 662 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { |
653 ipc_sender->Send(new ExtensionMsg_Response( | 663 ipc_sender->Send(new ExtensionMsg_Response( |
654 routing_id, request_id, false, std::string(), | 664 routing_id, request_id, false, std::string(), |
655 "Access to extension API denied.")); | 665 "Access to extension API denied.")); |
656 } | 666 } |
OLD | NEW |