| 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/renderer/extensions/extension_process_bindings.h" | 5 #include "chrome/renderer/extensions/extension_process_bindings.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
| 14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
| 17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
| 18 #include "chrome/common/extensions/extension.h" | 18 #include "chrome/common/extensions/extension.h" |
| 19 #include "chrome/common/extensions/extension_constants.h" | 19 #include "chrome/common/extensions/extension_constants.h" |
| 20 #include "chrome/common/extensions/extension_messages.h" | 20 #include "chrome/common/extensions/extension_messages.h" |
| 21 #include "chrome/common/extensions/extension_set.h" | 21 #include "chrome/common/extensions/extension_set.h" |
| 22 #include "chrome/common/extensions/url_pattern.h" | 22 #include "chrome/common/extensions/url_pattern.h" |
| 23 #include "chrome/common/render_messages.h" | 23 #include "chrome/common/render_messages.h" |
| 24 #include "chrome/common/render_messages_params.h" | |
| 25 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 26 #include "chrome/renderer/extensions/bindings_utils.h" | 25 #include "chrome/renderer/extensions/bindings_utils.h" |
| 27 #include "chrome/renderer/extensions/event_bindings.h" | 26 #include "chrome/renderer/extensions/event_bindings.h" |
| 28 #include "chrome/renderer/extensions/js_only_v8_extensions.h" | 27 #include "chrome/renderer/extensions/js_only_v8_extensions.h" |
| 29 #include "chrome/renderer/extensions/renderer_extension_bindings.h" | 28 #include "chrome/renderer/extensions/renderer_extension_bindings.h" |
| 30 #include "chrome/renderer/user_script_slave.h" | 29 #include "chrome/renderer/user_script_slave.h" |
| 31 #include "chrome/renderer/render_thread.h" | 30 #include "chrome/renderer/render_thread.h" |
| 32 #include "content/renderer/render_view.h" | 31 #include "content/renderer/render_view.h" |
| 33 #include "content/renderer/render_view_visitor.h" | 32 #include "content/renderer/render_view_visitor.h" |
| 34 #include "grit/common_resources.h" | 33 #include "grit/common_resources.h" |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 ExtensionProcessBindings::ThrowPermissionDeniedException( | 648 ExtensionProcessBindings::ThrowPermissionDeniedException( |
| 650 const std::string& function_name) { | 649 const std::string& function_name) { |
| 651 static const char kMessage[] = | 650 static const char kMessage[] = |
| 652 "You do not have permission to use '%s'. Be sure to declare" | 651 "You do not have permission to use '%s'. Be sure to declare" |
| 653 " in your manifest what permissions you need."; | 652 " in your manifest what permissions you need."; |
| 654 std::string error_msg = StringPrintf(kMessage, function_name.c_str()); | 653 std::string error_msg = StringPrintf(kMessage, function_name.c_str()); |
| 655 | 654 |
| 656 return v8::ThrowException(v8::Exception::Error( | 655 return v8::ThrowException(v8::Exception::Error( |
| 657 v8::String::New(error_msg.c_str()))); | 656 v8::String::New(error_msg.c_str()))); |
| 658 } | 657 } |
| OLD | NEW |