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

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

Issue 7720002: Chrome Extensions chrome.experimental.offscreenTabs.* API implementation, docs, and test. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_offscreen_tabs_apitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/extensions/extension_debugger_api.h" 25 #include "chrome/browser/extensions/extension_debugger_api.h"
26 #include "chrome/browser/extensions/extension_downloads_api.h" 26 #include "chrome/browser/extensions/extension_downloads_api.h"
27 #include "chrome/browser/extensions/extension_function.h" 27 #include "chrome/browser/extensions/extension_function.h"
28 #include "chrome/browser/extensions/extension_history_api.h" 28 #include "chrome/browser/extensions/extension_history_api.h"
29 #include "chrome/browser/extensions/extension_i18n_api.h" 29 #include "chrome/browser/extensions/extension_i18n_api.h"
30 #include "chrome/browser/extensions/extension_idle_api.h" 30 #include "chrome/browser/extensions/extension_idle_api.h"
31 #include "chrome/browser/extensions/extension_infobar_module.h" 31 #include "chrome/browser/extensions/extension_infobar_module.h"
32 #include "chrome/browser/extensions/extension_management_api.h" 32 #include "chrome/browser/extensions/extension_management_api.h"
33 #include "chrome/browser/extensions/extension_metrics_module.h" 33 #include "chrome/browser/extensions/extension_metrics_module.h"
34 #include "chrome/browser/extensions/extension_module.h" 34 #include "chrome/browser/extensions/extension_module.h"
35 #include "chrome/browser/extensions/extension_offscreen_tabs_module.h"
35 #include "chrome/browser/extensions/extension_omnibox_api.h" 36 #include "chrome/browser/extensions/extension_omnibox_api.h"
36 #include "chrome/browser/extensions/extension_page_actions_module.h" 37 #include "chrome/browser/extensions/extension_page_actions_module.h"
37 #include "chrome/browser/extensions/extension_permissions_api.h" 38 #include "chrome/browser/extensions/extension_permissions_api.h"
38 #include "chrome/browser/extensions/extension_preference_api.h" 39 #include "chrome/browser/extensions/extension_preference_api.h"
39 #include "chrome/browser/extensions/extension_processes_api.h" 40 #include "chrome/browser/extensions/extension_processes_api.h"
40 #include "chrome/browser/extensions/extension_proxy_api.h" 41 #include "chrome/browser/extensions/extension_proxy_api.h"
41 #include "chrome/browser/extensions/extension_rlz_module.h" 42 #include "chrome/browser/extensions/extension_rlz_module.h"
42 #include "chrome/browser/extensions/extension_service.h" 43 #include "chrome/browser/extensions/extension_service.h"
43 #include "chrome/browser/extensions/extension_settings_api.h" 44 #include "chrome/browser/extensions/extension_settings_api.h"
44 #include "chrome/browser/extensions/extension_sidebar_api.h" 45 #include "chrome/browser/extensions/extension_sidebar_api.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 RegisterFunction<DownloadsDownloadFunction>(); 441 RegisterFunction<DownloadsDownloadFunction>();
441 RegisterFunction<DownloadsSearchFunction>(); 442 RegisterFunction<DownloadsSearchFunction>();
442 RegisterFunction<DownloadsPauseFunction>(); 443 RegisterFunction<DownloadsPauseFunction>();
443 RegisterFunction<DownloadsResumeFunction>(); 444 RegisterFunction<DownloadsResumeFunction>();
444 RegisterFunction<DownloadsCancelFunction>(); 445 RegisterFunction<DownloadsCancelFunction>();
445 RegisterFunction<DownloadsEraseFunction>(); 446 RegisterFunction<DownloadsEraseFunction>();
446 RegisterFunction<DownloadsSetDestinationFunction>(); 447 RegisterFunction<DownloadsSetDestinationFunction>();
447 RegisterFunction<DownloadsAcceptDangerFunction>(); 448 RegisterFunction<DownloadsAcceptDangerFunction>();
448 RegisterFunction<DownloadsShowFunction>(); 449 RegisterFunction<DownloadsShowFunction>();
449 RegisterFunction<DownloadsDragFunction>(); 450 RegisterFunction<DownloadsDragFunction>();
451
452 // Experimental Offscreen Tabs
453 RegisterFunction<CreateOffscreenTabFunction>();
454 RegisterFunction<GetOffscreenTabFunction>();
455 RegisterFunction<GetAllOffscreenTabFunction>();
456 RegisterFunction<RemoveOffscreenTabFunction>();
457 RegisterFunction<SendKeyboardEventOffscreenTabFunction>();
458 RegisterFunction<SendMouseEventOffscreenTabFunction>();
459 RegisterFunction<ToDataUrlOffscreenTabFunction>();
460 RegisterFunction<UpdateOffscreenTabFunction>();
450 } 461 }
451 462
452 void FactoryRegistry::GetAllNames(std::vector<std::string>* names) { 463 void FactoryRegistry::GetAllNames(std::vector<std::string>* names) {
453 for (FactoryMap::iterator iter = factories_.begin(); 464 for (FactoryMap::iterator iter = factories_.begin();
454 iter != factories_.end(); ++iter) { 465 iter != factories_.end(); ++iter) {
455 names->push_back(iter->first); 466 names->push_back(iter->first);
456 } 467 }
457 } 468 }
458 469
459 bool FactoryRegistry::OverrideFunction(const std::string& name, 470 bool FactoryRegistry::OverrideFunction(const std::string& name,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 return function; 671 return function;
661 } 672 }
662 673
663 // static 674 // static
664 void ExtensionFunctionDispatcher::SendAccessDenied( 675 void ExtensionFunctionDispatcher::SendAccessDenied(
665 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { 676 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) {
666 ipc_sender->Send(new ExtensionMsg_Response( 677 ipc_sender->Send(new ExtensionMsg_Response(
667 routing_id, request_id, false, std::string(), 678 routing_id, request_id, false, std::string(),
668 "Access to extension API denied.")); 679 "Access to extension API denied."));
669 } 680 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_offscreen_tabs_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698