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_chrome_auth_private_api.h" |
19 #include "chrome/browser/extensions/extension_content_settings_api.h" | 20 #include "chrome/browser/extensions/extension_content_settings_api.h" |
20 #include "chrome/browser/extensions/extension_context_menu_api.h" | 21 #include "chrome/browser/extensions/extension_context_menu_api.h" |
21 #include "chrome/browser/extensions/extension_cookies_api.h" | 22 #include "chrome/browser/extensions/extension_cookies_api.h" |
22 #include "chrome/browser/extensions/extension_debugger_api.h" | 23 #include "chrome/browser/extensions/extension_debugger_api.h" |
23 #include "chrome/browser/extensions/extension_function.h" | 24 #include "chrome/browser/extensions/extension_function.h" |
24 #include "chrome/browser/extensions/extension_history_api.h" | 25 #include "chrome/browser/extensions/extension_history_api.h" |
25 #include "chrome/browser/extensions/extension_i18n_api.h" | 26 #include "chrome/browser/extensions/extension_i18n_api.h" |
26 #include "chrome/browser/extensions/extension_idle_api.h" | 27 #include "chrome/browser/extensions/extension_idle_api.h" |
27 #include "chrome/browser/extensions/extension_infobar_module.h" | 28 #include "chrome/browser/extensions/extension_infobar_module.h" |
28 #include "chrome/browser/extensions/extension_management_api.h" | 29 #include "chrome/browser/extensions/extension_management_api.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // Debugger | 364 // Debugger |
364 RegisterFunction<AttachDebuggerFunction>(); | 365 RegisterFunction<AttachDebuggerFunction>(); |
365 RegisterFunction<DetachDebuggerFunction>(); | 366 RegisterFunction<DetachDebuggerFunction>(); |
366 RegisterFunction<SendRequestDebuggerFunction>(); | 367 RegisterFunction<SendRequestDebuggerFunction>(); |
367 | 368 |
368 // Content settings. | 369 // Content settings. |
369 RegisterFunction<GetResourceIdentifiersFunction>(); | 370 RegisterFunction<GetResourceIdentifiersFunction>(); |
370 RegisterFunction<ClearContentSettingsFunction>(); | 371 RegisterFunction<ClearContentSettingsFunction>(); |
371 RegisterFunction<GetContentSettingFunction>(); | 372 RegisterFunction<GetContentSettingFunction>(); |
372 RegisterFunction<SetContentSettingFunction>(); | 373 RegisterFunction<SetContentSettingFunction>(); |
| 374 |
| 375 // ChromeAuth settings. |
| 376 RegisterFunction<SetCloudPrintCredentialsFunction>(); |
373 } | 377 } |
374 | 378 |
375 void FactoryRegistry::GetAllNames(std::vector<std::string>* names) { | 379 void FactoryRegistry::GetAllNames(std::vector<std::string>* names) { |
376 for (FactoryMap::iterator iter = factories_.begin(); | 380 for (FactoryMap::iterator iter = factories_.begin(); |
377 iter != factories_.end(); ++iter) { | 381 iter != factories_.end(); ++iter) { |
378 names->push_back(iter->first); | 382 names->push_back(iter->first); |
379 } | 383 } |
380 } | 384 } |
381 | 385 |
382 bool FactoryRegistry::OverrideFunction(const std::string& name, | 386 bool FactoryRegistry::OverrideFunction(const std::string& name, |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 return function; | 586 return function; |
583 } | 587 } |
584 | 588 |
585 // static | 589 // static |
586 void ExtensionFunctionDispatcher::SendAccessDenied( | 590 void ExtensionFunctionDispatcher::SendAccessDenied( |
587 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { | 591 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { |
588 ipc_sender->Send(new ExtensionMsg_Response( | 592 ipc_sender->Send(new ExtensionMsg_Response( |
589 routing_id, request_id, false, std::string(), | 593 routing_id, request_id, false, std::string(), |
590 "Access to extension API denied.")); | 594 "Access to extension API denied.")); |
591 } | 595 } |
OLD | NEW |