| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 #if defined(OS_CHROMEOS) | 90 #if defined(OS_CHROMEOS) |
| 91 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h" | 91 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h" |
| 92 #include "chrome/browser/chromeos/media/media_player_extension_api.h" | 92 #include "chrome/browser/chromeos/media/media_player_extension_api.h" |
| 93 #include "chrome/browser/extensions/api/terminal/terminal_private_api.h" | 93 #include "chrome/browser/extensions/api/terminal/terminal_private_api.h" |
| 94 #include "chrome/browser/extensions/extension_info_private_api_chromeos.h" | 94 #include "chrome/browser/extensions/extension_info_private_api_chromeos.h" |
| 95 #include "chrome/browser/extensions/extension_input_ime_api.h" | 95 #include "chrome/browser/extensions/extension_input_ime_api.h" |
| 96 #include "chrome/browser/extensions/extension_input_method_api.h" | 96 #include "chrome/browser/extensions/extension_input_method_api.h" |
| 97 #endif | 97 #endif |
| 98 | 98 |
| 99 using extensions::ExtensionAPI; | 99 using extensions::ExtensionAPI; |
| 100 using content::RenderViewHost; |
| 100 using WebKit::WebSecurityOrigin; | 101 using WebKit::WebSecurityOrigin; |
| 101 | 102 |
| 102 // FactoryRegistry ------------------------------------------------------------- | 103 // FactoryRegistry ------------------------------------------------------------- |
| 103 | 104 |
| 104 namespace { | 105 namespace { |
| 105 | 106 |
| 106 // Template for defining ExtensionFunctionFactory. | 107 // Template for defining ExtensionFunctionFactory. |
| 107 template<class T> | 108 template<class T> |
| 108 ExtensionFunction* NewExtensionFunction() { | 109 ExtensionFunction* NewExtensionFunction() { |
| 109 return new T(); | 110 return new T(); |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 return function; | 793 return function; |
| 793 } | 794 } |
| 794 | 795 |
| 795 // static | 796 // static |
| 796 void ExtensionFunctionDispatcher::SendAccessDenied( | 797 void ExtensionFunctionDispatcher::SendAccessDenied( |
| 797 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { | 798 IPC::Message::Sender* ipc_sender, int routing_id, int request_id) { |
| 798 ipc_sender->Send(new ExtensionMsg_Response( | 799 ipc_sender->Send(new ExtensionMsg_Response( |
| 799 routing_id, request_id, false, std::string(), | 800 routing_id, request_id, false, std::string(), |
| 800 "Access to extension API denied.")); | 801 "Access to extension API denied.")); |
| 801 } | 802 } |
| OLD | NEW |