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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 struct Static { | 87 struct Static { |
88 Static() | 88 Static() |
89 : api(extensions::ExtensionAPI::CreateWithDefaultConfiguration()) { | 89 : api(extensions::ExtensionAPI::CreateWithDefaultConfiguration()) { |
90 } | 90 } |
91 scoped_ptr<extensions::ExtensionAPI> api; | 91 scoped_ptr<extensions::ExtensionAPI> api; |
92 }; | 92 }; |
93 base::LazyInstance<Static> g_global_io_data = LAZY_INSTANCE_INITIALIZER; | 93 base::LazyInstance<Static> g_global_io_data = LAZY_INSTANCE_INITIALIZER; |
94 | 94 |
95 } // namespace | 95 } // namespace |
96 | 96 |
97 ExtensionWindowController* | 97 extensions::WindowController* |
98 ExtensionFunctionDispatcher::Delegate::GetExtensionWindowController() | 98 ExtensionFunctionDispatcher::Delegate::GetExtensionWindowController() |
99 const { | 99 const { |
100 return NULL; | 100 return NULL; |
101 } | 101 } |
102 | 102 |
103 content::WebContents* | 103 content::WebContents* |
104 ExtensionFunctionDispatcher::Delegate::GetAssociatedWebContents() const { | 104 ExtensionFunctionDispatcher::Delegate::GetAssociatedWebContents() const { |
105 return NULL; | 105 return NULL; |
106 } | 106 } |
107 | 107 |
108 void ExtensionFunctionDispatcher::GetAllFunctionNames( | 108 void ExtensionFunctionDispatcher::GetAllFunctionNames( |
109 std::vector<std::string>* names) { | 109 std::vector<std::string>* names) { |
110 ExtensionFunctionRegistry::GetInstance()->GetAllNames(names); | 110 ExtensionFunctionRegistry::GetInstance()->GetAllNames(names); |
111 } | 111 } |
112 | 112 |
113 bool ExtensionFunctionDispatcher::OverrideFunction( | 113 bool ExtensionFunctionDispatcher::OverrideFunction( |
114 const std::string& name, ExtensionFunctionFactory factory) { | 114 const std::string& name, ExtensionFunctionFactory factory) { |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 287 } |
288 | 288 |
289 // static | 289 // static |
290 void ExtensionFunctionDispatcher::SendAccessDenied( | 290 void ExtensionFunctionDispatcher::SendAccessDenied( |
291 IPC::Sender* ipc_sender, int routing_id, int request_id) { | 291 IPC::Sender* ipc_sender, int routing_id, int request_id) { |
292 ListValue empty_list; | 292 ListValue empty_list; |
293 ipc_sender->Send(new ExtensionMsg_Response( | 293 ipc_sender->Send(new ExtensionMsg_Response( |
294 routing_id, request_id, false, empty_list, | 294 routing_id, request_id, false, empty_list, |
295 "Access to extension API denied.")); | 295 "Access to extension API denied.")); |
296 } | 296 } |
OLD | NEW |