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

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

Issue 7192016: chrome.experimental.downloads (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merged db_handle, id; onCreated, onErased Created 9 years, 5 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) 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_content_settings_api.h" 20 #include "chrome/browser/extensions/extension_content_settings_api.h"
21 #include "chrome/browser/extensions/extension_context_menu_api.h" 21 #include "chrome/browser/extensions/extension_context_menu_api.h"
22 #include "chrome/browser/extensions/extension_cookies_api.h" 22 #include "chrome/browser/extensions/extension_cookies_api.h"
23 #include "chrome/browser/extensions/extension_debugger_api.h" 23 #include "chrome/browser/extensions/extension_debugger_api.h"
24 #include "chrome/browser/extensions/extension_downloads.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_metrics_module.h" 31 #include "chrome/browser/extensions/extension_metrics_module.h"
31 #include "chrome/browser/extensions/extension_module.h" 32 #include "chrome/browser/extensions/extension_module.h"
32 #include "chrome/browser/extensions/extension_omnibox_api.h" 33 #include "chrome/browser/extensions/extension_omnibox_api.h"
33 #include "chrome/browser/extensions/extension_page_actions_module.h" 34 #include "chrome/browser/extensions/extension_page_actions_module.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 372
372 // Content settings. 373 // Content settings.
373 RegisterFunction<GetResourceIdentifiersFunction>(); 374 RegisterFunction<GetResourceIdentifiersFunction>();
374 RegisterFunction<ClearContentSettingsFunction>(); 375 RegisterFunction<ClearContentSettingsFunction>();
375 RegisterFunction<GetContentSettingFunction>(); 376 RegisterFunction<GetContentSettingFunction>();
376 RegisterFunction<SetContentSettingFunction>(); 377 RegisterFunction<SetContentSettingFunction>();
377 378
378 // Experimental App API. 379 // Experimental App API.
379 RegisterFunction<AppNotifyFunction>(); 380 RegisterFunction<AppNotifyFunction>();
380 RegisterFunction<AppClearAllNotificationsFunction>(); 381 RegisterFunction<AppClearAllNotificationsFunction>();
382
383 // Downloads
384 RegisterFunction<DownloadsDownloadFunction>();
385 RegisterFunction<DownloadsSearchFunction>();
386 RegisterFunction<DownloadsPauseFunction>();
387 RegisterFunction<DownloadsResumeFunction>();
388 RegisterFunction<DownloadsCancelFunction>();
389 RegisterFunction<DownloadsEraseFunction>();
390 RegisterFunction<DownloadsSetDestinationFunction>();
391 RegisterFunction<DownloadsAcceptDangerFunction>();
392 RegisterFunction<DownloadsShowFunction>();
393 RegisterFunction<DownloadsDragFunction>();
381 } 394 }
382 395
383 void FactoryRegistry::GetAllNames(std::vector<std::string>* names) { 396 void FactoryRegistry::GetAllNames(std::vector<std::string>* names) {
384 for (FactoryMap::iterator iter = factories_.begin(); 397 for (FactoryMap::iterator iter = factories_.begin();
385 iter != factories_.end(); ++iter) { 398 iter != factories_.end(); ++iter) {
386 names->push_back(iter->first); 399 names->push_back(iter->first);
387 } 400 }
388 } 401 }
389 402
390 bool FactoryRegistry::OverrideFunction(const std::string& name, 403 bool FactoryRegistry::OverrideFunction(const std::string& name,
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 return function; 603 return function;
591 } 604 }
592 605
593 // static 606 // static
594 void ExtensionFunctionDispatcher::SendAccessDenied( 607 void ExtensionFunctionDispatcher::SendAccessDenied(
595 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { 608 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) {
596 ipc_sender->Send(new ExtensionMsg_Response( 609 ipc_sender->Send(new ExtensionMsg_Response(
597 routing_id, request_id, false, std::string(), 610 routing_id, request_id, false, std::string(),
598 "Access to extension API denied.")); 611 "Access to extension API denied."));
599 } 612 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_event_router.cc ('k') | chrome/browser/history/download_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698