OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
15 #include "base/singleton.h" | 15 #include "base/singleton.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.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/url_pattern.h" | 20 #include "chrome/common/extensions/url_pattern.h" |
21 #include "chrome/common/render_messages.h" | 21 #include "chrome/common/render_messages.h" |
| 22 #include "chrome/common/render_messages_params.h" |
22 #include "chrome/common/url_constants.h" | 23 #include "chrome/common/url_constants.h" |
23 #include "chrome/renderer/extensions/bindings_utils.h" | 24 #include "chrome/renderer/extensions/bindings_utils.h" |
24 #include "chrome/renderer/extensions/event_bindings.h" | 25 #include "chrome/renderer/extensions/event_bindings.h" |
25 #include "chrome/renderer/extensions/js_only_v8_extensions.h" | 26 #include "chrome/renderer/extensions/js_only_v8_extensions.h" |
26 #include "chrome/renderer/extensions/renderer_extension_bindings.h" | 27 #include "chrome/renderer/extensions/renderer_extension_bindings.h" |
27 #include "chrome/renderer/user_script_slave.h" | 28 #include "chrome/renderer/user_script_slave.h" |
28 #include "chrome/renderer/render_thread.h" | 29 #include "chrome/renderer/render_thread.h" |
29 #include "chrome/renderer/render_view.h" | 30 #include "chrome/renderer/render_view.h" |
30 #include "chrome/renderer/render_view_visitor.h" | 31 #include "chrome/renderer/render_view_visitor.h" |
31 #include "grit/common_resources.h" | 32 #include "grit/common_resources.h" |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 const std::string& function_name) { | 711 const std::string& function_name) { |
711 static const char kMessage[] = | 712 static const char kMessage[] = |
712 "You do not have permission to use '%s'. Be sure to declare" | 713 "You do not have permission to use '%s'. Be sure to declare" |
713 " in your manifest what permissions you need."; | 714 " in your manifest what permissions you need."; |
714 std::string error_msg = StringPrintf(kMessage, function_name.c_str()); | 715 std::string error_msg = StringPrintf(kMessage, function_name.c_str()); |
715 | 716 |
716 return v8::ThrowException(v8::Exception::Error( | 717 return v8::ThrowException(v8::Exception::Error( |
717 v8::String::New(error_msg.c_str()))); | 718 v8::String::New(error_msg.c_str()))); |
718 } | 719 } |
719 | 720 |
OLD | NEW |