| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_string_value_serializer.h" | 8 #include "base/json/json_string_value_serializer.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "chrome/common/extensions/extension_set.h" | 29 #include "chrome/common/extensions/extension_set.h" |
| 30 #include "chrome/common/url_constants.h" | 30 #include "chrome/common/url_constants.h" |
| 31 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
| 32 #include "content/public/browser/render_process_host.h" | 32 #include "content/public/browser/render_process_host.h" |
| 33 #include "content/public/browser/render_view_host.h" | 33 #include "content/public/browser/render_view_host.h" |
| 34 #include "content/public/browser/render_view_host_observer.h" | 34 #include "content/public/browser/render_view_host_observer.h" |
| 35 #include "content/public/browser/user_metrics.h" | 35 #include "content/public/browser/user_metrics.h" |
| 36 #include "content/public/common/result_codes.h" | 36 #include "content/public/common/result_codes.h" |
| 37 #include "ipc/ipc_message.h" | 37 #include "ipc/ipc_message.h" |
| 38 #include "ipc/ipc_message_macros.h" | 38 #include "ipc/ipc_message_macros.h" |
| 39 #include "webkit/glue/resource_type.h" | 39 #include "webkit/common/resource_type.h" |
| 40 | 40 |
| 41 using extensions::Extension; | 41 using extensions::Extension; |
| 42 using extensions::ExtensionAPI; | 42 using extensions::ExtensionAPI; |
| 43 using content::RenderViewHost; | 43 using content::RenderViewHost; |
| 44 | 44 |
| 45 namespace { | 45 namespace { |
| 46 | 46 |
| 47 void LogSuccess(const std::string& extension_id, | 47 void LogSuccess(const std::string& extension_id, |
| 48 const std::string& api_name, | 48 const std::string& api_name, |
| 49 scoped_ptr<base::ListValue> args, | 49 scoped_ptr<base::ListValue> args, |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 return function; | 533 return function; |
| 534 } | 534 } |
| 535 | 535 |
| 536 // static | 536 // static |
| 537 void ExtensionFunctionDispatcher::SendAccessDenied( | 537 void ExtensionFunctionDispatcher::SendAccessDenied( |
| 538 const ExtensionFunction::ResponseCallback& callback) { | 538 const ExtensionFunction::ResponseCallback& callback) { |
| 539 ListValue empty_list; | 539 ListValue empty_list; |
| 540 callback.Run(ExtensionFunction::FAILED, empty_list, | 540 callback.Run(ExtensionFunction::FAILED, empty_list, |
| 541 "Access to extension API denied."); | 541 "Access to extension API denied."); |
| 542 } | 542 } |
| OLD | NEW |