| 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/renderer/extensions/chrome_v8_context_set.h" | 5 #include "chrome/renderer/extensions/chrome_v8_context_set.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/tracked_objects.h" | 9 #include "base/tracked_objects.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 if (render_view && render_view != context_render_view) | 131 if (render_view && render_view != context_render_view) |
| 132 continue; | 132 continue; |
| 133 | 133 |
| 134 if (!HasSufficientPermissions(context_render_view, event_url)) | 134 if (!HasSufficientPermissions(context_render_view, event_url)) |
| 135 continue; | 135 continue; |
| 136 | 136 |
| 137 v8::Local<v8::Context> context(*((*it)->v8_context())); | 137 v8::Local<v8::Context> context(*((*it)->v8_context())); |
| 138 std::vector<v8::Handle<v8::Value> > v8_arguments; | 138 std::vector<v8::Handle<v8::Value> > v8_arguments; |
| 139 for (size_t i = 0; i < arguments.GetSize(); ++i) { | 139 for (size_t i = 0; i < arguments.GetSize(); ++i) { |
| 140 base::Value* item = NULL; | 140 const base::Value* item = NULL; |
| 141 CHECK(arguments.Get(i, &item)); | 141 CHECK(arguments.Get(i, &item)); |
| 142 v8_arguments.push_back(converter->ToV8Value(item, context)); | 142 v8_arguments.push_back(converter->ToV8Value(item, context)); |
| 143 } | 143 } |
| 144 | 144 |
| 145 v8::Handle<v8::Value> retval; | 145 v8::Handle<v8::Value> retval; |
| 146 (*it)->CallChromeHiddenMethod( | 146 (*it)->CallChromeHiddenMethod( |
| 147 method_name, v8_arguments.size(), &v8_arguments[0], &retval); | 147 method_name, v8_arguments.size(), &v8_arguments[0], &retval); |
| 148 } | 148 } |
| 149 } | 149 } |
| OLD | NEW |