| 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" |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 474 |
| 475 // Sockets | 475 // Sockets |
| 476 RegisterFunction<extensions::SocketCreateFunction>(); | 476 RegisterFunction<extensions::SocketCreateFunction>(); |
| 477 RegisterFunction<extensions::SocketDestroyFunction>(); | 477 RegisterFunction<extensions::SocketDestroyFunction>(); |
| 478 RegisterFunction<extensions::SocketConnectFunction>(); | 478 RegisterFunction<extensions::SocketConnectFunction>(); |
| 479 RegisterFunction<extensions::SocketCloseFunction>(); | 479 RegisterFunction<extensions::SocketCloseFunction>(); |
| 480 RegisterFunction<extensions::SocketWriteFunction>(); | 480 RegisterFunction<extensions::SocketWriteFunction>(); |
| 481 | 481 |
| 482 // System | 482 // System |
| 483 RegisterFunction<extensions::GetIncognitoModeAvailabilityFunction>(); | 483 RegisterFunction<extensions::GetIncognitoModeAvailabilityFunction>(); |
| 484 RegisterFunction<extensions::GetUpdateStatusFunction>(); |
| 484 } | 485 } |
| 485 | 486 |
| 486 void FactoryRegistry::GetAllNames(std::vector<std::string>* names) { | 487 void FactoryRegistry::GetAllNames(std::vector<std::string>* names) { |
| 487 for (FactoryMap::iterator iter = factories_.begin(); | 488 for (FactoryMap::iterator iter = factories_.begin(); |
| 488 iter != factories_.end(); ++iter) { | 489 iter != factories_.end(); ++iter) { |
| 489 names->push_back(iter->first); | 490 names->push_back(iter->first); |
| 490 } | 491 } |
| 491 } | 492 } |
| 492 | 493 |
| 493 bool FactoryRegistry::OverrideFunction(const std::string& name, | 494 bool FactoryRegistry::OverrideFunction(const std::string& name, |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 return function; | 689 return function; |
| 689 } | 690 } |
| 690 | 691 |
| 691 // static | 692 // static |
| 692 void ExtensionFunctionDispatcher::SendAccessDenied( | 693 void ExtensionFunctionDispatcher::SendAccessDenied( |
| 693 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { | 694 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { |
| 694 ipc_sender->Send(new ExtensionMsg_Response( | 695 ipc_sender->Send(new ExtensionMsg_Response( |
| 695 routing_id, request_id, false, std::string(), | 696 routing_id, request_id, false, std::string(), |
| 696 "Access to extension API denied.")); | 697 "Access to extension API denied.")); |
| 697 } | 698 } |
| OLD | NEW |